diff --git a/404.html b/404.html index 30c3375d..9053f6d3 100644 --- a/404.html +++ b/404.html @@ -2,10 +2,10 @@ - + Page Not Found | Docusaurus JSON Schema Plugin - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

diff --git a/assets/js/0446378f.a64ee537.js b/assets/js/0446378f.ef015516.js similarity index 82% rename from assets/js/0446378f.a64ee537.js rename to assets/js/0446378f.ef015516.js index c6dd8378..a174bc00 100644 --- a/assets/js/0446378f.a64ee537.js +++ b/assets/js/0446378f.ef015516.js @@ -1 +1 @@ -(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7889,8180],{1936:(e,s,a)=>{"use strict";a.r(s),a.d(s,{assets:()=>j,contentTitle:()=>x,default:()=>g,frontMatter:()=>u,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/refs/localFile","title":"\ud83d\udcc1$ref (as local file)","description":"References local file $ref showcase","source":"@site/docs/demo-viewer/refs/localFile.mdx","sourceDirName":"demo-viewer/refs","slug":"/demo-viewer/refs/localFile","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/refs/localFile.mdx","tags":[],"version":"current","frontMatter":{"description":"References local file $ref showcase","title":"\ud83d\udcc1$ref (as local file)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcce References","permalink":"/docusaurus-json-schema-plugin/docs/category/-references"},"next":{"title":"\ud83d\udca1 $ref (inline)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref"}}');var t=a(62540),o=a(28453),m=a(21432),c=a(8180),l=a(21344),r=a.n(l),i=a(96988),p=a(29585),h=a(11470),d=a(19365);const u={description:"References local file $ref showcase",title:"\ud83d\udcc1$ref (as local file)"},x="$ref (as local file)",j={},f=[];function y(e){const s={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"ref-as-local-file",children:"$ref (as local file)"})}),"\n",(0,t.jsxs)(h.default,{children:[(0,t.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(r(),{schema:c,resolverOptions:(0,i.A)({basePath:"/schemas/examples/refs"})})}),(0,t.jsx)(d.default,{value:"resolverOptions",label:"resolverOptions",children:(0,t.jsx)(m.default,{language:"js",children:`${(0,p.A)((0,i.A)({basePath:"/schemas/examples/refs"}))}`})}),(0,t.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(m.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function g(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(y,{...e})}):y(e)}},96988:(e,s,a)=>{"use strict";function n(e){return void 0===e&&(e=""),{resolve:s=>new Promise(((n,t)=>{const o=function(e,s){void 0===s&&(s="");const a=e.toString().split("/");let n=s;for(let t=0;tn(e.default))).catch((e=>t(e)))}))}}function t(e){return void 0===e&&(e="http"),{resolve:e=>new Promise(((s,a)=>{fetch(e.toString(),{headers:{Accept:"application/json"}}).then((e=>e.json())).then((e=>s(e))).catch((e=>a(e)))}))}}function o(e){const{basePath:s,jsonPointer:a,remote:o}=e;let m={};return s&&(m.resolvers={file:n(s)}),o&&(void 0===m.resolvers&&(m.resolvers={}),m.resolvers.http=t("http"),m.resolvers.https=t("https")),a&&(m.jsonPointer=a),m}a.d(s,{A:()=>o})},29585:(e,s,a)=>{"use strict";function n(e,s){void 0===s&&(s=2);return`{\n${Object.keys(e).map((a=>{const t=e[a];if("function"==typeof t){const e=t.toString().match(/function\s+([\w$]+)\s*\(([^)]*)\)/),n=e?e[1]:"anonymous",o=e?e[2].split(",").map((e=>e.trim())).join(", "):"";return`${" ".repeat(s)}${a}: function ${n}(${o}) { /* function body */ },`}return"object"!=typeof t||Array.isArray(t)||null===t?`${" ".repeat(s)}${a}: ${JSON.stringify(t)},`:`${" ".repeat(s)}${a}: ${n(t,s+2)},`})).join("\n")}\n${" ".repeat(s-2)}}`}a.d(s,{A:()=>n})},59620:(e,s,a)=>{var n={"./img/favicon.ico":[32532,9,2532],"./img/gear-tools.svg":[19229,9,9229],"./img/logo.svg":[18187,9,8187],"./img/opensource-icon.svg":[16949,9,6949],"./img/project_icon.svg":[30635,9,635],"./img/undraw_code_review.svg":[82022,9,2022],"./schemas/examples/array/additionalItems1":[77240,3,7240],"./schemas/examples/array/additionalItems1.json":[77240,3,7240],"./schemas/examples/array/additionalItems2":[24629,3,4629],"./schemas/examples/array/additionalItems2.json":[24629,3,4629],"./schemas/examples/array/contains":[49567,3,9567],"./schemas/examples/array/contains.json":[49567,3,9567],"./schemas/examples/array/items":[4082,3,4082],"./schemas/examples/array/items.json":[4082,3,4082],"./schemas/examples/array/length":[18210,3,8210],"./schemas/examples/array/length.json":[18210,3,8210],"./schemas/examples/array/minContainsAndMaxContains":[53839,3,3839],"./schemas/examples/array/minContainsAndMaxContains.json":[53839,3,3839],"./schemas/examples/array/simple":[56864,3,6864],"./schemas/examples/array/simple.json":[56864,3,6864],"./schemas/examples/array/tuples":[62441,3,2441],"./schemas/examples/array/tuples.json":[62441,3,2441],"./schemas/examples/array/unevaluatedItems1":[9933,3,9933],"./schemas/examples/array/unevaluatedItems1.json":[9933,3,9933],"./schemas/examples/array/unevaluatedItems2":[54416,3,4416],"./schemas/examples/array/unevaluatedItems2.json":[54416,3,4416],"./schemas/examples/array/uniqueItems":[97095,3,7095],"./schemas/examples/array/uniqueItems.json":[97095,3,7095],"./schemas/examples/boolean/simple":[9175,3,9175],"./schemas/examples/boolean/simple.json":[9175,3,9175],"./schemas/examples/custom/description":[37662,3,7662],"./schemas/examples/custom/description.json":[37662,3,7662],"./schemas/examples/custom/unresolved_refs":[52498,3,2498],"./schemas/examples/custom/unresolved_refs.json":[52498,3,2498],"./schemas/examples/custom/values":[66546,3,6546],"./schemas/examples/custom/values.json":[66546,3,6546],"./schemas/examples/generic_keywords/annotations":[63563,3,3563],"./schemas/examples/generic_keywords/annotations.json":[63563,3,3563],"./schemas/examples/generic_keywords/const":[14130,3,4130],"./schemas/examples/generic_keywords/const.json":[14130,3,4130],"./schemas/examples/generic_keywords/enum":[4534,3,4534],"./schemas/examples/generic_keywords/enum.json":[4534,3,4534],"./schemas/examples/null/simple":[5040,3,5040],"./schemas/examples/null/simple.json":[5040,3,5040],"./schemas/examples/numeric/integer":[2910,3,2910],"./schemas/examples/numeric/integer.json":[2910,3,2910],"./schemas/examples/numeric/multipleOf":[94369,3,4369],"./schemas/examples/numeric/multipleOf.json":[94369,3,4369],"./schemas/examples/numeric/number":[99621,3,9621],"./schemas/examples/numeric/number.json":[99621,3,9621],"./schemas/examples/numeric/ranges":[9086,3,9086],"./schemas/examples/numeric/ranges.json":[9086,3,9086],"./schemas/examples/object/additionalProperties":[16368,3,6368],"./schemas/examples/object/additionalProperties.json":[16368,3,6368],"./schemas/examples/object/additionalProperties2":[47434,3,7434],"./schemas/examples/object/additionalProperties2.json":[47434,3,7434],"./schemas/examples/object/additionalPropertiesWithPatternProperties":[55951,3,5951],"./schemas/examples/object/additionalPropertiesWithPatternProperties.json":[55951,3,5951],"./schemas/examples/object/patternProperties":[17555,3,7555],"./schemas/examples/object/patternProperties.json":[17555,3,7555],"./schemas/examples/object/properties":[37669,3,7669],"./schemas/examples/object/properties.json":[37669,3,7669],"./schemas/examples/object/propertyNames":[55607,3,5607],"./schemas/examples/object/propertyNames.json":[55607,3,5607],"./schemas/examples/object/required":[68369,3,8369],"./schemas/examples/object/required.json":[68369,3,8369],"./schemas/examples/object/simpleObject":[93289,3,3289],"./schemas/examples/object/simpleObject.json":[93289,3,3289],"./schemas/examples/object/size":[75113,3,5113],"./schemas/examples/object/size.json":[75113,3,5113],"./schemas/examples/object/unevaluatedProperties":[34437,3,4437],"./schemas/examples/object/unevaluatedProperties.json":[34437,3,4437],"./schemas/examples/object/unevaluatedProperties1":[44360,3,4360],"./schemas/examples/object/unevaluatedProperties1.json":[44360,3,4360],"./schemas/examples/object/unevaluatedProperties2":[30277,3,277],"./schemas/examples/object/unevaluatedProperties2.json":[30277,3,277],"./schemas/examples/refs/localFile":[8180,3,8180],"./schemas/examples/refs/localFile.json":[8180,3,8180],"./schemas/examples/refs/refOnRoot":[63601,3,3601],"./schemas/examples/refs/refOnRoot.json":[63601,3,3601],"./schemas/examples/refs/remoteRef":[16474,3,6474],"./schemas/examples/refs/remoteRef.json":[16474,3,6474],"./schemas/examples/schema_composition/allOf":[4275,3,4275],"./schemas/examples/schema_composition/allOf.json":[4275,3,4275],"./schemas/examples/schema_composition/anyOf":[83974,3,3974],"./schemas/examples/schema_composition/anyOf.json":[83974,3,3974],"./schemas/examples/schema_composition/not":[15648,3,5648],"./schemas/examples/schema_composition/not.json":[15648,3,5648],"./schemas/examples/schema_composition/oneOf":[33536,3,3536],"./schemas/examples/schema_composition/oneOf.json":[33536,3,3536],"./schemas/examples/schema_conditionally/dependencies_dependentRequired":[12304,3,2304],"./schemas/examples/schema_conditionally/dependencies_dependentRequired.json":[12304,3,2304],"./schemas/examples/schema_conditionally/dependencies_dependentSchemas":[42783,3,2783],"./schemas/examples/schema_conditionally/dependencies_dependentSchemas.json":[42783,3,2783],"./schemas/examples/schema_conditionally/dependentRequired":[1250,3,1250],"./schemas/examples/schema_conditionally/dependentRequired.json":[1250,3,1250],"./schemas/examples/schema_conditionally/dependentRequired_bidirectional":[62186,3,2186],"./schemas/examples/schema_conditionally/dependentRequired_bidirectional.json":[62186,3,2186],"./schemas/examples/schema_conditionally/dependentSchemas":[80561,3,561],"./schemas/examples/schema_conditionally/dependentSchemas.json":[80561,3,561],"./schemas/examples/schema_conditionally/if-then-else":[2881,3,2881],"./schemas/examples/schema_conditionally/if-then-else.json":[2881,3,2881],"./schemas/examples/schema_conditionally/if-then-else_multiple":[89534,3,9534],"./schemas/examples/schema_conditionally/if-then-else_multiple.json":[89534,3,9534],"./schemas/examples/string/basic":[94820,3,4820],"./schemas/examples/string/basic.json":[94820,3,4820],"./schemas/examples/string/contentEncoding":[12570,3,2570],"./schemas/examples/string/contentEncoding.json":[12570,3,2570],"./schemas/examples/string/contentEncodingWithContentMediaType":[80513,3,513],"./schemas/examples/string/contentEncodingWithContentMediaType.json":[80513,3,513],"./schemas/examples/string/contentMediaType":[95741,3,5741],"./schemas/examples/string/contentMediaType.json":[95741,3,5741],"./schemas/examples/string/contentSchema":[1616,3,1616],"./schemas/examples/string/contentSchema.json":[1616,3,1616],"./schemas/examples/string/format":[9569,3,9569],"./schemas/examples/string/format.json":[9569,3,9569],"./schemas/examples/string/length":[92334,3,2334],"./schemas/examples/string/length.json":[92334,3,2334],"./schemas/examples/string/pattern":[75188,3,5188],"./schemas/examples/string/pattern.json":[75188,3,5188],"./schemas/examples/type/multipleType":[65465,3,5465],"./schemas/examples/type/multipleType.json":[65465,3,5465],"./schemas/examples/type/singleType":[41201,3,1201],"./schemas/examples/type/singleType.json":[41201,3,1201],"./schemas/realWorld/boxFileSchema":[4651,3,4651],"./schemas/realWorld/boxFileSchema.json":[4651,3,4651],"./schemas/realWorld/githubIssueSchema":[91530,3,1530],"./schemas/realWorld/githubIssueSchema.json":[91530,3,1530]};function t(e){if(!a.o(n,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=n[e],t=s[0];return a.e(s[2]).then((()=>a.t(t,16|s[1])))}t.keys=()=>Object.keys(n),t.id=59620,e.exports=t},8180:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"externalProp":{"$ref":"../array/tuples.json"}}}')}}]); \ No newline at end of file +(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7889,8180],{50376:(e,s,a)=>{"use strict";a.r(s),a.d(s,{assets:()=>j,contentTitle:()=>x,default:()=>g,frontMatter:()=>u,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/refs/localFile","title":"\ud83d\udcc1$ref (as local file)","description":"References local file $ref showcase","source":"@site/docs/demo-viewer/refs/localFile.mdx","sourceDirName":"demo-viewer/refs","slug":"/demo-viewer/refs/localFile","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/refs/localFile.mdx","tags":[],"version":"current","frontMatter":{"description":"References local file $ref showcase","title":"\ud83d\udcc1$ref (as local file)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcce References","permalink":"/docusaurus-json-schema-plugin/docs/category/-references"},"next":{"title":"\ud83d\udca1 $ref (inline)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref"}}');var t=a(62540),o=a(28453),m=a(58069),c=a(8180),l=a(88307),r=a.n(l),i=a(61506),p=a(1890),h=a(65537),d=a(79329);const u={description:"References local file $ref showcase",title:"\ud83d\udcc1$ref (as local file)"},x="$ref (as local file)",j={},f=[];function y(e){const s={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"ref-as-local-file",children:"$ref (as local file)"})}),"\n",(0,t.jsxs)(h.default,{children:[(0,t.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(r(),{schema:c,resolverOptions:(0,i.A)({basePath:"/schemas/examples/refs"})})}),(0,t.jsx)(d.default,{value:"resolverOptions",label:"resolverOptions",children:(0,t.jsx)(m.default,{language:"js",children:`${(0,p.A)((0,i.A)({basePath:"/schemas/examples/refs"}))}`})}),(0,t.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(m.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function g(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(y,{...e})}):y(e)}},61506:(e,s,a)=>{"use strict";function n(e){return void 0===e&&(e=""),{resolve:s=>new Promise(((n,t)=>{const o=function(e,s){void 0===s&&(s="");const a=e.toString().split("/");let n=s;for(let t=0;tn(e.default))).catch((e=>t(e)))}))}}function t(e){return void 0===e&&(e="http"),{resolve:e=>new Promise(((s,a)=>{fetch(e.toString(),{headers:{Accept:"application/json"}}).then((e=>e.json())).then((e=>s(e))).catch((e=>a(e)))}))}}function o(e){const{basePath:s,jsonPointer:a,remote:o}=e;let m={};return s&&(m.resolvers={file:n(s)}),o&&(void 0===m.resolvers&&(m.resolvers={}),m.resolvers.http=t("http"),m.resolvers.https=t("https")),a&&(m.jsonPointer=a),m}a.d(s,{A:()=>o})},1890:(e,s,a)=>{"use strict";function n(e,s){void 0===s&&(s=2);return`{\n${Object.keys(e).map((a=>{const t=e[a];if("function"==typeof t){const e=t.toString().match(/function\s+([\w$]+)\s*\(([^)]*)\)/),n=e?e[1]:"anonymous",o=e?e[2].split(",").map((e=>e.trim())).join(", "):"";return`${" ".repeat(s)}${a}: function ${n}(${o}) { /* function body */ },`}return"object"!=typeof t||Array.isArray(t)||null===t?`${" ".repeat(s)}${a}: ${JSON.stringify(t)},`:`${" ".repeat(s)}${a}: ${n(t,s+2)},`})).join("\n")}\n${" ".repeat(s-2)}}`}a.d(s,{A:()=>n})},59620:(e,s,a)=>{var n={"./img/favicon.ico":[32532,9,2532],"./img/gear-tools.svg":[85711,9,5711],"./img/logo.svg":[86005,9,6005],"./img/opensource-icon.svg":[32155,9,2155],"./img/project_icon.svg":[32953,9,2953],"./img/undraw_code_review.svg":[63596,9,3596],"./schemas/examples/array/additionalItems1":[77240,3,7240],"./schemas/examples/array/additionalItems1.json":[77240,3,7240],"./schemas/examples/array/additionalItems2":[24629,3,4629],"./schemas/examples/array/additionalItems2.json":[24629,3,4629],"./schemas/examples/array/contains":[49567,3,9567],"./schemas/examples/array/contains.json":[49567,3,9567],"./schemas/examples/array/items":[4082,3,4082],"./schemas/examples/array/items.json":[4082,3,4082],"./schemas/examples/array/length":[18210,3,8210],"./schemas/examples/array/length.json":[18210,3,8210],"./schemas/examples/array/minContainsAndMaxContains":[53839,3,3839],"./schemas/examples/array/minContainsAndMaxContains.json":[53839,3,3839],"./schemas/examples/array/simple":[56864,3,6864],"./schemas/examples/array/simple.json":[56864,3,6864],"./schemas/examples/array/tuples":[62441,3,2441],"./schemas/examples/array/tuples.json":[62441,3,2441],"./schemas/examples/array/unevaluatedItems1":[9933,3,9933],"./schemas/examples/array/unevaluatedItems1.json":[9933,3,9933],"./schemas/examples/array/unevaluatedItems2":[54416,3,4416],"./schemas/examples/array/unevaluatedItems2.json":[54416,3,4416],"./schemas/examples/array/uniqueItems":[97095,3,7095],"./schemas/examples/array/uniqueItems.json":[97095,3,7095],"./schemas/examples/boolean/simple":[9175,3,9175],"./schemas/examples/boolean/simple.json":[9175,3,9175],"./schemas/examples/custom/description":[37662,3,7662],"./schemas/examples/custom/description.json":[37662,3,7662],"./schemas/examples/custom/unresolved_refs":[52498,3,2498],"./schemas/examples/custom/unresolved_refs.json":[52498,3,2498],"./schemas/examples/custom/values":[66546,3,6546],"./schemas/examples/custom/values.json":[66546,3,6546],"./schemas/examples/generic_keywords/annotations":[63563,3,3563],"./schemas/examples/generic_keywords/annotations.json":[63563,3,3563],"./schemas/examples/generic_keywords/const":[14130,3,4130],"./schemas/examples/generic_keywords/const.json":[14130,3,4130],"./schemas/examples/generic_keywords/enum":[4534,3,4534],"./schemas/examples/generic_keywords/enum.json":[4534,3,4534],"./schemas/examples/null/simple":[5040,3,5040],"./schemas/examples/null/simple.json":[5040,3,5040],"./schemas/examples/numeric/integer":[2910,3,2910],"./schemas/examples/numeric/integer.json":[2910,3,2910],"./schemas/examples/numeric/multipleOf":[94369,3,4369],"./schemas/examples/numeric/multipleOf.json":[94369,3,4369],"./schemas/examples/numeric/number":[99621,3,9621],"./schemas/examples/numeric/number.json":[99621,3,9621],"./schemas/examples/numeric/ranges":[9086,3,9086],"./schemas/examples/numeric/ranges.json":[9086,3,9086],"./schemas/examples/object/additionalProperties":[16368,3,6368],"./schemas/examples/object/additionalProperties.json":[16368,3,6368],"./schemas/examples/object/additionalProperties2":[47434,3,7434],"./schemas/examples/object/additionalProperties2.json":[47434,3,7434],"./schemas/examples/object/additionalPropertiesWithPatternProperties":[55951,3,5951],"./schemas/examples/object/additionalPropertiesWithPatternProperties.json":[55951,3,5951],"./schemas/examples/object/patternProperties":[17555,3,7555],"./schemas/examples/object/patternProperties.json":[17555,3,7555],"./schemas/examples/object/properties":[37669,3,7669],"./schemas/examples/object/properties.json":[37669,3,7669],"./schemas/examples/object/propertyNames":[55607,3,5607],"./schemas/examples/object/propertyNames.json":[55607,3,5607],"./schemas/examples/object/required":[68369,3,8369],"./schemas/examples/object/required.json":[68369,3,8369],"./schemas/examples/object/simpleObject":[93289,3,3289],"./schemas/examples/object/simpleObject.json":[93289,3,3289],"./schemas/examples/object/size":[75113,3,5113],"./schemas/examples/object/size.json":[75113,3,5113],"./schemas/examples/object/unevaluatedProperties":[34437,3,4437],"./schemas/examples/object/unevaluatedProperties.json":[34437,3,4437],"./schemas/examples/object/unevaluatedProperties1":[44360,3,4360],"./schemas/examples/object/unevaluatedProperties1.json":[44360,3,4360],"./schemas/examples/object/unevaluatedProperties2":[30277,3,277],"./schemas/examples/object/unevaluatedProperties2.json":[30277,3,277],"./schemas/examples/refs/localFile":[8180,3,8180],"./schemas/examples/refs/localFile.json":[8180,3,8180],"./schemas/examples/refs/refOnRoot":[63601,3,3601],"./schemas/examples/refs/refOnRoot.json":[63601,3,3601],"./schemas/examples/refs/remoteRef":[16474,3,6474],"./schemas/examples/refs/remoteRef.json":[16474,3,6474],"./schemas/examples/schema_composition/allOf":[4275,3,4275],"./schemas/examples/schema_composition/allOf.json":[4275,3,4275],"./schemas/examples/schema_composition/anyOf":[83974,3,3974],"./schemas/examples/schema_composition/anyOf.json":[83974,3,3974],"./schemas/examples/schema_composition/not":[15648,3,5648],"./schemas/examples/schema_composition/not.json":[15648,3,5648],"./schemas/examples/schema_composition/oneOf":[33536,3,3536],"./schemas/examples/schema_composition/oneOf.json":[33536,3,3536],"./schemas/examples/schema_conditionally/dependencies_dependentRequired":[12304,3,2304],"./schemas/examples/schema_conditionally/dependencies_dependentRequired.json":[12304,3,2304],"./schemas/examples/schema_conditionally/dependencies_dependentSchemas":[42783,3,2783],"./schemas/examples/schema_conditionally/dependencies_dependentSchemas.json":[42783,3,2783],"./schemas/examples/schema_conditionally/dependentRequired":[1250,3,1250],"./schemas/examples/schema_conditionally/dependentRequired.json":[1250,3,1250],"./schemas/examples/schema_conditionally/dependentRequired_bidirectional":[62186,3,2186],"./schemas/examples/schema_conditionally/dependentRequired_bidirectional.json":[62186,3,2186],"./schemas/examples/schema_conditionally/dependentSchemas":[80561,3,561],"./schemas/examples/schema_conditionally/dependentSchemas.json":[80561,3,561],"./schemas/examples/schema_conditionally/if-then-else":[2881,3,2881],"./schemas/examples/schema_conditionally/if-then-else.json":[2881,3,2881],"./schemas/examples/schema_conditionally/if-then-else_multiple":[89534,3,9534],"./schemas/examples/schema_conditionally/if-then-else_multiple.json":[89534,3,9534],"./schemas/examples/string/basic":[94820,3,4820],"./schemas/examples/string/basic.json":[94820,3,4820],"./schemas/examples/string/contentEncoding":[12570,3,2570],"./schemas/examples/string/contentEncoding.json":[12570,3,2570],"./schemas/examples/string/contentEncodingWithContentMediaType":[80513,3,513],"./schemas/examples/string/contentEncodingWithContentMediaType.json":[80513,3,513],"./schemas/examples/string/contentMediaType":[95741,3,5741],"./schemas/examples/string/contentMediaType.json":[95741,3,5741],"./schemas/examples/string/contentSchema":[1616,3,1616],"./schemas/examples/string/contentSchema.json":[1616,3,1616],"./schemas/examples/string/format":[9569,3,9569],"./schemas/examples/string/format.json":[9569,3,9569],"./schemas/examples/string/length":[92334,3,2334],"./schemas/examples/string/length.json":[92334,3,2334],"./schemas/examples/string/pattern":[75188,3,5188],"./schemas/examples/string/pattern.json":[75188,3,5188],"./schemas/examples/type/multipleType":[65465,3,5465],"./schemas/examples/type/multipleType.json":[65465,3,5465],"./schemas/examples/type/singleType":[41201,3,1201],"./schemas/examples/type/singleType.json":[41201,3,1201],"./schemas/realWorld/boxFileSchema":[4651,3,4651],"./schemas/realWorld/boxFileSchema.json":[4651,3,4651],"./schemas/realWorld/githubIssueSchema":[91530,3,1530],"./schemas/realWorld/githubIssueSchema.json":[91530,3,1530]};function t(e){if(!a.o(n,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=n[e],t=s[0];return a.e(s[2]).then((()=>a.t(t,16|s[1])))}t.keys=()=>Object.keys(n),t.id=59620,e.exports=t},8180:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"externalProp":{"$ref":"../array/tuples.json"}}}')}}]); \ No newline at end of file diff --git a/assets/js/08dc474f.0b6c3eba.js b/assets/js/08dc474f.ae792b63.js similarity index 97% rename from assets/js/08dc474f.0b6c3eba.js rename to assets/js/08dc474f.ae792b63.js index 9e2bce2d..c8493202 100644 --- a/assets/js/08dc474f.0b6c3eba.js +++ b/assets/js/08dc474f.ae792b63.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[81],{98826:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>m,frontMatter:()=>s,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"api/MonacoEditor","title":"\ud83d\udd27 @theme/MonacoEditor","description":"@theme/MonacoEditor API","source":"@site/docs/api/MonacoEditor.mdx","sourceDirName":"api","slug":"/api/MonacoEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/MonacoEditor","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/api/MonacoEditor.mdx","tags":[],"version":"current","frontMatter":{"title":"\ud83d\udd27 @theme/MonacoEditor","description":"@theme/MonacoEditor API"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd0e @theme/JSONSchemaViewer","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer"},"next":{"title":"\u2753 FAQ","permalink":"/docusaurus-json-schema-plugin/docs/faq"}}');var a=o(62540),r=o(28453),i=o(11470),d=o(19365);const s={title:"\ud83d\udd27 @theme/MonacoEditor",description:"@theme/MonacoEditor API"},c=void 0,l={},u=[{value:"Configuration",id:"configuration",level:2},{value:"Examples",id:"examples",level:2}];function h(e){const t={a:"a",code:"code",h2:"h2",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"configuration",children:"Configuration"}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{children:"Property"}),(0,a.jsx)(t.th,{children:"Type"}),(0,a.jsx)(t.th,{children:"Required ?"}),(0,a.jsx)(t.th,{children:"Note"})]})}),(0,a.jsx)(t.tbody,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"...."}),(0,a.jsx)(t.td,{children:"MonacoEditorProps"}),(0,a.jsx)(t.td,{children:"Optional"}),(0,a.jsxs)(t.td,{children:[(0,a.jsx)(t.a,{href:"https://github.com/react-monaco-editor/react-monaco-editor#properties",children:"Properties"})," of ",(0,a.jsx)(t.a,{href:"https://github.com/react-monaco-editor/react-monaco-editor",children:"react-monaco-editor"})]})]})})]}),"\n",(0,a.jsx)(t.h2,{id:"examples",children:"Examples"}),"\n",(0,a.jsx)(i.default,{children:(0,a.jsx)(d.default,{value:"JSX",label:"JSX",default:!0,children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-tsx",children:'import React from "react";\nimport Layout from "@theme/Layout";\nimport MonacoEditor, { monaco } from "@theme/MonacoEditor";\n// import { useColorMode } from "@docusaurus/theme-common"\n\n// To have the monacco types\nimport type { MonacoEditorTypes } from "@theme/MonacoEditor";\n\nexport default function ExamplePage(): JSX.Element {\n const editorRef =\n React.useRef(null);\n\n function generateFakeData() {\n const editor = editorRef.current;\n if (editor) {\n const randomPayload = [\n { name: "test", luck: 42.0 },\n { items: [{ id: 1, amount: 7, isValidated: true }] },\n [1, 2, 3, 4, 5],\n ];\n // Set a value\n editor.setValue(\n JSON.stringify(\n randomPayload[Math.floor(Math.random() * randomPayload.length)],\n null,\n "\\t"\n )\n );\n // And a advanced method from monaco\n monacoInstance.editor.setModelMarkers(\n editor.getModel(),\n "schema-validation",\n []\n );\n }\n }\n\n // https://docusaurus.io/docs/api/themes/configuration#use-color-mode\n return (\n \n <>\n
\n \n
\n {/* You can "useColorMode" if you want to take into account current Docusaurus color */}\n {\n editorRef.current = editor;\n }}\n />\n \n \n );\n}\n'})})})})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[81],{70571:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>m,frontMatter:()=>s,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"api/MonacoEditor","title":"\ud83d\udd27 @theme/MonacoEditor","description":"@theme/MonacoEditor API","source":"@site/docs/api/MonacoEditor.mdx","sourceDirName":"api","slug":"/api/MonacoEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/MonacoEditor","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/api/MonacoEditor.mdx","tags":[],"version":"current","frontMatter":{"title":"\ud83d\udd27 @theme/MonacoEditor","description":"@theme/MonacoEditor API"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd0e @theme/JSONSchemaViewer","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer"},"next":{"title":"\u2753 FAQ","permalink":"/docusaurus-json-schema-plugin/docs/faq"}}');var a=o(62540),r=o(28453),i=o(65537),d=o(79329);const s={title:"\ud83d\udd27 @theme/MonacoEditor",description:"@theme/MonacoEditor API"},c=void 0,l={},u=[{value:"Configuration",id:"configuration",level:2},{value:"Examples",id:"examples",level:2}];function h(e){const t={a:"a",code:"code",h2:"h2",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"configuration",children:"Configuration"}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{children:"Property"}),(0,a.jsx)(t.th,{children:"Type"}),(0,a.jsx)(t.th,{children:"Required ?"}),(0,a.jsx)(t.th,{children:"Note"})]})}),(0,a.jsx)(t.tbody,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"...."}),(0,a.jsx)(t.td,{children:"MonacoEditorProps"}),(0,a.jsx)(t.td,{children:"Optional"}),(0,a.jsxs)(t.td,{children:[(0,a.jsx)(t.a,{href:"https://github.com/react-monaco-editor/react-monaco-editor#properties",children:"Properties"})," of ",(0,a.jsx)(t.a,{href:"https://github.com/react-monaco-editor/react-monaco-editor",children:"react-monaco-editor"})]})]})})]}),"\n",(0,a.jsx)(t.h2,{id:"examples",children:"Examples"}),"\n",(0,a.jsx)(i.default,{children:(0,a.jsx)(d.default,{value:"JSX",label:"JSX",default:!0,children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-tsx",children:'import React from "react";\nimport Layout from "@theme/Layout";\nimport MonacoEditor, { monaco } from "@theme/MonacoEditor";\n// import { useColorMode } from "@docusaurus/theme-common"\n\n// To have the monacco types\nimport type { MonacoEditorTypes } from "@theme/MonacoEditor";\n\nexport default function ExamplePage(): JSX.Element {\n const editorRef =\n React.useRef(null);\n\n function generateFakeData() {\n const editor = editorRef.current;\n if (editor) {\n const randomPayload = [\n { name: "test", luck: 42.0 },\n { items: [{ id: 1, amount: 7, isValidated: true }] },\n [1, 2, 3, 4, 5],\n ];\n // Set a value\n editor.setValue(\n JSON.stringify(\n randomPayload[Math.floor(Math.random() * randomPayload.length)],\n null,\n "\\t"\n )\n );\n // And a advanced method from monaco\n monacoInstance.editor.setModelMarkers(\n editor.getModel(),\n "schema-validation",\n []\n );\n }\n }\n\n // https://docusaurus.io/docs/api/themes/configuration#use-color-mode\n return (\n \n <>\n
\n \n
\n {/* You can "useColorMode" if you want to take into account current Docusaurus color */}\n {\n editorRef.current = editor;\n }}\n />\n \n \n );\n}\n'})})})})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/09dbd73b.26436e53.js b/assets/js/09dbd73b.dbce5616.js similarity index 91% rename from assets/js/09dbd73b.26436e53.js rename to assets/js/09dbd73b.dbce5616.js index e2239153..ac36ded0 100644 --- a/assets/js/09dbd73b.26436e53.js +++ b/assets/js/09dbd73b.dbce5616.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1060,4629],{77187:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>s,toc:()=>w});const s=JSON.parse('{"id":"demo-viewer/array/additionalItems2","title":"\u2795 AdditionalItems (2)","description":"array with additionalItems showcase","source":"@site/docs/demo-viewer/array/additionalItems2.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/additionalItems2","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/additionalItems2.mdx","tags":[],"version":"current","frontMatter":{"description":"array with additionalItems showcase","title":"\u2795 AdditionalItems (2)"},"sidebar":"tutorialSidebar","previous":{"title":"\u274c AdditionalItems (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1"},"next":{"title":"\ud83c\udf71 Contains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains"}}');var i=a(62540),r=a(28453),d=a(21432),n=a(24629),o=a(21344),l=a.n(o),c=a(11470),m=a(19365);const u={description:"array with additionalItems showcase",title:"\u2795 AdditionalItems (2)"},h="AdditionalItems (2)",p={},w=[];function y(e){const t={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"additionalitems-2",children:"AdditionalItems (2)"})}),"\n",(0,i.jsxs)(c.default,{children:[(0,i.jsx)(m.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(l(),{schema:n})}),(0,i.jsx)(m.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(d.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(y,{...e})}):y(e)}},24629:e=>{e.exports=JSON.parse('{"type":"array","items":[{"type":"integer"},{"type":"string"}],"additionalItems":{"type":"boolean"}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1060,4629],{98272:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>s,toc:()=>w});const s=JSON.parse('{"id":"demo-viewer/array/additionalItems2","title":"\u2795 AdditionalItems (2)","description":"array with additionalItems showcase","source":"@site/docs/demo-viewer/array/additionalItems2.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/additionalItems2","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/additionalItems2.mdx","tags":[],"version":"current","frontMatter":{"description":"array with additionalItems showcase","title":"\u2795 AdditionalItems (2)"},"sidebar":"tutorialSidebar","previous":{"title":"\u274c AdditionalItems (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1"},"next":{"title":"\ud83c\udf71 Contains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains"}}');var i=a(62540),r=a(28453),d=a(58069),n=a(24629),o=a(88307),l=a.n(o),c=a(65537),m=a(79329);const u={description:"array with additionalItems showcase",title:"\u2795 AdditionalItems (2)"},h="AdditionalItems (2)",p={},w=[];function y(e){const t={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"additionalitems-2",children:"AdditionalItems (2)"})}),"\n",(0,i.jsxs)(c.default,{children:[(0,i.jsx)(m.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(l(),{schema:n})}),(0,i.jsx)(m.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(d.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(y,{...e})}):y(e)}},24629:e=>{e.exports=JSON.parse('{"type":"array","items":[{"type":"integer"},{"type":"string"}],"additionalItems":{"type":"boolean"}}')}}]); \ No newline at end of file diff --git a/assets/js/0ce74438.351fc17d.js b/assets/js/0ce74438.351fc17d.js deleted file mode 100644 index 2565262c..00000000 --- a/assets/js/0ce74438.351fc17d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3365,6368],{97503:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a.default.createElement(i.default,{fallback:a.default.createElement(s.LoadingLabel,null)},(()=>a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,{fallback:e=>a.default.createElement(c,{...e})},a.default.createElement(d,{...e})))))};const a=r(n(63696)),o=r(n(39781)),i=r(n(78478)),l=r(n(67489)),s=n(206);function c(e){let{error:t,tryAgain:n}=e;return a.default.createElement("div",null,a.default.createElement("p",null,a.default.createElement(s.ErrorOccurredLabel,{error:t})),a.default.createElement("button",{onClick:n},"Try Again!"))}function u(e,t){let n=e;return"boolean"==typeof n||void 0===n.$id?`https://docusaurus.io/json-viewer/schema_${t}.json`:n.$id}function d(e){const{schema:t,diagnosticsOptions:n,...r}=e;return a.default.createElement(o.default,{height:"90vh",language:"json",editorWillMount:e=>{const r=(Array.isArray(t)?t:[t]).map(((e,n)=>({uri:u(t,n),fileMatch:["*"],schema:e})));e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:r,...n})},...r})}},99073:function(e,t,n){var r,a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),i=0;is.default.createElement(s.default.Fragment,null,s.default.createElement(d.default,{fallback:e=>s.default.createElement(m,{...e})},s.default.createElement(c.default,{...e})))))};const s=l(n(63696)),c=l(n(39781)),u=l(n(78478)),d=l(n(67489)),f=n(206);function m(e){let{error:t,tryAgain:n}=e;return s.default.createElement("div",null,s.default.createElement("p",null,s.default.createElement(f.ErrorOccurredLabel,{error:t})),s.default.createElement("button",{onClick:n},"Try Again!"))}t.monaco=i(n(85868))},25493:(e,t,n)=>{n.d(t,{A:()=>W});var r=n(63696),a=n(78478),o=n(27293),i=n(28774),l=n(21344),s=n.n(l),c=n(95293),u=n(9269),d=n(63282),f=n.n(d),m=n(99073),h=n.n(m),p=n(37817);const g=(0,r.createContext)({state:{fullSchema:{},userSchema:{},jsonPointer:"",data:"{}",schemaRef:void 0,editorRef:void 0,schemaErrors:[],dataErrors:[]},updateState:()=>{}}),x=()=>(0,r.useContext)(g),y=g.Provider;var b=n(99571),j=n(62540);function v(e){let{label:t,onImport:n}=e;const a=r.createRef();return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("input",{type:"file",accept:".json",style:{display:"none"},ref:a,onChange:e=>{const t=e.target.files[0];if(!t)return;const r=new FileReader;r.onload=()=>{try{const e=JSON.parse(r.result);n(e)}catch(e){b.oR.error(e.message,{autoClose:5e3})}},r.readAsText(t)}}),(0,j.jsx)("button",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"},onClick:()=>a.current.click(),title:t,children:"\ud83d\udce5"})]})}function S(e){let{label:t,filename:n,getValue:r}=e;return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("button",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"},onClick:()=>{const e=r();if(0===e.length)return;const t=new Blob([e],{type:"application/json"}),a=URL.createObjectURL(t),o=document.createElement("a");o.href=a,o.download=n,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},title:t,children:"\ud83d\udcbe"})})}const k=e=>{let{onRefresh:t,onCopy:n,onExport:r,onImport:a}=e;const o={toolbar:{display:"flex",justifyContent:"flex-start",alignItems:"center",padding:"8px",backgroundColor:"inherit"},icon:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"}};return(0,j.jsxs)("div",{style:o.toolbar,children:[(0,j.jsx)("h1",{children:"Schema"}),"\xa0",(0,j.jsx)("div",{style:{flex:1}}),(0,j.jsx)("button",{style:o.icon,onClick:t,title:"Update Data Editor / Schema Viewer",children:"\ud83c\udf00"}),(0,j.jsx)("button",{style:o.icon,onClick:n,title:"Copy Schema to clipboard",children:"\ud83d\udccb"}),(0,j.jsx)(v,{label:"Import Schema from file",onImport:a}),(0,j.jsx)(S,{filename:"schema.json",label:"Export to JSON File",getValue:r})]})},C=e=>JSON.stringify(e,null,"\t");function w(){const{state:{fullSchema:e,schemaRef:t},updateState:n}=x(),{colorMode:r}=(0,c.G)();async function a(){try{let e=t?.getModel().getValue(),r=JSON.parse(e);n({fullSchema:r}),await async function(e){let t="";if(void 0!==e.$ref&&(t=e.$ref),0===t.length)n({userSchema:e,jsonPointer:t});else try{const r=await(new u.Resolver).resolve(e,{jsonPointer:"object"!=typeof e||Array.isArray(e)||null===e?void 0:t});n({userSchema:r.result,jsonPointer:t})}catch(r){b.oR.error(r.message,{autoClose:5e3})}}(r),await async function(e){const n=new(f())({allErrors:!0,strictSchema:!1,allowMatchingProperties:!0,strictRequired:!1,strictTypes:!0,strictTuples:!1,validateFormats:!1,validateSchema:!0}),r=[],a=C(e);let o=n.validateSchema(e);if(!o){n.errors.forEach((e=>{const t=function(e){switch(e.keyword){case"type":case"maxItems":case"minItems":case"minLength":case"maxLength":case"maximum":case"minimum":case"exclusiveMaximum":case"exclusiveMinimum":case"minProperties":case"maxProperties":case"pattern":case"multipleOf":return{markIdentifier:!1,severity:m.monaco.MarkerSeverity.Warning};case"format":case"uniqueItems":return{markIdentifier:!1,severity:m.monaco.MarkerSeverity.Info};case"const":case"enum":return{markIdentifier:!1,severity:m.monaco.MarkerSeverity.Hint};default:return{markIdentifier:!1,severity:m.monaco.MarkerSeverity.Error}}}(e);let n={message:e.message,severity:t.severity};if(e.instancePath.length>0){const r=(0,p.xJ)(a,{pointerPath:e.instancePath,markIdentifier:t.markIdentifier});n.startLineNumber=r.start.line,n.startColumn=r.start.column,n.endLineNumber=r.end.line,n.endColumn=r.end.column}r.push(n)}))}m.monaco.editor.setModelMarkers(t?.getModel(),"schema-validation",r)}(r)}catch(e){alert(e)}}return(0,j.jsxs)("div",{style:{boxSizing:"border-box",width:"50%"},children:[(0,j.jsx)(k,{onRefresh:async()=>{await a()},onCopy:async()=>{const e=t.getModel().getValue()||"";await navigator.clipboard.writeText(e),b.oR.success("Schema copied")},onExport:()=>(b.oR.info("Exporting Schema ..."),t.getModel().getValue()||""),onImport:async e=>{t.setValue(JSON.stringify(e,null,"\t")),await a()}}),(0,j.jsx)(h(),{value:C(e),theme:"dark"===r?"vs-dark":"vs",language:"json",height:"70vh",editorDidMount:e=>{n({schemaRef:e})}})]})}function E(){return(0,j.jsx)(a.default,{fallback:(0,j.jsx)("div",{children:"Loading..."}),children:()=>(0,j.jsx)(w,{})})}var O=n(97503),R=n.n(O),M=n(25691);function I(e){if(Array.isArray(e))return{type:"array",items:e.map((e=>I(e)))};if("object"==typeof e&&null!==e){const t={};for(const n of Object.keys(e))t[n]=I(e[n]);return{type:"object",properties:t}}return{string:{type:"string"},number:{type:"number"},boolean:{type:"boolean"},undefined:{type:"null"}}[typeof e]}function P(e){const t=I(e);return t.$schema="http://json-schema.org/draft-07/schema#",t}function _(){const{state:{schemaRef:e,editorRef:t},updateState:n}=x();return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("button",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"},onClick:async()=>{let e=t.getModel().getValue();try{const t=P(JSON.parse(e));n({jsonPointer:"",data:e,userSchema:t,fullSchema:t})}catch(r){b.oR.error(r.message,{autoClose:5e3})}},title:"Infer Schema from data",children:"\u2728"})})}const L=e=>{let{onGenerate:t,onCopy:n,onExport:r,onImport:a}=e;const o={toolbar:{display:"flex",justifyContent:"flex-start",alignItems:"center",padding:"8px",backgroundColor:"inherit"},icon:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"}};return(0,j.jsxs)("div",{style:o.toolbar,children:[(0,j.jsx)("h1",{children:"Data"}),"\xa0",(0,j.jsx)("div",{style:{flex:1}}),(0,j.jsx)("button",{style:o.icon,onClick:t,title:"Generate Data",children:"\ud83d\udd04"}),(0,j.jsx)(_,{}),(0,j.jsx)("button",{style:o.icon,onClick:n,title:"Copy Data to clipboard",children:"\ud83d\udccb"}),(0,j.jsx)(v,{label:"Import Data from file",onImport:a}),(0,j.jsx)(S,{filename:"data.json",label:"Export to JSON File",getValue:r})]})},N=e=>JSON.stringify(e,null,"\t");function A(){const{state:{userSchema:e,editorRef:t,data:n},updateState:r}=x(),{colorMode:a}=(0,c.G)();return(0,j.jsxs)("div",{style:{boxSizing:"border-box",width:"50%"},children:[(0,j.jsx)(L,{onGenerate:()=>{M.N.resolve(e).then((e=>{t.setValue(N(e))})).catch((e=>b.oR.error(e.message,{autoClose:5e3})))},onCopy:async()=>{const e=t.getModel().getValue()||"";await navigator.clipboard.writeText(e),b.oR.success("Data copied")},onExport:()=>(b.oR.info("Exporting data ..."),t.getModel().getValue()||""),onImport:e=>{t.setValue(JSON.stringify(e,null,"\t"))}}),(0,j.jsx)(R(),{value:n,schema:e,theme:"dark"===a?"vs-dark":"vs",editorDidMount:e=>{r({editorRef:e})},height:"70vh"},N(e))]})}function D(){return(0,j.jsx)(a.default,{fallback:(0,j.jsx)("div",{children:"Loading..."}),children:()=>(0,j.jsx)(A,{})})}var J=n(56347),V=n(13293),F=n(16368);const T=e=>JSON.stringify(e,null,"\t");function $(){const{state:{userSchema:e}}=x();return(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"column",overflowY:"hidden",overflowX:"hidden"},children:[(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[(0,j.jsx)(E,{}),(0,j.jsx)(D,{},T(e))]}),(0,j.jsxs)("div",{style:{marginTop:"0.5rem"},children:[(0,j.jsx)("h1",{style:{fontSize:"1.5rem",marginBottom:"1rem"},children:"JSON Schema Viewer"}),(0,j.jsx)(s(),{schema:e},T(e))]}),(0,j.jsx)(o.A,{type:"tip",children:(0,j.jsxs)("p",{children:["You can use \xa0",(0,j.jsx)(i.A,{to:`/playground?b64Schema=${V.o4.encode(T(e)).replace("+","-").replace("/","_").replace("=","")}`,children:"b64Schema query parameter"}),"\xa0with a JSON Schema in Base64URL format so that you can bookmark this page with wanted schema"]})})]})}function U(){const e={$schema:"http://json-schema.org/draft-07/schema",...F},[t,n]=r.useState({jsonPointer:"",userSchema:e,fullSchema:e});function a(e){n((t=>({...t,...e})))}const o=function(){const{search:e}=(0,J.zy)();return r.useMemo((()=>new URLSearchParams(e)),[e])}();return r.useEffect((()=>{if(o.has("b64Schema")){let t=o.get("b64Schema");try{let e=V.o4.decode(t),n=JSON.parse(e);a({fullSchema:n,userSchema:n,jsonPointer:""})}catch(e){console.error("Invalid JSON in b64Schema parameter"),console.error(t)}}}),[o]),(0,j.jsx)(y,{value:{state:t,updateState:a},children:(0,j.jsx)($,{})})}function W(){return(0,j.jsx)(a.default,{fallback:(0,j.jsx)("div",{children:"Loading..."}),children:()=>(0,j.jsx)(U,{})})}},81891:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});n(63696);var r=n(41957),a=n(78478),o=n(67489),i=n(99571),l=(n(42113),n(62540));function s(){return(0,l.jsx)(o.default,{fallback:e=>{let{error:t,tryAgain:n}=e;return(0,l.jsxs)("div",{children:[(0,l.jsxs)("p",{children:["Playground component crashed because of error: ",t.message,"."]}),(0,l.jsx)("button",{onClick:n,children:"Try Again!"})]})},children:(0,l.jsx)(a.default,{fallback:(0,l.jsx)("div",{children:"Loading..."}),children:()=>{const e=n(25493).A;return(0,l.jsx)(e,{})}})})}function c(){return(0,l.jsxs)(r.A,{title:"Playground",description:"Playground of docusaurus-json-schema-plugin",children:[(0,l.jsx)(s,{}),(0,l.jsx)(i.N9,{position:"bottom-right",autoClose:1e3})]})}},16368:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"additionalProperties":false}')}}]); \ No newline at end of file diff --git a/assets/js/0ce74438.5c1e34e0.js b/assets/js/0ce74438.5c1e34e0.js new file mode 100644 index 00000000..cd6dc1fa --- /dev/null +++ b/assets/js/0ce74438.5c1e34e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3365,6368],{79504:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a.default.createElement(i.default,{fallback:a.default.createElement(s.LoadingLabel,null)},(()=>a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,{fallback:e=>a.default.createElement(c,{...e})},a.default.createElement(d,{...e})))))};const a=r(n(63696)),o=r(n(39781)),i=r(n(35363)),l=r(n(4023)),s=n(76563);function c(e){let{error:t,tryAgain:n}=e;return a.default.createElement("div",null,a.default.createElement("p",null,a.default.createElement(s.ErrorOccurredLabel,{error:t})),a.default.createElement("button",{onClick:n},"Try Again!"))}function u(e,t){let n=e;return"boolean"==typeof n||void 0===n.$id?`https://docusaurus.io/json-viewer/schema_${t}.json`:n.$id}function d(e){const{schema:t,diagnosticsOptions:n,...r}=e;return a.default.createElement(o.default,{height:"90vh",language:"json",editorWillMount:e=>{const r=(Array.isArray(t)?t:[t]).map(((e,n)=>({uri:u(t,n),fileMatch:["*"],schema:e})));e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:r,...n})},...r})}},82722:function(e,t,n){var r,a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),i=0;is.default.createElement(s.default.Fragment,null,s.default.createElement(d.default,{fallback:e=>s.default.createElement(m,{...e})},s.default.createElement(c.default,{...e})))))};const s=l(n(63696)),c=l(n(39781)),u=l(n(35363)),d=l(n(4023)),f=n(76563);function m(e){let{error:t,tryAgain:n}=e;return s.default.createElement("div",null,s.default.createElement("p",null,s.default.createElement(f.ErrorOccurredLabel,{error:t})),s.default.createElement("button",{onClick:n},"Try Again!"))}t.monaco=i(n(85868))},98349:(e,t,n)=>{n.d(t,{A:()=>W});var r=n(63696),a=n(35363),o=n(52362),i=n(56289),l=n(88307),s=n.n(l),c=n(8532),u=n(9269),d=n(63282),f=n.n(d),m=n(82722),h=n.n(m),p=n(37817);const g=(0,r.createContext)({state:{fullSchema:{},userSchema:{},jsonPointer:"",data:"{}",schemaRef:void 0,editorRef:void 0,schemaErrors:[],dataErrors:[]},updateState:()=>{}}),x=()=>(0,r.useContext)(g),y=g.Provider;var b=n(99571),j=n(62540);function v(e){let{label:t,onImport:n}=e;const a=r.createRef();return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("input",{type:"file",accept:".json",style:{display:"none"},ref:a,onChange:e=>{const t=e.target.files[0];if(!t)return;const r=new FileReader;r.onload=()=>{try{const e=JSON.parse(r.result);n(e)}catch(e){b.oR.error(e.message,{autoClose:5e3})}},r.readAsText(t)}}),(0,j.jsx)("button",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"},onClick:()=>a.current.click(),title:t,children:"\ud83d\udce5"})]})}function S(e){let{label:t,filename:n,getValue:r}=e;return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("button",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"},onClick:()=>{const e=r();if(0===e.length)return;const t=new Blob([e],{type:"application/json"}),a=URL.createObjectURL(t),o=document.createElement("a");o.href=a,o.download=n,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},title:t,children:"\ud83d\udcbe"})})}const k=e=>{let{onRefresh:t,onCopy:n,onExport:r,onImport:a}=e;const o={toolbar:{display:"flex",justifyContent:"flex-start",alignItems:"center",padding:"8px",backgroundColor:"inherit"},icon:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"}};return(0,j.jsxs)("div",{style:o.toolbar,children:[(0,j.jsx)("h1",{children:"Schema"}),"\xa0",(0,j.jsx)("div",{style:{flex:1}}),(0,j.jsx)("button",{style:o.icon,onClick:t,title:"Update Data Editor / Schema Viewer",children:"\ud83c\udf00"}),(0,j.jsx)("button",{style:o.icon,onClick:n,title:"Copy Schema to clipboard",children:"\ud83d\udccb"}),(0,j.jsx)(v,{label:"Import Schema from file",onImport:a}),(0,j.jsx)(S,{filename:"schema.json",label:"Export to JSON File",getValue:r})]})},C=e=>JSON.stringify(e,null,"\t");function w(){const{state:{fullSchema:e,schemaRef:t},updateState:n}=x(),{colorMode:r}=(0,c.G)();async function a(){try{let e=t?.getModel().getValue(),r=JSON.parse(e);n({fullSchema:r}),await async function(e){let t="";if(void 0!==e.$ref&&(t=e.$ref),0===t.length)n({userSchema:e,jsonPointer:t});else try{const r=await(new u.Resolver).resolve(e,{jsonPointer:"object"!=typeof e||Array.isArray(e)||null===e?void 0:t});n({userSchema:r.result,jsonPointer:t})}catch(r){b.oR.error(r.message,{autoClose:5e3})}}(r),await async function(e){const n=new(f())({allErrors:!0,strictSchema:!1,allowMatchingProperties:!0,strictRequired:!1,strictTypes:!0,strictTuples:!1,validateFormats:!1,validateSchema:!0}),r=[],a=C(e);let o=n.validateSchema(e);if(!o){n.errors.forEach((e=>{const t=function(e){switch(e.keyword){case"type":case"maxItems":case"minItems":case"minLength":case"maxLength":case"maximum":case"minimum":case"exclusiveMaximum":case"exclusiveMinimum":case"minProperties":case"maxProperties":case"pattern":case"multipleOf":return{markIdentifier:!1,severity:m.monaco.MarkerSeverity.Warning};case"format":case"uniqueItems":return{markIdentifier:!1,severity:m.monaco.MarkerSeverity.Info};case"const":case"enum":return{markIdentifier:!1,severity:m.monaco.MarkerSeverity.Hint};default:return{markIdentifier:!1,severity:m.monaco.MarkerSeverity.Error}}}(e);let n={message:e.message,severity:t.severity};if(e.instancePath.length>0){const r=(0,p.xJ)(a,{pointerPath:e.instancePath,markIdentifier:t.markIdentifier});n.startLineNumber=r.start.line,n.startColumn=r.start.column,n.endLineNumber=r.end.line,n.endColumn=r.end.column}r.push(n)}))}m.monaco.editor.setModelMarkers(t?.getModel(),"schema-validation",r)}(r)}catch(e){alert(e)}}return(0,j.jsxs)("div",{style:{boxSizing:"border-box",width:"50%"},children:[(0,j.jsx)(k,{onRefresh:async()=>{await a()},onCopy:async()=>{const e=t.getModel().getValue()||"";await navigator.clipboard.writeText(e),b.oR.success("Schema copied")},onExport:()=>(b.oR.info("Exporting Schema ..."),t.getModel().getValue()||""),onImport:async e=>{t.setValue(JSON.stringify(e,null,"\t")),await a()}}),(0,j.jsx)(h(),{value:C(e),theme:"dark"===r?"vs-dark":"vs",language:"json",height:"70vh",editorDidMount:e=>{n({schemaRef:e})}})]})}function E(){return(0,j.jsx)(a.default,{fallback:(0,j.jsx)("div",{children:"Loading..."}),children:()=>(0,j.jsx)(w,{})})}var O=n(79504),R=n.n(O),M=n(25691);function I(e){if(Array.isArray(e))return{type:"array",items:e.map((e=>I(e)))};if("object"==typeof e&&null!==e){const t={};for(const n of Object.keys(e))t[n]=I(e[n]);return{type:"object",properties:t}}return{string:{type:"string"},number:{type:"number"},boolean:{type:"boolean"},undefined:{type:"null"}}[typeof e]}function P(e){const t=I(e);return t.$schema="http://json-schema.org/draft-07/schema#",t}function _(){const{state:{schemaRef:e,editorRef:t},updateState:n}=x();return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("button",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"},onClick:async()=>{let e=t.getModel().getValue();try{const t=P(JSON.parse(e));n({jsonPointer:"",data:e,userSchema:t,fullSchema:t})}catch(r){b.oR.error(r.message,{autoClose:5e3})}},title:"Infer Schema from data",children:"\u2728"})})}const L=e=>{let{onGenerate:t,onCopy:n,onExport:r,onImport:a}=e;const o={toolbar:{display:"flex",justifyContent:"flex-start",alignItems:"center",padding:"8px",backgroundColor:"inherit"},icon:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",marginRight:"8px",backgroundColor:"transparent",cursor:"pointer",border:"1px solid",fontWeight:"bold"}};return(0,j.jsxs)("div",{style:o.toolbar,children:[(0,j.jsx)("h1",{children:"Data"}),"\xa0",(0,j.jsx)("div",{style:{flex:1}}),(0,j.jsx)("button",{style:o.icon,onClick:t,title:"Generate Data",children:"\ud83d\udd04"}),(0,j.jsx)(_,{}),(0,j.jsx)("button",{style:o.icon,onClick:n,title:"Copy Data to clipboard",children:"\ud83d\udccb"}),(0,j.jsx)(v,{label:"Import Data from file",onImport:a}),(0,j.jsx)(S,{filename:"data.json",label:"Export to JSON File",getValue:r})]})},N=e=>JSON.stringify(e,null,"\t");function A(){const{state:{userSchema:e,editorRef:t,data:n},updateState:r}=x(),{colorMode:a}=(0,c.G)();return(0,j.jsxs)("div",{style:{boxSizing:"border-box",width:"50%"},children:[(0,j.jsx)(L,{onGenerate:()=>{M.N.resolve(e).then((e=>{t.setValue(N(e))})).catch((e=>b.oR.error(e.message,{autoClose:5e3})))},onCopy:async()=>{const e=t.getModel().getValue()||"";await navigator.clipboard.writeText(e),b.oR.success("Data copied")},onExport:()=>(b.oR.info("Exporting data ..."),t.getModel().getValue()||""),onImport:e=>{t.setValue(JSON.stringify(e,null,"\t"))}}),(0,j.jsx)(R(),{value:n,schema:e,theme:"dark"===a?"vs-dark":"vs",editorDidMount:e=>{r({editorRef:e})},height:"70vh"},N(e))]})}function D(){return(0,j.jsx)(a.default,{fallback:(0,j.jsx)("div",{children:"Loading..."}),children:()=>(0,j.jsx)(A,{})})}var J=n(56347),V=n(13293),F=n(16368);const T=e=>JSON.stringify(e,null,"\t");function $(){const{state:{userSchema:e}}=x();return(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"column",overflowY:"hidden",overflowX:"hidden"},children:[(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[(0,j.jsx)(E,{}),(0,j.jsx)(D,{},T(e))]}),(0,j.jsxs)("div",{style:{marginTop:"0.5rem"},children:[(0,j.jsx)("h1",{style:{fontSize:"1.5rem",marginBottom:"1rem"},children:"JSON Schema Viewer"}),(0,j.jsx)(s(),{schema:e},T(e))]}),(0,j.jsx)(o.A,{type:"tip",children:(0,j.jsxs)("p",{children:["You can use \xa0",(0,j.jsx)(i.A,{to:`/playground?b64Schema=${V.o4.encode(T(e)).replace("+","-").replace("/","_").replace("=","")}`,children:"b64Schema query parameter"}),"\xa0with a JSON Schema in Base64URL format so that you can bookmark this page with wanted schema"]})})]})}function U(){const e={$schema:"http://json-schema.org/draft-07/schema",...F},[t,n]=r.useState({jsonPointer:"",userSchema:e,fullSchema:e});function a(e){n((t=>({...t,...e})))}const o=function(){const{search:e}=(0,J.zy)();return r.useMemo((()=>new URLSearchParams(e)),[e])}();return r.useEffect((()=>{if(o.has("b64Schema")){let t=o.get("b64Schema");try{let e=V.o4.decode(t),n=JSON.parse(e);a({fullSchema:n,userSchema:n,jsonPointer:""})}catch(e){console.error("Invalid JSON in b64Schema parameter"),console.error(t)}}}),[o]),(0,j.jsx)(y,{value:{state:t,updateState:a},children:(0,j.jsx)($,{})})}function W(){return(0,j.jsx)(a.default,{fallback:(0,j.jsx)("div",{children:"Loading..."}),children:()=>(0,j.jsx)(U,{})})}},77824:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});n(63696);var r=n(27912),a=n(35363),o=n(4023),i=n(99571),l=(n(57076),n(62540));function s(){return(0,l.jsx)(o.default,{fallback:e=>{let{error:t,tryAgain:n}=e;return(0,l.jsxs)("div",{children:[(0,l.jsxs)("p",{children:["Playground component crashed because of error: ",t.message,"."]}),(0,l.jsx)("button",{onClick:n,children:"Try Again!"})]})},children:(0,l.jsx)(a.default,{fallback:(0,l.jsx)("div",{children:"Loading..."}),children:()=>{const e=n(98349).A;return(0,l.jsx)(e,{})}})})}function c(){return(0,l.jsxs)(r.A,{title:"Playground",description:"Playground of docusaurus-json-schema-plugin",children:[(0,l.jsx)(s,{}),(0,l.jsx)(i.N9,{position:"bottom-right",autoClose:1e3})]})}},16368:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"additionalProperties":false}')}}]); \ No newline at end of file diff --git a/assets/js/0d2bf170.de023bbf.js b/assets/js/0d2bf170.ba8f6a64.js similarity index 91% rename from assets/js/0d2bf170.de023bbf.js rename to assets/js/0d2bf170.ba8f6a64.js index e2416530..e2ef04b0 100644 --- a/assets/js/0d2bf170.de023bbf.js +++ b/assets/js/0d2bf170.ba8f6a64.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3177,9933],{62934:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>v,contentTitle:()=>h,default:()=>f,frontMatter:()=>m,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"demo-viewer/array/unevaluatedItems1","title":"\ud83e\udd14 UnevaluatedItems (1)","description":"array with unevaluatedItems showcase","source":"@site/docs/demo-viewer/array/unevaluatedItems1.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/unevaluatedItems1","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/unevaluatedItems1.mdx","tags":[],"version":"current","frontMatter":{"description":"array with unevaluatedItems showcase","title":"\ud83e\udd14 UnevaluatedItems (1)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccb Tuples","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples"},"next":{"title":"\ud83d\udccb UnevaluatedItems (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2"}}');var r=t(62540),n=t(28453),u=t(21432),d=t(9933),i=t(21344),l=t.n(i),o=t(11470),c=t(19365);const m={description:"array with unevaluatedItems showcase",title:"\ud83e\udd14 UnevaluatedItems (1)"},h="UnevaluatedItems (1)",v={},p=[];function w(e){const a={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.header,{children:(0,r.jsx)(a.h1,{id:"unevaluateditems-1",children:"UnevaluatedItems (1)"})}),"\n",(0,r.jsxs)(o.default,{children:[(0,r.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(l(),{schema:d})}),(0,r.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(u.default,{language:"json-schema",children:JSON.stringify(d,null,2)})})]})]})}function f(e={}){const{wrapper:a}={...(0,n.R)(),...e.components};return a?(0,r.jsx)(a,{...e,children:(0,r.jsx)(w,{...e})}):w(e)}},9933:e=>{e.exports=JSON.parse('{"type":"array","prefixItems":[{"type":"integer"},{"type":"string"}],"unevaluatedItems":false}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3177,9933],{37222:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>v,contentTitle:()=>h,default:()=>f,frontMatter:()=>m,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"demo-viewer/array/unevaluatedItems1","title":"\ud83e\udd14 UnevaluatedItems (1)","description":"array with unevaluatedItems showcase","source":"@site/docs/demo-viewer/array/unevaluatedItems1.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/unevaluatedItems1","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/unevaluatedItems1.mdx","tags":[],"version":"current","frontMatter":{"description":"array with unevaluatedItems showcase","title":"\ud83e\udd14 UnevaluatedItems (1)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccb Tuples","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples"},"next":{"title":"\ud83d\udccb UnevaluatedItems (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2"}}');var r=t(62540),n=t(28453),u=t(58069),d=t(9933),i=t(88307),l=t.n(i),o=t(65537),c=t(79329);const m={description:"array with unevaluatedItems showcase",title:"\ud83e\udd14 UnevaluatedItems (1)"},h="UnevaluatedItems (1)",v={},p=[];function w(e){const a={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.header,{children:(0,r.jsx)(a.h1,{id:"unevaluateditems-1",children:"UnevaluatedItems (1)"})}),"\n",(0,r.jsxs)(o.default,{children:[(0,r.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(l(),{schema:d})}),(0,r.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(u.default,{language:"json-schema",children:JSON.stringify(d,null,2)})})]})]})}function f(e={}){const{wrapper:a}={...(0,n.R)(),...e.components};return a?(0,r.jsx)(a,{...e,children:(0,r.jsx)(w,{...e})}):w(e)}},9933:e=>{e.exports=JSON.parse('{"type":"array","prefixItems":[{"type":"integer"},{"type":"string"}],"unevaluatedItems":false}')}}]); \ No newline at end of file diff --git a/assets/js/0d743cca.dd7dd8be.js b/assets/js/0d743cca.65ae7d51.js similarity index 92% rename from assets/js/0d743cca.dd7dd8be.js rename to assets/js/0d743cca.65ae7d51.js index 328c4f0b..e7fd9a4a 100644 --- a/assets/js/0d743cca.dd7dd8be.js +++ b/assets/js/0d743cca.65ae7d51.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2186,9352],{72055:(e,i,d)=>{d.r(i),d.d(i,{assets:()=>m,contentTitle:()=>h,default:()=>_,frontMatter:()=>p,metadata:()=>n,toc:()=>b});const n=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependentRequired_bidirectional","title":"\ud83d\udd01 dependentRequired (bidirectional)","description":"schema conditionally with dependentRequired (bidirectional) showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependentRequired_bidirectional","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependentRequired (bidirectional) showcase","title":"\ud83d\udd01 dependentRequired (bidirectional)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd11 dependentRequired","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired"},"next":{"title":"\ud83c\udfd7\ufe0f dependentSchemas","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas"}}');var t=d(62540),r=d(28453),s=d(21432),a=d(62186),c=d(21344),o=d.n(c),l=d(11470),u=d(19365);const p={description:"schema conditionally with dependentRequired (bidirectional) showcase",title:"\ud83d\udd01 dependentRequired (bidirectional)"},h="dependentRequired (bidirectional)",m={},b=[];function w(e){const i={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.header,{children:(0,t.jsx)(i.h1,{id:"dependentrequired-bidirectional",children:"dependentRequired (bidirectional)"})}),"\n",(0,t.jsxs)(l.default,{children:[(0,t.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(o(),{schema:a})}),(0,t.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(s.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function _(e={}){const{wrapper:i}={...(0,r.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(w,{...e})}):w(e)}},62186:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"},"billing_address":{"type":"string"}},"required":["name"],"dependentRequired":{"credit_card":["billing_address"],"billing_address":["credit_card"]}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2186,9352],{39096:(e,i,d)=>{d.r(i),d.d(i,{assets:()=>m,contentTitle:()=>h,default:()=>_,frontMatter:()=>p,metadata:()=>n,toc:()=>b});const n=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependentRequired_bidirectional","title":"\ud83d\udd01 dependentRequired (bidirectional)","description":"schema conditionally with dependentRequired (bidirectional) showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependentRequired_bidirectional","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependentRequired (bidirectional) showcase","title":"\ud83d\udd01 dependentRequired (bidirectional)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd11 dependentRequired","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired"},"next":{"title":"\ud83c\udfd7\ufe0f dependentSchemas","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas"}}');var t=d(62540),r=d(28453),s=d(58069),a=d(62186),c=d(88307),o=d.n(c),l=d(65537),u=d(79329);const p={description:"schema conditionally with dependentRequired (bidirectional) showcase",title:"\ud83d\udd01 dependentRequired (bidirectional)"},h="dependentRequired (bidirectional)",m={},b=[];function w(e){const i={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.header,{children:(0,t.jsx)(i.h1,{id:"dependentrequired-bidirectional",children:"dependentRequired (bidirectional)"})}),"\n",(0,t.jsxs)(l.default,{children:[(0,t.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(o(),{schema:a})}),(0,t.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(s.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function _(e={}){const{wrapper:i}={...(0,r.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(w,{...e})}):w(e)}},62186:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"},"billing_address":{"type":"string"}},"required":["name"],"dependentRequired":{"credit_card":["billing_address"],"billing_address":["credit_card"]}}')}}]); \ No newline at end of file diff --git a/assets/js/0ff7d3d9.6dc8a7dc.js b/assets/js/0ff7d3d9.8865e8c5.js similarity index 92% rename from assets/js/0ff7d3d9.6dc8a7dc.js rename to assets/js/0ff7d3d9.8865e8c5.js index c0faacdf..6b7110ba 100644 --- a/assets/js/0ff7d3d9.6dc8a7dc.js +++ b/assets/js/0ff7d3d9.8865e8c5.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2881,8962],{27264:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>p,contentTitle:()=>m,default:()=>j,frontMatter:()=>u,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/schema_conditionally/if-then-else","title":"\ud83c\udfac If-Then-Else","description":"schema conditionally with if-then-else showcase","source":"@site/docs/demo-viewer/schema_conditionally/if-then-else.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/if-then-else","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/if-then-else.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with if-then-else showcase","title":"\ud83c\udfac If-Then-Else"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udfd7\ufe0f dependentSchemas","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas"},"next":{"title":"\ud83d\udd00 If-Then-Else (multiple)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple"}}');var i=s(62540),a=s(28453),l=s(21432),o=s(2881),c=s(21344),r=s.n(c),d=s(11470),h=s(19365);const u={description:"schema conditionally with if-then-else showcase",title:"\ud83c\udfac If-Then-Else"},m="If-Then-Else",p={},f=[];function w(e){const t={h1:"h1",header:"header",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"if-then-else",children:"If-Then-Else"})}),"\n",(0,i.jsxs)(d.default,{children:[(0,i.jsx)(h.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(r(),{schema:o})}),(0,i.jsx)(h.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(l.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function j(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(w,{...e})}):w(e)}},2881:e=>{e.exports=JSON.parse('{"type":"object","properties":{"street_address":{"type":"string"},"country":{"default":"United States of America","enum":["United States of America","Canada"]}},"if":{"properties":{"country":{"const":"United States of America"}}},"then":{"properties":{"postal_code":{"pattern":"[0-9]{5}(-[0-9]{4})?"}}},"else":{"properties":{"postal_code":{"pattern":"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]"}}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2881,8962],{30623:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>p,contentTitle:()=>m,default:()=>j,frontMatter:()=>u,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/schema_conditionally/if-then-else","title":"\ud83c\udfac If-Then-Else","description":"schema conditionally with if-then-else showcase","source":"@site/docs/demo-viewer/schema_conditionally/if-then-else.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/if-then-else","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/if-then-else.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with if-then-else showcase","title":"\ud83c\udfac If-Then-Else"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udfd7\ufe0f dependentSchemas","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas"},"next":{"title":"\ud83d\udd00 If-Then-Else (multiple)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple"}}');var i=s(62540),a=s(28453),l=s(58069),o=s(2881),c=s(88307),r=s.n(c),d=s(65537),h=s(79329);const u={description:"schema conditionally with if-then-else showcase",title:"\ud83c\udfac If-Then-Else"},m="If-Then-Else",p={},f=[];function w(e){const t={h1:"h1",header:"header",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"if-then-else",children:"If-Then-Else"})}),"\n",(0,i.jsxs)(d.default,{children:[(0,i.jsx)(h.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(r(),{schema:o})}),(0,i.jsx)(h.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(l.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function j(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(w,{...e})}):w(e)}},2881:e=>{e.exports=JSON.parse('{"type":"object","properties":{"street_address":{"type":"string"},"country":{"default":"United States of America","enum":["United States of America","Canada"]}},"if":{"properties":{"country":{"const":"United States of America"}}},"then":{"properties":{"postal_code":{"pattern":"[0-9]{5}(-[0-9]{4})?"}}},"else":{"properties":{"postal_code":{"pattern":"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/14eb3368.4f964236.js b/assets/js/14eb3368.4f964236.js deleted file mode 100644 index 820596aa..00000000 --- a/assets/js/14eb3368.4f964236.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[6969],{71243:(e,t,n)=>{n.d(t,{A:()=>g});n(63696);var s=n(34164),r=n(17559),i=n(26972),a=n(99169),l=n(28774),o=n(21312),c=n(86025),d=n(62540);function u(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const m={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,c.Ay)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(l.A,{"aria-label":(0,o.translate)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(u,{className:m.breadcrumbHomeIcon})})})}const b={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function x(e){let{children:t,href:n,isLast:s}=e;const r="breadcrumbs__link";return s?(0,d.jsx)("span",{className:r,itemProp:"name",children:t}):n?(0,d.jsx)(l.A,{className:r,href:n,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:t})}):(0,d.jsx)("span",{className:r,children:t})}function p(e){let{children:t,active:n,index:r,addMicrodata:i}=e;return(0,d.jsxs)("li",{...i&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,s.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,d.jsx)("meta",{itemProp:"position",content:String(r+1)})]})}function g(){const e=(0,i.OF)(),t=(0,a.Dt)();return e?(0,d.jsx)("nav",{className:(0,s.A)(r.G.docs.docBreadcrumbs,b.breadcrumbsContainer),"aria-label":(0,o.translate)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,d.jsx)(h,{}),e.map(((t,n)=>{const s=n===e.length-1,r="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,d.jsx)(p,{active:s,index:n,addMicrodata:!!r,children:(0,d.jsx)(x,{href:r,isLast:s,children:t.label})},n)}))]})}):null}},34136:(e,t,n)=>{n.r(t),n.d(t,{default:()=>w});n(63696);var s=n(69024),r=n(26972),i=n(86025),a=n(34164),l=n(28774),o=n(53465),c=n(16654),d=n(21312),u=n(51107);const m={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var h=n(62540);function b(e){let{href:t,children:n}=e;return(0,h.jsx)(l.A,{href:t,className:(0,a.A)("card padding--lg",m.cardContainer),children:n})}function x(e){let{href:t,icon:n,title:s,description:r}=e;return(0,h.jsxs)(b,{href:t,children:[(0,h.jsxs)(u.A,{as:"h2",className:(0,a.A)("text--truncate",m.cardTitle),title:s,children:[n," ",s]}),r&&(0,h.jsx)("p",{className:(0,a.A)("text--truncate",m.cardDescription),title:r,children:r})]})}function p(e){let{item:t}=e;const n=(0,r.Nr)(t),s=function(){const{selectMessage:e}=(0,o.W)();return t=>e(t,(0,d.translate)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t}))}();return n?(0,h.jsx)(x,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:t.description??s(t.items.length)}):null}function g(e){let{item:t}=e;const n=(0,c.A)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,r.cC)(t.docId??void 0);return(0,h.jsx)(x,{href:t.href,icon:n,title:t.label,description:t.description??s?.description})}function v(e){let{item:t}=e;switch(t.type){case"link":return(0,h.jsx)(g,{item:t});case"category":return(0,h.jsx)(p,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function f(e){let{className:t}=e;const n=(0,r.$S)();return(0,h.jsx)(j,{items:n.items,className:t})}function j(e){const{items:t,className:n}=e;if(!t)return(0,h.jsx)(f,{...e});const s=(0,r.d1)(t);return(0,h.jsx)("section",{className:(0,a.A)("row",n),children:s.map(((e,t)=>(0,h.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,h.jsx)(v,{item:e})},t)))})}var N=n(86929),A=n(51878),L=n(4267),_=n(71243);const T={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function k(e){let{categoryGeneratedIndex:t}=e;return(0,h.jsx)(s.be,{title:t.title,description:t.description,keywords:t.keywords,image:(0,i.Ay)(t.image)})}function y(e){let{categoryGeneratedIndex:t}=e;const n=(0,r.$S)();return(0,h.jsxs)("div",{className:T.generatedIndexPage,children:[(0,h.jsx)(A.A,{}),(0,h.jsx)(_.A,{}),(0,h.jsx)(L.A,{}),(0,h.jsxs)("header",{children:[(0,h.jsx)(u.A,{as:"h1",className:T.title,children:t.title}),t.description&&(0,h.jsx)("p",{children:t.description})]}),(0,h.jsx)("article",{className:"margin-top--lg",children:(0,h.jsx)(j,{items:n.items,className:T.list})}),(0,h.jsx)("footer",{className:"margin-top--lg",children:(0,h.jsx)(N.A,{previous:t.navigation.previous,next:t.navigation.next})})]})}function w(e){return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(k,{...e}),(0,h.jsx)(y,{...e})]})}},86929:(e,t,n)=>{n.d(t,{A:()=>o});n(63696);var s=n(21312),r=n(34164),i=n(28774),a=n(62540);function l(e){const{permalink:t,title:n,subLabel:s,isNext:l}=e;return(0,a.jsxs)(i.A,{className:(0,r.A)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,a.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,a.jsx)("div",{className:"pagination-nav__label",children:n})]})}function o(e){const{previous:t,next:n}=e;return(0,a.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,s.translate)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,a.jsx)(l,{...t,subLabel:(0,a.jsx)(s.default,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,a.jsx)(l,{...n,subLabel:(0,a.jsx)(s.default,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},4267:(e,t,n)=>{n.d(t,{A:()=>o});n(63696);var s=n(34164),r=n(21312),i=n(17559),a=n(23025),l=n(62540);function o(e){let{className:t}=e;const n=(0,a.r)();return n.badge?(0,l.jsx)("span",{className:(0,s.A)(t,i.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,l.jsx)(r.default,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},51878:(e,t,n)=>{n.d(t,{A:()=>p});n(63696);var s=n(34164),r=n(44586),i=n(28774),a=n(21312),l=n(44070),o=n(17559),c=n(53886),d=n(23025),u=n(62540);const m={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(a.default,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(a.default,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const t=m[e.versionMetadata.banner];return(0,u.jsx)(t,{...e})}function b(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,u.jsx)(a.default,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(i.A,{to:n,onClick:s,children:(0,u.jsx)(a.default,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function x(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:i}}=(0,r.A)(),{pluginId:a}=(0,l.vT)({failfast:!0}),{savePreferredVersionName:d}=(0,c.g1)(a),{latestDocSuggestion:m,latestVersionSuggestion:x}=(0,l.HW)(a),p=m??(g=x).docs.find((e=>e.id===g.mainDocId));var g;return(0,u.jsxs)("div",{className:(0,s.A)(t,o.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(h,{siteTitle:i,versionMetadata:n})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(b,{versionLabel:x.label,to:p.path,onClick:()=>d(x.name)})})]})}function p(e){let{className:t}=e;const n=(0,d.r)();return n.banner?(0,u.jsx)(x,{className:t,versionMetadata:n}):null}},53465:(e,t,n)=>{n.d(t,{W:()=>c});var s=n(63696),r=n(44586);const i=["zero","one","two","few","many","other"];function a(e){return i.filter((t=>e.includes(t)))}const l={locale:"en",pluralForms:a(["one","other"]),select:e=>1===e?"one":"other"};function o(){const{i18n:{currentLocale:e}}=(0,r.A)();return(0,s.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:a(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),l}}),[e])}function c(){const e=o();return{selectMessage:(t,n)=>function(e,t,n){const s=e.split("|");if(1===s.length)return s[0];s.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms.join(",")}), but the message contains ${s.length}: ${e}`);const r=n.select(t),i=n.pluralForms.indexOf(r);return s[Math.min(i,s.length-1)]}(n,t,e)}}}}]); \ No newline at end of file diff --git a/assets/js/14eb3368.aef7709c.js b/assets/js/14eb3368.aef7709c.js new file mode 100644 index 00000000..402502b8 --- /dev/null +++ b/assets/js/14eb3368.aef7709c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[6969],{57519:(e,t,n)=>{n.d(t,{A:()=>g});n(63696);var s=n(34164),r=n(204),i=n(93751),a=n(30214),l=n(56289),o=n(50539),c=n(29030),d=n(62540);function u(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const m={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,c.Ay)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(l.A,{"aria-label":(0,o.translate)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(u,{className:m.breadcrumbHomeIcon})})})}const b={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function x(e){let{children:t,href:n,isLast:s}=e;const r="breadcrumbs__link";return s?(0,d.jsx)("span",{className:r,itemProp:"name",children:t}):n?(0,d.jsx)(l.A,{className:r,href:n,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:t})}):(0,d.jsx)("span",{className:r,children:t})}function p(e){let{children:t,active:n,index:r,addMicrodata:i}=e;return(0,d.jsxs)("li",{...i&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,s.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,d.jsx)("meta",{itemProp:"position",content:String(r+1)})]})}function g(){const e=(0,i.OF)(),t=(0,a.Dt)();return e?(0,d.jsx)("nav",{className:(0,s.A)(r.G.docs.docBreadcrumbs,b.breadcrumbsContainer),"aria-label":(0,o.translate)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,d.jsx)(h,{}),e.map(((t,n)=>{const s=n===e.length-1,r="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,d.jsx)(p,{active:s,index:n,addMicrodata:!!r,children:(0,d.jsx)(x,{href:r,isLast:s,children:t.label})},n)}))]})}):null}},67981:(e,t,n)=>{n.r(t),n.d(t,{default:()=>w});n(63696);var s=n(59144),r=n(93751),i=n(29030),a=n(34164),l=n(56289),o=n(81430),c=n(22887),d=n(50539),u=n(9303);const m={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var h=n(62540);function b(e){let{href:t,children:n}=e;return(0,h.jsx)(l.A,{href:t,className:(0,a.A)("card padding--lg",m.cardContainer),children:n})}function x(e){let{href:t,icon:n,title:s,description:r}=e;return(0,h.jsxs)(b,{href:t,children:[(0,h.jsxs)(u.A,{as:"h2",className:(0,a.A)("text--truncate",m.cardTitle),title:s,children:[n," ",s]}),r&&(0,h.jsx)("p",{className:(0,a.A)("text--truncate",m.cardDescription),title:r,children:r})]})}function p(e){let{item:t}=e;const n=(0,r.Nr)(t),s=function(){const{selectMessage:e}=(0,o.W)();return t=>e(t,(0,d.translate)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t}))}();return n?(0,h.jsx)(x,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:t.description??s(t.items.length)}):null}function g(e){let{item:t}=e;const n=(0,c.A)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,r.cC)(t.docId??void 0);return(0,h.jsx)(x,{href:t.href,icon:n,title:t.label,description:t.description??s?.description})}function v(e){let{item:t}=e;switch(t.type){case"link":return(0,h.jsx)(g,{item:t});case"category":return(0,h.jsx)(p,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function f(e){let{className:t}=e;const n=(0,r.$S)();return(0,h.jsx)(j,{items:n.items,className:t})}function j(e){const{items:t,className:n}=e;if(!t)return(0,h.jsx)(f,{...e});const s=(0,r.d1)(t);return(0,h.jsx)("section",{className:(0,a.A)("row",n),children:s.map(((e,t)=>(0,h.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,h.jsx)(v,{item:e})},t)))})}var N=n(80807),A=n(15833),L=n(55730),_=n(57519);const T={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function k(e){let{categoryGeneratedIndex:t}=e;return(0,h.jsx)(s.be,{title:t.title,description:t.description,keywords:t.keywords,image:(0,i.Ay)(t.image)})}function y(e){let{categoryGeneratedIndex:t}=e;const n=(0,r.$S)();return(0,h.jsxs)("div",{className:T.generatedIndexPage,children:[(0,h.jsx)(A.A,{}),(0,h.jsx)(_.A,{}),(0,h.jsx)(L.A,{}),(0,h.jsxs)("header",{children:[(0,h.jsx)(u.A,{as:"h1",className:T.title,children:t.title}),t.description&&(0,h.jsx)("p",{children:t.description})]}),(0,h.jsx)("article",{className:"margin-top--lg",children:(0,h.jsx)(j,{items:n.items,className:T.list})}),(0,h.jsx)("footer",{className:"margin-top--lg",children:(0,h.jsx)(N.A,{previous:t.navigation.previous,next:t.navigation.next})})]})}function w(e){return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(k,{...e}),(0,h.jsx)(y,{...e})]})}},80807:(e,t,n)=>{n.d(t,{A:()=>o});n(63696);var s=n(50539),r=n(34164),i=n(56289),a=n(62540);function l(e){const{permalink:t,title:n,subLabel:s,isNext:l}=e;return(0,a.jsxs)(i.A,{className:(0,r.A)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,a.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,a.jsx)("div",{className:"pagination-nav__label",children:n})]})}function o(e){const{previous:t,next:n}=e;return(0,a.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,s.translate)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,a.jsx)(l,{...t,subLabel:(0,a.jsx)(s.default,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,a.jsx)(l,{...n,subLabel:(0,a.jsx)(s.default,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},55730:(e,t,n)=>{n.d(t,{A:()=>o});n(63696);var s=n(34164),r=n(50539),i=n(204),a=n(21858),l=n(62540);function o(e){let{className:t}=e;const n=(0,a.r)();return n.badge?(0,l.jsx)("span",{className:(0,s.A)(t,i.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,l.jsx)(r.default,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},15833:(e,t,n)=>{n.d(t,{A:()=>p});n(63696);var s=n(34164),r=n(40797),i=n(56289),a=n(50539),l=n(56942),o=n(204),c=n(96351),d=n(21858),u=n(62540);const m={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(a.default,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(a.default,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const t=m[e.versionMetadata.banner];return(0,u.jsx)(t,{...e})}function b(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,u.jsx)(a.default,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(i.A,{to:n,onClick:s,children:(0,u.jsx)(a.default,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function x(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:i}}=(0,r.A)(),{pluginId:a}=(0,l.vT)({failfast:!0}),{savePreferredVersionName:d}=(0,c.g1)(a),{latestDocSuggestion:m,latestVersionSuggestion:x}=(0,l.HW)(a),p=m??(g=x).docs.find((e=>e.id===g.mainDocId));var g;return(0,u.jsxs)("div",{className:(0,s.A)(t,o.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(h,{siteTitle:i,versionMetadata:n})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(b,{versionLabel:x.label,to:p.path,onClick:()=>d(x.name)})})]})}function p(e){let{className:t}=e;const n=(0,d.r)();return n.banner?(0,u.jsx)(x,{className:t,versionMetadata:n}):null}},81430:(e,t,n)=>{n.d(t,{W:()=>c});var s=n(63696),r=n(40797);const i=["zero","one","two","few","many","other"];function a(e){return i.filter((t=>e.includes(t)))}const l={locale:"en",pluralForms:a(["one","other"]),select:e=>1===e?"one":"other"};function o(){const{i18n:{currentLocale:e}}=(0,r.A)();return(0,s.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:a(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),l}}),[e])}function c(){const e=o();return{selectMessage:(t,n)=>function(e,t,n){const s=e.split("|");if(1===s.length)return s[0];s.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms.join(",")}), but the message contains ${s.length}: ${e}`);const r=n.select(t),i=n.pluralForms.indexOf(r);return s[Math.min(i,s.length-1)]}(n,t,e)}}}}]); \ No newline at end of file diff --git a/assets/js/17896441.70db0a30.js b/assets/js/17896441.70db0a30.js deleted file mode 100644 index 5401538d..00000000 --- a/assets/js/17896441.70db0a30.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[8401],{27293:(e,t,n)=>{n.d(t,{A:()=>B});var s=n(63696),i=n(62540);function a(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),l=n?.props.children;return{mdxAdmonitionTitle:l,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}var l=n(34164),o=n(21312),r=n(17559);const c="admonition_xJq3",d="admonitionHeading_Gvgb",u="admonitionIcon_Rf37",m="admonitionContent_BuS1";function h(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,l.A)(r.G.common.admonition,r.G.common.admonitionType(t),c,n),children:s})}function x(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:d,children:[(0,i.jsx)("span",{className:u,children:t}),n]})}function f(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:m,children:t}):null}function v(e){const{type:t,icon:n,title:s,children:a,className:l}=e;return(0,i.jsxs)(h,{type:t,className:l,children:[s||n?(0,i.jsx)(x,{title:s,icon:n}):null,(0,i.jsx)(f,{children:a})]})}function p(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const j={icon:(0,i.jsx)(p,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function g(e){return(0,i.jsx)(v,{...j,...e,className:(0,l.A)("alert alert--secondary",e.className),children:e.children})}function b(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const N={icon:(0,i.jsx)(b,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function A(e){return(0,i.jsx)(v,{...N,...e,className:(0,l.A)("alert alert--success",e.className),children:e.children})}function C(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const L={icon:(0,i.jsx)(C,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function _(e){return(0,i.jsx)(v,{...L,...e,className:(0,l.A)("alert alert--info",e.className),children:e.children})}function T(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const y={icon:(0,i.jsx)(T,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function k(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const H={icon:(0,i.jsx)(k,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const w={icon:(0,i.jsx)(T,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const M={...{note:g,tip:A,info:_,warning:function(e){return(0,i.jsx)(v,{...y,...e,className:(0,l.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(v,{...H,...e,className:(0,l.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(g,{title:"secondary",...e}),important:e=>(0,i.jsx)(_,{title:"important",...e}),success:e=>(0,i.jsx)(A,{title:"success",...e}),caution:function(e){return(0,i.jsx)(v,{...w,...e,className:(0,l.A)("alert alert--warning",e.className),children:e.children})}}};function B(e){const t=a(e),n=(s=t.type,M[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),M.info));var s;return(0,i.jsx)(n,{...t})}},71243:(e,t,n)=>{n.d(t,{A:()=>p});n(63696);var s=n(34164),i=n(17559),a=n(26972),l=n(99169),o=n(28774),r=n(21312),c=n(86025),d=n(62540);function u(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const m={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,c.Ay)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(o.A,{"aria-label":(0,r.translate)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(u,{className:m.breadcrumbHomeIcon})})})}const x={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function f(e){let{children:t,href:n,isLast:s}=e;const i="breadcrumbs__link";return s?(0,d.jsx)("span",{className:i,itemProp:"name",children:t}):n?(0,d.jsx)(o.A,{className:i,href:n,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:t})}):(0,d.jsx)("span",{className:i,children:t})}function v(e){let{children:t,active:n,index:i,addMicrodata:a}=e;return(0,d.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,s.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,d.jsx)("meta",{itemProp:"position",content:String(i+1)})]})}function p(){const e=(0,a.OF)(),t=(0,l.Dt)();return e?(0,d.jsx)("nav",{className:(0,s.A)(i.G.docs.docBreadcrumbs,x.breadcrumbsContainer),"aria-label":(0,r.translate)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,d.jsx)(h,{}),e.map(((t,n)=>{const s=n===e.length-1,i="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,d.jsx)(v,{active:s,index:n,addMicrodata:!!i,children:(0,d.jsx)(f,{href:i,isLast:s,children:t.label})},n)}))]})}):null}},94577:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Me});var s=n(63696),i=n(69024),a=n(89532),l=n(62540);const o=s.createContext(null);function r(e){let{children:t,content:n}=e;const i=function(e){return(0,s.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return(0,l.jsx)(o.Provider,{value:i,children:t})}function c(){const e=(0,s.useContext)(o);if(null===e)throw new a.dV("DocProvider");return e}function d(){const{metadata:e,frontMatter:t,assets:n}=c();return(0,l.jsx)(i.be,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var u=n(34164),m=n(24581),h=n(86929);function x(){const{metadata:e}=c();return(0,l.jsx)(h.A,{previous:e.previous,next:e.next})}var f=n(51878),v=n(4267),p=n(17559),j=n(21312),g=n(28774);const b={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function N(e){let{permalink:t,label:n,count:s,description:i}=e;return(0,l.jsxs)(g.A,{href:t,title:i,className:(0,u.A)(b.tag,s?b.tagWithCount:b.tagRegular),children:[n,s&&(0,l.jsx)("span",{children:s})]})}const A={tags:"tags_jXut",tag:"tag_QGVx"};function C(e){let{tags:t}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("b",{children:(0,l.jsx)(j.default,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,l.jsx)("ul",{className:(0,u.A)(A.tags,"padding--none","margin-left--sm"),children:t.map((e=>(0,l.jsx)("li",{className:A.tag,children:(0,l.jsx)(N,{...e})},e.permalink)))})]})}const L={iconEdit:"iconEdit_Z9Sw"};function _(e){let{className:t,...n}=e;return(0,l.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.A)(L.iconEdit,t),"aria-hidden":"true",...n,children:(0,l.jsx)("g",{children:(0,l.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function T(e){let{editUrl:t}=e;return(0,l.jsxs)(g.A,{to:t,className:p.G.common.editThisPage,children:[(0,l.jsx)(_,{}),(0,l.jsx)(j.default,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var y=n(44586);function k(e){void 0===e&&(e={});const{i18n:{currentLocale:t}}=(0,y.A)(),n=function(){const{i18n:{currentLocale:e,localeConfigs:t}}=(0,y.A)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})}function H(e){let{lastUpdatedAt:t}=e;const n=new Date(t),s=k({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(n);return(0,l.jsx)(j.default,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,l.jsx)("b",{children:(0,l.jsx)("time",{dateTime:n.toISOString(),itemProp:"dateModified",children:s})})},children:" on {date}"})}function w(e){let{lastUpdatedBy:t}=e;return(0,l.jsx)(j.default,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,l.jsx)("b",{children:t})},children:" by {user}"})}function M(e){let{lastUpdatedAt:t,lastUpdatedBy:n}=e;return(0,l.jsxs)("span",{className:p.G.common.lastUpdated,children:[(0,l.jsx)(j.default,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t?(0,l.jsx)(H,{lastUpdatedAt:t}):"",byUser:n?(0,l.jsx)(w,{lastUpdatedBy:n}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const B={lastUpdated:"lastUpdated_JAkA"};function U(e){let{className:t,editUrl:n,lastUpdatedAt:s,lastUpdatedBy:i}=e;return(0,l.jsxs)("div",{className:(0,u.A)("row",t),children:[(0,l.jsx)("div",{className:"col",children:n&&(0,l.jsx)(T,{editUrl:n})}),(0,l.jsx)("div",{className:(0,u.A)("col",B.lastUpdated),children:(s||i)&&(0,l.jsx)(M,{lastUpdatedAt:s,lastUpdatedBy:i})})]})}function I(){const{metadata:e}=c(),{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s,tags:i}=e,a=i.length>0,o=!!(t||n||s);return a||o?(0,l.jsxs)("footer",{className:(0,u.A)(p.G.docs.docFooter,"docusaurus-mt-lg"),children:[a&&(0,l.jsx)("div",{className:(0,u.A)("row margin-top--sm",p.G.docs.docFooterTagsRow),children:(0,l.jsx)("div",{className:"col",children:(0,l.jsx)(C,{tags:i})})}),o&&(0,l.jsx)(U,{className:(0,u.A)("margin-top--sm",p.G.docs.docFooterEditMetaRow),editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s})]}):null}var E=n(41422),V=n(6342);function z(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const s=n.slice(2,e.level);e.parentIndex=Math.max(...s),n[e.level]=t}));const s=[];return t.forEach((e=>{const{parentIndex:n,...i}=e;n>=0?t[n].children.push(i):s.push(i)})),s}function G(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:s}=e;return t.flatMap((e=>{const t=G({toc:e.children,minHeadingLevel:n,maxHeadingLevel:s});return function(e){return e.level>=n&&e.level<=s}(e)?[{...e,children:t}]:t}))}function R(e){const t=e.getBoundingClientRect();return t.top===t.bottom?R(e.parentNode):t}function O(e,t){let{anchorTopOffset:n}=t;const s=e.find((e=>R(e).top>=n));if(s){return function(e){return e.top>0&&e.bottom{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function D(e){const t=(0,s.useRef)(void 0),n=S();(0,s.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:i,minHeadingLevel:a,maxHeadingLevel:l}=e;function o(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),o=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const s=[];for(let i=t;i<=n;i+=1)s.push(`h${i}.anchor`);return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:a,maxHeadingLevel:l}),r=O(o,{anchorTopOffset:n.current}),c=e.find((e=>r&&r.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(i),e.classList.add(i),t.current=e):e.classList.remove(i)}(e,e===c)}))}return document.addEventListener("scroll",o),document.addEventListener("resize",o),o(),()=>{document.removeEventListener("scroll",o),document.removeEventListener("resize",o)}}),[e,n])}function F(e){let{toc:t,className:n,linkClassName:s,isChild:i}=e;return t.length?(0,l.jsx)("ul",{className:i?void 0:n,children:t.map((e=>(0,l.jsxs)("li",{children:[(0,l.jsx)(g.A,{to:`#${e.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,l.jsx)(F,{isChild:!0,toc:e.children,className:n,linkClassName:s})]},e.id)))}):null}const P=s.memo(F);function q(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:i="table-of-contents__link",linkActiveClassName:a,minHeadingLevel:o,maxHeadingLevel:r,...c}=e;const d=(0,V.p)(),u=o??d.tableOfContents.minHeadingLevel,m=r??d.tableOfContents.maxHeadingLevel,h=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:i}=e;return(0,s.useMemo)((()=>G({toc:z(t),minHeadingLevel:n,maxHeadingLevel:i})),[t,n,i])}({toc:t,minHeadingLevel:u,maxHeadingLevel:m});return D((0,s.useMemo)((()=>{if(i&&a)return{linkClassName:i,linkActiveClassName:a,minHeadingLevel:u,maxHeadingLevel:m}}),[i,a,u,m])),(0,l.jsx)(P,{toc:h,className:n,linkClassName:i,...c})}const W={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function $(e){let{collapsed:t,...n}=e;return(0,l.jsx)("button",{type:"button",...n,className:(0,u.A)("clean-btn",W.tocCollapsibleButton,!t&&W.tocCollapsibleButtonExpanded,n.className),children:(0,l.jsx)(j.default,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}const Z={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function J(e){let{toc:t,className:n,minHeadingLevel:s,maxHeadingLevel:i}=e;const{collapsed:a,toggleCollapsed:o}=(0,E.u)({initialState:!0});return(0,l.jsxs)("div",{className:(0,u.A)(Z.tocCollapsible,!a&&Z.tocCollapsibleExpanded,n),children:[(0,l.jsx)($,{collapsed:a,onClick:o}),(0,l.jsx)(E.N,{lazy:!0,className:Z.tocCollapsibleContent,collapsed:a,children:(0,l.jsx)(q,{toc:t,minHeadingLevel:s,maxHeadingLevel:i})})]})}const Q={tocMobile:"tocMobile_ITEo"};function X(){const{toc:e,frontMatter:t}=c();return(0,l.jsx)(J,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,u.A)(p.G.docs.docTocMobile,Q.tocMobile)})}const Y={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},K="table-of-contents__link toc-highlight",ee="table-of-contents__link--active";function te(e){let{className:t,...n}=e;return(0,l.jsx)("div",{className:(0,u.A)(Y.tableOfContents,"thin-scrollbar",t),children:(0,l.jsx)(q,{...n,linkClassName:K,linkActiveClassName:ee})})}function ne(){const{toc:e,frontMatter:t}=c();return(0,l.jsx)(te,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:p.G.docs.docTocDesktop})}var se=n(51107),ie=n(28453),ae=n(5260),le=n(21432);function oe(e){return(0,l.jsx)("code",{...e})}var re=n(41622);function ce(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),i=(0,l.jsx)(l.Fragment,{children:t.filter((e=>e!==n))});return(0,l.jsx)(re.default,{...e,summary:n,children:i})}function de(e){return(0,l.jsx)(se.A,{...e})}const ue="containsTaskList_mC6p";function me(e){if(void 0!==e)return(0,u.A)(e,e?.includes("contains-task-list")&&ue)}var he=n(63427);const xe="img_ev3q";var fe=n(27293);const ve={Head:ae.A,details:ce,Details:ce,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,l.jsx)(oe,{...e}):(0,l.jsx)(le.default,{...e})},a:function(e){return(0,l.jsx)(g.A,{...e})},pre:function(e){return(0,l.jsx)(l.Fragment,{children:e.children})},ul:function(e){return(0,l.jsx)("ul",{...e,className:me(e.className)})},li:function(e){return(0,he.A)().collectAnchor(e.id),(0,l.jsx)("li",{...e})},img:function(e){return(0,l.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,u.A)(t,xe))});var t},h1:e=>(0,l.jsx)(de,{as:"h1",...e}),h2:e=>(0,l.jsx)(de,{as:"h2",...e}),h3:e=>(0,l.jsx)(de,{as:"h3",...e}),h4:e=>(0,l.jsx)(de,{as:"h4",...e}),h5:e=>(0,l.jsx)(de,{as:"h5",...e}),h6:e=>(0,l.jsx)(de,{as:"h6",...e}),admonition:fe.A,mermaid:()=>null};function pe(e){let{children:t}=e;return(0,l.jsx)(ie.x,{components:ve,children:t})}function je(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=c();return t.hide_title||void 0!==n?null:e.title}();return(0,l.jsxs)("div",{className:(0,u.A)(p.G.docs.docMarkdown,"markdown"),children:[n&&(0,l.jsx)("header",{children:(0,l.jsx)(se.A,{as:"h1",children:n})}),(0,l.jsx)(pe,{children:t})]})}var ge=n(71243);function be(){return(0,l.jsx)(j.default,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Ne(){return(0,l.jsx)(j.default,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Ae(){return(0,l.jsx)(ae.A,{children:(0,l.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Ce(){return(0,l.jsx)(j.default,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function Le(){return(0,l.jsx)(j.default,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}function _e(e){let{className:t}=e;return(0,l.jsx)(fe.A,{type:"caution",title:(0,l.jsx)(Ce,{}),className:(0,u.A)(t,p.G.common.draftBanner),children:(0,l.jsx)(Le,{})})}function Te(e){let{className:t}=e;return(0,l.jsx)(fe.A,{type:"caution",title:(0,l.jsx)(be,{}),className:(0,u.A)(t,p.G.common.unlistedBanner),children:(0,l.jsx)(Ne,{})})}function ye(e){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ae,{}),(0,l.jsx)(Te,{...e})]})}function ke(e){let{metadata:t}=e;const{unlisted:n,frontMatter:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(n||s.unlisted)&&(0,l.jsx)(ye,{}),s.draft&&(0,l.jsx)(_e,{})]})}const He={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function we(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=c(),n=(0,m.l)(),s=e.hide_table_of_contents,i=!s&&t.length>0;return{hidden:s,mobile:i?(0,l.jsx)(X,{}):void 0,desktop:!i||"desktop"!==n&&"ssr"!==n?void 0:(0,l.jsx)(ne,{})}}(),{metadata:s}=c();return(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:(0,u.A)("col",!n.hidden&&He.docItemCol),children:[(0,l.jsx)(ke,{metadata:s}),(0,l.jsx)(f.A,{}),(0,l.jsxs)("div",{className:He.docItemContainer,children:[(0,l.jsxs)("article",{children:[(0,l.jsx)(ge.A,{}),(0,l.jsx)(v.A,{}),n.mobile,(0,l.jsx)(je,{children:t}),(0,l.jsx)(I,{})]}),(0,l.jsx)(x,{})]})]}),n.desktop&&(0,l.jsx)("div",{className:"col col--3",children:n.desktop})]})}function Me(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,l.jsx)(r,{content:e.content,children:(0,l.jsxs)(i.e3,{className:t,children:[(0,l.jsx)(d,{}),(0,l.jsx)(we,{children:(0,l.jsx)(n,{})})]})})}},86929:(e,t,n)=>{n.d(t,{A:()=>r});n(63696);var s=n(21312),i=n(34164),a=n(28774),l=n(62540);function o(e){const{permalink:t,title:n,subLabel:s,isNext:o}=e;return(0,l.jsxs)(a.A,{className:(0,i.A)("pagination-nav__link",o?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,l.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,l.jsx)("div",{className:"pagination-nav__label",children:n})]})}function r(e){const{previous:t,next:n}=e;return(0,l.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,s.translate)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,l.jsx)(o,{...t,subLabel:(0,l.jsx)(s.default,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,l.jsx)(o,{...n,subLabel:(0,l.jsx)(s.default,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},4267:(e,t,n)=>{n.d(t,{A:()=>r});n(63696);var s=n(34164),i=n(21312),a=n(17559),l=n(23025),o=n(62540);function r(e){let{className:t}=e;const n=(0,l.r)();return n.badge?(0,o.jsx)("span",{className:(0,s.A)(t,a.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,o.jsx)(i.default,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},51878:(e,t,n)=>{n.d(t,{A:()=>v});n(63696);var s=n(34164),i=n(44586),a=n(28774),l=n(21312),o=n(44070),r=n(17559),c=n(53886),d=n(23025),u=n(62540);const m={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(l.default,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(l.default,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const t=m[e.versionMetadata.banner];return(0,u.jsx)(t,{...e})}function x(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,u.jsx)(l.default,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(a.A,{to:n,onClick:s,children:(0,u.jsx)(l.default,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function f(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:a}}=(0,i.A)(),{pluginId:l}=(0,o.vT)({failfast:!0}),{savePreferredVersionName:d}=(0,c.g1)(l),{latestDocSuggestion:m,latestVersionSuggestion:f}=(0,o.HW)(l),v=m??(p=f).docs.find((e=>e.id===p.mainDocId));var p;return(0,u.jsxs)("div",{className:(0,s.A)(t,r.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(h,{siteTitle:a,versionMetadata:n})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(x,{versionLabel:f.label,to:v.path,onClick:()=>d(f.name)})})]})}function v(e){let{className:t}=e;const n=(0,d.r)();return n.banner?(0,u.jsx)(f,{className:t,versionMetadata:n}):null}}}]); \ No newline at end of file diff --git a/assets/js/17896441.7fdc214a.js b/assets/js/17896441.7fdc214a.js new file mode 100644 index 00000000..75457f70 --- /dev/null +++ b/assets/js/17896441.7fdc214a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[8401],{52362:(e,t,n)=>{n.d(t,{A:()=>B});var s=n(63696),i=n(62540);function a(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),l=n?.props.children;return{mdxAdmonitionTitle:l,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}var l=n(34164),o=n(50539),r=n(204);const c="admonition_xJq3",d="admonitionHeading_Gvgb",u="admonitionIcon_Rf37",m="admonitionContent_BuS1";function h(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,l.A)(r.G.common.admonition,r.G.common.admonitionType(t),c,n),children:s})}function x(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:d,children:[(0,i.jsx)("span",{className:u,children:t}),n]})}function f(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:m,children:t}):null}function v(e){const{type:t,icon:n,title:s,children:a,className:l}=e;return(0,i.jsxs)(h,{type:t,className:l,children:[s||n?(0,i.jsx)(x,{title:s,icon:n}):null,(0,i.jsx)(f,{children:a})]})}function p(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const j={icon:(0,i.jsx)(p,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function g(e){return(0,i.jsx)(v,{...j,...e,className:(0,l.A)("alert alert--secondary",e.className),children:e.children})}function b(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const N={icon:(0,i.jsx)(b,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function A(e){return(0,i.jsx)(v,{...N,...e,className:(0,l.A)("alert alert--success",e.className),children:e.children})}function C(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const L={icon:(0,i.jsx)(C,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function _(e){return(0,i.jsx)(v,{...L,...e,className:(0,l.A)("alert alert--info",e.className),children:e.children})}function T(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const y={icon:(0,i.jsx)(T,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function k(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const H={icon:(0,i.jsx)(k,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const w={icon:(0,i.jsx)(T,{}),title:(0,i.jsx)(o.default,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const M={...{note:g,tip:A,info:_,warning:function(e){return(0,i.jsx)(v,{...y,...e,className:(0,l.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(v,{...H,...e,className:(0,l.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(g,{title:"secondary",...e}),important:e=>(0,i.jsx)(_,{title:"important",...e}),success:e=>(0,i.jsx)(A,{title:"success",...e}),caution:function(e){return(0,i.jsx)(v,{...w,...e,className:(0,l.A)("alert alert--warning",e.className),children:e.children})}}};function B(e){const t=a(e),n=(s=t.type,M[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),M.info));var s;return(0,i.jsx)(n,{...t})}},57519:(e,t,n)=>{n.d(t,{A:()=>p});n(63696);var s=n(34164),i=n(204),a=n(93751),l=n(30214),o=n(56289),r=n(50539),c=n(29030),d=n(62540);function u(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const m={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,c.Ay)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(o.A,{"aria-label":(0,r.translate)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(u,{className:m.breadcrumbHomeIcon})})})}const x={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function f(e){let{children:t,href:n,isLast:s}=e;const i="breadcrumbs__link";return s?(0,d.jsx)("span",{className:i,itemProp:"name",children:t}):n?(0,d.jsx)(o.A,{className:i,href:n,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:t})}):(0,d.jsx)("span",{className:i,children:t})}function v(e){let{children:t,active:n,index:i,addMicrodata:a}=e;return(0,d.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,s.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,d.jsx)("meta",{itemProp:"position",content:String(i+1)})]})}function p(){const e=(0,a.OF)(),t=(0,l.Dt)();return e?(0,d.jsx)("nav",{className:(0,s.A)(i.G.docs.docBreadcrumbs,x.breadcrumbsContainer),"aria-label":(0,r.translate)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,d.jsx)(h,{}),e.map(((t,n)=>{const s=n===e.length-1,i="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,d.jsx)(v,{active:s,index:n,addMicrodata:!!i,children:(0,d.jsx)(f,{href:i,isLast:s,children:t.label})},n)}))]})}):null}},58404:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Me});var s=n(63696),i=n(59144),a=n(26849),l=n(62540);const o=s.createContext(null);function r(e){let{children:t,content:n}=e;const i=function(e){return(0,s.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return(0,l.jsx)(o.Provider,{value:i,children:t})}function c(){const e=(0,s.useContext)(o);if(null===e)throw new a.dV("DocProvider");return e}function d(){const{metadata:e,frontMatter:t,assets:n}=c();return(0,l.jsx)(i.be,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var u=n(34164),m=n(86682),h=n(80807);function x(){const{metadata:e}=c();return(0,l.jsx)(h.A,{previous:e.previous,next:e.next})}var f=n(15833),v=n(55730),p=n(204),j=n(50539),g=n(56289);const b={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function N(e){let{permalink:t,label:n,count:s,description:i}=e;return(0,l.jsxs)(g.A,{href:t,title:i,className:(0,u.A)(b.tag,s?b.tagWithCount:b.tagRegular),children:[n,s&&(0,l.jsx)("span",{children:s})]})}const A={tags:"tags_jXut",tag:"tag_QGVx"};function C(e){let{tags:t}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("b",{children:(0,l.jsx)(j.default,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,l.jsx)("ul",{className:(0,u.A)(A.tags,"padding--none","margin-left--sm"),children:t.map((e=>(0,l.jsx)("li",{className:A.tag,children:(0,l.jsx)(N,{...e})},e.permalink)))})]})}const L={iconEdit:"iconEdit_Z9Sw"};function _(e){let{className:t,...n}=e;return(0,l.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.A)(L.iconEdit,t),"aria-hidden":"true",...n,children:(0,l.jsx)("g",{children:(0,l.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function T(e){let{editUrl:t}=e;return(0,l.jsxs)(g.A,{to:t,className:p.G.common.editThisPage,children:[(0,l.jsx)(_,{}),(0,l.jsx)(j.default,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var y=n(40797);function k(e){void 0===e&&(e={});const{i18n:{currentLocale:t}}=(0,y.A)(),n=function(){const{i18n:{currentLocale:e,localeConfigs:t}}=(0,y.A)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})}function H(e){let{lastUpdatedAt:t}=e;const n=new Date(t),s=k({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(n);return(0,l.jsx)(j.default,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,l.jsx)("b",{children:(0,l.jsx)("time",{dateTime:n.toISOString(),itemProp:"dateModified",children:s})})},children:" on {date}"})}function w(e){let{lastUpdatedBy:t}=e;return(0,l.jsx)(j.default,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,l.jsx)("b",{children:t})},children:" by {user}"})}function M(e){let{lastUpdatedAt:t,lastUpdatedBy:n}=e;return(0,l.jsxs)("span",{className:p.G.common.lastUpdated,children:[(0,l.jsx)(j.default,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t?(0,l.jsx)(H,{lastUpdatedAt:t}):"",byUser:n?(0,l.jsx)(w,{lastUpdatedBy:n}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const B={lastUpdated:"lastUpdated_JAkA"};function U(e){let{className:t,editUrl:n,lastUpdatedAt:s,lastUpdatedBy:i}=e;return(0,l.jsxs)("div",{className:(0,u.A)("row",t),children:[(0,l.jsx)("div",{className:"col",children:n&&(0,l.jsx)(T,{editUrl:n})}),(0,l.jsx)("div",{className:(0,u.A)("col",B.lastUpdated),children:(s||i)&&(0,l.jsx)(M,{lastUpdatedAt:s,lastUpdatedBy:i})})]})}function I(){const{metadata:e}=c(),{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s,tags:i}=e,a=i.length>0,o=!!(t||n||s);return a||o?(0,l.jsxs)("footer",{className:(0,u.A)(p.G.docs.docFooter,"docusaurus-mt-lg"),children:[a&&(0,l.jsx)("div",{className:(0,u.A)("row margin-top--sm",p.G.docs.docFooterTagsRow),children:(0,l.jsx)("div",{className:"col",children:(0,l.jsx)(C,{tags:i})})}),o&&(0,l.jsx)(U,{className:(0,u.A)("margin-top--sm",p.G.docs.docFooterEditMetaRow),editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s})]}):null}var E=n(33535),V=n(53115);function z(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const s=n.slice(2,e.level);e.parentIndex=Math.max(...s),n[e.level]=t}));const s=[];return t.forEach((e=>{const{parentIndex:n,...i}=e;n>=0?t[n].children.push(i):s.push(i)})),s}function G(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:s}=e;return t.flatMap((e=>{const t=G({toc:e.children,minHeadingLevel:n,maxHeadingLevel:s});return function(e){return e.level>=n&&e.level<=s}(e)?[{...e,children:t}]:t}))}function R(e){const t=e.getBoundingClientRect();return t.top===t.bottom?R(e.parentNode):t}function O(e,t){let{anchorTopOffset:n}=t;const s=e.find((e=>R(e).top>=n));if(s){return function(e){return e.top>0&&e.bottom{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function D(e){const t=(0,s.useRef)(void 0),n=S();(0,s.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:i,minHeadingLevel:a,maxHeadingLevel:l}=e;function o(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),o=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const s=[];for(let i=t;i<=n;i+=1)s.push(`h${i}.anchor`);return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:a,maxHeadingLevel:l}),r=O(o,{anchorTopOffset:n.current}),c=e.find((e=>r&&r.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(i),e.classList.add(i),t.current=e):e.classList.remove(i)}(e,e===c)}))}return document.addEventListener("scroll",o),document.addEventListener("resize",o),o(),()=>{document.removeEventListener("scroll",o),document.removeEventListener("resize",o)}}),[e,n])}function F(e){let{toc:t,className:n,linkClassName:s,isChild:i}=e;return t.length?(0,l.jsx)("ul",{className:i?void 0:n,children:t.map((e=>(0,l.jsxs)("li",{children:[(0,l.jsx)(g.A,{to:`#${e.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,l.jsx)(F,{isChild:!0,toc:e.children,className:n,linkClassName:s})]},e.id)))}):null}const P=s.memo(F);function q(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:i="table-of-contents__link",linkActiveClassName:a,minHeadingLevel:o,maxHeadingLevel:r,...c}=e;const d=(0,V.p)(),u=o??d.tableOfContents.minHeadingLevel,m=r??d.tableOfContents.maxHeadingLevel,h=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:i}=e;return(0,s.useMemo)((()=>G({toc:z(t),minHeadingLevel:n,maxHeadingLevel:i})),[t,n,i])}({toc:t,minHeadingLevel:u,maxHeadingLevel:m});return D((0,s.useMemo)((()=>{if(i&&a)return{linkClassName:i,linkActiveClassName:a,minHeadingLevel:u,maxHeadingLevel:m}}),[i,a,u,m])),(0,l.jsx)(P,{toc:h,className:n,linkClassName:i,...c})}const W={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function $(e){let{collapsed:t,...n}=e;return(0,l.jsx)("button",{type:"button",...n,className:(0,u.A)("clean-btn",W.tocCollapsibleButton,!t&&W.tocCollapsibleButtonExpanded,n.className),children:(0,l.jsx)(j.default,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}const Z={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function J(e){let{toc:t,className:n,minHeadingLevel:s,maxHeadingLevel:i}=e;const{collapsed:a,toggleCollapsed:o}=(0,E.u)({initialState:!0});return(0,l.jsxs)("div",{className:(0,u.A)(Z.tocCollapsible,!a&&Z.tocCollapsibleExpanded,n),children:[(0,l.jsx)($,{collapsed:a,onClick:o}),(0,l.jsx)(E.N,{lazy:!0,className:Z.tocCollapsibleContent,collapsed:a,children:(0,l.jsx)(q,{toc:t,minHeadingLevel:s,maxHeadingLevel:i})})]})}const Q={tocMobile:"tocMobile_ITEo"};function X(){const{toc:e,frontMatter:t}=c();return(0,l.jsx)(J,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,u.A)(p.G.docs.docTocMobile,Q.tocMobile)})}const Y={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},K="table-of-contents__link toc-highlight",ee="table-of-contents__link--active";function te(e){let{className:t,...n}=e;return(0,l.jsx)("div",{className:(0,u.A)(Y.tableOfContents,"thin-scrollbar",t),children:(0,l.jsx)(q,{...n,linkClassName:K,linkActiveClassName:ee})})}function ne(){const{toc:e,frontMatter:t}=c();return(0,l.jsx)(te,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:p.G.docs.docTocDesktop})}var se=n(9303),ie=n(28453),ae=n(27143),le=n(58069);function oe(e){return(0,l.jsx)("code",{...e})}var re=n(56701);function ce(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),i=(0,l.jsx)(l.Fragment,{children:t.filter((e=>e!==n))});return(0,l.jsx)(re.default,{...e,summary:n,children:i})}function de(e){return(0,l.jsx)(se.A,{...e})}const ue="containsTaskList_mC6p";function me(e){if(void 0!==e)return(0,u.A)(e,e?.includes("contains-task-list")&&ue)}var he=n(25246);const xe="img_ev3q";var fe=n(52362);const ve={Head:ae.A,details:ce,Details:ce,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,l.jsx)(oe,{...e}):(0,l.jsx)(le.default,{...e})},a:function(e){return(0,l.jsx)(g.A,{...e})},pre:function(e){return(0,l.jsx)(l.Fragment,{children:e.children})},ul:function(e){return(0,l.jsx)("ul",{...e,className:me(e.className)})},li:function(e){return(0,he.A)().collectAnchor(e.id),(0,l.jsx)("li",{...e})},img:function(e){return(0,l.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,u.A)(t,xe))});var t},h1:e=>(0,l.jsx)(de,{as:"h1",...e}),h2:e=>(0,l.jsx)(de,{as:"h2",...e}),h3:e=>(0,l.jsx)(de,{as:"h3",...e}),h4:e=>(0,l.jsx)(de,{as:"h4",...e}),h5:e=>(0,l.jsx)(de,{as:"h5",...e}),h6:e=>(0,l.jsx)(de,{as:"h6",...e}),admonition:fe.A,mermaid:()=>null};function pe(e){let{children:t}=e;return(0,l.jsx)(ie.x,{components:ve,children:t})}function je(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=c();return t.hide_title||void 0!==n?null:e.title}();return(0,l.jsxs)("div",{className:(0,u.A)(p.G.docs.docMarkdown,"markdown"),children:[n&&(0,l.jsx)("header",{children:(0,l.jsx)(se.A,{as:"h1",children:n})}),(0,l.jsx)(pe,{children:t})]})}var ge=n(57519);function be(){return(0,l.jsx)(j.default,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Ne(){return(0,l.jsx)(j.default,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Ae(){return(0,l.jsx)(ae.A,{children:(0,l.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Ce(){return(0,l.jsx)(j.default,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function Le(){return(0,l.jsx)(j.default,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}function _e(e){let{className:t}=e;return(0,l.jsx)(fe.A,{type:"caution",title:(0,l.jsx)(Ce,{}),className:(0,u.A)(t,p.G.common.draftBanner),children:(0,l.jsx)(Le,{})})}function Te(e){let{className:t}=e;return(0,l.jsx)(fe.A,{type:"caution",title:(0,l.jsx)(be,{}),className:(0,u.A)(t,p.G.common.unlistedBanner),children:(0,l.jsx)(Ne,{})})}function ye(e){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ae,{}),(0,l.jsx)(Te,{...e})]})}function ke(e){let{metadata:t}=e;const{unlisted:n,frontMatter:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(n||s.unlisted)&&(0,l.jsx)(ye,{}),s.draft&&(0,l.jsx)(_e,{})]})}const He={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function we(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=c(),n=(0,m.l)(),s=e.hide_table_of_contents,i=!s&&t.length>0;return{hidden:s,mobile:i?(0,l.jsx)(X,{}):void 0,desktop:!i||"desktop"!==n&&"ssr"!==n?void 0:(0,l.jsx)(ne,{})}}(),{metadata:s}=c();return(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:(0,u.A)("col",!n.hidden&&He.docItemCol),children:[(0,l.jsx)(ke,{metadata:s}),(0,l.jsx)(f.A,{}),(0,l.jsxs)("div",{className:He.docItemContainer,children:[(0,l.jsxs)("article",{children:[(0,l.jsx)(ge.A,{}),(0,l.jsx)(v.A,{}),n.mobile,(0,l.jsx)(je,{children:t}),(0,l.jsx)(I,{})]}),(0,l.jsx)(x,{})]})]}),n.desktop&&(0,l.jsx)("div",{className:"col col--3",children:n.desktop})]})}function Me(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,l.jsx)(r,{content:e.content,children:(0,l.jsxs)(i.e3,{className:t,children:[(0,l.jsx)(d,{}),(0,l.jsx)(we,{children:(0,l.jsx)(n,{})})]})})}},80807:(e,t,n)=>{n.d(t,{A:()=>r});n(63696);var s=n(50539),i=n(34164),a=n(56289),l=n(62540);function o(e){const{permalink:t,title:n,subLabel:s,isNext:o}=e;return(0,l.jsxs)(a.A,{className:(0,i.A)("pagination-nav__link",o?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,l.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,l.jsx)("div",{className:"pagination-nav__label",children:n})]})}function r(e){const{previous:t,next:n}=e;return(0,l.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,s.translate)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,l.jsx)(o,{...t,subLabel:(0,l.jsx)(s.default,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,l.jsx)(o,{...n,subLabel:(0,l.jsx)(s.default,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},55730:(e,t,n)=>{n.d(t,{A:()=>r});n(63696);var s=n(34164),i=n(50539),a=n(204),l=n(21858),o=n(62540);function r(e){let{className:t}=e;const n=(0,l.r)();return n.badge?(0,o.jsx)("span",{className:(0,s.A)(t,a.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,o.jsx)(i.default,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},15833:(e,t,n)=>{n.d(t,{A:()=>v});n(63696);var s=n(34164),i=n(40797),a=n(56289),l=n(50539),o=n(56942),r=n(204),c=n(96351),d=n(21858),u=n(62540);const m={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(l.default,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(l.default,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const t=m[e.versionMetadata.banner];return(0,u.jsx)(t,{...e})}function x(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,u.jsx)(l.default,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(a.A,{to:n,onClick:s,children:(0,u.jsx)(l.default,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function f(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:a}}=(0,i.A)(),{pluginId:l}=(0,o.vT)({failfast:!0}),{savePreferredVersionName:d}=(0,c.g1)(l),{latestDocSuggestion:m,latestVersionSuggestion:f}=(0,o.HW)(l),v=m??(p=f).docs.find((e=>e.id===p.mainDocId));var p;return(0,u.jsxs)("div",{className:(0,s.A)(t,r.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(h,{siteTitle:a,versionMetadata:n})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(x,{versionLabel:f.label,to:v.path,onClick:()=>d(f.name)})})]})}function v(e){let{className:t}=e;const n=(0,d.r)();return n.banner?(0,u.jsx)(f,{className:t,versionMetadata:n}):null}}}]); \ No newline at end of file diff --git a/assets/js/416.f27fdde8.js b/assets/js/1809.372b7f7b.js similarity index 57% rename from assets/js/416.f27fdde8.js rename to assets/js/1809.372b7f7b.js index 413f2c95..1002d13e 100644 --- a/assets/js/416.f27fdde8.js +++ b/assets/js/1809.372b7f7b.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[416],{90416:(e,s,t)=>{t.r(s)}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1809],{1809:(e,s,t)=>{t.r(s)}}]); \ No newline at end of file diff --git a/assets/js/188a43e1.fa5cdf81.js b/assets/js/188a43e1.7e973f9f.js similarity index 92% rename from assets/js/188a43e1.fa5cdf81.js rename to assets/js/188a43e1.7e973f9f.js index 1e6131e3..f3c79031 100644 --- a/assets/js/188a43e1.fa5cdf81.js +++ b/assets/js/188a43e1.7e973f9f.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[277,5232],{87592:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>b,frontMatter:()=>p,metadata:()=>s,toc:()=>v});const s=JSON.parse('{"id":"demo-viewer/object/unevaluatedProperties2","title":"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f UnevaluatedProperties (2)","description":"object with properties / unevaluatedProperties showcase","source":"@site/docs/demo-viewer/object/unevaluatedProperties2.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/unevaluatedProperties2","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/unevaluatedProperties2.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / unevaluatedProperties showcase","title":"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f UnevaluatedProperties (2)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddd0 UnevaluatedProperties (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1"},"next":{"title":"\ud83d\udcce References","permalink":"/docusaurus-json-schema-plugin/docs/category/-references"}}');var a=r(62540),o=r(28453),i=r(21432),n=r(30277),u=r(21344),d=r.n(u),l=r(11470),c=r(19365);const p={description:"object with properties / unevaluatedProperties showcase",title:"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f UnevaluatedProperties (2)"},h="UnevaluatedProperties (2)",m={},v=[];function j(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.header,{children:(0,a.jsx)(t.h1,{id:"unevaluatedproperties-2",children:"UnevaluatedProperties (2)"})}),"\n",(0,a.jsxs)(l.default,{children:[(0,a.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:n})}),(0,a.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(i.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function b(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(j,{...e})}):j(e)}},30277:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"unevaluatedProperties":{"type":"boolean"}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[277,5232],{35070:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>b,frontMatter:()=>p,metadata:()=>s,toc:()=>v});const s=JSON.parse('{"id":"demo-viewer/object/unevaluatedProperties2","title":"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f UnevaluatedProperties (2)","description":"object with properties / unevaluatedProperties showcase","source":"@site/docs/demo-viewer/object/unevaluatedProperties2.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/unevaluatedProperties2","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/unevaluatedProperties2.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / unevaluatedProperties showcase","title":"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f UnevaluatedProperties (2)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddd0 UnevaluatedProperties (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1"},"next":{"title":"\ud83d\udcce References","permalink":"/docusaurus-json-schema-plugin/docs/category/-references"}}');var a=r(62540),o=r(28453),i=r(58069),n=r(30277),u=r(88307),d=r.n(u),l=r(65537),c=r(79329);const p={description:"object with properties / unevaluatedProperties showcase",title:"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f UnevaluatedProperties (2)"},h="UnevaluatedProperties (2)",m={},v=[];function j(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.header,{children:(0,a.jsx)(t.h1,{id:"unevaluatedproperties-2",children:"UnevaluatedProperties (2)"})}),"\n",(0,a.jsxs)(l.default,{children:[(0,a.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:n})}),(0,a.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(i.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function b(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(j,{...e})}):j(e)}},30277:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"unevaluatedProperties":{"type":"boolean"}}')}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.7604b0c0.js b/assets/js/1a4e3797.7604b0c0.js new file mode 100644 index 00000000..53c0bf9b --- /dev/null +++ b/assets/js/1a4e3797.7604b0c0.js @@ -0,0 +1 @@ +(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2138],{72733:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function n(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,s,a,c,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(n(s=this._events[e]))return!1;if(r(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),s.apply(this,c)}else if(i(s))for(c=Array.prototype.slice.call(arguments,1),a=(u=s.slice()).length,o=0;o0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var i=!1;function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},t.prototype.removeListener=function(e,t){var n,s,a,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,s=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(c=a;c-- >0;)if(n[c]===t||n[c].listener&&n[c].listener===t){s=c;break}if(s<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(i=this._events[e]))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},74103:(e,t,r)=>{"use strict";var i=r(36571),n=r(19127),s=r(42223),a=r(33371),c=r(67691);function o(e,t,r,n){return new i(e,t,r,n)}o.version=r(16938),o.AlgoliaSearchHelper=i,o.SearchParameters=a,o.RecommendParameters=n,o.SearchResults=c,o.RecommendResults=s,e.exports=o},46732:(e,t,r)=>{"use strict";var i=r(72733);function n(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(73014)(n,i),n.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},n.prototype.getModifiedState=function(e){return this.fn(e)},n.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=n},19127:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter((function(e){return void 0===t[e.$$id]})).map((function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r}))}},e.exports=t},42223:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach((function(e){var i=e.$$id;r[i]=t[i],r._rawResults[i]=t[i]}))}t.prototype={constructor:t},e.exports=t},44054:(e,t,r)=>{"use strict";var i=r(29110),n=r(40317),s=r(21383),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var n=""+r,s=e[t]?e[t].concat(n):[n],c={};return c[t]=s,i(c,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var i=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&i===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return n(e)?{}:e;if("string"==typeof t)return s(e,[t]);if("function"==typeof t){var i=!1,a=Object.keys(e).reduce((function(n,s){var a=e[s]||[],c=a.filter((function(e){return!t(e,s,r)}));return c.length!==a.length&&(i=!0),n[s]=c,n}),{});return i?a:e}},isRefined:function(e,t,r){var i=Boolean(e[t])&&e[t].length>0;if(void 0===r||!i)return i;var n=""+r;return-1!==e[t].indexOf(n)}};e.exports=a},33371:(e,t,r)=>{"use strict";var i=r(29110),n=r(20849),s=r(14843),a=r(44728),c=r(40317),o=r(21383),u=r(17507),h=r(72208),l=r(44054);function f(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return f(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var i=-1!==m.PARAMETERS.indexOf(e),n=void 0!==t[e];!i&&n&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var i=e[r];if("string"==typeof i){var n=parseFloat(i);t[r]=isNaN(n)?i:n}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var i=e.numericRefinements[t]||{};r[t]={},Object.keys(i).forEach((function(e){var n=i[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=n}))})),t.numericRefinements=r}return a(e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:l.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:l.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:l.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:l.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=u(r);if(this.isNumericRefined(e,t,i))return this;var n=a({},this.numericRefinements);return n[e]=a({},n[e]),n[e][t]?(n[e][t]=n[e][t].slice(),n[e][t].push(i)):n[e][t]=[i],this.setQueryParameters({numericRefinements:n})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var i=r;return void 0!==i?this.isNumericRefined(e,t,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t&&f(r.val,u(i))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return o(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,i=Object.keys(r).reduce((function(i,n){var s=r[n],a={};return s=s||{},Object.keys(s).forEach((function(r){var i=s[r]||[],c=[];i.forEach((function(t){e({val:t,op:r},n,"numeric")||c.push(t)})),c.length!==i.length&&(t=!0),a[r]=c})),i[n]=a,i}),{});return t?i:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:l.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:l.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:l.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:l.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:l.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:l.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:l.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:l.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:l.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i(n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i(r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i(t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&l.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var i=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!i)return i;var s,a,c=u(r),o=void 0!==(s=this.numericRefinements[e][t],a=c,n(s,(function(e){return f(e,a)})));return i&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(i){var n=r[i];-1===e.indexOf(i)&&void 0!==n&&(t[i]=n)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,i=m._parseNumbers(e),n=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),s=Object.keys(i).reduce((function(e,t){var r=void 0!==e[t],n=void 0!==i[t];return r&&!n?o(e,[t]):(n&&(e[t]=i[t]),e)}),n);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return n(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},76673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var i=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[i.name]&&e.hierarchicalFacetsRefinements[i.name][0]||"",h=e._getHierarchicalFacetSeparator(i),l=e._getHierarchicalRootPath(i),f=e._getHierarchicalShowParentLevel(i),m=s(e._getHierarchicalFacetSortBy(i)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,i,s){return function(u,h,l){var f=u;if(l>0){var m=0;for(f=u;m{"use strict";var i=r(78965),n=r(29110),s=r(2909),a=r(20849),c=r(43917),o=r(7577),u=r(38601),h=s.escapeFacetValue,l=s.unescapeFacetValue,f=r(76673);function m(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function d(e,t,r){t&&t[r]&&(e.stats=t[r])}function p(e,t,r){var s=t[0]||{};this._rawResults=t;var o=this;Object.keys(s).forEach((function(e){o[e]=s[e]}));var u=n(r,{persistHierarchicalRootCount:!1});Object.keys(u).forEach((function(e){o[e]=u[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var h=e.getRefinedDisjunctiveFacets(),p=m(e.facets),g=m(e.disjunctiveFacets),v=1,y=s.facets||{};Object.keys(y).forEach((function(t){var r,i,n=y[t],u=(r=e.hierarchicalFacets,i=t,a(r,(function(e){return(e.attributes||[]).indexOf(i)>-1})));if(u){var h=u.attributes.indexOf(t),l=c(e.hierarchicalFacets,(function(e){return e.name===u.name}));o.hierarchicalFacets[l][h]={attribute:t,data:n,exhaustive:s.exhaustiveFacetsCount}}else{var f,m=-1!==e.disjunctiveFacets.indexOf(t),v=-1!==e.facets.indexOf(t);m&&(f=g[t],o.disjunctiveFacets[f]={name:t,data:n,exhaustive:s.exhaustiveFacetsCount},d(o.disjunctiveFacets[f],s.facets_stats,t)),v&&(f=p[t],o.facets[f]={name:t,data:n,exhaustive:s.exhaustiveFacetsCount},d(o.facets[f],s.facets_stats,t))}})),this.hierarchicalFacets=i(this.hierarchicalFacets),h.forEach((function(r){var i=t[v],a=i&&i.facets?i.facets:{},u=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,h=a[t];if(u){r=c(e.hierarchicalFacets,(function(e){return e.name===u.name}));var f=c(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===f)return;o.hierarchicalFacets[r][f].data=o.persistHierarchicalRootCount?n(o.hierarchicalFacets[r][f].data,h):n(h,o.hierarchicalFacets[r][f].data)}else{r=g[t];var m=s.facets&&s.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:n(m,h),exhaustive:i.exhaustiveFacetsCount},d(o.disjunctiveFacets[r],i.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(i){!o.disjunctiveFacets[r].data[i]&&e.disjunctiveFacetsRefinements[t].indexOf(l(i))>-1&&(o.disjunctiveFacets[r].data[i]=0)}))}})),v++})),e.getRefinedHierarchicalFacets().forEach((function(r){var i=e.getHierarchicalFacetByName(r),s=e._getHierarchicalFacetSeparator(i),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(s).length<2||t.slice(v).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===i.name})),l=c(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==l){var f={};if(a.length>0&&!o.persistHierarchicalRootCount){var m=a[0].split(s)[0];f[m]=o.hierarchicalFacets[h][l].data[m]}o.hierarchicalFacets[h][l].data=n(f,u,o.hierarchicalFacets[h][l].data)}})),v++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],i=p[t];o.facets[i]={name:t,data:y[t],exhaustive:s.exhaustiveFacetsCount},r.forEach((function(e){o.facets[i]=o.facets[i]||{name:t},o.facets[i].data=o.facets[i].data||{},o.facets[i].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(f(e)),this.facets=i(this.facets),this.disjunctiveFacets=i(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var i=a(e.facets,r);return i?Object.keys(i.data).map((function(r){var n=h(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isFacetRefined(t,n),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var n=a(e.disjunctiveFacets,r);return n?Object.keys(n.data).map((function(r){var i=h(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,i)}})):[]}if(e._state.isHierarchicalFacet(t)){var s=a(e.hierarchicalFacets,r);if(!s)return s;var c=e._state.getHierarchicalFacetByName(t),o=e._state._getHierarchicalFacetSeparator(c),u=l(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(c.rootPath)&&(u=u.replace(c.rootPath+o,""));var f=u.split(o);return f.unshift(t),v(s,f,0),s}}function v(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){v(e,t,r+1)}))}function y(e,t,r,i){if(i=i||0,Array.isArray(t))return e(t,r[i]);if(!t.data||0===t.data.length)return t;var s=t.data.map((function(t){return y(e,t,r,i+1)})),a=e(s,r[i]);return n({data:a},t)}function R(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function F(e,t,r,i,n){var s=a(n,(function(e){return e.name===r})),c=s&&s.data&&s.data[i]?s.data[i]:0,o=s&&s.exhaustive||!1;return{type:t,attributeName:r,name:i,count:c,exhaustive:o}}p.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},p.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],p.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var i,s=n(t,{sortBy:p.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))i=[e];else i=a._state.getHierarchicalFacetByName(r.name).attributes;return y((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(r)return function(e,t){var r=[],i=[],n=t.hide||[],s=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name,a=n.indexOf(t)>-1;a||void 0===s[t]?a||i.push(e):r[s[t]]=e})),r=r.filter((function(e){return e}));var a,c=t.sortRemainingBy;return"hidden"===c?r:(a="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(u(i,a[0],a[1])))}(e,r)}if(Array.isArray(s.sortBy)){var i=o(s.sortBy,p.DEFAULT_SORT);return u(e,i[0],i[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,i)}},p.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?R(this.facets,e):this._state.isDisjunctiveFacet(e)?R(this.disjunctiveFacets,e):void 0},p.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(i){e.facetsRefinements[i].forEach((function(n){r.push(F(e,"facet",i,n,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(i){e.facetsExcludes[i].forEach((function(n){r.push(F(e,"exclude",i,n,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(i){e.disjunctiveFacetsRefinements[i].forEach((function(n){r.push(F(e,"disjunctive",i,n,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(i){e.hierarchicalFacetsRefinements[i].forEach((function(n){r.push(function(e,t,r,i){var n=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(n),c=r.split(s),o=a(i,(function(e){return e.name===t})),u=c.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),o),h=u&&u.count||0,l=u&&u.exhaustive||!1,f=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:f,count:h,exhaustive:l}}(e,i,n,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var i=e.numericRefinements[t];Object.keys(i).forEach((function(e){i[e].forEach((function(i){r.push({type:"numeric",attributeName:t,name:i,numericValue:i,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=p},36571:(e,t,r)=>{"use strict";var i=r(72733),n=r(46732),s=r(2909).escapeFacetValue,a=r(73014),c=r(44728),o=r(40317),u=r(21383),h=r(19127),l=r(42223),f=r(49228),m=r(33371),d=r(67691),p=r(57749),g=r(16938);function v(e,t,r,i){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var n=r||{};n.index=t,this.state=m.make(n),this.recommendState=new h({params:n.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=i,this._recommendCache={}}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function R(){return this.state.page}a(v,i),v.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},v.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},v.prototype.recommend=function(){return this._recommend(),this},v.prototype.getQuery=function(){var e=this.state;return f._getHitsSearchParams(e)},v.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,i=f._getQueries(r.index,r),n=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(i).then((function(e){return n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),{content:new d(r,e.results),state:r,_originalResponse:e}}),(function(e){throw n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),e}));this.client.search(i).then((function(e){n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),t(null,new d(r,e.results),r)})).catch((function(e){n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),t(e,null,r)}))},v.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var i=r.getModifiedState(t),n=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(f._getHitsSearchParams(i),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(s);var a=this.client.initIndex(i.index);if("function"!=typeof a.findAnswers)throw new Error(s);return a.findAnswers(i.query,e.queryLanguages,n)},v.prototype.searchForFacetValues=function(e,t,r,i){var n="function"==typeof this.client.searchForFacetValues&&"function"!=typeof this.client.searchForFacets,a="function"==typeof this.client.initIndex;if(!n&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(i||{}),o=c.isDisjunctiveFacet(e),u=f.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,l=this;return n?h=this.client.searchForFacetValues([{indexName:c.index,params:u}]):a?h=this.client.initIndex(c.index).searchForFacetValues(u):(delete u.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=s(t.value),t.isRefined=o?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e}))},v.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},v.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},v.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},v.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},v.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},v.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},v.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},v.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},v.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},v.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},v.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},v.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},v.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},v.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},v.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},v.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},v.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},v.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},v.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},v.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},v.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},v.prototype.setCurrentPage=y,v.prototype.setPage=y,v.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},v.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},v.prototype.setState=function(e){return this._change({state:m.make(e),isPageReset:!1}),this},v.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new m(e),this},v.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},v.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},v.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},v.prototype.hasTag=function(e){return this.state.isTagRefined(e)},v.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},v.prototype.getIndex=function(){return this.state.index},v.prototype.getCurrentPage=R,v.prototype.getPage=R,v.prototype.getTags=function(){return this.state.tagRefinements},v.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var i=r[e];t.push({value:i,operator:e,type:"numeric"})})),t},v.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},v.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},v.prototype._search=function(e){var t=this.state,r=[],i=[];e.onlyWithDerivedHelpers||(i=f._getQueries(t.index,t),r.push({state:t,queriesCount:i.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var n=this.derivedHelpers.map((function(e){var i=e.getModifiedState(t),n=i.index?f._getQueries(i.index,i):[];return r.push({state:i,queriesCount:n.length,helper:e}),e.emit("search",{state:i,results:e.lastResults}),n})),s=Array.prototype.concat.apply(i,n),a=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(c){this.emit("error",{error:c})}},v.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),i=[{state:t,index:r,helper:this}],n=t.params.map((function(e){return e.$$id}));this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var s=this._recommendCache,a=this.derivedHelpers.map((function(t){var r=t.getModifiedState(e).index;if(!r)return[];var a=t.getModifiedRecommendState(new h);return i.push({state:a,index:r,helper:t}),n=Array.prototype.concat.apply(n,a.params.map((function(e){return e.$$id}))),t.emit("fetch",{recommend:{state:a,results:t.lastRecommendResults}}),a._buildQueries(r,s)})),c=Array.prototype.concat.apply(this.recommendState._buildQueries(r,s),a);if(0!==c.length)if(c.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var o=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(c).then(this._dispatchRecommendResponse.bind(this,o,i,n)).catch(this._dispatchRecommendError.bind(this,o))}catch(u){this.emit("error",{error:u})}}},v.prototype._dispatchAlgoliaResponse=function(e,t,r){var i=this;if(!(t0},v.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},v.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},v.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},v.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},v.prototype.getClient=function(){return this.client},v.prototype.derive=function(e,t){var r=new n(this,e,t);return this.derivedHelpers.push(r),r},v.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},v.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=v},78965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},29110:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2909:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},20849:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{e.exports=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}},7577:(e,t,r)=>{"use strict";var i=r(20849);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var n=t.split(":"),s=i(r,(function(e){return e[0]===n[0]}));return n.length>1||!s?(e[0].push(n[0]),e[1].push(n[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)}),[[],[]])}},73014:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},14843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,i){return t.indexOf(r)>-1&&e.indexOf(r)===i}))}},44728:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,i){if(e===i)return e;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&"__proto__"!==n&&"constructor"!==n){var s=i[n],a=e[n];void 0!==a&&void 0===s||(t(a)&&t(s)?e[n]=r(a,s):e[n]="object"==typeof(c=s)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var i=1,n=arguments.length;i{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},21383:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,i,n={},s=Object.keys(e);for(i=0;i=0||(n[r]=e[r]);return n}},38601:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,i=null===e,n=void 0!==t,s=null===t;if(!s&&e>t||i&&n||!r)return 1;if(!i&&e=i.length?s:"desc"===i[n]?-s:s}return e.index-r.index})),n.map((function(e){return e.value}))}},17507:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},49228:(e,t,r)=>{"use strict";var i=r(44728);function n(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var s={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(i){r.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,i)})})),t.getRefinedHierarchicalFacets().forEach((function(i){var n=t.getHierarchicalFacetByName(i),a=t.getHierarchicalRefinement(i),c=t._getHierarchicalFacetSeparator(n);if(a.length>0&&a[0].split(c).length>1){var o=a[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:n.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);o.forEach((function(i,a){var c=s._getDisjunctiveFacetSearchParams(t,i.attribute,0===a);function u(e){return n.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),l=o[a-1];a>0?c.facetFilters=h.concat(l.attribute+":"+l.value):h.length>0?c.facetFilters=h:delete c.facetFilters,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),r=s._getFacetFilters(e),a=s._getNumericFilters(e),c=s._getTagFilters(e),o={};return t.length>0&&(o.facets=t.indexOf("*")>-1?["*"]:t),c.length>0&&(o.tagFilters=c),r.length>0&&(o.facetFilters=r),a.length>0&&(o.numericFilters=a),n(i({},e.getQueryParams(),o))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=s._getFacetFilters(e,t,r),c=s._getNumericFilters(e,t),o=s._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};o.length>0&&(u.tagFilters=o);var h=e.getHierarchicalFacetByName(t);return u.facets=h?s._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(u.numericFilters=c),a.length>0&&(u.facetFilters=a),n(i({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(i){var n=e.numericRefinements[i]||{};Object.keys(n).forEach((function(e){var s=n[e]||[];t!==i&&s.forEach((function(t){if(Array.isArray(t)){var n=t.map((function(t){return i+e+t}));r.push(n)}else r.push(i+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var i=[],n=e.facetsRefinements||{};Object.keys(n).sort().forEach((function(e){(n[e]||[]).slice().sort().forEach((function(t){i.push(e+":"+t)}))}));var s=e.facetsExcludes||{};Object.keys(s).sort().forEach((function(e){(s[e]||[]).sort().forEach((function(t){i.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var n=[];r.slice().sort().forEach((function(t){n.push(e+":"+t)})),i.push(n)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(n){var s=(c[n]||[])[0];if(void 0!==s){var a,o,u=e.getHierarchicalFacetByName(n),h=e._getHierarchicalFacetSeparator(u),l=e._getHierarchicalRootPath(u);if(t===n){if(-1===s.indexOf(h)||!l&&!0===r||l&&l.split(h).length===s.split(h).length)return;l?(o=l.split(h).length-1,s=l):(o=s.split(h).length-2,s=s.slice(0,s.lastIndexOf(h))),a=u.attributes[o]}else o=s.split(h).length-1,a=u.attributes[o];a&&i.push([a+":"+s])}})),i},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var i=e.getHierarchicalRefinement(r.name)[0];if(!i)return t.push(r.attributes[0]),t;var n=e._getHierarchicalFacetSeparator(r),s=i.split(n).length,a=r.attributes.slice(0,s+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var i=e._getHierarchicalFacetSeparator(t);if(!0===r){var n=e._getHierarchicalRootPath(t),s=0;return n&&(s=n.split(i).length),[t.attributes[s]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(i).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var c=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,o={facetQuery:t,facetName:e};return"number"==typeof r&&(o.maxFacetHits=r),n(i({},s._getHitsSearchParams(c),o))}};e.exports=s},72208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},57749:(e,t,r)=>{"use strict";var i=r(20849),n=r(38657);e.exports=function(e){var t={};return e.forEach((function(e){e.forEach((function(e,r){t[e.objectID]?t[e.objectID]={indexSum:t[e.objectID].indexSum+r,count:t[e.objectID].count+1}:t[e.objectID]={indexSum:r,count:1}}))})),function(e,t){var r=[];return Object.keys(e).forEach((function(i){e[i].count<2&&(e[i].indexSum+=100),r.push({objectID:i,avgOfIndices:e[i].indexSum/t})})),r.sort((function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}))}(t,e.length).reduce((function(t,r){var s=i(n(e),(function(e){return e.objectID===r.objectID}));return s?t.concat(s):t}),[])}},16938:e=>{"use strict";e.exports="3.22.6"},81430:(e,t,r)=>{"use strict";r.d(t,{W:()=>u});var i=r(63696),n=r(40797);const s=["zero","one","two","few","many","other"];function a(e){return s.filter((t=>e.includes(t)))}const c={locale:"en",pluralForms:a(["one","other"]),select:e=>1===e?"one":"other"};function o(){const{i18n:{currentLocale:e}}=(0,n.A)();return(0,i.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:a(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),c}}),[e])}function u(){const e=o();return{selectMessage:(t,r)=>function(e,t,r){const i=e.split("|");if(1===i.length)return i[0];i.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${i.length}: ${e}`);const n=r.select(t),s=r.pluralForms.indexOf(n);return i[Math.min(s,i.length-1)]}(r,t,e)}}},90511:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>M});var i=r(63696),n=r(34164),s=r(74103),a=r.n(s);function c(e){let t;const r=`algolia-client-js-${e.key}`;function i(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function n(){return JSON.parse(i().getItem(r)||"{}")}function s(e){i().setItem(r,JSON.stringify(e))}return{get:(t,r,i={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=n(),i=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(s(i),!t)return;s(Object.fromEntries(Object.entries(i).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||i.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=n();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},i().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=n();delete t[JSON.stringify(e)],i().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{i().removeItem(r)}))}}function o(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,i,n={miss:()=>Promise.resolve()})=>r.get(e,i,n).catch((()=>o({caches:t}).get(e,i,n))),set:(e,i)=>r.set(e,i).catch((()=>o({caches:t}).set(e,i))),delete:e=>r.delete(e).catch((()=>o({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>o({caches:t}).clear()))}}function u(e={serializable:!0}){let t={};return{get(r,i,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const a=i();return a.then((e=>n.miss(e))).then((()=>a))},set:(r,i)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(i):i,Promise.resolve(i)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function h({algoliaAgents:e,client:t,version:r}){const i=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>i.add(e))),i}var l=12e4;function f(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>l},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=l}}}var m=class extends Error{name="AlgoliaError";constructor(e,t){super(e),t&&(this.name=t)}},d=class extends m{stackTrace;constructor(e,t,r){super(e,r),this.stackTrace=t}},p=class extends d{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}},g=class extends d{status;constructor(e,t,r,i="ApiError"){super(e,r,i),this.status=t}},v=class extends m{response;constructor(e,t){super(e,"DeserializationError"),this.response=t}},y=class extends g{error;constructor(e,t,r,i){super(e,t,i,"DetailedApiError"),this.error=r}};function R(e,t,r){const i=(n=r,Object.keys(n).filter((e=>void 0!==n[e])).sort().map((e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(n[e])?n[e].join(","):n[e]).replace(/\+/g,"%20")}`)).join("&"));var n;let s=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return i.length&&(s+=`?${i}`),s}function F(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function P({hosts:e,hostsCache:t,baseHeaders:r,logger:i,baseQueryParameters:n,algoliaAgent:s,timeouts:a,requester:c,requestsCache:o,responsesCache:u}){async function h(o,u,h=!0){const l=[],m=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(o,u),d=function(e,t,r){const i={Accept:"application/json",...e,...t,...r},n={};return Object.keys(i).forEach((e=>{const t=i[e];n[e.toLowerCase()]=t})),n}(r,o.headers,u.headers),P="GET"===o.method?{...o.data,...u.data}:{},b={...n,...o.queryParameters,...P};if(s.value&&(b["x-algolia-agent"]=s.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?b[e]=u.queryParameters[e].toString():b[e]=u.queryParameters[e];let _=0;const j=async(e,r)=>{const n=e.pop();if(void 0===n)throw new p(function(e){return e.map((e=>F(e)))}(l));const s={...a,...u.timeouts},P={data:m,headers:d,method:o.method,url:R(n,o.path,b),connectTimeout:r(_,s.connect),responseTimeout:r(_,h?s.read:s.write)},x=t=>{const r={request:P,response:t,host:n,triesLeft:e.length};return l.push(r),r},E=await c.send(P);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const s=x(E);return E.isTimedOut&&_++,i.info("Retryable failure",F(s)),await t.set(n,f(n,E.isTimedOut?"timed out":"down")),j(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new v(t.message,e)}}(E);throw x(E),function({content:e,status:t},r){try{const i=JSON.parse(e);return"error"in i?new y(i.message,t,i.error,r):new g(i.message,t,r)}catch{}return new g(e,t,r)}(E,l)},x=e.filter((e=>"readWrite"===e.accept||(h?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(f(e))))))),i=r.filter((e=>e.isUp())),n=r.filter((e=>e.isTimedOut())),s=[...i,...n];return{hosts:s.length>0?s:e,getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t}}(x);return j([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:c,timeouts:a,logger:i,algoliaAgent:s,baseHeaders:r,baseQueryParameters:n,hosts:e,request:function(e,t={}){const i=e.useReadTransporter||"GET"===e.method;if(!i)return h(e,t,i);const s=()=>h(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const a={request:e,requestOptions:t,transporter:{queryParameters:n,headers:r}};return u.get(a,(()=>o.get(a,(()=>o.set(a,s()).then((e=>Promise.all([o.delete(a),e])),(e=>Promise.all([o.delete(a),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(a,e)})},requestsCache:o,responsesCache:u}}var b="5.18.0";function _(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1)),n=e[r];t[r]=e[i],t[i]=n}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function j(e,t,r){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:i,...n}){const s=function(e,t,r="WithinHeaders"){const i={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?i:{},queryParameters:()=>"WithinQueryParameters"===r?i:{}}}(e,t,r),a=P({hosts:_(e),...n,algoliaAgent:h({algoliaAgents:i,client:"Lite",version:b}),baseHeaders:{"content-type":"text/plain",...s.headers(),...n.baseHeaders},baseQueryParameters:{...s.queryParameters(),...n.baseQueryParameters}});return{transporter:a,appId:e,clearCache:()=>Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((()=>{})),get _ua(){return a.algoliaAgent.value},addAlgoliaAgent(e,t){a.algoliaAgent.add({segment:e,version:t})},setClientApiKey({apiKey:e}){r&&"WithinHeaders"!==r?a.baseQueryParameters["x-algolia-api-key"]=e:a.baseHeaders["x-algolia-api-key"]=e},searchForHits(e,t){return this.search(e,t)},searchForFacets(e,t){return this.search(e,t)},customPost({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return a.request(n,i)},getRecommendations(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return a.request(r,t)},search(e,t){if(e&&Array.isArray(e)){const t={requests:e.map((({params:e,...t})=>"facet"===t.type?{...t,...e,type:"facet"}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0}))};e=t}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return a.request(r,t)}}}({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:(e,t)=>Promise.resolve(),info:(e,t)=>Promise.resolve(),error:(e,t)=>Promise.resolve()},requester:{send:function(e){return new Promise((t=>{let r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));let i,n=(e,i)=>setTimeout((()=>{r.abort(),t({status:0,content:i,isTimedOut:!0})}),e),s=n(e.connectTimeout,"Connection timeout");r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(s),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(s),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(s),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:o({caches:[c({key:`${b}-${e}`}),u()]}),...r})}var x=r(61934),E=r(27143),w=r(56289),O=r(56942),A=r(81430),S=r(53592),H=r(26849),T=r(59144),N=r(66540),Q=r(50539),C=r(40797),I=r(11835),D=r(58455),k=r(27912),q=r(9303);const L={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};var V=r(62540);function $(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return(0,V.jsx)("div",{className:(0,n.A)("col","col--3","padding-left--none",L.searchVersionColumn),children:r.map((e=>{let[i,n]=e;const s=r.length>1?`${i}: `:"";return(0,V.jsx)("select",{onChange:e=>t.setSearchVersion(i,e.target.value),defaultValue:t.searchVersions[i],className:L.searchVersionInput,children:n.versions.map(((e,t)=>(0,V.jsx)("option",{label:`${s}${e.label}`,value:e.name},t)))},i)}))})}function B(){const{i18n:{currentLocale:e}}=(0,C.A)(),{algolia:{appId:t,apiKey:r,indexName:s,contextualSearch:c}}=(0,I.c)(),o=(0,D.C)(),u=function(){const{selectMessage:e}=(0,A.W)();return t=>e(t,(0,Q.translate)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),h=function(){const e=(0,O.Gy)(),[t,r]=(0,i.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,i]=t;return{...e,[r]:i.versions[0].name}}),{}))),n=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:n,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),[l,f]=(0,S.b)(),m={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[d,p]=(0,i.useReducer)(((e,t)=>{switch(t.type){case"reset":return m;case"loading":return{...e,loading:!0};case"update":return l!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),m),g=c?["language","docusaurus_tag"]:[],v=j(t,r),y=a()(v,s,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:g});y.on("result",(e=>{let{results:{query:t,hits:r,page:i,nbHits:n,nbPages:s}}=e;if(""===t||!Array.isArray(r))return void p({type:"reset"});const a=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),c=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:i={}}=e;const n=Object.keys(r).map((e=>a(r[e].value)));return{title:n.pop(),url:o(t),summary:i.content?`${a(i.content.value)}...`:"",breadcrumbs:n}}));p({type:"update",value:{items:c,query:t,totalResults:n,totalPages:s,lastPage:i,hasMore:s>i+1,loading:!1}})}));const[R,F]=(0,i.useState)(null),P=(0,i.useRef)(0),b=(0,i.useRef)(x.A.canUseIntersectionObserver&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&P.current>r&&p({type:"advance"}),P.current=r}),{threshold:1})),_=()=>l?(0,Q.translate)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:l}):(0,Q.translate)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),T=(0,H._q)((function(t){void 0===t&&(t=0),c&&(y.addDisjunctiveFacetRefinement("docusaurus_tag","default"),y.addDisjunctiveFacetRefinement("language",e),Object.entries(h.searchVersions).forEach((e=>{let[t,r]=e;y.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)}))),y.setQuery(l).setPage(t).search()}));return(0,i.useEffect)((()=>{if(!R)return;const e=b.current;return e?(e.observe(R),()=>e.unobserve(R)):()=>!0}),[R]),(0,i.useEffect)((()=>{p({type:"reset"}),l&&(p({type:"loading"}),setTimeout((()=>{T()}),300))}),[l,h.searchVersions,T]),(0,i.useEffect)((()=>{d.lastPage&&0!==d.lastPage&&T(d.lastPage)}),[T,d.lastPage]),(0,V.jsxs)(k.A,{children:[(0,V.jsxs)(E.A,{children:[(0,V.jsx)("title",{children:(0,N.s)(_())}),(0,V.jsx)("meta",{property:"robots",content:"noindex, follow"})]}),(0,V.jsxs)("div",{className:"container margin-vert--lg",children:[(0,V.jsx)(q.A,{as:"h1",children:_()}),(0,V.jsxs)("form",{className:"row",onSubmit:e=>e.preventDefault(),children:[(0,V.jsx)("div",{className:(0,n.A)("col",L.searchQueryColumn,{"col--9":h.versioningEnabled,"col--12":!h.versioningEnabled}),children:(0,V.jsx)("input",{type:"search",name:"q",className:L.searchQueryInput,placeholder:(0,Q.translate)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,Q.translate)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>f(e.target.value),value:l,autoComplete:"off",autoFocus:!0})}),c&&h.versioningEnabled&&(0,V.jsx)($,{docsSearchVersionsHelpers:h})]}),(0,V.jsxs)("div",{className:"row",children:[(0,V.jsx)("div",{className:(0,n.A)("col","col--8",L.searchResultsColumn),children:!!d.totalResults&&u(d.totalResults)}),(0,V.jsx)("div",{className:(0,n.A)("col","col--4","text--right",L.searchLogoColumn),children:(0,V.jsx)(w.A,{to:"https://www.algolia.com/","aria-label":(0,Q.translate)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"}),children:(0,V.jsx)("svg",{viewBox:"0 0 168 24",className:L.algoliaLogo,children:(0,V.jsxs)("g",{fill:"none",children:[(0,V.jsx)("path",{className:L.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),(0,V.jsx)("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),(0,V.jsx)("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})]})})})})]}),d.items.length>0?(0,V.jsx)("main",{children:d.items.map(((e,t)=>{let{title:r,url:i,summary:s,breadcrumbs:a}=e;return(0,V.jsxs)("article",{className:L.searchResultItem,children:[(0,V.jsx)(q.A,{as:"h2",className:L.searchResultItemHeading,children:(0,V.jsx)(w.A,{to:i,dangerouslySetInnerHTML:{__html:r}})}),a.length>0&&(0,V.jsx)("nav",{"aria-label":"breadcrumbs",children:(0,V.jsx)("ul",{className:(0,n.A)("breadcrumbs",L.searchResultItemPath),children:a.map(((e,t)=>(0,V.jsx)("li",{className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}},t)))})}),s&&(0,V.jsx)("p",{className:L.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}})]},t)}))}):[l&&!d.loading&&(0,V.jsx)("p",{children:(0,V.jsx)(Q.default,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result",children:"No results were found"})},"no-results"),!!d.loading&&(0,V.jsx)("div",{className:L.loadingSpinner},"spinner")],d.hasMore&&(0,V.jsx)("div",{className:L.loader,ref:F,children:(0,V.jsx)(Q.default,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results",children:"Fetching new results..."})})]})]})}function M(){return(0,V.jsx)(T.e3,{className:"search-page-wrapper",children:(0,V.jsx)(B,{})})}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.e8ad5f3a.js b/assets/js/1a4e3797.e8ad5f3a.js deleted file mode 100644 index d4054d42..00000000 --- a/assets/js/1a4e3797.e8ad5f3a.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 1a4e3797.e8ad5f3a.js.LICENSE.txt */ -(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2138],{72733:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,s,a,c,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(s=this._events[e]))return!1;if(r(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),s.apply(this,c)}else if(n(s))for(c=Array.prototype.slice.call(arguments,1),a=(u=s.slice()).length,o=0;o0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,s,a,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,s=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=a;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){s=c;break}if(s<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},74103:(e,t,r)=>{"use strict";var n=r(36571),i=r(19127),s=r(42223),a=r(33371),c=r(67691);function o(e,t,r,i){return new n(e,t,r,i)}o.version=r(16938),o.AlgoliaSearchHelper=n,o.SearchParameters=a,o.RecommendParameters=i,o.SearchResults=c,o.RecommendResults=s,e.exports=o},46732:(e,t,r)=>{"use strict";var n=r(72733);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(73014)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},19127:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter((function(e){return void 0===t[e.$$id]})).map((function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r}))}},e.exports=t},42223:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach((function(e){var n=e.$$id;r[n]=t[n],r._rawResults[n]=t[n]}))}t.prototype={constructor:t},e.exports=t},44054:(e,t,r)=>{"use strict";var n=r(29110),i=r(40317),s=r(21383),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,s=e[t]?e[t].concat(i):[i],c={};return c[t]=s,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return s(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,s){var a=e[s]||[],c=a.filter((function(e){return!t(e,s,r)}));return c.length!==a.length&&(n=!0),i[s]=c,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=a},33371:(e,t,r)=>{"use strict";var n=r(29110),i=r(20849),s=r(14843),a=r(44728),c=r(40317),o=r(21383),u=r(17507),h=r(72208),f=r(44054);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return a(e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,u(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return o(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var s=r[i],a={};return s=s||{},Object.keys(s).forEach((function(r){var n=s[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),a[r]=c})),n[i]=a,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var s,a,c=u(r),o=void 0!==(s=this.numericRefinements[e][t],a=c,i(s,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),s=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?o(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},76673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),m=s(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,n,s){return function(u,h,f){var l=u;if(f>0){var m=0;for(l=u;m{"use strict";var n=r(78965),i=r(29110),s=r(2909),a=r(20849),c=r(43917),o=r(7577),u=r(44728),h=r(38601),f=s.escapeFacetValue,l=s.unescapeFacetValue,m=r(76673);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function g(e,t,r){var s=t[0]||{};this._rawResults=t;var o=this;Object.keys(s).forEach((function(e){o[e]=s[e]}));var h=u({persistHierarchicalRootCount:!1},r);Object.keys(h).forEach((function(e){o[e]=h[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var f=e.getRefinedDisjunctiveFacets(),g=d(e.facets),v=d(e.disjunctiveFacets),y=1,R=s.facets||{};Object.keys(R).forEach((function(t){var r,n,i=R[t],u=(r=e.hierarchicalFacets,n=t,a(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var h=u.attributes.indexOf(t),f=c(e.hierarchicalFacets,(function(e){return e.name===u.name}));o.hierarchicalFacets[f][h]={attribute:t,data:i,exhaustive:s.exhaustiveFacetsCount}}else{var l,m=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);m&&(l=v[t],o.disjunctiveFacets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(o.disjunctiveFacets[l],s.facets_stats,t)),d&&(l=g[t],o.facets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(o.facets[l],s.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach((function(r){var n=t[y],a=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,f=a[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=u({},o.hierarchicalFacets[r][m].data,f)}else{r=v[t];var d=s.facets&&s.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),y++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),s=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(s).length<2||t.slice(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(a.length>0&&!o.persistHierarchicalRootCount){var m=a[0].split(s)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,u,o.hierarchicalFacets[h][f].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=g[t];o.facets[n]={name:t,data:R[t],exhaustive:s.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=a(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var s=a(e.hierarchicalFacets,r);if(!s)return s;var c=e._state.getHierarchicalFacetByName(t),o=e._state._getHierarchicalFacetSeparator(c),u=l(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(c.rootPath)&&(u=u.replace(c.rootPath+o,""));var h=u.split(o);return h.unshift(t),y(s,h,0),s}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var s=t.data.map((function(t){return R(e,t,r,n+1)})),a=e(s,r[n]);return i({data:a},t)}function F(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var s=a(i,(function(e){return e.name===r})),c=s&&s.data&&s.data[n]?s.data[n]:0,o=s&&s.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:o}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r=v(this,e);if(r){var n,s=i({},t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(r)return function(e,t){var r=[],n=[],i=t.hide||[],s=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name,a=i.indexOf(t)>-1;a||void 0===s[t]?a||n.push(e):r[s[t]]=e})),r=r.filter((function(e){return e}));var a,c=t.sortRemainingBy;return"hidden"===c?r:(a="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,a[0],a[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,g.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(i),c=r.split(s),o=a(n,(function(e){return e.name===t})),u=c.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),o),h=u&&u.count||0,f=u&&u.exhaustive||!1,l=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=g},36571:(e,t,r)=>{"use strict";var n=r(72733),i=r(46732),s=r(2909).escapeFacetValue,a=r(73014),c=r(44728),o=r(40317),u=r(21383),h=r(19127),f=r(42223),l=r(49228),m=r(33371),d=r(67691),p=r(57749),g=r(16938);function v(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var i=r||{};i.index=t,this.state=m.make(i),this.recommendState=new h({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function R(){return this.state.page}a(v,n),v.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},v.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},v.prototype.recommend=function(){return this._recommend(),this},v.prototype.getQuery=function(){var e=this.state;return l._getHitsSearchParams(e)},v.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=l._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new d(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new d(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},v.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(l._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(s);var a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw new Error(s);return a.findAnswers(n.query,e.queryLanguages,i)},v.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues&&"function"!=typeof this.client.searchForFacets,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),o=c.isDisjunctiveFacet(e),u=l.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:u}]):a?h=this.client.initIndex(c.index).searchForFacetValues(u):(delete u.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=s(t.value),t.isRefined=o?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},v.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},v.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},v.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},v.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},v.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},v.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},v.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},v.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},v.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},v.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},v.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},v.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},v.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},v.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},v.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},v.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},v.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},v.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},v.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},v.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},v.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},v.prototype.setCurrentPage=y,v.prototype.setPage=y,v.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},v.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},v.prototype.setState=function(e){return this._change({state:m.make(e),isPageReset:!1}),this},v.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new m(e),this},v.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},v.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},v.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},v.prototype.hasTag=function(e){return this.state.isTagRefined(e)},v.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},v.prototype.getIndex=function(){return this.state.index},v.prototype.getCurrentPage=R,v.prototype.getPage=R,v.prototype.getTags=function(){return this.state.tagRefinements},v.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},v.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},v.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},v.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=l._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?l._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),s=Array.prototype.concat.apply(n,i),a=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(c){this.emit("error",{error:c})}},v.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map((function(e){return e.$$id}));this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var s=this._recommendCache,a=this.derivedHelpers.map((function(t){var r=t.getModifiedState(e).index;if(!r)return[];var a=t.getModifiedRecommendState(new h);return n.push({state:a,index:r,helper:t}),i=Array.prototype.concat.apply(i,a.params.map((function(e){return e.$$id}))),t.emit("fetch",{recommend:{state:a,results:t.lastRecommendResults}}),a._buildQueries(r,s)})),c=Array.prototype.concat.apply(this.recommendState._buildQueries(r,s),a);if(0!==c.length)if(c.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var o=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(c).then(this._dispatchRecommendResponse.bind(this,o,n,i)).catch(this._dispatchRecommendError.bind(this,o))}catch(u){this.emit("error",{error:u})}}},v.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},v.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},v.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},v.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},v.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},v.prototype.getClient=function(){return this.client},v.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},v.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},v.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=v},78965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},29110:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2909:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},20849:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{e.exports=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}},7577:(e,t,r)=>{"use strict";var n=r(20849);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),s=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!s?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)}),[[],[]])}},73014:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},14843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},44728:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var s=n[i],a=e[i];void 0!==a&&void 0===s||(t(a)&&t(s)?e[i]=r(a,s):e[i]="object"==typeof(c=s)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},21383:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},38601:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,s=null===t;if(!s&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?s:"desc"===n[i]?-s:s}return e.index-r.index})),i.map((function(e){return e.value}))}},17507:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},49228:(e,t,r)=>{"use strict";var n=r(44728);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var s={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(c).length>1){var o=a[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);o.forEach((function(n,a){var c=s._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),f=o[a-1];a>0?c.facetFilters=h.concat(f.attribute+":"+f.value):h.length>0?c.facetFilters=h:delete c.facetFilters,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),r=s._getFacetFilters(e),a=s._getNumericFilters(e),c=s._getTagFilters(e),o={};return t.length>0&&(o.facets=t.indexOf("*")>-1?["*"]:t),c.length>0&&(o.tagFilters=c),r.length>0&&(o.facetFilters=r),a.length>0&&(o.numericFilters=a),i(n({},e.getQueryParams(),o))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=s._getFacetFilters(e,t,r),c=s._getNumericFilters(e,t),o=s._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};o.length>0&&(u.tagFilters=o);var h=e.getHierarchicalFacetByName(t);return u.facets=h?s._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(u.numericFilters=c),a.length>0&&(u.facetFilters=a),i(n({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var s=i[e]||[];t!==n&&s.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var s=e.facetsExcludes||{};Object.keys(s).sort().forEach((function(e){(s[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var s=(c[i]||[])[0];if(void 0!==s){var a,o,u=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===s.indexOf(h)||!f&&!0===r||f&&f.split(h).length===s.split(h).length)return;f?(o=f.split(h).length-1,s=f):(o=s.split(h).length-2,s=s.slice(0,s.lastIndexOf(h))),a=u.attributes[o]}else o=s.split(h).length-1,a=u.attributes[o];a&&n.push([a+":"+s])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),s=n.split(i).length,a=r.attributes.slice(0,s+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),s=0;return i&&(s=i.split(n).length),[t.attributes[s]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var c=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,o={facetQuery:t,facetName:e};return"number"==typeof r&&(o.maxFacetHits=r),i(n({},s._getHitsSearchParams(c),o))}};e.exports=s},72208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},57749:(e,t,r)=>{"use strict";var n=r(20849),i=r(38657);e.exports=function(e){var t={};return e.forEach((function(e){e.forEach((function(e,r){t[e.objectID]?t[e.objectID]={indexSum:t[e.objectID].indexSum+r,count:t[e.objectID].count+1}:t[e.objectID]={indexSum:r,count:1}}))})),function(e,t){var r=[];return Object.keys(e).forEach((function(n){e[n].count<2&&(e[n].indexSum+=100),r.push({objectID:n,avgOfIndices:e[n].indexSum/t})})),r.sort((function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}))}(t,e.length).reduce((function(t,r){var s=n(i(e),(function(e){return e.objectID===r.objectID}));return s?t.concat(s):t}),[])}},16938:e=>{"use strict";e.exports="3.22.5"},83643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,s=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw s}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return s()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],s=t[1];return Promise.all([n,s||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=s();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=s();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=s(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);var a=n(),c=i&&i.miss||function(){return Promise.resolve()};return a.then((function(e){return c(e)})).then((function(){return a}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,g=2,v=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function j(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===v&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(s(r),s(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function P(e,t,n,i){var a=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),o=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,s){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .",transporterStackTrace:O(a)};var m={data:c,headers:o,method:u,url:x(h,n.path,f),connectTimeout:s(l,e.timeouts.connect),responseTimeout:s(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return a.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?v:g))]).then((function(){return t(r,s)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(a))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&!~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return j(e.hostsCache,t).then((function(e){return m(s(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function x(e,t,r){var n=E(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function E(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var S=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),s=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,s=e.requestsCache,a=e.responsesCache,c=e.timeouts,o=e.userAgent,u=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:s,responsesCache:a,timeouts:c,userAgent:o,headers:e.headers,queryParameters:h,hosts:u.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return P(f,f.hosts.filter((function(e){return!!(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var s={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(s,(function(){return f.requestsCache.get(s,(function(){return f.requestsCache.set(s,n()).then((function(e){return Promise.all([f.requestsCache.delete(s),e])}),(function(e){return Promise.all([f.requestsCache.delete(s),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(s,e)}})},write:function(e,t){return P(f,f.hosts.filter((function(e){return!!(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:s,appId:t,addAlgoliaAgent:function(e,t){s.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},N=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},H=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:E(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},Q=function(e){return function(t,i){return Promise.all(t.map((function(t){var s=t.params,a=s.facetName,c=s.facetQuery,o=n(s,["facetName","facetQuery"]);return N(e)(t.indexName,{methods:{searchForFacetValues:I}}).searchForFacetValues(a,c,r(r({},i),o))})))}},T=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},I=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,k=2,q=3,L=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:b,path:"1/indexes/*/recommendations",data:{requests:i},cacheable:!0},n)}};function V(e,t,n){var i,s={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},s=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(s),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(s),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(s),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return k>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:o(),requestsCache:o({serializable:!1}),hostsCache:c({caches:[a({key:"".concat("4.24.0","-").concat(e)}),o()]}),userAgent:_("4.24.0").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return S(r(r(r({},s),n),{},{methods:{search:H,searchForFacetValues:Q,multipleQueries:H,multipleSearchForFacetValues:Q,customRequest:A,initIndex:function(e){return function(t){return N(e)(t,{methods:{search:C,searchForFacetValues:I,findAnswers:T}})}},getRecommendations:L}}))}return V.version="4.24.0",V}()},53465:(e,t,r)=>{"use strict";r.d(t,{W:()=>u});var n=r(63696),i=r(44586);const s=["zero","one","two","few","many","other"];function a(e){return s.filter((t=>e.includes(t)))}const c={locale:"en",pluralForms:a(["one","other"]),select:e=>1===e?"one":"other"};function o(){const{i18n:{currentLocale:e}}=(0,i.A)();return(0,n.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:a(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),c}}),[e])}function u(){const e=o();return{selectMessage:(t,r)=>function(e,t,r){const n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${n.length}: ${e}`);const i=r.select(t),s=r.pluralForms.indexOf(i);return n[Math.min(s,n.length-1)]}(r,t,e)}}},74604:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>w});var n=r(63696),i=r(34164),s=r(74103),a=r.n(s),c=r(83643),o=r.n(c),u=r(38193),h=r(5260),f=r(28774),l=r(44070),m=r(53465),d=r(24255),p=r(89532),g=r(69024),v=r(20481),y=r(21312),R=r(44586),F=r(38126),b=r(51062),j=r(41957),P=r(51107);const _={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};var x=r(62540);function E(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return(0,x.jsx)("div",{className:(0,i.A)("col","col--3","padding-left--none",_.searchVersionColumn),children:r.map((e=>{let[n,i]=e;const s=r.length>1?`${n}: `:"";return(0,x.jsx)("select",{onChange:e=>t.setSearchVersion(n,e.target.value),defaultValue:t.searchVersions[n],className:_.searchVersionInput,children:i.versions.map(((e,t)=>(0,x.jsx)("option",{label:`${s}${e.label}`,value:e.name},t)))},n)}))})}function O(){const{i18n:{currentLocale:e}}=(0,R.A)(),{algolia:{appId:t,apiKey:r,indexName:s,contextualSearch:c}}=(0,F.c)(),g=(0,b.C)(),O=function(){const{selectMessage:e}=(0,m.W)();return t=>e(t,(0,y.translate)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),w=function(){const e=(0,l.Gy)(),[t,r]=(0,n.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return{...e,[r]:n.versions[0].name}}),{}))),i=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:i,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),[S,A]=(0,d.b)(),N={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[H,Q]=(0,n.useReducer)(((e,t)=>{switch(t.type){case"reset":return N;case"loading":return{...e,loading:!0};case"update":return S!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),N),T=c?["language","docusaurus_tag"]:[],C=o()(t,r),I=a()(C,s,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:T});I.on("result",(e=>{let{results:{query:t,hits:r,page:n,nbHits:i,nbPages:s}}=e;if(""===t||!Array.isArray(r))return void Q({type:"reset"});const a=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),c=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:n={}}=e;const i=Object.keys(r).map((e=>a(r[e].value)));return{title:i.pop(),url:g(t),summary:n.content?`${a(n.content.value)}...`:"",breadcrumbs:i}}));Q({type:"update",value:{items:c,query:t,totalResults:i,totalPages:s,lastPage:n,hasMore:s>n+1,loading:!1}})}));const[D,k]=(0,n.useState)(null),q=(0,n.useRef)(0),L=(0,n.useRef)(u.A.canUseIntersectionObserver&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&q.current>r&&Q({type:"advance"}),q.current=r}),{threshold:1})),V=()=>S?(0,y.translate)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:S}):(0,y.translate)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),B=(0,p._q)((function(t){void 0===t&&(t=0),c&&(I.addDisjunctiveFacetRefinement("docusaurus_tag","default"),I.addDisjunctiveFacetRefinement("language",e),Object.entries(w.searchVersions).forEach((e=>{let[t,r]=e;I.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)}))),I.setQuery(S).setPage(t).search()}));return(0,n.useEffect)((()=>{if(!D)return;const e=L.current;return e?(e.observe(D),()=>e.unobserve(D)):()=>!0}),[D]),(0,n.useEffect)((()=>{Q({type:"reset"}),S&&(Q({type:"loading"}),setTimeout((()=>{B()}),300))}),[S,w.searchVersions,B]),(0,n.useEffect)((()=>{H.lastPage&&0!==H.lastPage&&B(H.lastPage)}),[B,H.lastPage]),(0,x.jsxs)(j.A,{children:[(0,x.jsxs)(h.A,{children:[(0,x.jsx)("title",{children:(0,v.s)(V())}),(0,x.jsx)("meta",{property:"robots",content:"noindex, follow"})]}),(0,x.jsxs)("div",{className:"container margin-vert--lg",children:[(0,x.jsx)(P.A,{as:"h1",children:V()}),(0,x.jsxs)("form",{className:"row",onSubmit:e=>e.preventDefault(),children:[(0,x.jsx)("div",{className:(0,i.A)("col",_.searchQueryColumn,{"col--9":w.versioningEnabled,"col--12":!w.versioningEnabled}),children:(0,x.jsx)("input",{type:"search",name:"q",className:_.searchQueryInput,placeholder:(0,y.translate)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,y.translate)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>A(e.target.value),value:S,autoComplete:"off",autoFocus:!0})}),c&&w.versioningEnabled&&(0,x.jsx)(E,{docsSearchVersionsHelpers:w})]}),(0,x.jsxs)("div",{className:"row",children:[(0,x.jsx)("div",{className:(0,i.A)("col","col--8",_.searchResultsColumn),children:!!H.totalResults&&O(H.totalResults)}),(0,x.jsx)("div",{className:(0,i.A)("col","col--4","text--right",_.searchLogoColumn),children:(0,x.jsx)(f.A,{to:"https://www.algolia.com/","aria-label":(0,y.translate)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"}),children:(0,x.jsx)("svg",{viewBox:"0 0 168 24",className:_.algoliaLogo,children:(0,x.jsxs)("g",{fill:"none",children:[(0,x.jsx)("path",{className:_.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),(0,x.jsx)("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),(0,x.jsx)("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})]})})})})]}),H.items.length>0?(0,x.jsx)("main",{children:H.items.map(((e,t)=>{let{title:r,url:n,summary:s,breadcrumbs:a}=e;return(0,x.jsxs)("article",{className:_.searchResultItem,children:[(0,x.jsx)(P.A,{as:"h2",className:_.searchResultItemHeading,children:(0,x.jsx)(f.A,{to:n,dangerouslySetInnerHTML:{__html:r}})}),a.length>0&&(0,x.jsx)("nav",{"aria-label":"breadcrumbs",children:(0,x.jsx)("ul",{className:(0,i.A)("breadcrumbs",_.searchResultItemPath),children:a.map(((e,t)=>(0,x.jsx)("li",{className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}},t)))})}),s&&(0,x.jsx)("p",{className:_.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}})]},t)}))}):[S&&!H.loading&&(0,x.jsx)("p",{children:(0,x.jsx)(y.default,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result",children:"No results were found"})},"no-results"),!!H.loading&&(0,x.jsx)("div",{className:_.loadingSpinner},"spinner")],H.hasMore&&(0,x.jsx)("div",{className:_.loader,ref:k,children:(0,x.jsx)(y.default,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results",children:"Fetching new results..."})})]})]})}function w(){return(0,x.jsx)(g.e3,{className:"search-page-wrapper",children:(0,x.jsx)(O,{})})}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.e8ad5f3a.js.LICENSE.txt b/assets/js/1a4e3797.e8ad5f3a.js.LICENSE.txt deleted file mode 100644 index bfc7620f..00000000 --- a/assets/js/1a4e3797.e8ad5f3a.js.LICENSE.txt +++ /dev/null @@ -1 +0,0 @@ -/*! algoliasearch-lite.umd.js | 4.24.0 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ diff --git a/assets/js/1e804d56.7fa771bc.js b/assets/js/1e804d56.76056651.js similarity index 90% rename from assets/js/1e804d56.7fa771bc.js rename to assets/js/1e804d56.76056651.js index 1e83a57f..ea5030de 100644 --- a/assets/js/1e804d56.7fa771bc.js +++ b/assets/js/1e804d56.76056651.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5648,6444],{97431:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>u,default:()=>j,frontMatter:()=>l,metadata:()=>o,toc:()=>f});const o=JSON.parse('{"id":"demo-viewer/schema_composition/not","title":"\ud83d\udeab not","description":"schema composition with not showcase","source":"@site/docs/demo-viewer/schema_composition/not.mdx","sourceDirName":"demo-viewer/schema_composition","slug":"/demo-viewer/schema_composition/not","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_composition/not.mdx","tags":[],"version":"current","frontMatter":{"description":"schema composition with not showcase","title":"\ud83d\udeab not"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf10 anyOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf"},"next":{"title":"\ud83c\udfaf oneOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf"}}');var n=t(62540),i=t(28453),c=t(21432),a=t(15648),r=t(21344),m=t.n(r),d=t(11470),h=t(19365);const l={description:"schema composition with not showcase",title:"\ud83d\udeab not"},u="not",p={},f=[];function w(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"not",children:"not"})}),"\n",(0,n.jsxs)(d.default,{children:[(0,n.jsx)(h.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(m(),{schema:a})}),(0,n.jsx)(h.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(c.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(w,{...e})}):w(e)}},15648:e=>{e.exports=JSON.parse('{"not":{"type":"string"}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5648,6444],{77670:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>u,default:()=>j,frontMatter:()=>l,metadata:()=>o,toc:()=>f});const o=JSON.parse('{"id":"demo-viewer/schema_composition/not","title":"\ud83d\udeab not","description":"schema composition with not showcase","source":"@site/docs/demo-viewer/schema_composition/not.mdx","sourceDirName":"demo-viewer/schema_composition","slug":"/demo-viewer/schema_composition/not","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_composition/not.mdx","tags":[],"version":"current","frontMatter":{"description":"schema composition with not showcase","title":"\ud83d\udeab not"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf10 anyOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf"},"next":{"title":"\ud83c\udfaf oneOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf"}}');var n=t(62540),i=t(28453),c=t(58069),a=t(15648),r=t(88307),m=t.n(r),d=t(65537),h=t(79329);const l={description:"schema composition with not showcase",title:"\ud83d\udeab not"},u="not",p={},f=[];function w(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"not",children:"not"})}),"\n",(0,n.jsxs)(d.default,{children:[(0,n.jsx)(h.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(m(),{schema:a})}),(0,n.jsx)(h.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(c.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(w,{...e})}):w(e)}},15648:e=>{e.exports=JSON.parse('{"not":{"type":"string"}}')}}]); \ No newline at end of file diff --git a/assets/js/207c73ba.1232ea9a.js b/assets/js/207c73ba.c67b8a95.js similarity index 91% rename from assets/js/207c73ba.1232ea9a.js rename to assets/js/207c73ba.c67b8a95.js index 92bb40f7..c69d2e8d 100644 --- a/assets/js/207c73ba.1232ea9a.js +++ b/assets/js/207c73ba.c67b8a95.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1698,7669],{35672:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>h,contentTitle:()=>m,default:()=>w,frontMatter:()=>l,metadata:()=>s,toc:()=>j});const s=JSON.parse('{"id":"demo-viewer/object/properties","title":"\ud83d\udcdd Properties","description":"object with properties showcase","source":"@site/docs/demo-viewer/object/properties.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/properties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/properties.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties showcase","title":"\ud83d\udcdd Properties"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udfa8 PatternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties"},"next":{"title":"\ud83c\udff7\ufe0f PropertyNames","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames"}}');var o=r(62540),i=r(28453),n=r(21432),a=r(37669),c=r(21344),p=r.n(c),d=r(11470),u=r(19365);const l={description:"object with properties showcase",title:"\ud83d\udcdd Properties"},m="Properties",h={},j=[];function b(e){const t={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"properties",children:"Properties"})}),"\n",(0,o.jsxs)(d.default,{children:[(0,o.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(p(),{schema:a})}),(0,o.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(n.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(b,{...e})}):b(e)}},37669:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1698,7669],{34349:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>h,contentTitle:()=>m,default:()=>w,frontMatter:()=>l,metadata:()=>s,toc:()=>j});const s=JSON.parse('{"id":"demo-viewer/object/properties","title":"\ud83d\udcdd Properties","description":"object with properties showcase","source":"@site/docs/demo-viewer/object/properties.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/properties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/properties.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties showcase","title":"\ud83d\udcdd Properties"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udfa8 PatternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties"},"next":{"title":"\ud83c\udff7\ufe0f PropertyNames","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames"}}');var o=r(62540),i=r(28453),n=r(58069),a=r(37669),c=r(88307),p=r.n(c),d=r(65537),u=r(79329);const l={description:"object with properties showcase",title:"\ud83d\udcdd Properties"},m="Properties",h={},j=[];function b(e){const t={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"properties",children:"Properties"})}),"\n",(0,o.jsxs)(d.default,{children:[(0,o.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(p(),{schema:a})}),(0,o.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(n.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(b,{...e})}):b(e)}},37669:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}}}')}}]); \ No newline at end of file diff --git a/assets/js/6949.268f5d16.js b/assets/js/2155.a89f639b.js similarity index 98% rename from assets/js/6949.268f5d16.js rename to assets/js/2155.a89f639b.js index 193dd33f..23ef1817 100644 --- a/assets/js/6949.268f5d16.js +++ b/assets/js/2155.a89f639b.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[6949],{16949:(M,L,j)=>{j.r(L),j.d(L,{default:()=>N});const N="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTI2LjggMTIyLjg4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxMjYuOCAxMjIuODgiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCgkuc3Qwe2ZpbGw6IzIxNTUyQTt9Cgkuc3Qxe2ZpbGw6IzNGQTY1Mjt9Cl1dPjwvc3R5bGU+PGc+PHBhdGggY2xhc3M9InN0MCIgZD0iTTY5LjQsNzguMDZjMy45Mi0xLjYsNi44Ni00LjYxLDguNDctOC4yM2MxLjY1LTMuNzEsMS44OS04LjA0LDAuMzItMTIuMTJsMC0wLjAxIGMtMS41Ni00LjA3LTQuNjQtNy4xMy04LjM1LTguNzhjLTMuNy0xLjY1LTguMDQtMS44OS0xMi4xMi0wLjMybDAsMGMtNC4wNywxLjU2LTcuMTMsNC42NC04Ljc4LDguMzUgYy0xLjY1LDMuNy0xLjg5LDguMDQtMC4zMiwxMi4xMmwwLDAuMDFsMC4wMi0wLjAxYzAuOCwyLjA4LDIuMDMsMy45NSwzLjU4LDUuNWMxLjU3LDEuNTcsMy40NCwyLjgxLDUuNSwzLjYgYzIuMzYsMC45LDMuNTQsMy41NCwyLjY0LDUuOWwwLjAyLDAuMDFsLTEzLjc1LDM1LjgzYy0wLjksMi4zNy0zLjU1LDMuNTYtNS45MiwyLjY2Yy0wLjE0LTAuMDUtMC4yNy0wLjExLTAuNC0wLjE3IGMtMTYuMTUtNi4zMi0yOC4yNS0xOC41NC0zNC43OS0zMy4yMkMtMS4xLDc0LjM1LTIuMDUsNTcuMDIsNC4yMiw0MC43YzAuMDUtMC4xNCwwLjExLTAuMjcsMC4xNy0wLjQgYzYuMzItMTYuMTUsMTguNTQtMjguMjUsMzMuMjItMzQuNzlDNTIuNDQtMS4xLDY5Ljc4LTIuMDUsODYuMSw0LjIyYzEyLjMxLDQuNzIsMjIuMywxMi44NywyOS4zLDIyLjkzIGM3LjIsMTAuMzQsMTEuMjMsMjIuNzQsMTEuMzgsMzUuNTZsMCwwLjA0aDAuMDJ2MS4wOWMwLDAuMTYtMC4wMSwwLjMxLTAuMDIsMC40NmMtMC4wNSwzLjY0LTAuNDEsNy4yNy0xLjA5LDEwLjg2IGMtMC42OSwzLjY0LTEuNzMsNy4zLTMuMTIsMTAuOTRsMC4wMiwwLjAxYy0zLjIyLDguNC04LjE1LDE1LjkxLTE0LjM2LDIyLjEyYy02LjIxLDYuMjEtMTMuNzIsMTEuMTMtMjIuMTIsMTQuMzYgYy0yLjM3LDAuOS01LjAyLTAuMjktNS45Mi0yLjY2TDY2LjQzLDg0LjA5Yy0wLjktMi4zNywwLjI5LTUuMDIsMi42Ni01LjkyQzY5LjE5LDc4LjEzLDY5LjI5LDc4LjA5LDY5LjQsNzguMDZMNjkuNCw3OC4wNnogTTg2LjIzLDczLjU3Yy0yLjAxLDQuNTEtNS4zNSw4LjQzLTkuNzQsMTEuMTJsMTAuNTUsMjcuNDljNS40OC0yLjY2LDEwLjQzLTYuMiwxNC42OS0xMC40NmM1LjMyLTUuMzIsOS41My0xMS43MywxMi4yOC0xOC44OSBsMC4wMiwwLjAxbDAtMC4wMWMxLjE3LTMuMDYsMi4wNi02LjIsMi42Ni05LjM3YzAuNTktMy4xMiwwLjktNi4yMiwwLjk1LTkuMjdjLTAuMDEtMC4xMi0wLjAxLTAuMjQtMC4wMS0wLjM2di0xLjA5aDAuMDIgYy0wLjEzLTEwLjktMy42LTIxLjQ4LTkuNzctMzAuMzVjLTUuOTgtOC42LTE0LjUyLTE1LjU1LTI1LjAzLTE5LjU5Yy0xMy45OS01LjM3LTI4LjgyLTQuNTctNDEuNDgsMS4wNyBjLTEyLjU4LDUuNi0yMy4wNCwxNS45Ni0yOC40NCwyOS43NmMtMC4wMywwLjExLTAuMDcsMC4yMy0wLjExLDAuMzRjLTUuMzcsMTMuOTktNC41NywyOC44MiwxLjA3LDQxLjQ5IGM1LjA2LDExLjM3LDE0LjAxLDIxLjAxLDI1Ljg4LDI2Ljc1bDEwLjU2LTI3LjVjLTEuNjgtMS4wMy0zLjIyLTIuMjQtNC41OS0zLjYxYy0yLjQ1LTIuNDUtNC4zOS01LjQxLTUuNjYtOC43M2wwLjAyLTAuMDEgYy0yLjQ3LTYuNDQtMi4xLTEzLjI3LDAuNS0xOS4xMWMyLjUzLTUuNjksNy4xOS0xMC40NCwxMy40MS0xMi45N2MwLjMtMC4xNSwwLjYxLTAuMjgsMC45NS0wLjM2YzYuMy0yLjI4LDEyLjk1LTEuODcsMTguNjUsMC42NyBjNS42OSwyLjUzLDEwLjQ0LDcuMTksMTIuOTcsMTMuNDFjMC4xNSwwLjMsMC4yOCwwLjYyLDAuMzYsMC45NUM4OS4xOCw2MS4yMiw4OC43Nyw2Ny44Nyw4Ni4yMyw3My41N0w4Ni4yMyw3My41N3oiLz48cGF0aCBjbGFzcz0ic3QxIiBkPSJNNzAuNzEsODIuNDZjMTAuNTMtNC4wNCwxNS43OC0xNS44NSwxMS43NC0yNi4zOEM3OC40Miw0NS41NSw2Ni42MSw0MC4zLDU2LjA4LDQ0LjM0IEM0NS41Niw0OC4zOCw0MC4zLDYwLjE5LDQ0LjM0LDcwLjcxYzIuMDcsNS40LDYuMzQsOS42NywxMS43NCwxMS43NGwtMTMuNzUsMzUuODNDMTIuMDEsMTA2LjY1LTMuMTMsNzIuNjUsOC41MSw0Mi4zMyBDMjAuMTQsMTIuMDEsNTQuMTUtMy4xMyw4NC40Nyw4LjUxYzIzLjE2LDguODksMzcuNDcsMzAuODQsMzcuNzQsNTQuMjN2MS4wOWMtMC4wNSw2Ljg3LTEuMzEsMTMuODQtMy45MSwyMC42NCBjLTUuOTcsMTUuNTYtMTguMjYsMjcuODUtMzMuODIsMzMuODJMNzAuNzEsODIuNDZMNzAuNzEsODIuNDZ6Ii8+PC9nPjwvc3ZnPg=="}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2155],{32155:(M,L,j)=>{j.r(L),j.d(L,{default:()=>N});const N="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTI2LjggMTIyLjg4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxMjYuOCAxMjIuODgiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCgkuc3Qwe2ZpbGw6IzIxNTUyQTt9Cgkuc3Qxe2ZpbGw6IzNGQTY1Mjt9Cl1dPjwvc3R5bGU+PGc+PHBhdGggY2xhc3M9InN0MCIgZD0iTTY5LjQsNzguMDZjMy45Mi0xLjYsNi44Ni00LjYxLDguNDctOC4yM2MxLjY1LTMuNzEsMS44OS04LjA0LDAuMzItMTIuMTJsMC0wLjAxIGMtMS41Ni00LjA3LTQuNjQtNy4xMy04LjM1LTguNzhjLTMuNy0xLjY1LTguMDQtMS44OS0xMi4xMi0wLjMybDAsMGMtNC4wNywxLjU2LTcuMTMsNC42NC04Ljc4LDguMzUgYy0xLjY1LDMuNy0xLjg5LDguMDQtMC4zMiwxMi4xMmwwLDAuMDFsMC4wMi0wLjAxYzAuOCwyLjA4LDIuMDMsMy45NSwzLjU4LDUuNWMxLjU3LDEuNTcsMy40NCwyLjgxLDUuNSwzLjYgYzIuMzYsMC45LDMuNTQsMy41NCwyLjY0LDUuOWwwLjAyLDAuMDFsLTEzLjc1LDM1LjgzYy0wLjksMi4zNy0zLjU1LDMuNTYtNS45MiwyLjY2Yy0wLjE0LTAuMDUtMC4yNy0wLjExLTAuNC0wLjE3IGMtMTYuMTUtNi4zMi0yOC4yNS0xOC41NC0zNC43OS0zMy4yMkMtMS4xLDc0LjM1LTIuMDUsNTcuMDIsNC4yMiw0MC43YzAuMDUtMC4xNCwwLjExLTAuMjcsMC4xNy0wLjQgYzYuMzItMTYuMTUsMTguNTQtMjguMjUsMzMuMjItMzQuNzlDNTIuNDQtMS4xLDY5Ljc4LTIuMDUsODYuMSw0LjIyYzEyLjMxLDQuNzIsMjIuMywxMi44NywyOS4zLDIyLjkzIGM3LjIsMTAuMzQsMTEuMjMsMjIuNzQsMTEuMzgsMzUuNTZsMCwwLjA0aDAuMDJ2MS4wOWMwLDAuMTYtMC4wMSwwLjMxLTAuMDIsMC40NmMtMC4wNSwzLjY0LTAuNDEsNy4yNy0xLjA5LDEwLjg2IGMtMC42OSwzLjY0LTEuNzMsNy4zLTMuMTIsMTAuOTRsMC4wMiwwLjAxYy0zLjIyLDguNC04LjE1LDE1LjkxLTE0LjM2LDIyLjEyYy02LjIxLDYuMjEtMTMuNzIsMTEuMTMtMjIuMTIsMTQuMzYgYy0yLjM3LDAuOS01LjAyLTAuMjktNS45Mi0yLjY2TDY2LjQzLDg0LjA5Yy0wLjktMi4zNywwLjI5LTUuMDIsMi42Ni01LjkyQzY5LjE5LDc4LjEzLDY5LjI5LDc4LjA5LDY5LjQsNzguMDZMNjkuNCw3OC4wNnogTTg2LjIzLDczLjU3Yy0yLjAxLDQuNTEtNS4zNSw4LjQzLTkuNzQsMTEuMTJsMTAuNTUsMjcuNDljNS40OC0yLjY2LDEwLjQzLTYuMiwxNC42OS0xMC40NmM1LjMyLTUuMzIsOS41My0xMS43MywxMi4yOC0xOC44OSBsMC4wMiwwLjAxbDAtMC4wMWMxLjE3LTMuMDYsMi4wNi02LjIsMi42Ni05LjM3YzAuNTktMy4xMiwwLjktNi4yMiwwLjk1LTkuMjdjLTAuMDEtMC4xMi0wLjAxLTAuMjQtMC4wMS0wLjM2di0xLjA5aDAuMDIgYy0wLjEzLTEwLjktMy42LTIxLjQ4LTkuNzctMzAuMzVjLTUuOTgtOC42LTE0LjUyLTE1LjU1LTI1LjAzLTE5LjU5Yy0xMy45OS01LjM3LTI4LjgyLTQuNTctNDEuNDgsMS4wNyBjLTEyLjU4LDUuNi0yMy4wNCwxNS45Ni0yOC40NCwyOS43NmMtMC4wMywwLjExLTAuMDcsMC4yMy0wLjExLDAuMzRjLTUuMzcsMTMuOTktNC41NywyOC44MiwxLjA3LDQxLjQ5IGM1LjA2LDExLjM3LDE0LjAxLDIxLjAxLDI1Ljg4LDI2Ljc1bDEwLjU2LTI3LjVjLTEuNjgtMS4wMy0zLjIyLTIuMjQtNC41OS0zLjYxYy0yLjQ1LTIuNDUtNC4zOS01LjQxLTUuNjYtOC43M2wwLjAyLTAuMDEgYy0yLjQ3LTYuNDQtMi4xLTEzLjI3LDAuNS0xOS4xMWMyLjUzLTUuNjksNy4xOS0xMC40NCwxMy40MS0xMi45N2MwLjMtMC4xNSwwLjYxLTAuMjgsMC45NS0wLjM2YzYuMy0yLjI4LDEyLjk1LTEuODcsMTguNjUsMC42NyBjNS42OSwyLjUzLDEwLjQ0LDcuMTksMTIuOTcsMTMuNDFjMC4xNSwwLjMsMC4yOCwwLjYyLDAuMzYsMC45NUM4OS4xOCw2MS4yMiw4OC43Nyw2Ny44Nyw4Ni4yMyw3My41N0w4Ni4yMyw3My41N3oiLz48cGF0aCBjbGFzcz0ic3QxIiBkPSJNNzAuNzEsODIuNDZjMTAuNTMtNC4wNCwxNS43OC0xNS44NSwxMS43NC0yNi4zOEM3OC40Miw0NS41NSw2Ni42MSw0MC4zLDU2LjA4LDQ0LjM0IEM0NS41Niw0OC4zOCw0MC4zLDYwLjE5LDQ0LjM0LDcwLjcxYzIuMDcsNS40LDYuMzQsOS42NywxMS43NCwxMS43NGwtMTMuNzUsMzUuODNDMTIuMDEsMTA2LjY1LTMuMTMsNzIuNjUsOC41MSw0Mi4zMyBDMjAuMTQsMTIuMDEsNTQuMTUtMy4xMyw4NC40Nyw4LjUxYzIzLjE2LDguODksMzcuNDcsMzAuODQsMzcuNzQsNTQuMjN2MS4wOWMtMC4wNSw2Ljg3LTEuMzEsMTMuODQtMy45MSwyMC42NCBjLTUuOTcsMTUuNTYtMTguMjYsMjcuODUtMzMuODIsMzMuODJMNzAuNzEsODIuNDZMNzAuNzEsODIuNDZ6Ii8+PC9nPjwvc3ZnPg=="}}]); \ No newline at end of file diff --git a/assets/js/2237.6142219e.js b/assets/js/2237.6142219e.js deleted file mode 100644 index 83fba691..00000000 --- a/assets/js/2237.6142219e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2237],{23363:(e,t,n)=>{n.d(t,{A:()=>l});n(63696);var s=n(34164),i=n(21312),a=n(51107),o=n(62540);function l(e){let{className:t}=e;return(0,o.jsx)("main",{className:(0,s.A)("container margin-vert--xl",t),children:(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,o.jsx)(a.A,{as:"h1",className:"hero__title",children:(0,o.jsx)(i.default,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,o.jsx)("p",{children:(0,o.jsx)(i.default,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,o.jsx)("p",{children:(0,o.jsx)(i.default,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},82237:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});n(63696);var s=n(21312),i=n(69024),a=n(41957),o=n(23363),l=n(62540);function r(){const e=(0,s.translate)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.be,{title:e}),(0,l.jsx)(a.A,{children:(0,l.jsx)(o.A,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/247662c2.6912d122.js b/assets/js/247662c2.6912d122.js new file mode 100644 index 00000000..679d09df --- /dev/null +++ b/assets/js/247662c2.6912d122.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1250,5821],{36672:(e,d,n)=>{n.r(d),n.d(d,{assets:()=>m,contentTitle:()=>h,default:()=>R,frontMatter:()=>p,metadata:()=>i,toc:()=>w});const i=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependentRequired","title":"\ud83d\udd11 dependentRequired","description":"schema conditionally with dependentRequired showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependentRequired.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependentRequired","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependentRequired.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependentRequired showcase","title":"\ud83d\udd11 dependentRequired"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf33 dependencies (dependentSchemas)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas"},"next":{"title":"\ud83d\udd01 dependentRequired (bidirectional)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional"}}');var t=n(62540),s=n(28453),r=n(58069),a=n(1250),c=n(88307),o=n.n(c),l=n(65537),u=n(79329);const p={description:"schema conditionally with dependentRequired showcase",title:"\ud83d\udd11 dependentRequired"},h="dependentRequired",m={},w=[];function q(e){const d={h1:"h1",header:"header",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.header,{children:(0,t.jsx)(d.h1,{id:"dependentrequired",children:"dependentRequired"})}),"\n",(0,t.jsxs)(l.default,{children:[(0,t.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(o(),{schema:a})}),(0,t.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(r.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function R(e={}){const{wrapper:d}={...(0,s.R)(),...e.components};return d?(0,t.jsx)(d,{...e,children:(0,t.jsx)(q,{...e})}):q(e)}},1250:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"},"billing_address":{"type":"string"}},"required":["name"],"dependentRequired":{"credit_card":["billing_address"]}}')}}]); \ No newline at end of file diff --git a/assets/js/247662c2.a7210a5e.js b/assets/js/247662c2.a7210a5e.js deleted file mode 100644 index 4a1d9f85..00000000 --- a/assets/js/247662c2.a7210a5e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1250,5821],{8665:(e,d,n)=>{n.r(d),n.d(d,{assets:()=>m,contentTitle:()=>h,default:()=>R,frontMatter:()=>p,metadata:()=>i,toc:()=>w});const i=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependentRequired","title":"\ud83d\udd11 dependentRequired","description":"schema conditionally with dependentRequired showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependentRequired.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependentRequired","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependentRequired.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependentRequired showcase","title":"\ud83d\udd11 dependentRequired"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf33 dependencies (dependentSchemas)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas"},"next":{"title":"\ud83d\udd01 dependentRequired (bidirectional)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional"}}');var t=n(62540),s=n(28453),r=n(21432),a=n(1250),c=n(21344),o=n.n(c),l=n(11470),u=n(19365);const p={description:"schema conditionally with dependentRequired showcase",title:"\ud83d\udd11 dependentRequired"},h="dependentRequired",m={},w=[];function q(e){const d={h1:"h1",header:"header",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.header,{children:(0,t.jsx)(d.h1,{id:"dependentrequired",children:"dependentRequired"})}),"\n",(0,t.jsxs)(l.default,{children:[(0,t.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(o(),{schema:a})}),(0,t.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(r.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function R(e={}){const{wrapper:d}={...(0,s.R)(),...e.components};return d?(0,t.jsx)(d,{...e,children:(0,t.jsx)(q,{...e})}):q(e)}},1250:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"},"billing_address":{"type":"string"}},"required":["name"],"dependentRequired":{"credit_card":["billing_address"]}}')}}]); \ No newline at end of file diff --git a/assets/js/25efcfba.ec812cad.js b/assets/js/25efcfba.3e10cb0c.js similarity index 94% rename from assets/js/25efcfba.ec812cad.js rename to assets/js/25efcfba.3e10cb0c.js index c4556d44..b1ff5988 100644 --- a/assets/js/25efcfba.ec812cad.js +++ b/assets/js/25efcfba.3e10cb0c.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7555,9617],{94277:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>j,contentTitle:()=>h,default:()=>w,frontMatter:()=>u,metadata:()=>s,toc:()=>m});const s=JSON.parse('{"id":"demo-viewer/object/patternProperties","title":"\ud83c\udfa8 PatternProperties","description":"object with patternProperties showcase","source":"@site/docs/demo-viewer/object/patternProperties.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/patternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/patternProperties.mdx","tags":[],"version":"current","frontMatter":{"description":"object with patternProperties showcase","title":"\ud83c\udfa8 PatternProperties"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf08 AdditionalProperties with patternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties"},"next":{"title":"\ud83d\udcdd Properties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties"}}');var i=r(62540),o=r(28453),a=r(21432),n=r(17555),c=r(21344),p=r.n(c),d=r(11470),l=r(19365);const u={description:"object with patternProperties showcase",title:"\ud83c\udfa8 PatternProperties"},h="PatternProperties",j={},m=[];function P(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"patternproperties",children:"PatternProperties"})}),"\n",(0,i.jsxs)(d.default,{children:[(0,i.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(p(),{schema:n})}),(0,i.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(a.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(P,{...e})}):P(e)}},17555:e=>{e.exports=JSON.parse('{"type":"object","patternProperties":{"^S_":{"type":"string"},"^I_":{"type":"integer"}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7555,9617],{67163:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>j,contentTitle:()=>h,default:()=>w,frontMatter:()=>u,metadata:()=>s,toc:()=>m});const s=JSON.parse('{"id":"demo-viewer/object/patternProperties","title":"\ud83c\udfa8 PatternProperties","description":"object with patternProperties showcase","source":"@site/docs/demo-viewer/object/patternProperties.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/patternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/patternProperties.mdx","tags":[],"version":"current","frontMatter":{"description":"object with patternProperties showcase","title":"\ud83c\udfa8 PatternProperties"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf08 AdditionalProperties with patternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties"},"next":{"title":"\ud83d\udcdd Properties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties"}}');var i=r(62540),o=r(28453),a=r(58069),n=r(17555),c=r(88307),p=r.n(c),d=r(65537),l=r(79329);const u={description:"object with patternProperties showcase",title:"\ud83c\udfa8 PatternProperties"},h="PatternProperties",j={},m=[];function P(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"patternproperties",children:"PatternProperties"})}),"\n",(0,i.jsxs)(d.default,{children:[(0,i.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(p(),{schema:n})}),(0,i.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(a.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(P,{...e})}):P(e)}},17555:e=>{e.exports=JSON.parse('{"type":"object","patternProperties":{"^S_":{"type":"string"},"^I_":{"type":"integer"}}}')}}]); \ No newline at end of file diff --git a/assets/js/2953.b027838e.js b/assets/js/2953.b027838e.js new file mode 100644 index 00000000..bdb5c145 --- /dev/null +++ b/assets/js/2953.b027838e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2953],{32953:(s,e,t)=>{t.r(e),t.d(e,{default:()=>a});const a=t.p+"assets/images/project_icon-044438ba3230493516d84898d4700568.svg"}}]); \ No newline at end of file diff --git a/assets/js/2b403dce.274a4759.js b/assets/js/2b403dce.0af21df7.js similarity index 91% rename from assets/js/2b403dce.274a4759.js rename to assets/js/2b403dce.0af21df7.js index b378dce9..90a1ecf0 100644 --- a/assets/js/2b403dce.274a4759.js +++ b/assets/js/2b403dce.0af21df7.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2570,5650],{15738:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>m,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"demo-viewer/string/contentEncoding","title":"\ud83d\udcdc ContentEncoding","description":"string with contentEncoding showcase","source":"@site/docs/demo-viewer/string/contentEncoding.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/contentEncoding","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/contentEncoding.mdx","tags":[],"version":"current","frontMatter":{"description":"string with contentEncoding showcase","title":"\ud83d\udcdc ContentEncoding"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddf5 String","permalink":"/docusaurus-json-schema-plugin/docs/category/-string"},"next":{"title":"\ud83d\udcc4 ContentEncoding & ContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType"}}');var i=t(62540),o=t(28453),c=t(21432),r=t(12570),d=t(21344),a=t.n(d),l=t(11470),g=t(19365);const u={description:"string with contentEncoding showcase",title:"\ud83d\udcdc ContentEncoding"},h="ContentEncoding",m={},p=[];function w(e){const n={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"contentencoding",children:"ContentEncoding"})}),"\n",(0,i.jsxs)(l.default,{children:[(0,i.jsx)(g.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(a(),{schema:r})}),(0,i.jsx)(g.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(c.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function f(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(w,{...e})}):w(e)}},12570:e=>{e.exports=JSON.parse('{"type":"string","contentEncoding":"base64"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2570,5650],{98755:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>m,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"demo-viewer/string/contentEncoding","title":"\ud83d\udcdc ContentEncoding","description":"string with contentEncoding showcase","source":"@site/docs/demo-viewer/string/contentEncoding.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/contentEncoding","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/contentEncoding.mdx","tags":[],"version":"current","frontMatter":{"description":"string with contentEncoding showcase","title":"\ud83d\udcdc ContentEncoding"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddf5 String","permalink":"/docusaurus-json-schema-plugin/docs/category/-string"},"next":{"title":"\ud83d\udcc4 ContentEncoding & ContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType"}}');var i=t(62540),o=t(28453),c=t(58069),r=t(12570),d=t(88307),a=t.n(d),l=t(65537),g=t(79329);const u={description:"string with contentEncoding showcase",title:"\ud83d\udcdc ContentEncoding"},h="ContentEncoding",m={},p=[];function w(e){const n={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"contentencoding",children:"ContentEncoding"})}),"\n",(0,i.jsxs)(l.default,{children:[(0,i.jsx)(g.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(a(),{schema:r})}),(0,i.jsx)(g.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(c.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function f(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(w,{...e})}):w(e)}},12570:e=>{e.exports=JSON.parse('{"type":"string","contentEncoding":"base64"}')}}]); \ No newline at end of file diff --git a/assets/js/2cc05f38.10c18d9a.js b/assets/js/2cc05f38.10c18d9a.js new file mode 100644 index 00000000..36ddad47 --- /dev/null +++ b/assets/js/2cc05f38.10c18d9a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1487,5040],{7924:(e,s,l)=>{l.r(s),l.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>w,frontMatter:()=>m,metadata:()=>t,toc:()=>f});const t=JSON.parse('{"id":"demo-viewer/null","title":"\ud83d\udd73\ufe0f Null","description":"null type showcase","source":"@site/docs/demo-viewer/null.mdx","sourceDirName":"demo-viewer","slug":"/demo-viewer/null","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/null","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/null.mdx","tags":[],"version":"current","frontMatter":{"description":"null type showcase","title":"\ud83d\udd73\ufe0f Null"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd12 Enum","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum"},"next":{"title":"\ud83d\udd22 Numeric","permalink":"/docusaurus-json-schema-plugin/docs/category/-numeric"}}');var n=l(62540),r=l(28453),u=l(58069),i=l(5040),a=l(88307),c=l.n(a),o=l(65537),d=l(79329);const m={description:"null type showcase",title:"\ud83d\udd73\ufe0f Null"},h="Null",p={},f=[];function j(e){const s={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"null",children:"Null"})}),"\n",(0,n.jsxs)(o.default,{children:[(0,n.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(c(),{schema:i})}),(0,n.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(u.default,{language:"json-schema",children:JSON.stringify(i,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(j,{...e})}):j(e)}},5040:e=>{e.exports={type:"null"}}}]); \ No newline at end of file diff --git a/assets/js/2cc05f38.793ba1f7.js b/assets/js/2cc05f38.793ba1f7.js deleted file mode 100644 index 7eee5912..00000000 --- a/assets/js/2cc05f38.793ba1f7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1487,5040],{89265:(e,s,l)=>{l.r(s),l.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>w,frontMatter:()=>m,metadata:()=>t,toc:()=>f});const t=JSON.parse('{"id":"demo-viewer/null","title":"\ud83d\udd73\ufe0f Null","description":"null type showcase","source":"@site/docs/demo-viewer/null.mdx","sourceDirName":"demo-viewer","slug":"/demo-viewer/null","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/null","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/null.mdx","tags":[],"version":"current","frontMatter":{"description":"null type showcase","title":"\ud83d\udd73\ufe0f Null"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd12 Enum","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum"},"next":{"title":"\ud83d\udd22 Numeric","permalink":"/docusaurus-json-schema-plugin/docs/category/-numeric"}}');var n=l(62540),r=l(28453),u=l(21432),i=l(5040),a=l(21344),c=l.n(a),o=l(11470),d=l(19365);const m={description:"null type showcase",title:"\ud83d\udd73\ufe0f Null"},h="Null",p={},f=[];function j(e){const s={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"null",children:"Null"})}),"\n",(0,n.jsxs)(o.default,{children:[(0,n.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(c(),{schema:i})}),(0,n.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(u.default,{language:"json-schema",children:JSON.stringify(i,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(j,{...e})}):j(e)}},5040:e=>{e.exports={type:"null"}}}]); \ No newline at end of file diff --git a/assets/js/3042.6015bfb1.js b/assets/js/3042.6015bfb1.js new file mode 100644 index 00000000..2c1182a7 --- /dev/null +++ b/assets/js/3042.6015bfb1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3042],{65932:(e,t,n)=>{n.d(t,{A:()=>l});n(63696);var s=n(34164),i=n(50539),a=n(9303),o=n(62540);function l(e){let{className:t}=e;return(0,o.jsx)("main",{className:(0,s.A)("container margin-vert--xl",t),children:(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,o.jsx)(a.A,{as:"h1",className:"hero__title",children:(0,o.jsx)(i.default,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,o.jsx)("p",{children:(0,o.jsx)(i.default,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,o.jsx)("p",{children:(0,o.jsx)(i.default,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},73042:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});n(63696);var s=n(50539),i=n(59144),a=n(27912),o=n(65932),l=n(62540);function r(){const e=(0,s.translate)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.be,{title:e}),(0,l.jsx)(a.A,{children:(0,l.jsx)(o.A,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/2022.e33c8b98.js b/assets/js/3596.47b4fe9a.js similarity index 99% rename from assets/js/2022.e33c8b98.js rename to assets/js/3596.47b4fe9a.js index dc5b61d3..5b808853 100644 --- a/assets/js/2022.e33c8b98.js +++ b/assets/js/3596.47b4fe9a.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2022],{82022:(M,N,T)=>{T.r(N),T.d(N,{default:()=>j});const j="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbmFtZT0iTGF5ZXIgMSIgd2lkdGg9IjkyNi42MjE2NSIgaGVpZ2h0PSI2MDAuMDg0OTUiIHZpZXdCb3g9IjAgMCA5MjYuNjIxNjUgNjAwLjA4NDk1IiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGNpcmNsZSBjeD0iMTUwLjUzMzk1IiBjeT0iMjU0Ljg3MjQ5IiByPSIyNC41NjEwMyIgZmlsbD0iI2ZmYjhiOCIvPjxwb2x5Z29uIHBvaW50cz0iNjcuNTQzIDU0OS4xOTcgNzMuNzYyIDU1OS43NjMgMTE3LjQ3NCA1NDAuODAzIDEwOC4yOTUgNTI1LjIxIDY3LjU0MyA1NDkuMTk3IiBmaWxsPSIjZmZiOGI4Ii8+PHBhdGggZD0iTTIwNi4wOTU2Niw2OTQuNDI5NywyMTguMzQzLDcxNS4yMzY1OGwuMDAwNS4wMDA4NEExNS4zODYwNSwxNS4zODYwNSwwLDAsMSwyMTIuODg4LDczNi4zMDJsLS40MzA5MS4yNTM2MkwxOTIuNDA0Nyw3MDIuNDg4NTdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjMmYyZTQxIi8+PHBvbHlnb24gcG9pbnRzPSIxMzkuNiA1ODcuMjYgMTUxLjg2IDU4Ny4yNTkgMTU3LjY5MiA1MzkuOTcxIDEzOS41OTggNTM5Ljk3MiAxMzkuNiA1ODcuMjYiIGZpbGw9IiNmZmI4YjgiLz48cGF0aCBkPSJNMjczLjE2MjIzLDczMy4yMTQ2NmwyNC4xNDM3OS0uMDAxaC4wMDFhMTUuMzg2MDUsMTUuMzg2MDUsMCwwLDEsMTUuMzg2NDgsMTUuMzg2MjN2LjVsLTM5LjUzMDUyLjAwMTQ2WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iIzJmMmU0MSIvPjxwYXRoIGQ9Ik0yMjcuMDAwNjMsNzA4LjU2NzIzYTQuNDkzMTgsNC40OTMxOCwwLDAsMS0zLjYyNC0xLjgzM2wtMTEuODIzNzMtMTYuMDU4NTlhNC40OTk2MSw0LjQ5OTYxLDAsMCwxLDEuMTI0NTEtNi40MTAxNmw1Mi42MTQtMzUuMTQxNi0zMS43NDY1OS04My40NzQ2MUwzMDEuNDM0LDU3MS4yNTE4bDIuMjg2NjIsNzEuNzMzNEEzNi4wNDU3OSwzNi4wNDU3OSwwLDAsMSwyODUuNjc1NDQsNjc1LjQwOWwtNTYuNDI2NTIsMzIuNTUzNzFBNC40ODYsNC40ODYsMCwwLDEsMjI3LjAwMDYzLDcwOC41NjcyM1oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiMyZjJlNDEiLz48cGF0aCBkPSJNMjc2LjY1OTMzLDcyNy42MTdhNC40OTk4Niw0LjQ5OTg2LDAsMCwxLTQuNDg4NzctNC4zMzk4NGwtMi40ODgtNjkuODgxODQsMzAuODA4MzUtMS42MjMtMi40NTMxMyw3MC4zODM3OWE0LjQ4NzI5LDQuNDg3MjksMCwwLDEtNC4xOTk3LDQuMzMzbC0xNi44NzI4MSwxLjExODE3QzI3Ni44NjI5NCw3MjcuNjE0MSwyNzYuNzYwODksNzI3LjYxNywyNzYuNjU5MzMsNzI3LjYxN1oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiMyZjJlNDEiLz48cGF0aCBkPSJNMzA5LjI5MDkyLDU4NS4xMjg3NWMtNy44MzgzOCwwLTM1LjIxNjU2LTguODE2NC00NC43MjExOS0xMS45NTktMS40MjE4OCwxLjEzNzY5LTkuMjMzMTYsNi45Nzg1MS0xOC4zNTEwOCw1LjkxMTEzLTUuNjI2LS42NjAxNi0xMC41Nzg4Ni0zLjg0NDczLTE0LjcyMDk1LTkuNDY1ODItOS4xNDctMTIuNDE0MDYsMi4xNTA2NC02NS42NTEzNywxMy4yMzktMTA4LjEyNmEzNC4yNjc4MiwzNC4yNjc4MiwwLDAsMSw0MC41Mjg1Ni0yNC44Nzk4OGgwYTM0LjU3MTM3LDM0LjU3MTM3LDAsMCwxLDI2LjA4NzY1LDI1LjM3NzkzYzIuMDg3NjUsOC40OTgwNS4yOTE3NSwxOC40OTQxNC0xLjAxOTUzLDI1Ljc5Mzk1LS42MTY0NiwzLjQzMTY0LTEuMTAzNTIsNi4xNDI1Ny0uOTM3LDcuNDc0NjEuNjQzNTUsNS4xNDg0Myw0LjIxODc1LDg1Ljg5MTYsMS45MTk5Miw4OS4zMzk4NEMzMTEuMDcxNDMsNTg0Ljk2Mjc0LDMxMC4zNjM0Myw1ODUuMTI4NzUsMzA5LjI5MDkyLDU4NS4xMjg3NVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiM2YzYzZmYiLz48cGF0aCBkPSJNMjgwLjYxNiw1ODUuMjcxNzdhMTAuNzQyNjksMTAuNzQyNjksMCwwLDAsLjk0MTYtMTYuNDQ1NjlsLjQ4NTM0LTk3Ljg0MzU2LTIzLjA0NDc4LDMuODM3NCw2Ljc2OTI1LDk0Ljk3MDM3QTEwLjgwMDkxLDEwLjgwMDkxLDAsMCwwLDI4MC42MTYsNTg1LjI3MTc3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2ZmYjhiOCIvPjxwYXRoIGQ9Ik0yODUuOTQ2LDUzMy44MTgyMUgyNjEuMTI0MTdhNC41MTM1Miw0LjUxMzUyLDAsMCwxLTQuNS00LjQ1OWwtLjYwOTM4LTY3LjI5MmExNy42MDMsMTcuNjAzLDAsMSwxLDM1LjIwNDExLjA0M0wyOTAuNDQ1Nyw1MjkuMzdBNC41MTU0Nyw0LjUxNTQ3LDAsMCwxLDI4NS45NDYsNTMzLjgxODIxWiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iIzZjNjNmZiIvPjxwYXRoIGQ9Ik0yODAuOTY5MjYsNDI5LjI4ODczYy0xMS4yNDUyOS4wMjA1OS0yMS44NTQxNi04Ljg2OC0yMy44MDI4Ni0xOS45NDMyM2EyOC42NzE0OCwyOC42NzE0OCwwLDAsMSwuOTE5MjctMTMuMDEzNzJBMzQuOTUzOTQsMzQuOTUzOTQsMCwwLDEsMzA2LjAyMSwzNzQuMzc5YzMuMDA4MzEsMS4zNjEzMSw1Ljk3MTQ1LDMuMzE2NDUsNy4zNDg5LDYuMzE3NDFzLjUxNTM1LDcuMTk1MjgtMi40OTc5MSw4LjU0NTYxYy0xLjk2OTE2Ljg4MjQyLTQuNDQwMjMuNDQ5MS02LjE4NzE5LDEuNzE1NzMtMi41MDkyOCwxLjgxOTM3LTEuODYzMzQsNS42OTEyOS0uNzQyODYsOC41ODExMnMyLjM4Nzc2LDYuMzg2OTEuNTA5NDcsOC44NTIzOWMtMS43NTAyMywyLjI5NzM5LTUuMjQ4NzIsMi4yMjYwOS04LjAwNDM2LDEuMzYxMzdzLTUuNDc1NTctMi4zMTI3Ny04LjM0ODY0LTIuMDE4MjJjLTQuMTkwNC40Mjk2MS03LjIwMTcyLDQuNTk3NzMtNy43NTkxLDguNzczMDZzLjc1NDc0LDguMzQ4OTIsMi4wNTAxOCwxMi4zNTcxNFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiMyZjJlNDEiLz48cGF0aCBkPSJNMzk1LjY4OTE4LDc1MC4wNDI0N2gtMjU4YTEsMSwwLDEsMSwwLTJoMjU4YTEsMSwwLDAsMSwwLDJaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTEwNDYuODEwODIsNTg0LjUwNTM4SDQwNS45NzIzMmExNi41MTg2OCwxNi41MTg2OCwwLDAsMS0xNi41LTE2LjVWMTcyLjg1MTU3YTEyLjEwMTg1LDEyLjEwMTg1LDAsMCwxLDEyLjA4Nzg5LTEyLjA4ODM4aDY0OS40NTM1YTEyLjMxMTExLDEyLjMxMTExLDAsMCwxLDEyLjI5NzExLDEyLjI5NzM2VjU2OC4wMDUzOEExNi41MTg2NywxNi41MTg2NywwLDAsMSwxMDQ2LjgxMDgyLDU4NC41MDUzOFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNmMmYyZjIiLz48cGF0aCBkPSJNMTAyNi4wOTEsNTYzLjY3MzA2SDQyOC44NDYyN2MtOC43NTUsMC0xNS44Nzc1Ny02LjY2OTkzLTE1Ljg3NzU3LTE0Ljg2ODE3di0zNDQuMTA1YzAtNi4wODAwOCw1LjI3OC0xMS4wMjY4NSwxMS43NjU2My0xMS4wMjY4NUgxMDMwLjAwOGM2LjU5NTIxLDAsMTEuOTYwNjksNS4wMjgzMiwxMS45NjA2OSwxMS4yMDg0OVY1NDguODA0ODlDMTA0MS45Njg3LDU1Ny4wMDMxMywxMDM0Ljg0NTksNTYzLjY3MzA2LDEwMjYuMDkxLDU2My42NzMwNloiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTA2My4wODEwOSwxNzQuOTA3NzJIMzg5LjI0MDc2di04LjQwMDM5YTE2LjU3Mzc2LDE2LjU3Mzc2LDAsMCwxLDE2LjU2LTE2LjU0OThIMTA0Ni41MjFhMTYuNTczNjgsMTYuNTczNjgsMCwwLDEsMTYuNTYwMDYsMTYuNTQ5OFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiMzZjNkNTYiLz48Y2lyY2xlIGN4PSIyODIuNjQ2OTQiIGN5PSIxMi41IiByPSI0LjI4MzQyIiBmaWxsPSIjZmZmIi8+PGNpcmNsZSBjeD0iMjk4LjkwNTc1IiBjeT0iMTIuNSIgcj0iNC4yODM0MiIgZmlsbD0iI2ZmZiIvPjxjaXJjbGUgY3g9IjMxNS4xNjQ1NSIgY3k9IjEyLjUiIHI9IjQuMjgzNDIiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNNzEzLjI5OTY3LDI2OC45MTJINTk2LjQ5MTUzYTYuNTY2MTQsNi41NjYxNCwwLDAsMSwwLTEzLjEzMjI4SDcxMy4yOTk2N2E2LjU2NjE0LDYuNTY2MTQsMCwxLDEsMCwxMy4xMzIyOFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNjY2MiLz48cGF0aCBkPSJNODU4LjQ0NTg3LDI2OC45MTJINzQxLjYzNzc0YTYuNTY2MTQsNi41NjYxNCwwLDAsMSwwLTEzLjEzMjI4SDg1OC40NDU4N2E2LjU2NjE0LDYuNTY2MTQsMCwxLDEsMCwxMy4xMzIyOFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNjY2MiLz48cGF0aCBkPSJNODU4LjQ0NTg3LDI5My43OTQxOUg2NTUuMjQxMTlhNi41NjYxMyw2LjU2NjEzLDAsMSwxLDAtMTMuMTMyMjdIODU4LjQ0NTg3YTYuNTY2MTMsNi41NjYxMywwLDEsMSwwLDEzLjEzMjI3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2NjYyIvPjxwYXRoIGQ9Ik03MTMuMjk5NjcsMjQzLjY4NDE5SDU5Ni40OTE1M2E2LjU2NjE0LDYuNTY2MTQsMCwwLDEsMC0xMy4xMzIyN0g3MTMuMjk5NjdhNi41NjYxNCw2LjU2NjE0LDAsMSwxLDAsMTMuMTMyMjdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTc3Ny41Nzg3LDI0NC4wMjk3OEg3NDQuNDAyNDNhNi41NjYxNCw2LjU2NjE0LDAsMCwxLDAtMTMuMTMyMjhINzc3LjU3ODdhNi41NjYxNCw2LjU2NjE0LDAsMSwxLDAsMTMuMTMyMjhaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTYyOS42Njc4MSwyOTMuNzk0MTlINTk2LjQ5MTUzYTYuNTY2MTQsNi41NjYxNCwwLDAsMSwwLTEzLjEzMjI3aDMzLjE3NjI4YTYuNTY2MTQsNi41NjYxNCwwLDEsMSwwLDEzLjEzMjI3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2NjYyIvPjxwYXRoIGQ9Ik03MTMuMjk5NjcsNTAxLjkxMkg1OTYuNDkxNTNhNi41NjYxNCw2LjU2NjE0LDAsMCwxLDAtMTMuMTMyMjhINzEzLjI5OTY3YTYuNTY2MTQsNi41NjYxNCwwLDEsMSwwLDEzLjEzMjI4WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2NjYyIvPjxwYXRoIGQ9Ik04NTguNDQ1ODcsNTAxLjkxMkg3NDEuNjM3NzRhNi41NjYxNCw2LjU2NjE0LDAsMCwxLDAtMTMuMTMyMjhIODU4LjQ0NTg3YTYuNTY2MTQsNi41NjYxNCwwLDEsMSwwLDEzLjEzMjI4WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2NjYyIvPjxwYXRoIGQ9Ik04NTguNDQ1ODcsNTI2Ljc5NDE5SDY1NS4yNDExOWE2LjU2NjEzLDYuNTY2MTMsMCwxLDEsMC0xMy4xMzIyN0g4NTguNDQ1ODdhNi41NjYxNCw2LjU2NjE0LDAsMSwxLDAsMTMuMTMyMjdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTcxMy4yOTk2Nyw0NzYuNjg0MTlINTk2LjQ5MTUzYTYuNTY2MTMsNi41NjYxMywwLDAsMSwwLTEzLjEzMjI3SDcxMy4yOTk2N2E2LjU2NjEzLDYuNTY2MTMsMCwxLDEsMCwxMy4xMzIyN1oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNjY2MiLz48cGF0aCBkPSJNNzc3LjU3ODcsNDc3LjAyOTc4SDc0NC40MDI0M2E2LjU2NjE0LDYuNTY2MTQsMCwwLDEsMC0xMy4xMzIyOEg3NzcuNTc4N2E2LjU2NjE0LDYuNTY2MTQsMCwwLDEsMCwxMy4xMzIyOFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNjY2MiLz48cGF0aCBkPSJNNjI5LjY2NzgxLDUyNi43OTQxOUg1OTYuNDkxNTNhNi41NjYxMyw2LjU2NjEzLDAsMCwxLDAtMTMuMTMyMjdoMzMuMTc2MjhhNi41NjYxNCw2LjU2NjE0LDAsMSwxLDAsMTMuMTMyMjdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTY4Mi43OTMsNDMxLjQxOTI0YTkuMzk2OTIsOS4zOTY5MiwwLDAsMS02LjYyMzUyLTIuNzEwMWwtNDMuOTA4NjgtNDMuMzU5MjlhOS4xNTE2LDkuMTUxNiwwLDAsMSwwLTEzLjAyMzM2bDQzLjczMTI0LTQzLjE4NDM1YTkuNzAxNzEsOS43MDE3MSwwLDAsMSwxMy42NDM1NC4wNDNoMGE5LjY4OSw5LjY4OSwwLDAsMSwuMDAwMTksMTMuNjg2NjlsLTMyLjQ5NjA3LDMyLjQ5NjY0YTUuNDEzMzgsNS40MTMzOCwwLDAsMCwwLDcuNjQ2NTJsMzIuMzE5NzgsMzIuMzIwMTZhOS40MTgsOS40MTgsMCwwLDEtNi42NjY0OCwxNi4wODQxMloiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiM2YzYzZmYiLz48cGF0aCBkPSJNNzUyLjc1ODU5LDQzMS40MTkyNGE5LjQxOCw5LjQxOCwwLDAsMS02LjY2NjQ4LTE2LjA4NDEyTDc3OC40MTE4OSwzODMuMDE1YTUuNDEzMzgsNS40MTMzOCwwLDAsMCwwLTcuNjQ2NTJMNzQ1LjkxNTgyLDM0Mi44NzE4YTkuNjc3NzYsOS42Nzc3NiwwLDAsMSwuMDAwMTktMTMuNjg2NjloMGE5LjcwMTY5LDkuNzAxNjksMCwwLDEsMTMuNjQzNTMtLjA0M2w0My43MzEyNCw0My4xODQzNWE5LjE1MTU3LDkuMTUxNTcsMCwwLDEsMCwxMy4wMjMzNmwtNDMuOTA4NjcsNDMuMzU5MjlBOS4zOTg5MSw5LjM5ODkxLDAsMCwxLDc1Mi43NTg1OSw0MzEuNDE5MjRaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjNmM2M2ZmIi8+PC9zdmc+"}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3596],{63596:(M,N,T)=>{T.r(N),T.d(N,{default:()=>j});const j="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbmFtZT0iTGF5ZXIgMSIgd2lkdGg9IjkyNi42MjE2NSIgaGVpZ2h0PSI2MDAuMDg0OTUiIHZpZXdCb3g9IjAgMCA5MjYuNjIxNjUgNjAwLjA4NDk1IiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGNpcmNsZSBjeD0iMTUwLjUzMzk1IiBjeT0iMjU0Ljg3MjQ5IiByPSIyNC41NjEwMyIgZmlsbD0iI2ZmYjhiOCIvPjxwb2x5Z29uIHBvaW50cz0iNjcuNTQzIDU0OS4xOTcgNzMuNzYyIDU1OS43NjMgMTE3LjQ3NCA1NDAuODAzIDEwOC4yOTUgNTI1LjIxIDY3LjU0MyA1NDkuMTk3IiBmaWxsPSIjZmZiOGI4Ii8+PHBhdGggZD0iTTIwNi4wOTU2Niw2OTQuNDI5NywyMTguMzQzLDcxNS4yMzY1OGwuMDAwNS4wMDA4NEExNS4zODYwNSwxNS4zODYwNSwwLDAsMSwyMTIuODg4LDczNi4zMDJsLS40MzA5MS4yNTM2MkwxOTIuNDA0Nyw3MDIuNDg4NTdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjMmYyZTQxIi8+PHBvbHlnb24gcG9pbnRzPSIxMzkuNiA1ODcuMjYgMTUxLjg2IDU4Ny4yNTkgMTU3LjY5MiA1MzkuOTcxIDEzOS41OTggNTM5Ljk3MiAxMzkuNiA1ODcuMjYiIGZpbGw9IiNmZmI4YjgiLz48cGF0aCBkPSJNMjczLjE2MjIzLDczMy4yMTQ2NmwyNC4xNDM3OS0uMDAxaC4wMDFhMTUuMzg2MDUsMTUuMzg2MDUsMCwwLDEsMTUuMzg2NDgsMTUuMzg2MjN2LjVsLTM5LjUzMDUyLjAwMTQ2WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iIzJmMmU0MSIvPjxwYXRoIGQ9Ik0yMjcuMDAwNjMsNzA4LjU2NzIzYTQuNDkzMTgsNC40OTMxOCwwLDAsMS0zLjYyNC0xLjgzM2wtMTEuODIzNzMtMTYuMDU4NTlhNC40OTk2MSw0LjQ5OTYxLDAsMCwxLDEuMTI0NTEtNi40MTAxNmw1Mi42MTQtMzUuMTQxNi0zMS43NDY1OS04My40NzQ2MUwzMDEuNDM0LDU3MS4yNTE4bDIuMjg2NjIsNzEuNzMzNEEzNi4wNDU3OSwzNi4wNDU3OSwwLDAsMSwyODUuNjc1NDQsNjc1LjQwOWwtNTYuNDI2NTIsMzIuNTUzNzFBNC40ODYsNC40ODYsMCwwLDEsMjI3LjAwMDYzLDcwOC41NjcyM1oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiMyZjJlNDEiLz48cGF0aCBkPSJNMjc2LjY1OTMzLDcyNy42MTdhNC40OTk4Niw0LjQ5OTg2LDAsMCwxLTQuNDg4NzctNC4zMzk4NGwtMi40ODgtNjkuODgxODQsMzAuODA4MzUtMS42MjMtMi40NTMxMyw3MC4zODM3OWE0LjQ4NzI5LDQuNDg3MjksMCwwLDEtNC4xOTk3LDQuMzMzbC0xNi44NzI4MSwxLjExODE3QzI3Ni44NjI5NCw3MjcuNjE0MSwyNzYuNzYwODksNzI3LjYxNywyNzYuNjU5MzMsNzI3LjYxN1oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiMyZjJlNDEiLz48cGF0aCBkPSJNMzA5LjI5MDkyLDU4NS4xMjg3NWMtNy44MzgzOCwwLTM1LjIxNjU2LTguODE2NC00NC43MjExOS0xMS45NTktMS40MjE4OCwxLjEzNzY5LTkuMjMzMTYsNi45Nzg1MS0xOC4zNTEwOCw1LjkxMTEzLTUuNjI2LS42NjAxNi0xMC41Nzg4Ni0zLjg0NDczLTE0LjcyMDk1LTkuNDY1ODItOS4xNDctMTIuNDE0MDYsMi4xNTA2NC02NS42NTEzNywxMy4yMzktMTA4LjEyNmEzNC4yNjc4MiwzNC4yNjc4MiwwLDAsMSw0MC41Mjg1Ni0yNC44Nzk4OGgwYTM0LjU3MTM3LDM0LjU3MTM3LDAsMCwxLDI2LjA4NzY1LDI1LjM3NzkzYzIuMDg3NjUsOC40OTgwNS4yOTE3NSwxOC40OTQxNC0xLjAxOTUzLDI1Ljc5Mzk1LS42MTY0NiwzLjQzMTY0LTEuMTAzNTIsNi4xNDI1Ny0uOTM3LDcuNDc0NjEuNjQzNTUsNS4xNDg0Myw0LjIxODc1LDg1Ljg5MTYsMS45MTk5Miw4OS4zMzk4NEMzMTEuMDcxNDMsNTg0Ljk2Mjc0LDMxMC4zNjM0Myw1ODUuMTI4NzUsMzA5LjI5MDkyLDU4NS4xMjg3NVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiM2YzYzZmYiLz48cGF0aCBkPSJNMjgwLjYxNiw1ODUuMjcxNzdhMTAuNzQyNjksMTAuNzQyNjksMCwwLDAsLjk0MTYtMTYuNDQ1NjlsLjQ4NTM0LTk3Ljg0MzU2LTIzLjA0NDc4LDMuODM3NCw2Ljc2OTI1LDk0Ljk3MDM3QTEwLjgwMDkxLDEwLjgwMDkxLDAsMCwwLDI4MC42MTYsNTg1LjI3MTc3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2ZmYjhiOCIvPjxwYXRoIGQ9Ik0yODUuOTQ2LDUzMy44MTgyMUgyNjEuMTI0MTdhNC41MTM1Miw0LjUxMzUyLDAsMCwxLTQuNS00LjQ1OWwtLjYwOTM4LTY3LjI5MmExNy42MDMsMTcuNjAzLDAsMSwxLDM1LjIwNDExLjA0M0wyOTAuNDQ1Nyw1MjkuMzdBNC41MTU0Nyw0LjUxNTQ3LDAsMCwxLDI4NS45NDYsNTMzLjgxODIxWiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iIzZjNjNmZiIvPjxwYXRoIGQ9Ik0yODAuOTY5MjYsNDI5LjI4ODczYy0xMS4yNDUyOS4wMjA1OS0yMS44NTQxNi04Ljg2OC0yMy44MDI4Ni0xOS45NDMyM2EyOC42NzE0OCwyOC42NzE0OCwwLDAsMSwuOTE5MjctMTMuMDEzNzJBMzQuOTUzOTQsMzQuOTUzOTQsMCwwLDEsMzA2LjAyMSwzNzQuMzc5YzMuMDA4MzEsMS4zNjEzMSw1Ljk3MTQ1LDMuMzE2NDUsNy4zNDg5LDYuMzE3NDFzLjUxNTM1LDcuMTk1MjgtMi40OTc5MSw4LjU0NTYxYy0xLjk2OTE2Ljg4MjQyLTQuNDQwMjMuNDQ5MS02LjE4NzE5LDEuNzE1NzMtMi41MDkyOCwxLjgxOTM3LTEuODYzMzQsNS42OTEyOS0uNzQyODYsOC41ODExMnMyLjM4Nzc2LDYuMzg2OTEuNTA5NDcsOC44NTIzOWMtMS43NTAyMywyLjI5NzM5LTUuMjQ4NzIsMi4yMjYwOS04LjAwNDM2LDEuMzYxMzdzLTUuNDc1NTctMi4zMTI3Ny04LjM0ODY0LTIuMDE4MjJjLTQuMTkwNC40Mjk2MS03LjIwMTcyLDQuNTk3NzMtNy43NTkxLDguNzczMDZzLjc1NDc0LDguMzQ4OTIsMi4wNTAxOCwxMi4zNTcxNFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiMyZjJlNDEiLz48cGF0aCBkPSJNMzk1LjY4OTE4LDc1MC4wNDI0N2gtMjU4YTEsMSwwLDEsMSwwLTJoMjU4YTEsMSwwLDAsMSwwLDJaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTEwNDYuODEwODIsNTg0LjUwNTM4SDQwNS45NzIzMmExNi41MTg2OCwxNi41MTg2OCwwLDAsMS0xNi41LTE2LjVWMTcyLjg1MTU3YTEyLjEwMTg1LDEyLjEwMTg1LDAsMCwxLDEyLjA4Nzg5LTEyLjA4ODM4aDY0OS40NTM1YTEyLjMxMTExLDEyLjMxMTExLDAsMCwxLDEyLjI5NzExLDEyLjI5NzM2VjU2OC4wMDUzOEExNi41MTg2NywxNi41MTg2NywwLDAsMSwxMDQ2LjgxMDgyLDU4NC41MDUzOFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNmMmYyZjIiLz48cGF0aCBkPSJNMTAyNi4wOTEsNTYzLjY3MzA2SDQyOC44NDYyN2MtOC43NTUsMC0xNS44Nzc1Ny02LjY2OTkzLTE1Ljg3NzU3LTE0Ljg2ODE3di0zNDQuMTA1YzAtNi4wODAwOCw1LjI3OC0xMS4wMjY4NSwxMS43NjU2My0xMS4wMjY4NUgxMDMwLjAwOGM2LjU5NTIxLDAsMTEuOTYwNjksNS4wMjgzMiwxMS45NjA2OSwxMS4yMDg0OVY1NDguODA0ODlDMTA0MS45Njg3LDU1Ny4wMDMxMywxMDM0Ljg0NTksNTYzLjY3MzA2LDEwMjYuMDkxLDU2My42NzMwNloiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTA2My4wODEwOSwxNzQuOTA3NzJIMzg5LjI0MDc2di04LjQwMDM5YTE2LjU3Mzc2LDE2LjU3Mzc2LDAsMCwxLDE2LjU2LTE2LjU0OThIMTA0Ni41MjFhMTYuNTczNjgsMTYuNTczNjgsMCwwLDEsMTYuNTYwMDYsMTYuNTQ5OFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiMzZjNkNTYiLz48Y2lyY2xlIGN4PSIyODIuNjQ2OTQiIGN5PSIxMi41IiByPSI0LjI4MzQyIiBmaWxsPSIjZmZmIi8+PGNpcmNsZSBjeD0iMjk4LjkwNTc1IiBjeT0iMTIuNSIgcj0iNC4yODM0MiIgZmlsbD0iI2ZmZiIvPjxjaXJjbGUgY3g9IjMxNS4xNjQ1NSIgY3k9IjEyLjUiIHI9IjQuMjgzNDIiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNNzEzLjI5OTY3LDI2OC45MTJINTk2LjQ5MTUzYTYuNTY2MTQsNi41NjYxNCwwLDAsMSwwLTEzLjEzMjI4SDcxMy4yOTk2N2E2LjU2NjE0LDYuNTY2MTQsMCwxLDEsMCwxMy4xMzIyOFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNjY2MiLz48cGF0aCBkPSJNODU4LjQ0NTg3LDI2OC45MTJINzQxLjYzNzc0YTYuNTY2MTQsNi41NjYxNCwwLDAsMSwwLTEzLjEzMjI4SDg1OC40NDU4N2E2LjU2NjE0LDYuNTY2MTQsMCwxLDEsMCwxMy4xMzIyOFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNjY2MiLz48cGF0aCBkPSJNODU4LjQ0NTg3LDI5My43OTQxOUg2NTUuMjQxMTlhNi41NjYxMyw2LjU2NjEzLDAsMSwxLDAtMTMuMTMyMjdIODU4LjQ0NTg3YTYuNTY2MTMsNi41NjYxMywwLDEsMSwwLDEzLjEzMjI3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2NjYyIvPjxwYXRoIGQ9Ik03MTMuMjk5NjcsMjQzLjY4NDE5SDU5Ni40OTE1M2E2LjU2NjE0LDYuNTY2MTQsMCwwLDEsMC0xMy4xMzIyN0g3MTMuMjk5NjdhNi41NjYxNCw2LjU2NjE0LDAsMSwxLDAsMTMuMTMyMjdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTc3Ny41Nzg3LDI0NC4wMjk3OEg3NDQuNDAyNDNhNi41NjYxNCw2LjU2NjE0LDAsMCwxLDAtMTMuMTMyMjhINzc3LjU3ODdhNi41NjYxNCw2LjU2NjE0LDAsMSwxLDAsMTMuMTMyMjhaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTYyOS42Njc4MSwyOTMuNzk0MTlINTk2LjQ5MTUzYTYuNTY2MTQsNi41NjYxNCwwLDAsMSwwLTEzLjEzMjI3aDMzLjE3NjI4YTYuNTY2MTQsNi41NjYxNCwwLDEsMSwwLDEzLjEzMjI3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2NjYyIvPjxwYXRoIGQ9Ik03MTMuMjk5NjcsNTAxLjkxMkg1OTYuNDkxNTNhNi41NjYxNCw2LjU2NjE0LDAsMCwxLDAtMTMuMTMyMjhINzEzLjI5OTY3YTYuNTY2MTQsNi41NjYxNCwwLDEsMSwwLDEzLjEzMjI4WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2NjYyIvPjxwYXRoIGQ9Ik04NTguNDQ1ODcsNTAxLjkxMkg3NDEuNjM3NzRhNi41NjYxNCw2LjU2NjE0LDAsMCwxLDAtMTMuMTMyMjhIODU4LjQ0NTg3YTYuNTY2MTQsNi41NjYxNCwwLDEsMSwwLDEzLjEzMjI4WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNi42ODkxOCAtMTQ5Ljk1NzUzKSIgZmlsbD0iI2NjYyIvPjxwYXRoIGQ9Ik04NTguNDQ1ODcsNTI2Ljc5NDE5SDY1NS4yNDExOWE2LjU2NjEzLDYuNTY2MTMsMCwxLDEsMC0xMy4xMzIyN0g4NTguNDQ1ODdhNi41NjYxNCw2LjU2NjE0LDAsMSwxLDAsMTMuMTMyMjdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTcxMy4yOTk2Nyw0NzYuNjg0MTlINTk2LjQ5MTUzYTYuNTY2MTMsNi41NjYxMywwLDAsMSwwLTEzLjEzMjI3SDcxMy4yOTk2N2E2LjU2NjEzLDYuNTY2MTMsMCwxLDEsMCwxMy4xMzIyN1oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNjY2MiLz48cGF0aCBkPSJNNzc3LjU3ODcsNDc3LjAyOTc4SDc0NC40MDI0M2E2LjU2NjE0LDYuNTY2MTQsMCwwLDEsMC0xMy4xMzIyOEg3NzcuNTc4N2E2LjU2NjE0LDYuNTY2MTQsMCwwLDEsMCwxMy4xMzIyOFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiNjY2MiLz48cGF0aCBkPSJNNjI5LjY2NzgxLDUyNi43OTQxOUg1OTYuNDkxNTNhNi41NjYxMyw2LjU2NjEzLDAsMCwxLDAtMTMuMTMyMjdoMzMuMTc2MjhhNi41NjYxNCw2LjU2NjE0LDAsMSwxLDAsMTMuMTMyMjdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjY2NjIi8+PHBhdGggZD0iTTY4Mi43OTMsNDMxLjQxOTI0YTkuMzk2OTIsOS4zOTY5MiwwLDAsMS02LjYyMzUyLTIuNzEwMWwtNDMuOTA4NjgtNDMuMzU5MjlhOS4xNTE2LDkuMTUxNiwwLDAsMSwwLTEzLjAyMzM2bDQzLjczMTI0LTQzLjE4NDM1YTkuNzAxNzEsOS43MDE3MSwwLDAsMSwxMy42NDM1NC4wNDNoMGE5LjY4OSw5LjY4OSwwLDAsMSwuMDAwMTksMTMuNjg2NjlsLTMyLjQ5NjA3LDMyLjQ5NjY0YTUuNDEzMzgsNS40MTMzOCwwLDAsMCwwLDcuNjQ2NTJsMzIuMzE5NzgsMzIuMzIwMTZhOS40MTgsOS40MTgsMCwwLDEtNi42NjY0OCwxNi4wODQxMloiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzYuNjg5MTggLTE0OS45NTc1MykiIGZpbGw9IiM2YzYzZmYiLz48cGF0aCBkPSJNNzUyLjc1ODU5LDQzMS40MTkyNGE5LjQxOCw5LjQxOCwwLDAsMS02LjY2NjQ4LTE2LjA4NDEyTDc3OC40MTE4OSwzODMuMDE1YTUuNDEzMzgsNS40MTMzOCwwLDAsMCwwLTcuNjQ2NTJMNzQ1LjkxNTgyLDM0Mi44NzE4YTkuNjc3NzYsOS42Nzc3NiwwLDAsMSwuMDAwMTktMTMuNjg2NjloMGE5LjcwMTY5LDkuNzAxNjksMCwwLDEsMTMuNjQzNTMtLjA0M2w0My43MzEyNCw0My4xODQzNWE5LjE1MTU3LDkuMTUxNTcsMCwwLDEsMCwxMy4wMjMzNmwtNDMuOTA4NjcsNDMuMzU5MjlBOS4zOTg5MSw5LjM5ODkxLDAsMCwxLDc1Mi43NTg1OSw0MzEuNDE5MjRaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTM2LjY4OTE4IC0xNDkuOTU3NTMpIiBmaWxsPSIjNmM2M2ZmIi8+PC9zdmc+"}}]); \ No newline at end of file diff --git a/assets/js/39bae550.0f30ee7c.js b/assets/js/39bae550.ca69824c.js similarity index 93% rename from assets/js/39bae550.0f30ee7c.js rename to assets/js/39bae550.ca69824c.js index 8b4fc5cc..5e7f57e4 100644 --- a/assets/js/39bae550.0f30ee7c.js +++ b/assets/js/39bae550.ca69824c.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[417,4369],{11343:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>h,contentTitle:()=>p,default:()=>O,frontMatter:()=>d,metadata:()=>s,toc:()=>f});const s=JSON.parse('{"id":"demo-viewer/numeric/multipleOf","title":"\u2716\ufe0f Multiple Of","description":"number with multipleOf showcase","source":"@site/docs/demo-viewer/numeric/multipleOf.mdx","sourceDirName":"demo-viewer/numeric","slug":"/demo-viewer/numeric/multipleOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/numeric/multipleOf.mdx","tags":[],"version":"current","frontMatter":{"description":"number with multipleOf showcase","title":"\u2716\ufe0f Multiple Of"},"sidebar":"tutorialSidebar","previous":{"title":"1\ufe0f\u20e3 Integer","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer"},"next":{"title":"\ud83d\udd22 Number","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number"}}');var r=i(62540),l=i(28453),u=i(21432),n=i(94369),c=i(21344),a=i.n(c),m=i(11470),o=i(19365);const d={description:"number with multipleOf showcase",title:"\u2716\ufe0f Multiple Of"},p="Multiple Of",h={},f=[];function w(e){const t={h1:"h1",header:"header",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"multiple-of",children:"Multiple Of"})}),"\n",(0,r.jsxs)(m.default,{children:[(0,r.jsx)(o.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(a(),{schema:n})}),(0,r.jsx)(o.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(u.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function O(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(w,{...e})}):w(e)}},94369:e=>{e.exports=JSON.parse('{"type":"number","multipleOf":10}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[417,4369],{55443:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>h,contentTitle:()=>p,default:()=>O,frontMatter:()=>d,metadata:()=>s,toc:()=>f});const s=JSON.parse('{"id":"demo-viewer/numeric/multipleOf","title":"\u2716\ufe0f Multiple Of","description":"number with multipleOf showcase","source":"@site/docs/demo-viewer/numeric/multipleOf.mdx","sourceDirName":"demo-viewer/numeric","slug":"/demo-viewer/numeric/multipleOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/numeric/multipleOf.mdx","tags":[],"version":"current","frontMatter":{"description":"number with multipleOf showcase","title":"\u2716\ufe0f Multiple Of"},"sidebar":"tutorialSidebar","previous":{"title":"1\ufe0f\u20e3 Integer","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer"},"next":{"title":"\ud83d\udd22 Number","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number"}}');var r=i(62540),l=i(28453),u=i(58069),n=i(94369),c=i(88307),a=i.n(c),m=i(65537),o=i(79329);const d={description:"number with multipleOf showcase",title:"\u2716\ufe0f Multiple Of"},p="Multiple Of",h={},f=[];function w(e){const t={h1:"h1",header:"header",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"multiple-of",children:"Multiple Of"})}),"\n",(0,r.jsxs)(m.default,{children:[(0,r.jsx)(o.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(a(),{schema:n})}),(0,r.jsx)(o.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(u.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function O(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(w,{...e})}):w(e)}},94369:e=>{e.exports=JSON.parse('{"type":"number","multipleOf":10}')}}]); \ No newline at end of file diff --git a/assets/js/3af02d98.d0960fe4.js b/assets/js/3af02d98.fa88bcf6.js similarity index 98% rename from assets/js/3af02d98.d0960fe4.js rename to assets/js/3af02d98.fa88bcf6.js index c3307afd..aade7cdd 100644 --- a/assets/js/3af02d98.d0960fe4.js +++ b/assets/js/3af02d98.fa88bcf6.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1552],{84563:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"api/JSONSchemaViewer","title":"\ud83d\udd0e @theme/JSONSchemaViewer","description":"@theme/JSONSchemaViewer API","source":"@site/docs/api/JSONSchemaViewer.mdx","sourceDirName":"api","slug":"/api/JSONSchemaViewer","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/api/JSONSchemaViewer.mdx","tags":[],"version":"current","frontMatter":{"title":"\ud83d\udd0e @theme/JSONSchemaViewer","description":"@theme/JSONSchemaViewer API"},"sidebar":"tutorialSidebar","previous":{"title":"\u270f\ufe0f @theme/JSONSchemaEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor"},"next":{"title":"\ud83d\udd27 @theme/MonacoEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/MonacoEditor"}}');var s=t(62540),i=t(28453),a=t(11470),o=t(19365);const l={title:"\ud83d\udd0e @theme/JSONSchemaViewer",description:"@theme/JSONSchemaViewer API"},c=void 0,d={},h=[{value:"Configuration",id:"configuration",level:2},{value:"Types",id:"types",level:3},{value:"Examples",id:"examples",level:2}];function m(e){const n={code:"code",h2:"h2",h3:"h3",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Property"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Required ?"}),(0,s.jsx)(n.th,{children:"Note"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"schema"}),(0,s.jsx)(n.td,{children:"JSONSchema"}),(0,s.jsx)(n.td,{children:"Mandatory"}),(0,s.jsx)(n.td,{children:"JSON Schema Draft-07 / Draft 2019-09 / Draft 2020-12"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"resolverOptions"}),(0,s.jsx)(n.td,{children:"IResolveOpts"}),(0,s.jsx)(n.td,{children:"Optional"}),(0,s.jsx)(n.td,{children:"To resolve your $ref (by default, only inline references will be dereferenced)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"viewerOptions"}),(0,s.jsx)(n.td,{children:"JSVOptions"}),(0,s.jsx)(n.td,{children:"Optional"}),(0,s.jsx)(n.td,{children:"Options for the viewer itself."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"className"}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"Optional"}),(0,s.jsx)(n.td,{children:"To customize the styles of the viewer, to override docusaurus styles on a specific page"})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"types",children:"Types"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:"// Either Draft-07 / Draft 2019-09 / Draft 2020-12\ntype JSONSchema = unknown\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'type IResolveOpts = {\n // "IResolveOpts" options from @stoplightio/json-ref-resolver\n // More info on https://github.com/stoplightio/json-ref-resolver\n // https://github.com/stoplightio/json-ref-resolver/blob/master/src/types.ts\n}\n'})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'type JSVOptions = {\n /**\n * Should we display "examples" ?\n * @default false\n */\n showExamples?: boolean\n /**\n * To overwrite the order to display qualifier messages\n * @default ["nullable","deprecated","readOnly","writeOnly","enum","stringLength","objectProperties","no-extra-properties","arrayItems","arrayContains","no-extra-items","number-range","pattern","multipleOf","uniqueItems","contentEncoding","contentMediaType","contentSchema","default","const","examples"]\n */\n qualifierMessagesOrder?: CheckKey[]\n /**\n * To overwrite the printout of "description"\n * By default, print out as provided\n * @default undefined\n */\n DescriptionComponent?: (params: { description: string }) => JSX.Element\n /**\n * To overwrite the printout of "examples", "default", "const", and "enum"\n * By default, print out as provided\n * @default undefined\n */\n ValueComponent?: (params: { value: unknown; schema: JSONSchema }) => JSX.Element\n /**\n * To overwrite the default handling of unresolved $refs\n * By default, print out as provided\n * @default undefined\n */\n UnresolvedRefsComponent?: (params: { schema: JSONSchema }) => JSX.Element\n}\n'})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'type CheckKey =\n | "nullable"\n | "deprecated"\n | "readOnly"\n | "writeOnly"\n | "enum"\n// minLength / maxLength\n | "stringLength"\n// minProperties / maxProperties\n | "objectProperties"\n | "no-extra-properties"\n// minItems / maxItems\n | "arrayItems"\n// minContains / maxContains\n | "arrayContains"\n | "no-extra-items"\n// minimum / exclusiveMinimum / maximum / exclusiveMaximum\n | "number-range"\n | "pattern"\n | "multipleOf"\n | "uniqueItems"\n | "default"\n | "const"\n | "examples"\n | "contentMediaType"\n | "contentEncoding"\n | "contentSchema"\n// For unsolved recursive refs ($ref, $dynamicRef, ...)\n | "unsolvedRefs"\n'})}),"\n",(0,s.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,s.jsxs)(a.default,{children:[(0,s.jsx)(o.default,{value:"JSX",label:"JSX",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'import React from "react"\nimport Layout from "@theme/Layout"\nimport JSONSchemaViewer from "@theme/JSONSchemaViewer"\n\nexport default function ExamplePage(): JSX.Element {\n\n // You are free to fetch your schema in your own way (load local file, fetch, ...) :)\n const mySchema = {\n "type": "object",\n "properties": {\n "builtin": {\n "type": "number"\n }\n },\n "patternProperties": {\n "^S_": {\n "type": "string"\n },\n "^I_": {\n "type": "integer"\n }\n },\n "additionalProperties": {\n "type": "string"\n }\n }\n\n return (\n \n \n \n )\n}\n'})})}),(0,s.jsx)(o.default,{value:"MDX",label:"MDX",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'\nimport CodeBlock from \'@theme/CodeBlock\';\n// To fetch a JSON file from your static folder\nimport Schema from "@site/static/schemas/examples/array/tuples.json";\nimport JSONSchemaViewer from "@theme/JSONSchemaViewer";\n\n# Tuples\n\nViewer :\n\n\n\nSource :\n\n{JSON.stringify(Schema, null, 2)}\n\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1552],{43645:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"api/JSONSchemaViewer","title":"\ud83d\udd0e @theme/JSONSchemaViewer","description":"@theme/JSONSchemaViewer API","source":"@site/docs/api/JSONSchemaViewer.mdx","sourceDirName":"api","slug":"/api/JSONSchemaViewer","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/api/JSONSchemaViewer.mdx","tags":[],"version":"current","frontMatter":{"title":"\ud83d\udd0e @theme/JSONSchemaViewer","description":"@theme/JSONSchemaViewer API"},"sidebar":"tutorialSidebar","previous":{"title":"\u270f\ufe0f @theme/JSONSchemaEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor"},"next":{"title":"\ud83d\udd27 @theme/MonacoEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/MonacoEditor"}}');var s=t(62540),i=t(28453),a=t(65537),o=t(79329);const l={title:"\ud83d\udd0e @theme/JSONSchemaViewer",description:"@theme/JSONSchemaViewer API"},c=void 0,d={},h=[{value:"Configuration",id:"configuration",level:2},{value:"Types",id:"types",level:3},{value:"Examples",id:"examples",level:2}];function m(e){const n={code:"code",h2:"h2",h3:"h3",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Property"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Required ?"}),(0,s.jsx)(n.th,{children:"Note"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"schema"}),(0,s.jsx)(n.td,{children:"JSONSchema"}),(0,s.jsx)(n.td,{children:"Mandatory"}),(0,s.jsx)(n.td,{children:"JSON Schema Draft-07 / Draft 2019-09 / Draft 2020-12"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"resolverOptions"}),(0,s.jsx)(n.td,{children:"IResolveOpts"}),(0,s.jsx)(n.td,{children:"Optional"}),(0,s.jsx)(n.td,{children:"To resolve your $ref (by default, only inline references will be dereferenced)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"viewerOptions"}),(0,s.jsx)(n.td,{children:"JSVOptions"}),(0,s.jsx)(n.td,{children:"Optional"}),(0,s.jsx)(n.td,{children:"Options for the viewer itself."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"className"}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"Optional"}),(0,s.jsx)(n.td,{children:"To customize the styles of the viewer, to override docusaurus styles on a specific page"})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"types",children:"Types"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:"// Either Draft-07 / Draft 2019-09 / Draft 2020-12\ntype JSONSchema = unknown\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'type IResolveOpts = {\n // "IResolveOpts" options from @stoplightio/json-ref-resolver\n // More info on https://github.com/stoplightio/json-ref-resolver\n // https://github.com/stoplightio/json-ref-resolver/blob/master/src/types.ts\n}\n'})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'type JSVOptions = {\n /**\n * Should we display "examples" ?\n * @default false\n */\n showExamples?: boolean\n /**\n * To overwrite the order to display qualifier messages\n * @default ["nullable","deprecated","readOnly","writeOnly","enum","stringLength","objectProperties","no-extra-properties","arrayItems","arrayContains","no-extra-items","number-range","pattern","multipleOf","uniqueItems","contentEncoding","contentMediaType","contentSchema","default","const","examples"]\n */\n qualifierMessagesOrder?: CheckKey[]\n /**\n * To overwrite the printout of "description"\n * By default, print out as provided\n * @default undefined\n */\n DescriptionComponent?: (params: { description: string }) => JSX.Element\n /**\n * To overwrite the printout of "examples", "default", "const", and "enum"\n * By default, print out as provided\n * @default undefined\n */\n ValueComponent?: (params: { value: unknown; schema: JSONSchema }) => JSX.Element\n /**\n * To overwrite the default handling of unresolved $refs\n * By default, print out as provided\n * @default undefined\n */\n UnresolvedRefsComponent?: (params: { schema: JSONSchema }) => JSX.Element\n}\n'})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'type CheckKey =\n | "nullable"\n | "deprecated"\n | "readOnly"\n | "writeOnly"\n | "enum"\n// minLength / maxLength\n | "stringLength"\n// minProperties / maxProperties\n | "objectProperties"\n | "no-extra-properties"\n// minItems / maxItems\n | "arrayItems"\n// minContains / maxContains\n | "arrayContains"\n | "no-extra-items"\n// minimum / exclusiveMinimum / maximum / exclusiveMaximum\n | "number-range"\n | "pattern"\n | "multipleOf"\n | "uniqueItems"\n | "default"\n | "const"\n | "examples"\n | "contentMediaType"\n | "contentEncoding"\n | "contentSchema"\n// For unsolved recursive refs ($ref, $dynamicRef, ...)\n | "unsolvedRefs"\n'})}),"\n",(0,s.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,s.jsxs)(a.default,{children:[(0,s.jsx)(o.default,{value:"JSX",label:"JSX",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'import React from "react"\nimport Layout from "@theme/Layout"\nimport JSONSchemaViewer from "@theme/JSONSchemaViewer"\n\nexport default function ExamplePage(): JSX.Element {\n\n // You are free to fetch your schema in your own way (load local file, fetch, ...) :)\n const mySchema = {\n "type": "object",\n "properties": {\n "builtin": {\n "type": "number"\n }\n },\n "patternProperties": {\n "^S_": {\n "type": "string"\n },\n "^I_": {\n "type": "integer"\n }\n },\n "additionalProperties": {\n "type": "string"\n }\n }\n\n return (\n \n \n \n )\n}\n'})})}),(0,s.jsx)(o.default,{value:"MDX",label:"MDX",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",children:'\nimport CodeBlock from \'@theme/CodeBlock\';\n// To fetch a JSON file from your static folder\nimport Schema from "@site/static/schemas/examples/array/tuples.json";\nimport JSONSchemaViewer from "@theme/JSONSchemaViewer";\n\n# Tuples\n\nViewer :\n\n\n\nSource :\n\n{JSON.stringify(Schema, null, 2)}\n\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}}}]); \ No newline at end of file diff --git a/assets/js/3d59b95f.ae3a21ad.js b/assets/js/3d59b95f.f88338ea.js similarity index 90% rename from assets/js/3d59b95f.ae3a21ad.js rename to assets/js/3d59b95f.f88338ea.js index dde96e73..dafcf637 100644 --- a/assets/js/3d59b95f.ae3a21ad.js +++ b/assets/js/3d59b95f.f88338ea.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4362,4534],{29483:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>w,contentTitle:()=>h,default:()=>f,frontMatter:()=>m,metadata:()=>r,toc:()=>p});const r=JSON.parse('{"id":"demo-viewer/generic_keywords/enum","title":"\ud83d\udd12 Enum","description":"enum showcase","source":"@site/docs/demo-viewer/generic_keywords/enum.mdx","sourceDirName":"demo-viewer/generic_keywords","slug":"/demo-viewer/generic_keywords/enum","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/generic_keywords/enum.mdx","tags":[],"version":"current","frontMatter":{"description":"enum showcase","title":"\ud83d\udd12 Enum"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddca Const","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const"},"next":{"title":"\ud83d\udd73\ufe0f Null","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/null"}}');var t=n(62540),i=n(28453),u=n(21432),o=n(4534),a=n(21344),c=n.n(a),d=n(11470),l=n(19365);const m={description:"enum showcase",title:"\ud83d\udd12 Enum"},h="Enum",w={},p=[];function g(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"enum",children:"Enum"})}),"\n",(0,t.jsxs)(d.default,{children:[(0,t.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(c(),{schema:o})}),(0,t.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(u.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function f(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}},4534:e=>{e.exports=JSON.parse('{"enum":["red","amber","green"]}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4362,4534],{78321:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>w,contentTitle:()=>h,default:()=>f,frontMatter:()=>m,metadata:()=>r,toc:()=>p});const r=JSON.parse('{"id":"demo-viewer/generic_keywords/enum","title":"\ud83d\udd12 Enum","description":"enum showcase","source":"@site/docs/demo-viewer/generic_keywords/enum.mdx","sourceDirName":"demo-viewer/generic_keywords","slug":"/demo-viewer/generic_keywords/enum","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/generic_keywords/enum.mdx","tags":[],"version":"current","frontMatter":{"description":"enum showcase","title":"\ud83d\udd12 Enum"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddca Const","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const"},"next":{"title":"\ud83d\udd73\ufe0f Null","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/null"}}');var t=n(62540),i=n(28453),u=n(58069),o=n(4534),a=n(88307),c=n.n(a),d=n(65537),l=n(79329);const m={description:"enum showcase",title:"\ud83d\udd12 Enum"},h="Enum",w={},p=[];function g(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"enum",children:"Enum"})}),"\n",(0,t.jsxs)(d.default,{children:[(0,t.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(c(),{schema:o})}),(0,t.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(u.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function f(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}},4534:e=>{e.exports=JSON.parse('{"enum":["red","amber","green"]}')}}]); \ No newline at end of file diff --git a/assets/js/458927b5.07d39c0c.js b/assets/js/458927b5.f29e42f3.js similarity index 94% rename from assets/js/458927b5.07d39c0c.js rename to assets/js/458927b5.f29e42f3.js index a92fa0cc..6f1d9d5d 100644 --- a/assets/js/458927b5.07d39c0c.js +++ b/assets/js/458927b5.f29e42f3.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[561,9905],{60653:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>f,frontMatter:()=>m,metadata:()=>t,toc:()=>S});const t=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependentSchemas","title":"\ud83c\udfd7\ufe0f dependentSchemas","description":"schema conditionally with dependentSchemas showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependentSchemas.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependentSchemas","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependentSchemas.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependentSchemas showcase","title":"\ud83c\udfd7\ufe0f dependentSchemas"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd01 dependentRequired (bidirectional)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional"},"next":{"title":"\ud83c\udfac If-Then-Else","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else"}}');var d=s(62540),i=s(28453),a=s(21432),c=s(80561),r=s(21344),o=s.n(r),l=s(11470),h=s(19365);const m={description:"schema conditionally with dependentSchemas showcase",title:"\ud83c\udfd7\ufe0f dependentSchemas"},p="dependentSchemas",u={},S=[];function w(e){const n={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"dependentschemas",children:"dependentSchemas"})}),"\n",(0,d.jsxs)(l.default,{children:[(0,d.jsx)(h.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,d.jsx)(o(),{schema:c})}),(0,d.jsx)(h.default,{value:"JSON Schema",label:"JSON Schema",children:(0,d.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function f(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(w,{...e})}):w(e)}},80561:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"}},"required":["name"],"dependentSchemas":{"credit_card":{"properties":{"billing_address":{"type":"string"}},"required":["billing_address"]}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[561,9905],{15635:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>f,frontMatter:()=>m,metadata:()=>t,toc:()=>S});const t=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependentSchemas","title":"\ud83c\udfd7\ufe0f dependentSchemas","description":"schema conditionally with dependentSchemas showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependentSchemas.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependentSchemas","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependentSchemas.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependentSchemas showcase","title":"\ud83c\udfd7\ufe0f dependentSchemas"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd01 dependentRequired (bidirectional)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional"},"next":{"title":"\ud83c\udfac If-Then-Else","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else"}}');var d=s(62540),i=s(28453),a=s(58069),c=s(80561),r=s(88307),o=s.n(r),l=s(65537),h=s(79329);const m={description:"schema conditionally with dependentSchemas showcase",title:"\ud83c\udfd7\ufe0f dependentSchemas"},p="dependentSchemas",u={},S=[];function w(e){const n={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"dependentschemas",children:"dependentSchemas"})}),"\n",(0,d.jsxs)(l.default,{children:[(0,d.jsx)(h.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,d.jsx)(o(),{schema:c})}),(0,d.jsx)(h.default,{value:"JSON Schema",label:"JSON Schema",children:(0,d.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function f(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(w,{...e})}):w(e)}},80561:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"}},"required":["name"],"dependentSchemas":{"credit_card":{"properties":{"billing_address":{"type":"string"}},"required":["billing_address"]}}}')}}]); \ No newline at end of file diff --git a/assets/js/4de116f4.fb1d2370.js b/assets/js/4de116f4.af200318.js similarity index 90% rename from assets/js/4de116f4.fb1d2370.js rename to assets/js/4de116f4.af200318.js index 7775ae9b..5c3d4d50 100644 --- a/assets/js/4de116f4.fb1d2370.js +++ b/assets/js/4de116f4.af200318.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2726,3974],{45871:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>u,default:()=>w,frontMatter:()=>h,metadata:()=>i,toc:()=>f});const i=JSON.parse('{"id":"demo-viewer/schema_composition/anyOf","title":"\ud83c\udf10 anyOf","description":"schema composition with anyOf showcase","source":"@site/docs/demo-viewer/schema_composition/anyOf.mdx","sourceDirName":"demo-viewer/schema_composition","slug":"/demo-viewer/schema_composition/anyOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_composition/anyOf.mdx","tags":[],"version":"current","frontMatter":{"description":"schema composition with anyOf showcase","title":"\ud83c\udf10 anyOf"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\udd1d allOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf"},"next":{"title":"\ud83d\udeab not","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not"}}');var n=t(62540),o=t(28453),a=t(21432),c=t(83974),r=t(21344),m=t.n(r),d=t(11470),l=t(19365);const h={description:"schema composition with anyOf showcase",title:"\ud83c\udf10 anyOf"},u="anyOf",p={},f=[];function O(e){const s={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"anyof",children:"anyOf"})}),"\n",(0,n.jsxs)(d.default,{children:[(0,n.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(m(),{schema:c})}),(0,n.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(O,{...e})}):O(e)}},83974:e=>{e.exports=JSON.parse('{"anyOf":[{"type":"string","maxLength":5},{"type":"number","minimum":0}]}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2726,3974],{47731:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>u,default:()=>w,frontMatter:()=>h,metadata:()=>i,toc:()=>f});const i=JSON.parse('{"id":"demo-viewer/schema_composition/anyOf","title":"\ud83c\udf10 anyOf","description":"schema composition with anyOf showcase","source":"@site/docs/demo-viewer/schema_composition/anyOf.mdx","sourceDirName":"demo-viewer/schema_composition","slug":"/demo-viewer/schema_composition/anyOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_composition/anyOf.mdx","tags":[],"version":"current","frontMatter":{"description":"schema composition with anyOf showcase","title":"\ud83c\udf10 anyOf"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\udd1d allOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf"},"next":{"title":"\ud83d\udeab not","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not"}}');var n=t(62540),o=t(28453),a=t(58069),c=t(83974),r=t(88307),m=t.n(r),d=t(65537),l=t(79329);const h={description:"schema composition with anyOf showcase",title:"\ud83c\udf10 anyOf"},u="anyOf",p={},f=[];function O(e){const s={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"anyof",children:"anyOf"})}),"\n",(0,n.jsxs)(d.default,{children:[(0,n.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(m(),{schema:c})}),(0,n.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(O,{...e})}):O(e)}},83974:e=>{e.exports=JSON.parse('{"anyOf":[{"type":"string","maxLength":5},{"type":"number","minimum":0}]}')}}]); \ No newline at end of file diff --git a/assets/js/4f68d1a6.24839fe2.js b/assets/js/4f68d1a6.fb7540a3.js similarity index 90% rename from assets/js/4f68d1a6.24839fe2.js rename to assets/js/4f68d1a6.fb7540a3.js index 2a5e3874..84d741c4 100644 --- a/assets/js/4f68d1a6.24839fe2.js +++ b/assets/js/4f68d1a6.fb7540a3.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[983,3289],{92284:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>j,contentTitle:()=>p,default:()=>f,frontMatter:()=>m,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"demo-viewer/object/simpleObject","title":"\ud83d\udfe6 Simple","description":"simple object showcase","source":"@site/docs/demo-viewer/object/simpleObject.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/simpleObject","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/simpleObject.mdx","tags":[],"version":"current","frontMatter":{"description":"simple object showcase","title":"\ud83d\udfe6 Simple"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd34 Required","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required"},"next":{"title":"\ud83d\udccf Size","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size"}}');var c=t(62540),r=t(28453),o=t(21432),l=t(93289),a=t(21344),n=t.n(a),d=t(11470),u=t(19365);const m={description:"simple object showcase",title:"\ud83d\udfe6 Simple"},p="Simple",j={},h=[];function b(e){const s={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.header,{children:(0,c.jsx)(s.h1,{id:"simple",children:"Simple"})}),"\n",(0,c.jsxs)(d.default,{children:[(0,c.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,c.jsx)(n(),{schema:l})}),(0,c.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,c.jsx)(o.default,{language:"json-schema",children:JSON.stringify(l,null,2)})})]})]})}function f(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,c.jsx)(s,{...e,children:(0,c.jsx)(b,{...e})}):b(e)}},93289:e=>{e.exports={type:"object"}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[983,3289],{28071:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>j,contentTitle:()=>p,default:()=>f,frontMatter:()=>m,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"demo-viewer/object/simpleObject","title":"\ud83d\udfe6 Simple","description":"simple object showcase","source":"@site/docs/demo-viewer/object/simpleObject.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/simpleObject","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/simpleObject.mdx","tags":[],"version":"current","frontMatter":{"description":"simple object showcase","title":"\ud83d\udfe6 Simple"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd34 Required","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required"},"next":{"title":"\ud83d\udccf Size","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size"}}');var c=t(62540),r=t(28453),o=t(58069),l=t(93289),a=t(88307),n=t.n(a),d=t(65537),u=t(79329);const m={description:"simple object showcase",title:"\ud83d\udfe6 Simple"},p="Simple",j={},h=[];function b(e){const s={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.header,{children:(0,c.jsx)(s.h1,{id:"simple",children:"Simple"})}),"\n",(0,c.jsxs)(d.default,{children:[(0,c.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,c.jsx)(n(),{schema:l})}),(0,c.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,c.jsx)(o.default,{language:"json-schema",children:JSON.stringify(l,null,2)})})]})]})}function f(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,c.jsx)(s,{...e,children:(0,c.jsx)(b,{...e})}):b(e)}},93289:e=>{e.exports={type:"object"}}}]); \ No newline at end of file diff --git a/assets/js/9229.074e6483.js b/assets/js/5711.fe71f8f3.js similarity index 99% rename from assets/js/9229.074e6483.js rename to assets/js/5711.fe71f8f3.js index 7e6e3cf7..f7c89f72 100644 --- a/assets/js/9229.074e6483.js +++ b/assets/js/5711.fe71f8f3.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[9229],{19229:(M,N,I)=>{I.r(N),I.d(N,{default:()=>g});const g="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgo8c3ZnCiAgICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIgogICAgeG1sbnM6bnMxPSJodHRwOi8vc296aS5iYWllcm91Z2UuZnIiCiAgICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICAgaWQ9InN2ZzI3MTgzIgogICAgc29kaXBvZGk6ZG9jbmFtZT0iZ2Vhcl90b29scy5zdmciCiAgICB2aWV3Qm94PSIwIDAgNDEwIDQxMCIKICAgIHZlcnNpb249IjEuMSIKICAgIGlua3NjYXBlOnZlcnNpb249IjAuNDguMSAiCiAgPgogIDxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICAgaWQ9ImJhc2UiCiAgICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgICBpbmtzY2FwZTpwYWdlc2hhZG93PSIyIgogICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiIKICAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iNzA2IgogICAgICBpbmtzY2FwZTp3aW5kb3ctbWF4aW1pemVkPSIxIgogICAgICBpbmtzY2FwZTp6b29tPSIwLjEyMzc0MzY5IgogICAgICBpbmtzY2FwZTp3aW5kb3cteD0iLTgiCiAgICAgIHNob3dncmlkPSJmYWxzZSIKICAgICAgYm9yZGVyb3BhY2l0eT0iMS4wIgogICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJsYXllcjEiCiAgICAgIGlua3NjYXBlOmN4PSItMTU1Ny40OTQ5IgogICAgICBpbmtzY2FwZTpjeT0iMTI1MC4xMjM2IgogICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjEzNjYiCiAgICAgIGlua3NjYXBlOnBhZ2VvcGFjaXR5PSIwLjAiCiAgICAgIGlua3NjYXBlOmRvY3VtZW50LXVuaXRzPSJweCIKICAvPgogIDxnCiAgICAgIGlkPSJsYXllcjEiCiAgICAgIGlua3NjYXBlOmxhYmVsPSJMYXllciAxIgogICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIgogICAgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIC02NDIuMzYpIgogICAgPgogICAgPHBhdGgKICAgICAgICBpZD0icGF0aDM5MTkiCiAgICAgICAgc29kaXBvZGk6bm9kZXR5cGVzPSJjY3Njc2NzY3NzY3Njc3Nzc3Nzc2NzY3NzY3Njc2Nzc3Nzc3Njc2Nzc3NzY3Njc3Nzc2NzY3Nzc3NzY2NzY3NzY3Nzc2NjY3NzY3NzY2Njc3Nzc3Nzc3Nzc3NzY3Nzc3Njc2NjY2NjY2Nzc2Nzc3Nzc3NzY3NjY2NjY2NjY2NjY3NzY3NzY2Njc3Njc2NjY3Nzc3NjY2Nzc3Nzc2NjY2NjY2NjY3NjY2NzY3NjY2NjY2Njc3NzIgogICAgICAgIHN0eWxlPSJmaWxsOiNlMTJkMGUiCiAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICBkPSJtMTcwLjg3IDEwMzEuNSA5Ljc4MDEtMTUuNjggMi43OTMyIDAuNDA5NGM2LjcxMDMgMC45ODM2IDE0LjM3NiAxLjUzMTUgMjEuNSAxLjUzNjkgNi45NDU4IDAgOS43MjYzLTAuMTg2MyAyMS43NzMtMS40OTg4bDMuNjc5OS0wLjQwMDkgOS4wMTgzIDE0LjYxYzQuOTU5OSA4LjAzNTYgOS4zOTE3IDE1LjEyIDkuODQ4NCAxNS43NDMgMC43OTk3IDEuMDkwOSAxLjA5OTggMS4wNjAyIDguMTQ3LTAuODMzMyA5Ljk1NDktMi42NzQ3IDIxLjY1OC02Ljc5NjMgMzEuMzg0LTExLjA1MyAxMC42ODQtNC42NzYxIDI2LjU1NC0xMy4zNzcgMjYuNTQ1LTE0LjU1NCAwLTAuMjQ4OC0xLjg4OTktOC4zODQyLTQuMTk1Ny0xOC4wNzlsLTQuMTkyMi0xNy42MjcgNi4xODg5LTUuMDQxMWM3LjcxOTQtNi4yODc2IDE4LjI1Ni0xNi44MzIgMjQuMjUtMjQuMjY2IDIuNTEyMi0zLjExNjIgNC45NjA2LTUuNjY1OSA1LjQ0MDgtNS42NjU5IDAuNDgwMyAwIDguNTc2MSAxLjc5NCAxNy45OTEgMy45ODY2IDkuNDE0NiAyLjE5MjcgMTcuMjI5IDMuOTg2NyAxNy4zNjQgMy45ODY3IDAuNjU2MiAwIDcuMDI5LTExLjQ0MSAxMS4zNDUtMjAuMzY3IDUuODIyMy0xMi4wNDIgMTAuMTA5LTIzLjQwNCAxMy40NzYtMzUuNzI1IDEuOTMyMS03LjA2ODIgMi4zMy05LjI3OTUgMS43MzQyLTkuNjQwNy0wLjQyNTItMC4yNTc3OC03LjUzNS00LjY5NDktMTUuOC05Ljg2MDItMTEuOTktNy40OTM5LTE0Ljk5OC05LjYzNTYtMTQuODg2LTEwLjU5OSAxLjg4LTE2LjE5OSAxLjc5NzYtMzcuMi0wLjE4NDMtNDYuOTc3LTAuMzA5NC0xLjUyNjQgMC40NTc2LTIuMDk3OCAxNC44MTktMTEuMDQgOC4zMy01LjE4NjYgMTUuNDM3LTkuNjE4NCAxNS43OTQtOS44NDg1IDEuMzU2Ni0wLjg3NDk1LTQuMzc0My0yMC40MzUtOS45OS0zNC4wOTctNC4wNDQ3LTkuODM5OC0xMi45ODktMjcuMzcxLTE2LjI1Ny0zMS44NjMtMC4wNTUtMC4wNzYxLTguMjI2NCAxLjc5NTQtMTguMTU4IDQuMTU5bC0xOC4wNTcgNC4yOTc0LTEuODQtMi4zMDljLTguOTU1Ny0xMS4yMzktMTguMTY3LTIwLjUzNC0yOC45OC0yOS4yNDUtMi40NDU2LTEuOTcwMi00LjQ0NjYtMy42ODE4LTQuNDQ2Ni0zLjgwMzYgMC0wLjEyMTg3IDEuNzk0LTcuOTQzMSAzLjk4NjYtMTcuMzggMi4xOTI3LTkuNDM3MyAzLjk4NjctMTcuNTYxIDMuOTg2Ny0xOC4wNTMgMC0xLjcyNzEtMTguMDgyLTExLjUwNC0zMS40MDctMTYuOTgxLTEzLjU2OC01LjU3NzItMzMuMjIxLTExLjM0OC0zNC4xMDgtMTAuMDE1LTAuMjMgMC4zNDU3OS00LjY2MjkgNy40NTQ1LTkuODUwOCAxNS43OTctNi4xMzIyIDkuODYwOS05LjcxMjMgMTUuMDYxLTEwLjIzMiAxNC44NjItMC40Mzk2LTAuMTY4NzMtNS45NDQzLTAuNjUxMy0xMi4yMzMtMS4wNzI0LTkuMTgwOC0wLjYxNDgtMTMuNjMtMC42MTI1OS0yMi41ODEgMC4wMTExLTYuMTMxMyAwLjQyNzMtMTEuODQ5IDAuOTE2OTktMTIuNzA2IDEuMDg4MS0xLjQ1ODcgMC4yOTEzNC0yLjE2LTAuNjYxNDEtMTAuOTgzLTE0LjkyLTUuMTgzOC04LjM3Ny05LjYyMTMtMTUuNDU3LTkuODYxMi0xNS43MzMtMC45ODI3LTEuMTMxMi0yMC44MDIgNC42ODc4LTMzLjMzMiA5Ljc4NjMtMTMuMzM1IDUuNDI2LTMyLjI1NyAxNS42NS0zMi4yNzEgMTcuNDM3LTAuMDEgMC41Mjg2NCAxLjc4NjUgOC40OTMgMy45NzkyIDE3LjY5OSAyLjE5MjYgOS4yMDU2IDMuOTg2NiAxNy4wNzcgMy45ODY2IDE3LjQ5MyAwIDAuNDE1NTMtMi4yNzY5IDIuNTE0LTUuMDYgNC42NjMyLTYuNTA5NCA1LjAyNy0yMC41NSAxOS4wNjgtMjUuNTc3IDI1LjU3Ny0yLjE0OTMgMi43ODMtNC4zNDYxIDUuMDU1Ny00Ljg4MTggNS4wNTA1LTAuNTM1Ny0wLjAwNi04LjcwMjEtMS43ODM1LTE4LjE0Ny0zLjk1MThsLTE3LjE3My0zLjk0MjItMS4wNDE4IDEuMzQ1MWMtMS44NTA4IDIuMzg5OS04Ljk0MTUgMTUuMjcxLTEyLjA1MSAyMS44OTItNC4yMzQxIDkuMDE1Ni04Ljc3MDQgMjEuNDkzLTExLjcwNCAzMi4xOTItMS4zNzMxIDUuMDA4LTIuNDk2NSA5LjI4OTQtMi40OTY1IDkuNTE0NCAwIDAuMjI0OTggNy4wNTY4IDQuODAyIDE1LjY4MiAxMC4xNzFsMTUuNjgyIDkuNzYyMS0wLjM2ODEgMy42OGMtMS42NDI4IDE2LjQyNC0xLjU4MDcgMzAuMTExIDAuMTkzOSA0Mi43NTFsMC40OTEgMy40OTgxLTEyLjYyIDcuODE3MWMtNi45NDEgNC4yOTk0LTE0LjA1IDguNzI0NS0xNS43OTggOS44MzM2bC0zLjE3NzcgMi4wMTY1IDIuMDY2IDcuODI4MmMyLjc4MTkgMTAuNTQxIDcuMDg4MSAyMi43NTEgMTEuMzMgMzIuMTI2IDMuNTg3MyA3LjkyOTIgMTEuMDA3IDIxLjQ5OCAxMy4yIDI0LjEzOGwxLjIyNjcgMS40NzcyIDE3Ljc4Ny00LjIzMTYgMTcuNzg3LTQuMjMxNiAxLjUzMzQgMS45NDk2YzguMzI3NiAxMC41ODggMTkuMSAyMS41NSAyOC42NzUgMjkuMTc3IDMuMzAzNSAyLjYzMTcgNC45Njk0IDQuMzYxOSA0Ljc5NTkgNC45ODA5LTAuODI4IDIuOTU0My03LjcxMDkgMzMuODU0LTcuNzEwOSAzNC42MTYgMCAxLjgxODMgMjAuMjMzIDEyLjY0IDMzLjEyIDE3LjcxNSA5Ljk5NjUgMy45MzY0IDI3Ljk4NyA5LjQ5MDIgMzAuOTczIDkuNTYxNiAwLjk1MDYgMC4wMjMgMy40Mjc1LTMuNDk5MSAxMS4wMDctMTUuNjUxem0xNi42MTMtNDYuNTU4Yy00Ni43NTEtNi4zNjIyLTg2LjI4LTM0LjU3NS0xMDYuNS03Ni4wMTUtMTAuMzcyLTIxLjI1My0xNC4zMS0zOC4yMy0xNC4yOTktNjEuNjQgMC4wMTEtMjMuNDc3IDMuNzQ2OS0zOS42OTMgMTQuMTExLTYxLjI1MyA2LjY2NjYtMTMuODY4IDEzLjk0LTI0LjE1MiAyNS4zNi0zNS44NiAyMi4zMDgtMjIuODY5IDUyLjI1OC0zNy40NjYgODMuOTQzLTQwLjkxMSA4Ljc5ODEtMC45NTY3MyAyOS41MzItMC40NDc3OSAzNy41MzIgMC45MjEyMyAzOC41OTcgNi42MDUyIDcyLjkxNCAyOS4wMDYgOTMuOTk1IDYxLjM1NyA3LjY3ODUgMTEuNzgzIDE1LjU1MiAzMC4zMjUgMTguNzUxIDQ0LjE2IDcuMjY2MSAzMS40MjMgMy4yOTQzIDY1LjA1OS0xMS4wNzggOTMuODE2LTIwLjkxIDQxLjgzNy02MS40NTUgNzAuMDE1LTEwOSA3NS43NTYtNy4xMzc2IDAuODYxNzYtMjUuMzk5IDAuNjc3NjMtMzIuODA5LTAuMzMwODJ6bTgwLjM1MS00Ny41MjJjMS4xMjItMS4yMzk4IDEuMDIxMi0xLjM2NzMtOS4xMDQ5LTExLjUwNy04LjY1MzgtOC42NjUtMTAuMjQtMTAuNTM2LTEwLjI0LTEyLjA3OCAwLTEuNTI2OCAxLjM3ODQtMy4yMDY1IDguNDI1MS0xMC4yNjcgMTEuMzA4LTExLjMyOSA5LjcxMDYtMTEuNDQ4IDIyLjg4MiAxLjcwNTggMTAuMTI3IDEwLjExNCAxMC4xNjQgMTAuMTQzIDExLjMwOCA4Ljg3OTIgMS4xMjYzLTEuMjQ0NiAxLjA5MzMtMS40NzMxLTEuODAxNS0xMi40NDdsLTIuOTQ4OC0xMS4xNzktNS44NTI3LTUuOTQ1Mi01Ljg1MjgtNS45NDUyLTExLjA4Ni0yLjU4ODktMTEuMDg2LTIuNTg4OS0zNC45ODgtMzQuODgtMzQuOTg4LTM0Ljg4LTIuMDE2Ni04LjQxMjNjLTMuNjk4Ni0xNS40MjktMy4wMDMyLTEzLjk5LTkuNzg0LTIwLjI0N2wtNi4wNTA4LTUuNTgzMy0xMC45OC0zLjA2NzRjLTEwLjg4Mi0zLjA0MDMtMTAuOTktMy4wNTY5LTEyLjE4Ni0xLjg3NDMtMS4xOTc3IDEuMTg0NS0xLjEzMjEgMS4yNjggOS4wNDY1IDExLjUxMSA4LjU2NjkgOC42MjA2IDEwLjI1MyAxMC42MTIgMTAuMjUzIDEyLjEwOSAwIDEuNDg2Mi0xLjQ4NzggMy4yODE5LTguNzMyMSAxMC41MzktNi41ODU3IDYuNTk3NS05LjEwOTIgOC43NDc2LTEwLjI2NyA4Ljc0NzYtMS4xNjY0IDAtMy45ODcxLTIuNDQ5Mi0xMS43NTYtMTAuMjA4LTEwLjIzMi0xMC4yMTktMTEuNTY1LTExLjExNy0xMi41NzctOC40NzkyLTAuMjA0MSAwLjUzMTk4IDAuOTQxNiA2LjAyOTggMi41NDYgMTIuMjE3bDIuOTE3NCAxMS4yNSA1LjkwMSA1LjgzMDYgNS45MDEyIDUuODMwNiAxMS4xNTQgMi42MTkyIDExLjE1NCAyLjYxOTIgMzQuODg4IDM1LjAwNyAzNC44ODggMzUuMDA3IDIuNTk3OSAxMS4xNTcgMi41OTc5IDExLjE1NyA2LjE0MDUgNS42NjE0IDYuMTQwMyA1LjY2MTQgMTAuNTM5IDIuOTE5OGM1Ljc5NjYgMS42MDU5IDEwLjg0MSAyLjkzODYgMTEuMjExIDIuOTYxNiAwLjM2OTMgMC4wMjMgMS4xODIxLTAuNTIyMzUgMS44MDYyLTEuMjExOXptLTExNC40MS03LjQwMjVjMy41ODk2LTEuNjYwOSA2LjIxNjMtNC4wNjkyIDI2LjM3MS0yNC4xNzdsMjIuMzg0LTIyLjMzMi0zLjY0NzktMy42ODY0LTMuNjQ4LTMuNjg2NC05LjMxIDkuMTg5M2MtOC40NzYgOC4zNjU5LTkuNTA1MSA5LjE4OTMtMTEuNDg1IDkuMTg5My0xLjYxOTMgMC0yLjUtMC40MTI5Ny0zLjQ0NjMtMS42MTYtMi42NjY4LTMuMzkwMi0yLjAxNzYtNC41NDA3IDguNjEzMi0xNS4yNjNsOC41MjU2LTguNTk5NC0zLjgzODMtMy43Nzk4LTMuODM4NC0zLjc3OTgtOS42MzcxIDkuMTU5MmMtMTAuMzkxIDkuODc1Ni0xMS41NDYgMTAuNTA0LTE0LjM5NyA3LjgyNTYtMC45NTk5LTAuOTAxNzQtMS40MTk2LTIuMDI5My0xLjQxOTYtMy40ODIgMC0xLjk0ODIgMC44NTcxLTMuMDEyIDkuMTk3My0xMS40MTVsOS4xOTcxLTkuMjY2NS0zLjY4NTItMy42NDY4LTMuNjg1My0zLjY0NjgtMjIuMDk2IDIyLjA2OWMtMjQuMTM2IDI0LjEwNi0yNS4wOTMgMjUuMzE3LTI2LjQ2OCAzMy40NzgtMC45NjEyIDUuNzA4MSAwLjA3NyA5Ljk3MzcgMy41NSAxNC41OTQgMi45NjU5IDMuOTQ1NSA4Ljk1MiA5LjczNDkgMTIuNDU5IDEyLjA1IDUuNjM3MSAzLjcyMDYgMTMuMzY1IDQuMDM0MSAyMC4zMDQgMC44MjM2NHptNzEuMTQ2LTEwNS40Mi0yMS4xNi0yMC43NjYtMi45MjM0IDIuODUzMy0yLjkyMzIgMi44NTMzIDIxLjAxMSAyMS4wMTggMjEuMDExIDIxLjAxOCAzLjA3Mi0zLjEwNSAzLjA3MTktMy4xMDV6bTI1LjYxNy0xNS44MDYgMTUuMzM3LTE1Ljc5OSA3LjI3NjUtMi4zNzg1IDcuMjc2Ni0yLjM3ODUgNi40MDU3LTkuMzE5NGMzLjUyMzItNS4xMjU3IDYuNDk5OC05LjYwMTkgNi42MTQ5LTkuOTQ3MiAwLjExNTEtMC4zNDUyNy0yLjgyNjktMy40NDk1LTYuNTM3OS02Ljg5ODNsLTYuNzQ3MS02LjI3MDUtOS40NzA2IDYuNzg4LTkuNDcwNiA2Ljc4OC0yLjM1NzEgNi43NTE1LTIuMzU3MiA2Ljc1MTUtMTYuMDk1IDE2LjA5NC0xNi4wOTUgMTYuMDk0IDQuNzM0MyA0Ljc2MjJjMi42MDM5IDIuNjE5MiA1LjA1MjggNC43NjIzIDUuNDQyMSA0Ljc2MjNzNy42MDkzLTcuMTA5NiAxNi4wNDQtMTUuNzk5eiIKICAgIC8+CiAgPC9nCiAgPgogIDxtZXRhZGF0YQogICAgPgogICAgPHJkZjpSREYKICAgICAgPgogICAgICA8Y2M6V29yawogICAgICAgID4KICAgICAgICA8ZGM6Zm9ybWF0CiAgICAgICAgICA+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0CiAgICAgICAgPgogICAgICAgIDxkYzp0eXBlCiAgICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiCiAgICAgICAgLz4KICAgICAgICA8Y2M6bGljZW5zZQogICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iCiAgICAgICAgLz4KICAgICAgICA8ZGM6cHVibGlzaGVyCiAgICAgICAgICA+CiAgICAgICAgICA8Y2M6QWdlbnQKICAgICAgICAgICAgICByZGY6YWJvdXQ9Imh0dHA6Ly9vcGVuY2xpcGFydC5vcmcvIgogICAgICAgICAgICA+CiAgICAgICAgICAgIDxkYzp0aXRsZQogICAgICAgICAgICAgID5PcGVuY2xpcGFydDwvZGM6dGl0bGUKICAgICAgICAgICAgPgogICAgICAgICAgPC9jYzpBZ2VudAogICAgICAgICAgPgogICAgICAgIDwvZGM6cHVibGlzaGVyCiAgICAgICAgPgogICAgICA8L2NjOldvcmsKICAgICAgPgogICAgICA8Y2M6TGljZW5zZQogICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIgogICAgICAgID4KICAgICAgICA8Y2M6cGVybWl0cwogICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI1JlcHJvZHVjdGlvbiIKICAgICAgICAvPgogICAgICAgIDxjYzpwZXJtaXRzCiAgICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIgogICAgICAgIC8+CiAgICAgICAgPGNjOnBlcm1pdHMKICAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNEZXJpdmF0aXZlV29ya3MiCiAgICAgICAgLz4KICAgICAgPC9jYzpMaWNlbnNlCiAgICAgID4KICAgIDwvcmRmOlJERgogICAgPgogIDwvbWV0YWRhdGEKICA+Cjwvc3ZnCj4K"}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5711],{85711:(M,N,I)=>{I.r(N),I.d(N,{default:()=>g});const g="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgo8c3ZnCiAgICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIgogICAgeG1sbnM6bnMxPSJodHRwOi8vc296aS5iYWllcm91Z2UuZnIiCiAgICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICAgaWQ9InN2ZzI3MTgzIgogICAgc29kaXBvZGk6ZG9jbmFtZT0iZ2Vhcl90b29scy5zdmciCiAgICB2aWV3Qm94PSIwIDAgNDEwIDQxMCIKICAgIHZlcnNpb249IjEuMSIKICAgIGlua3NjYXBlOnZlcnNpb249IjAuNDguMSAiCiAgPgogIDxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICAgaWQ9ImJhc2UiCiAgICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgICBpbmtzY2FwZTpwYWdlc2hhZG93PSIyIgogICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiIKICAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iNzA2IgogICAgICBpbmtzY2FwZTp3aW5kb3ctbWF4aW1pemVkPSIxIgogICAgICBpbmtzY2FwZTp6b29tPSIwLjEyMzc0MzY5IgogICAgICBpbmtzY2FwZTp3aW5kb3cteD0iLTgiCiAgICAgIHNob3dncmlkPSJmYWxzZSIKICAgICAgYm9yZGVyb3BhY2l0eT0iMS4wIgogICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJsYXllcjEiCiAgICAgIGlua3NjYXBlOmN4PSItMTU1Ny40OTQ5IgogICAgICBpbmtzY2FwZTpjeT0iMTI1MC4xMjM2IgogICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjEzNjYiCiAgICAgIGlua3NjYXBlOnBhZ2VvcGFjaXR5PSIwLjAiCiAgICAgIGlua3NjYXBlOmRvY3VtZW50LXVuaXRzPSJweCIKICAvPgogIDxnCiAgICAgIGlkPSJsYXllcjEiCiAgICAgIGlua3NjYXBlOmxhYmVsPSJMYXllciAxIgogICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIgogICAgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIC02NDIuMzYpIgogICAgPgogICAgPHBhdGgKICAgICAgICBpZD0icGF0aDM5MTkiCiAgICAgICAgc29kaXBvZGk6bm9kZXR5cGVzPSJjY3Njc2NzY3NzY3Njc3Nzc3Nzc2NzY3NzY3Njc2Nzc3Nzc3Njc2Nzc3NzY3Njc3Nzc2NzY3Nzc3NzY2NzY3NzY3Nzc2NjY3NzY3NzY2Njc3Nzc3Nzc3Nzc3NzY3Nzc3Njc2NjY2NjY2Nzc2Nzc3Nzc3NzY3NjY2NjY2NjY2NjY3NzY3NzY2Njc3Njc2NjY3Nzc3NjY2Nzc3Nzc2NjY2NjY2NjY3NjY2NzY3NjY2NjY2Njc3NzIgogICAgICAgIHN0eWxlPSJmaWxsOiNlMTJkMGUiCiAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICBkPSJtMTcwLjg3IDEwMzEuNSA5Ljc4MDEtMTUuNjggMi43OTMyIDAuNDA5NGM2LjcxMDMgMC45ODM2IDE0LjM3NiAxLjUzMTUgMjEuNSAxLjUzNjkgNi45NDU4IDAgOS43MjYzLTAuMTg2MyAyMS43NzMtMS40OTg4bDMuNjc5OS0wLjQwMDkgOS4wMTgzIDE0LjYxYzQuOTU5OSA4LjAzNTYgOS4zOTE3IDE1LjEyIDkuODQ4NCAxNS43NDMgMC43OTk3IDEuMDkwOSAxLjA5OTggMS4wNjAyIDguMTQ3LTAuODMzMyA5Ljk1NDktMi42NzQ3IDIxLjY1OC02Ljc5NjMgMzEuMzg0LTExLjA1MyAxMC42ODQtNC42NzYxIDI2LjU1NC0xMy4zNzcgMjYuNTQ1LTE0LjU1NCAwLTAuMjQ4OC0xLjg4OTktOC4zODQyLTQuMTk1Ny0xOC4wNzlsLTQuMTkyMi0xNy42MjcgNi4xODg5LTUuMDQxMWM3LjcxOTQtNi4yODc2IDE4LjI1Ni0xNi44MzIgMjQuMjUtMjQuMjY2IDIuNTEyMi0zLjExNjIgNC45NjA2LTUuNjY1OSA1LjQ0MDgtNS42NjU5IDAuNDgwMyAwIDguNTc2MSAxLjc5NCAxNy45OTEgMy45ODY2IDkuNDE0NiAyLjE5MjcgMTcuMjI5IDMuOTg2NyAxNy4zNjQgMy45ODY3IDAuNjU2MiAwIDcuMDI5LTExLjQ0MSAxMS4zNDUtMjAuMzY3IDUuODIyMy0xMi4wNDIgMTAuMTA5LTIzLjQwNCAxMy40NzYtMzUuNzI1IDEuOTMyMS03LjA2ODIgMi4zMy05LjI3OTUgMS43MzQyLTkuNjQwNy0wLjQyNTItMC4yNTc3OC03LjUzNS00LjY5NDktMTUuOC05Ljg2MDItMTEuOTktNy40OTM5LTE0Ljk5OC05LjYzNTYtMTQuODg2LTEwLjU5OSAxLjg4LTE2LjE5OSAxLjc5NzYtMzcuMi0wLjE4NDMtNDYuOTc3LTAuMzA5NC0xLjUyNjQgMC40NTc2LTIuMDk3OCAxNC44MTktMTEuMDQgOC4zMy01LjE4NjYgMTUuNDM3LTkuNjE4NCAxNS43OTQtOS44NDg1IDEuMzU2Ni0wLjg3NDk1LTQuMzc0My0yMC40MzUtOS45OS0zNC4wOTctNC4wNDQ3LTkuODM5OC0xMi45ODktMjcuMzcxLTE2LjI1Ny0zMS44NjMtMC4wNTUtMC4wNzYxLTguMjI2NCAxLjc5NTQtMTguMTU4IDQuMTU5bC0xOC4wNTcgNC4yOTc0LTEuODQtMi4zMDljLTguOTU1Ny0xMS4yMzktMTguMTY3LTIwLjUzNC0yOC45OC0yOS4yNDUtMi40NDU2LTEuOTcwMi00LjQ0NjYtMy42ODE4LTQuNDQ2Ni0zLjgwMzYgMC0wLjEyMTg3IDEuNzk0LTcuOTQzMSAzLjk4NjYtMTcuMzggMi4xOTI3LTkuNDM3MyAzLjk4NjctMTcuNTYxIDMuOTg2Ny0xOC4wNTMgMC0xLjcyNzEtMTguMDgyLTExLjUwNC0zMS40MDctMTYuOTgxLTEzLjU2OC01LjU3NzItMzMuMjIxLTExLjM0OC0zNC4xMDgtMTAuMDE1LTAuMjMgMC4zNDU3OS00LjY2MjkgNy40NTQ1LTkuODUwOCAxNS43OTctNi4xMzIyIDkuODYwOS05LjcxMjMgMTUuMDYxLTEwLjIzMiAxNC44NjItMC40Mzk2LTAuMTY4NzMtNS45NDQzLTAuNjUxMy0xMi4yMzMtMS4wNzI0LTkuMTgwOC0wLjYxNDgtMTMuNjMtMC42MTI1OS0yMi41ODEgMC4wMTExLTYuMTMxMyAwLjQyNzMtMTEuODQ5IDAuOTE2OTktMTIuNzA2IDEuMDg4MS0xLjQ1ODcgMC4yOTEzNC0yLjE2LTAuNjYxNDEtMTAuOTgzLTE0LjkyLTUuMTgzOC04LjM3Ny05LjYyMTMtMTUuNDU3LTkuODYxMi0xNS43MzMtMC45ODI3LTEuMTMxMi0yMC44MDIgNC42ODc4LTMzLjMzMiA5Ljc4NjMtMTMuMzM1IDUuNDI2LTMyLjI1NyAxNS42NS0zMi4yNzEgMTcuNDM3LTAuMDEgMC41Mjg2NCAxLjc4NjUgOC40OTMgMy45NzkyIDE3LjY5OSAyLjE5MjYgOS4yMDU2IDMuOTg2NiAxNy4wNzcgMy45ODY2IDE3LjQ5MyAwIDAuNDE1NTMtMi4yNzY5IDIuNTE0LTUuMDYgNC42NjMyLTYuNTA5NCA1LjAyNy0yMC41NSAxOS4wNjgtMjUuNTc3IDI1LjU3Ny0yLjE0OTMgMi43ODMtNC4zNDYxIDUuMDU1Ny00Ljg4MTggNS4wNTA1LTAuNTM1Ny0wLjAwNi04LjcwMjEtMS43ODM1LTE4LjE0Ny0zLjk1MThsLTE3LjE3My0zLjk0MjItMS4wNDE4IDEuMzQ1MWMtMS44NTA4IDIuMzg5OS04Ljk0MTUgMTUuMjcxLTEyLjA1MSAyMS44OTItNC4yMzQxIDkuMDE1Ni04Ljc3MDQgMjEuNDkzLTExLjcwNCAzMi4xOTItMS4zNzMxIDUuMDA4LTIuNDk2NSA5LjI4OTQtMi40OTY1IDkuNTE0NCAwIDAuMjI0OTggNy4wNTY4IDQuODAyIDE1LjY4MiAxMC4xNzFsMTUuNjgyIDkuNzYyMS0wLjM2ODEgMy42OGMtMS42NDI4IDE2LjQyNC0xLjU4MDcgMzAuMTExIDAuMTkzOSA0Mi43NTFsMC40OTEgMy40OTgxLTEyLjYyIDcuODE3MWMtNi45NDEgNC4yOTk0LTE0LjA1IDguNzI0NS0xNS43OTggOS44MzM2bC0zLjE3NzcgMi4wMTY1IDIuMDY2IDcuODI4MmMyLjc4MTkgMTAuNTQxIDcuMDg4MSAyMi43NTEgMTEuMzMgMzIuMTI2IDMuNTg3MyA3LjkyOTIgMTEuMDA3IDIxLjQ5OCAxMy4yIDI0LjEzOGwxLjIyNjcgMS40NzcyIDE3Ljc4Ny00LjIzMTYgMTcuNzg3LTQuMjMxNiAxLjUzMzQgMS45NDk2YzguMzI3NiAxMC41ODggMTkuMSAyMS41NSAyOC42NzUgMjkuMTc3IDMuMzAzNSAyLjYzMTcgNC45Njk0IDQuMzYxOSA0Ljc5NTkgNC45ODA5LTAuODI4IDIuOTU0My03LjcxMDkgMzMuODU0LTcuNzEwOSAzNC42MTYgMCAxLjgxODMgMjAuMjMzIDEyLjY0IDMzLjEyIDE3LjcxNSA5Ljk5NjUgMy45MzY0IDI3Ljk4NyA5LjQ5MDIgMzAuOTczIDkuNTYxNiAwLjk1MDYgMC4wMjMgMy40Mjc1LTMuNDk5MSAxMS4wMDctMTUuNjUxem0xNi42MTMtNDYuNTU4Yy00Ni43NTEtNi4zNjIyLTg2LjI4LTM0LjU3NS0xMDYuNS03Ni4wMTUtMTAuMzcyLTIxLjI1My0xNC4zMS0zOC4yMy0xNC4yOTktNjEuNjQgMC4wMTEtMjMuNDc3IDMuNzQ2OS0zOS42OTMgMTQuMTExLTYxLjI1MyA2LjY2NjYtMTMuODY4IDEzLjk0LTI0LjE1MiAyNS4zNi0zNS44NiAyMi4zMDgtMjIuODY5IDUyLjI1OC0zNy40NjYgODMuOTQzLTQwLjkxMSA4Ljc5ODEtMC45NTY3MyAyOS41MzItMC40NDc3OSAzNy41MzIgMC45MjEyMyAzOC41OTcgNi42MDUyIDcyLjkxNCAyOS4wMDYgOTMuOTk1IDYxLjM1NyA3LjY3ODUgMTEuNzgzIDE1LjU1MiAzMC4zMjUgMTguNzUxIDQ0LjE2IDcuMjY2MSAzMS40MjMgMy4yOTQzIDY1LjA1OS0xMS4wNzggOTMuODE2LTIwLjkxIDQxLjgzNy02MS40NTUgNzAuMDE1LTEwOSA3NS43NTYtNy4xMzc2IDAuODYxNzYtMjUuMzk5IDAuNjc3NjMtMzIuODA5LTAuMzMwODJ6bTgwLjM1MS00Ny41MjJjMS4xMjItMS4yMzk4IDEuMDIxMi0xLjM2NzMtOS4xMDQ5LTExLjUwNy04LjY1MzgtOC42NjUtMTAuMjQtMTAuNTM2LTEwLjI0LTEyLjA3OCAwLTEuNTI2OCAxLjM3ODQtMy4yMDY1IDguNDI1MS0xMC4yNjcgMTEuMzA4LTExLjMyOSA5LjcxMDYtMTEuNDQ4IDIyLjg4MiAxLjcwNTggMTAuMTI3IDEwLjExNCAxMC4xNjQgMTAuMTQzIDExLjMwOCA4Ljg3OTIgMS4xMjYzLTEuMjQ0NiAxLjA5MzMtMS40NzMxLTEuODAxNS0xMi40NDdsLTIuOTQ4OC0xMS4xNzktNS44NTI3LTUuOTQ1Mi01Ljg1MjgtNS45NDUyLTExLjA4Ni0yLjU4ODktMTEuMDg2LTIuNTg4OS0zNC45ODgtMzQuODgtMzQuOTg4LTM0Ljg4LTIuMDE2Ni04LjQxMjNjLTMuNjk4Ni0xNS40MjktMy4wMDMyLTEzLjk5LTkuNzg0LTIwLjI0N2wtNi4wNTA4LTUuNTgzMy0xMC45OC0zLjA2NzRjLTEwLjg4Mi0zLjA0MDMtMTAuOTktMy4wNTY5LTEyLjE4Ni0xLjg3NDMtMS4xOTc3IDEuMTg0NS0xLjEzMjEgMS4yNjggOS4wNDY1IDExLjUxMSA4LjU2NjkgOC42MjA2IDEwLjI1MyAxMC42MTIgMTAuMjUzIDEyLjEwOSAwIDEuNDg2Mi0xLjQ4NzggMy4yODE5LTguNzMyMSAxMC41MzktNi41ODU3IDYuNTk3NS05LjEwOTIgOC43NDc2LTEwLjI2NyA4Ljc0NzYtMS4xNjY0IDAtMy45ODcxLTIuNDQ5Mi0xMS43NTYtMTAuMjA4LTEwLjIzMi0xMC4yMTktMTEuNTY1LTExLjExNy0xMi41NzctOC40NzkyLTAuMjA0MSAwLjUzMTk4IDAuOTQxNiA2LjAyOTggMi41NDYgMTIuMjE3bDIuOTE3NCAxMS4yNSA1LjkwMSA1LjgzMDYgNS45MDEyIDUuODMwNiAxMS4xNTQgMi42MTkyIDExLjE1NCAyLjYxOTIgMzQuODg4IDM1LjAwNyAzNC44ODggMzUuMDA3IDIuNTk3OSAxMS4xNTcgMi41OTc5IDExLjE1NyA2LjE0MDUgNS42NjE0IDYuMTQwMyA1LjY2MTQgMTAuNTM5IDIuOTE5OGM1Ljc5NjYgMS42MDU5IDEwLjg0MSAyLjkzODYgMTEuMjExIDIuOTYxNiAwLjM2OTMgMC4wMjMgMS4xODIxLTAuNTIyMzUgMS44MDYyLTEuMjExOXptLTExNC40MS03LjQwMjVjMy41ODk2LTEuNjYwOSA2LjIxNjMtNC4wNjkyIDI2LjM3MS0yNC4xNzdsMjIuMzg0LTIyLjMzMi0zLjY0NzktMy42ODY0LTMuNjQ4LTMuNjg2NC05LjMxIDkuMTg5M2MtOC40NzYgOC4zNjU5LTkuNTA1MSA5LjE4OTMtMTEuNDg1IDkuMTg5My0xLjYxOTMgMC0yLjUtMC40MTI5Ny0zLjQ0NjMtMS42MTYtMi42NjY4LTMuMzkwMi0yLjAxNzYtNC41NDA3IDguNjEzMi0xNS4yNjNsOC41MjU2LTguNTk5NC0zLjgzODMtMy43Nzk4LTMuODM4NC0zLjc3OTgtOS42MzcxIDkuMTU5MmMtMTAuMzkxIDkuODc1Ni0xMS41NDYgMTAuNTA0LTE0LjM5NyA3LjgyNTYtMC45NTk5LTAuOTAxNzQtMS40MTk2LTIuMDI5My0xLjQxOTYtMy40ODIgMC0xLjk0ODIgMC44NTcxLTMuMDEyIDkuMTk3My0xMS40MTVsOS4xOTcxLTkuMjY2NS0zLjY4NTItMy42NDY4LTMuNjg1My0zLjY0NjgtMjIuMDk2IDIyLjA2OWMtMjQuMTM2IDI0LjEwNi0yNS4wOTMgMjUuMzE3LTI2LjQ2OCAzMy40NzgtMC45NjEyIDUuNzA4MSAwLjA3NyA5Ljk3MzcgMy41NSAxNC41OTQgMi45NjU5IDMuOTQ1NSA4Ljk1MiA5LjczNDkgMTIuNDU5IDEyLjA1IDUuNjM3MSAzLjcyMDYgMTMuMzY1IDQuMDM0MSAyMC4zMDQgMC44MjM2NHptNzEuMTQ2LTEwNS40Mi0yMS4xNi0yMC43NjYtMi45MjM0IDIuODUzMy0yLjkyMzIgMi44NTMzIDIxLjAxMSAyMS4wMTggMjEuMDExIDIxLjAxOCAzLjA3Mi0zLjEwNSAzLjA3MTktMy4xMDV6bTI1LjYxNy0xNS44MDYgMTUuMzM3LTE1Ljc5OSA3LjI3NjUtMi4zNzg1IDcuMjc2Ni0yLjM3ODUgNi40MDU3LTkuMzE5NGMzLjUyMzItNS4xMjU3IDYuNDk5OC05LjYwMTkgNi42MTQ5LTkuOTQ3MiAwLjExNTEtMC4zNDUyNy0yLjgyNjktMy40NDk1LTYuNTM3OS02Ljg5ODNsLTYuNzQ3MS02LjI3MDUtOS40NzA2IDYuNzg4LTkuNDcwNiA2Ljc4OC0yLjM1NzEgNi43NTE1LTIuMzU3MiA2Ljc1MTUtMTYuMDk1IDE2LjA5NC0xNi4wOTUgMTYuMDk0IDQuNzM0MyA0Ljc2MjJjMi42MDM5IDIuNjE5MiA1LjA1MjggNC43NjIzIDUuNDQyMSA0Ljc2MjNzNy42MDkzLTcuMTA5NiAxNi4wNDQtMTUuNzk5eiIKICAgIC8+CiAgPC9nCiAgPgogIDxtZXRhZGF0YQogICAgPgogICAgPHJkZjpSREYKICAgICAgPgogICAgICA8Y2M6V29yawogICAgICAgID4KICAgICAgICA8ZGM6Zm9ybWF0CiAgICAgICAgICA+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0CiAgICAgICAgPgogICAgICAgIDxkYzp0eXBlCiAgICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiCiAgICAgICAgLz4KICAgICAgICA8Y2M6bGljZW5zZQogICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iCiAgICAgICAgLz4KICAgICAgICA8ZGM6cHVibGlzaGVyCiAgICAgICAgICA+CiAgICAgICAgICA8Y2M6QWdlbnQKICAgICAgICAgICAgICByZGY6YWJvdXQ9Imh0dHA6Ly9vcGVuY2xpcGFydC5vcmcvIgogICAgICAgICAgICA+CiAgICAgICAgICAgIDxkYzp0aXRsZQogICAgICAgICAgICAgID5PcGVuY2xpcGFydDwvZGM6dGl0bGUKICAgICAgICAgICAgPgogICAgICAgICAgPC9jYzpBZ2VudAogICAgICAgICAgPgogICAgICAgIDwvZGM6cHVibGlzaGVyCiAgICAgICAgPgogICAgICA8L2NjOldvcmsKICAgICAgPgogICAgICA8Y2M6TGljZW5zZQogICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIgogICAgICAgID4KICAgICAgICA8Y2M6cGVybWl0cwogICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI1JlcHJvZHVjdGlvbiIKICAgICAgICAvPgogICAgICAgIDxjYzpwZXJtaXRzCiAgICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIgogICAgICAgIC8+CiAgICAgICAgPGNjOnBlcm1pdHMKICAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNEZXJpdmF0aXZlV29ya3MiCiAgICAgICAgLz4KICAgICAgPC9jYzpMaWNlbnNlCiAgICAgID4KICAgIDwvcmRmOlJERgogICAgPgogIDwvbWV0YWRhdGEKICA+Cjwvc3ZnCj4K"}}]); \ No newline at end of file diff --git a/assets/js/5bc82b60.072ca02f.js b/assets/js/5bc82b60.9b5992e1.js similarity index 90% rename from assets/js/5bc82b60.072ca02f.js rename to assets/js/5bc82b60.9b5992e1.js index 0bd13800..c34b24b9 100644 --- a/assets/js/5bc82b60.072ca02f.js +++ b/assets/js/5bc82b60.9b5992e1.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2334,9873],{73611:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>m,contentTitle:()=>u,default:()=>x,frontMatter:()=>g,metadata:()=>n,toc:()=>p});const n=JSON.parse('{"id":"demo-viewer/string/length","title":"\ud83d\udccf Length","description":"string with minLength / maxLength showcase","source":"@site/docs/demo-viewer/string/length.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/length.mdx","tags":[],"version":"current","frontMatter":{"description":"string with minLength / maxLength showcase","title":"\ud83d\udccf Length"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcc5 Format","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format"},"next":{"title":"\ud83d\udd2e Pattern","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern"}}');var r=s(62540),i=s(28453),a=s(21432),h=s(92334),o=s(21344),l=s.n(o),c=s(11470),d=s(19365);const g={description:"string with minLength / maxLength showcase",title:"\ud83d\udccf Length"},u="Length",m={},p=[];function w(e){const t={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"length",children:"Length"})}),"\n",(0,r.jsxs)(c.default,{children:[(0,r.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(l(),{schema:h})}),(0,r.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(a.default,{language:"json-schema",children:JSON.stringify(h,null,2)})})]})]})}function x(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(w,{...e})}):w(e)}},92334:e=>{e.exports=JSON.parse('{"type":"string","minLength":2,"maxLength":3}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2334,9873],{60708:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>m,contentTitle:()=>u,default:()=>x,frontMatter:()=>g,metadata:()=>n,toc:()=>p});const n=JSON.parse('{"id":"demo-viewer/string/length","title":"\ud83d\udccf Length","description":"string with minLength / maxLength showcase","source":"@site/docs/demo-viewer/string/length.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/length.mdx","tags":[],"version":"current","frontMatter":{"description":"string with minLength / maxLength showcase","title":"\ud83d\udccf Length"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcc5 Format","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format"},"next":{"title":"\ud83d\udd2e Pattern","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern"}}');var r=s(62540),i=s(28453),a=s(58069),h=s(92334),o=s(88307),l=s.n(o),c=s(65537),d=s(79329);const g={description:"string with minLength / maxLength showcase",title:"\ud83d\udccf Length"},u="Length",m={},p=[];function w(e){const t={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"length",children:"Length"})}),"\n",(0,r.jsxs)(c.default,{children:[(0,r.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(l(),{schema:h})}),(0,r.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(a.default,{language:"json-schema",children:JSON.stringify(h,null,2)})})]})]})}function x(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(w,{...e})}):w(e)}},92334:e=>{e.exports=JSON.parse('{"type":"string","minLength":2,"maxLength":3}')}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.15b1e4e3.js b/assets/js/5e95c892.15b1e4e3.js new file mode 100644 index 00000000..2810799f --- /dev/null +++ b/assets/js/5e95c892.15b1e4e3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[9647],{18122:(e,s,t)=>{t.r(s),t.d(s,{default:()=>l});t(63696);var r=t(34164),u=t(59144),a=t(204),c=t(22831),n=t(27912),i=t(62540);function l(e){return(0,i.jsx)(u.e3,{className:(0,r.A)(a.G.wrapper.docsPages),children:(0,i.jsx)(n.A,{children:(0,c.v)(e.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.3b3b4361.js b/assets/js/5e95c892.3b3b4361.js deleted file mode 100644 index 1a399b01..00000000 --- a/assets/js/5e95c892.3b3b4361.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[9647],{7121:(e,s,t)=>{t.r(s),t.d(s,{default:()=>l});t(63696);var r=t(34164),u=t(69024),a=t(17559),c=t(22831),n=t(41957),i=t(62540);function l(e){return(0,i.jsx)(u.e3,{className:(0,r.A)(a.G.wrapper.docsPages),children:(0,i.jsx)(n.A,{children:(0,c.v)(e.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/5f0f252d.c19cf2c0.js b/assets/js/5f0f252d.ed3f2cf3.js similarity index 91% rename from assets/js/5f0f252d.c19cf2c0.js rename to assets/js/5f0f252d.ed3f2cf3.js index f1a2cd17..c784fc3b 100644 --- a/assets/js/5f0f252d.c19cf2c0.js +++ b/assets/js/5f0f252d.ed3f2cf3.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2701,5741],{61739:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>w,frontMatter:()=>u,metadata:()=>i,toc:()=>g});const i=JSON.parse('{"id":"demo-viewer/string/contentMediaType","title":"\ud83d\udd16 ContentMediaType","description":"string with contentMediaType showcase","source":"@site/docs/demo-viewer/string/contentMediaType.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/contentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/contentMediaType.mdx","tags":[],"version":"current","frontMatter":{"description":"string with contentMediaType showcase","title":"\ud83d\udd16 ContentMediaType"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcc4 ContentEncoding & ContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType"},"next":{"title":"\ud83d\udcd1 ContentSchema","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema"}}');var s=n(62540),a=n(28453),o=n(21432),r=n(95741),d=n(21344),c=n.n(d),l=n(11470),p=n(19365);const u={description:"string with contentMediaType showcase",title:"\ud83d\udd16 ContentMediaType"},h="ContentMediaType",m={},g=[];function y(e){const t={h1:"h1",header:"header",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"contentmediatype",children:"ContentMediaType"})}),"\n",(0,s.jsxs)(l.default,{children:[(0,s.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(c(),{schema:r})}),(0,s.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(o.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(y,{...e})}):y(e)}},95741:e=>{e.exports=JSON.parse('{"type":"string","contentMediaType":"application/json"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2701,5741],{12146:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>w,frontMatter:()=>u,metadata:()=>i,toc:()=>g});const i=JSON.parse('{"id":"demo-viewer/string/contentMediaType","title":"\ud83d\udd16 ContentMediaType","description":"string with contentMediaType showcase","source":"@site/docs/demo-viewer/string/contentMediaType.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/contentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/contentMediaType.mdx","tags":[],"version":"current","frontMatter":{"description":"string with contentMediaType showcase","title":"\ud83d\udd16 ContentMediaType"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcc4 ContentEncoding & ContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType"},"next":{"title":"\ud83d\udcd1 ContentSchema","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema"}}');var s=n(62540),a=n(28453),o=n(58069),r=n(95741),d=n(88307),c=n.n(d),l=n(65537),p=n(79329);const u={description:"string with contentMediaType showcase",title:"\ud83d\udd16 ContentMediaType"},h="ContentMediaType",m={},g=[];function y(e){const t={h1:"h1",header:"header",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"contentmediatype",children:"ContentMediaType"})}),"\n",(0,s.jsxs)(l.default,{children:[(0,s.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(c(),{schema:r})}),(0,s.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(o.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(y,{...e})}):y(e)}},95741:e=>{e.exports=JSON.parse('{"type":"string","contentMediaType":"application/json"}')}}]); \ No newline at end of file diff --git a/assets/js/8187.329d123d.js b/assets/js/6005.9a1a210c.js similarity index 99% rename from assets/js/8187.329d123d.js rename to assets/js/6005.9a1a210c.js index 3d104a9b..56ca8fef 100644 --- a/assets/js/8187.329d123d.js +++ b/assets/js/6005.9a1a210c.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[8187],{18187:(M,L,j)=>{j.r(L),j.d(L,{default:()=>N});const N="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjRkZGIiBkPSJNOTkgNTJoODR2MzRIOTl6Ii8+PHBhdGggZD0iTTIzIDE2M2MtNy4zOTggMC0xMy44NDMtNC4wMjctMTcuMzAzLTEwQTE5Ljg4NiAxOS44ODYgMCAwIDAgMyAxNjNjMCAxMS4wNDYgOC45NTQgMjAgMjAgMjBoMjB2LTIwSDIzeiIgZmlsbD0iIzNFQ0M1RiIvPjxwYXRoIGQ9Ik0xMTIuOTggNTcuMzc2TDE4MyA1M1Y0M2MwLTExLjA0Ni04Ljk1NC0yMC0yMC0yMEg3M2wtMi41LTQuMzNjLTEuMTEyLTEuOTI1LTMuODg5LTEuOTI1LTUgMEw2MyAyM2wtMi41LTQuMzNjLTEuMTExLTEuOTI1LTMuODg5LTEuOTI1LTUgMEw1MyAyM2wtMi41LTQuMzNjLTEuMTExLTEuOTI1LTMuODg5LTEuOTI1LTUgMEw0MyAyM2MtLjAyMiAwLS4wNDIuMDAzLS4wNjUuMDAzbC00LjE0Mi00LjE0MWMtMS41Ny0xLjU3MS00LjI1Mi0uODUzLTQuODI4IDEuMjk0bC0xLjM2OSA1LjEwNC01LjE5Mi0xLjM5MmMtMi4xNDgtLjU3NS00LjExMSAxLjM4OS0zLjUzNSAzLjUzNmwxLjM5IDUuMTkzLTUuMTAyIDEuMzY3Yy0yLjE0OC41NzYtMi44NjcgMy4yNTktMS4yOTYgNC44M2w0LjE0MiA0LjE0MmMwIC4wMjEtLjAwMy4wNDItLjAwMy4wNjRsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgNTNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgNjNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgNzNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgODNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgOTNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgMTAzbC00LjMzIDIuNWMtMS45MjUgMS4xMTEtMS45MjUgMy44ODkgMCA1TDIzIDExM2wtNC4zMyAyLjVjLTEuOTI1IDEuMTExLTEuOTI1IDMuODg5IDAgNUwyMyAxMjNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgMTMzbC00LjMzIDIuNWMtMS45MjUgMS4xMTEtMS45MjUgMy44ODkgMCA1TDIzIDE0M2wtNC4zMyAyLjVjLTEuOTI1IDEuMTExLTEuOTI1IDMuODg5IDAgNUwyMyAxNTNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgMTYzYzAgMTEuMDQ2IDguOTU0IDIwIDIwIDIwaDEyMGMxMS4wNDYgMCAyMC04Ljk1NCAyMC0yMFY4M2wtNzAuMDItNC4zNzZBMTAuNjQ1IDEwLjY0NSAwIDAgMSAxMDMgNjhjMC01LjYyMSA0LjM3LTEwLjI3MyA5Ljk4LTEwLjYyNCIgZmlsbD0iIzNFQ0M1RiIvPjxwYXRoIGZpbGw9IiMzRUNDNUYiIGQ9Ik0xNDMgMTgzaDMwdi00MGgtMzB6Ii8+PHBhdGggZD0iTTE5MyAxNThjLS4yMTkgMC0uNDI4LjAzNy0uNjM5LjA2NC0uMDM4LS4xNS0uMDc0LS4zMDEtLjExNi0uNDUxQTUgNSAwIDAgMCAxOTAuMzIgMTQ4YTQuOTYgNC45NiAwIDAgMC0zLjAxNiAxLjAzNiAyNi41MzEgMjYuNTMxIDAgMCAwLS4zMzUtLjMzNiA0Ljk1NSA0Ljk1NSAwIDAgMCAxLjAxMS0yLjk4NyA1IDUgMCAwIDAtOS41OTktMS45NTljLS4xNDgtLjA0Mi0uMjk3LS4wNzctLjQ0NS0uMTE1LjAyNy0uMjExLjA2NC0uNDIuMDY0LS42MzlhNSA1IDAgMCAwLTUtNSA1IDUgMCAwIDAtNSA1YzAgLjIxOS4wMzcuNDI4LjA2NC42MzktLjE0OC4wMzgtLjI5Ny4wNzMtLjQ0NS4xMTVhNC45OTggNC45OTggMCAwIDAtOS41OTkgMS45NTljMCAxLjEyNS4zODQgMi4xNTEgMS4wMTEgMi45ODctMy43MTcgMy42MzItNi4wMzEgOC42OTMtNi4wMzEgMTQuMyAwIDExLjA0NiA4Ljk1NCAyMCAyMCAyMCA5LjMzOSAwIDE3LjE2LTYuNDEgMTkuMzYxLTE1LjA2NC4yMTEuMDI3LjQyLjA2NC42MzkuMDY0YTUgNSAwIDAgMCA1LTUgNSA1IDAgMCAwLTUtNSIgZmlsbD0iIzQ0RDg2MCIvPjxwYXRoIGZpbGw9IiMzRUNDNUYiIGQ9Ik0xNTMgMTIzaDMwdi0yMGgtMzB6Ii8+PHBhdGggZD0iTTE5MyAxMTUuNWEyLjUgMi41IDAgMSAwIDAtNWMtLjEwOSAwLS4yMTQuMDE5LS4zMTkuMDMyLS4wMi0uMDc1LS4wMzctLjE1LS4wNTgtLjIyNWEyLjUwMSAyLjUwMSAwIDAgMC0uOTYzLTQuODA3Yy0uNTY5IDAtMS4wODguMTk3LTEuNTA4LjUxOGE2LjY1MyA2LjY1MyAwIDAgMC0uMTY4LS4xNjhjLjMxNC0uNDE3LjUwNi0uOTMxLjUwNi0xLjQ5NGEyLjUgMi41IDAgMCAwLTQuOC0uOTc5QTkuOTg3IDkuOTg3IDAgMCAwIDE4MyAxMDNjLTUuNTIyIDAtMTAgNC40NzgtMTAgMTBzNC40NzggMTAgMTAgMTBjLjkzNCAwIDEuODMzLS4xMzggMi42OS0uMzc3YTIuNSAyLjUgMCAwIDAgNC44LS45NzljMC0uNTYzLS4xOTItMS4wNzctLjUwNi0xLjQ5NC4wNTctLjA1NS4xMTMtLjExMS4xNjgtLjE2OC40Mi4zMjEuOTM5LjUxOCAxLjUwOC41MThhMi41IDIuNSAwIDAgMCAuOTYzLTQuODA3Yy4wMjEtLjA3NC4wMzgtLjE1LjA1OC0uMjI1LjEwNS4wMTMuMjEuMDMyLjMxOS4wMzIiIGZpbGw9IiM0NEQ4NjAiLz48cGF0aCBkPSJNNjMgNTUuNWEyLjUgMi41IDAgMCAxLTIuNS0yLjVjMC00LjEzNi0zLjM2NC03LjUtNy41LTcuNXMtNy41IDMuMzY0LTcuNSA3LjVhMi41IDIuNSAwIDEgMS01IDBjMC02Ljg5MyA1LjYwNy0xMi41IDEyLjUtMTIuNVM2NS41IDQ2LjEwNyA2NS41IDUzYTIuNSAyLjUgMCAwIDEtMi41IDIuNSIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Ik0xMDMgMTgzaDYwYzExLjA0NiAwIDIwLTguOTU0IDIwLTIwVjkzaC02MGMtMTEuMDQ2IDAtMjAgOC45NTQtMjAgMjB2NzB6IiBmaWxsPSIjRkZGRjUwIi8+PHBhdGggZD0iTTE2OC4wMiAxMjRoLTUwLjA0YTEgMSAwIDEgMSAwLTJoNTAuMDRhMSAxIDAgMSAxIDAgMm0wIDIwaC01MC4wNGExIDEgMCAxIDEgMC0yaDUwLjA0YTEgMSAwIDEgMSAwIDJtMCAyMGgtNTAuMDRhMSAxIDAgMSAxIDAtMmg1MC4wNGExIDEgMCAxIDEgMCAybTAtNDkuODE0aC01MC4wNGExIDEgMCAxIDEgMC0yaDUwLjA0YTEgMSAwIDEgMSAwIDJtMCAxOS44MTRoLTUwLjA0YTEgMSAwIDEgMSAwLTJoNTAuMDRhMSAxIDAgMSAxIDAgMm0wIDIwaC01MC4wNGExIDEgMCAxIDEgMC0yaDUwLjA0YTEgMSAwIDEgMSAwIDJNMTgzIDYxLjYxMWMtLjAxMiAwLS4wMjItLjAwNi0uMDM0LS4wMDUtMy4wOS4xMDUtNC41NTIgMy4xOTYtNS44NDIgNS45MjMtMS4zNDYgMi44NS0yLjM4NyA0LjcwMy00LjA5MyA0LjY0Ny0xLjg4OS0uMDY4LTIuOTY5LTIuMjAyLTQuMTEzLTQuNDYtMS4zMTQtMi41OTQtMi44MTQtNS41MzYtNS45NjMtNS40MjYtMy4wNDYuMTA0LTQuNTEzIDIuNzk0LTUuODA3IDUuMTY3LTEuMzc3IDIuNTI4LTIuMzE0IDQuMDY1LTQuMTIxIDMuOTk0LTEuOTI3LS4wNy0yLjk1MS0xLjgwNS00LjEzNi0zLjgxMy0xLjMyMS0yLjIzNi0yLjg0OC00Ljc1LTUuOTM2LTQuNjY0LTIuOTk0LjEwMy00LjQ2NSAyLjM4NS01Ljc2MyA0LjQtMS4zNzMgMi4xMy0yLjMzNSAzLjQyOC00LjE2NSAzLjM1MS0xLjk3My0uMDctMi45OTItMS41MS00LjE3MS0zLjE3Ny0xLjMyNC0xLjg3My0yLjgxNi0zLjk5My01Ljg5NS0zLjg5LTIuOTI4LjEtNC4zOTkgMS45Ny01LjY5NiAzLjYxOC0xLjIzMiAxLjU2NC0yLjE5NCAyLjgwMi00LjIyOSAyLjcyNGExIDEgMCAwIDAtLjA3MiAyYzMuMDE3LjEwMSA0LjU0NS0xLjggNS44NzItMy40ODcgMS4xNzctMS40OTYgMi4xOTMtMi43ODcgNC4xOTMtMi44NTUgMS45MjYtLjA4MiAyLjgyOSAxLjExNSA0LjE5NSAzLjA0NSAxLjI5NyAxLjgzNCAyLjc2OSAzLjkxNCA1LjczMSA0LjAyMSAzLjEwMy4xMDQgNC41OTYtMi4yMTUgNS45MTgtNC4yNjcgMS4xODItMS44MzQgMi4yMDItMy40MTcgNC4xNS0zLjQ4NCAxLjc5My0uMDY3IDIuNzY5IDEuMzUgNC4xNDUgMy42ODEgMS4yOTcgMi4xOTcgMi43NjYgNC42ODYgNS43ODcgNC43OTYgMy4xMjUuMTA4IDQuNjM0LTIuNjIgNS45NDktNS4wMzUgMS4xMzktMi4wODggMi4yMTQtNC4wNiA0LjExOS00LjEyNiAxLjc5My0uMDQyIDIuNzI4IDEuNTk1IDQuMTExIDQuMzMgMS4yOTIgMi41NTMgMi43NTcgNS40NDUgNS44MjUgNS41NTZsLjE2OS4wMDNjMy4wNjQgMCA0LjUxOC0zLjA3NSA1LjgwNS01Ljc5NCAxLjEzOS0yLjQxIDIuMjE3LTQuNjggNC4wNjctNC43NzN2LTJ6IiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iIzNFQ0M1RiIgZD0iTTgzIDE4M2g0MHYtNDBIODN6Ii8+PHBhdGggZD0iTTE0MyAxNThjLS4yMTkgMC0uNDI4LjAzNy0uNjM5LjA2NC0uMDM4LS4xNS0uMDc0LS4zMDEtLjExNi0uNDUxQTUgNSAwIDAgMCAxNDAuMzIgMTQ4YTQuOTYgNC45NiAwIDAgMC0zLjAxNiAxLjAzNiAyNi41MzEgMjYuNTMxIDAgMCAwLS4zMzUtLjMzNiA0Ljk1NSA0Ljk1NSAwIDAgMCAxLjAxMS0yLjk4NyA1IDUgMCAwIDAtOS41OTktMS45NTljLS4xNDgtLjA0Mi0uMjk3LS4wNzctLjQ0NS0uMTE1LjAyNy0uMjExLjA2NC0uNDIuMDY0LS42MzlhNSA1IDAgMCAwLTUtNSA1IDUgMCAwIDAtNSA1YzAgLjIxOS4wMzcuNDI4LjA2NC42MzktLjE0OC4wMzgtLjI5Ny4wNzMtLjQ0NS4xMTVhNC45OTggNC45OTggMCAwIDAtOS41OTkgMS45NTljMCAxLjEyNS4zODQgMi4xNTEgMS4wMTEgMi45ODctMy43MTcgMy42MzItNi4wMzEgOC42OTMtNi4wMzEgMTQuMyAwIDExLjA0NiA4Ljk1NCAyMCAyMCAyMCA5LjMzOSAwIDE3LjE2LTYuNDEgMTkuMzYxLTE1LjA2NC4yMTEuMDI3LjQyLjA2NC42MzkuMDY0YTUgNSAwIDAgMCA1LTUgNSA1IDAgMCAwLTUtNSIgZmlsbD0iIzQ0RDg2MCIvPjxwYXRoIGZpbGw9IiMzRUNDNUYiIGQ9Ik04MyAxMjNoNDB2LTIwSDgzeiIvPjxwYXRoIGQ9Ik0xMzMgMTE1LjVhMi41IDIuNSAwIDEgMCAwLTVjLS4xMDkgMC0uMjE0LjAxOS0uMzE5LjAzMi0uMDItLjA3NS0uMDM3LS4xNS0uMDU4LS4yMjVhMi41MDEgMi41MDEgMCAwIDAtLjk2My00LjgwN2MtLjU2OSAwLTEuMDg4LjE5Ny0xLjUwOC41MThhNi42NTMgNi42NTMgMCAwIDAtLjE2OC0uMTY4Yy4zMTQtLjQxNy41MDYtLjkzMS41MDYtMS40OTRhMi41IDIuNSAwIDAgMC00LjgtLjk3OUE5Ljk4NyA5Ljk4NyAwIDAgMCAxMjMgMTAzYy01LjUyMiAwLTEwIDQuNDc4LTEwIDEwczQuNDc4IDEwIDEwIDEwYy45MzQgMCAxLjgzMy0uMTM4IDIuNjktLjM3N2EyLjUgMi41IDAgMCAwIDQuOC0uOTc5YzAtLjU2My0uMTkyLTEuMDc3LS41MDYtMS40OTQuMDU3LS4wNTUuMTEzLS4xMTEuMTY4LS4xNjguNDIuMzIxLjkzOS41MTggMS41MDguNTE4YTIuNSAyLjUgMCAwIDAgLjk2My00LjgwN2MuMDIxLS4wNzQuMDM4LS4xNS4wNTgtLjIyNS4xMDUuMDEzLjIxLjAzMi4zMTkuMDMyIiBmaWxsPSIjNDREODYwIi8+PHBhdGggZD0iTTE0MyA0MS43NWMtLjE2IDAtLjMzLS4wMi0uNDktLjA1YTIuNTIgMi41MiAwIDAgMS0uNDctLjE0Yy0uMTUtLjA2LS4yOS0uMTQtLjQzMS0uMjMtLjEzLS4wOS0uMjU5LS4yLS4zOC0uMzEtLjEwOS0uMTItLjIxOS0uMjQtLjMwOS0uMzhzLS4xNy0uMjgtLjIzMS0uNDNhMi42MTkgMi42MTkgMCAwIDEtLjE4OS0uOTZjMC0uMTYuMDItLjMzLjA1LS40OS4wMy0uMTYuMDgtLjMxLjEzOS0uNDcuMDYxLS4xNS4xNDEtLjI5LjIzMS0uNDMuMDktLjEzLjItLjI2LjMwOS0uMzguMTIxLS4xMS4yNS0uMjIuMzgtLjMxLjE0MS0uMDkuMjgxLS4xNy40MzEtLjIzLjE0OS0uMDYuMzEtLjExLjQ3LS4xNC4zMi0uMDcuNjUtLjA3Ljk4IDAgLjE1OS4wMy4zMi4wOC40Ny4xNC4xNDkuMDYuMjkuMTQuNDMuMjMuMTMuMDkuMjU5LjIuMzguMzEuMTEuMTIuMjIuMjUuMzEuMzguMDkuMTQuMTcuMjguMjMuNDMuMDYuMTYuMTEuMzEuMTQuNDcuMDI5LjE2LjA1LjMzLjA1LjQ5IDAgLjY2LS4yNzEgMS4zMS0uNzMgMS43Ny0uMTIxLjExLS4yNS4yMi0uMzguMzEtLjE0LjA5LS4yODEuMTctLjQzLjIzYTIuNTY1IDIuNTY1IDAgMCAxLS45Ni4xOW0yMC0xLjI1Yy0uNjYgMC0xLjMtLjI3LTEuNzcxLS43M2EzLjgwMiAzLjgwMiAwIDAgMS0uMzA5LS4zOGMtLjA5LS4xNC0uMTctLjI4LS4yMzEtLjQzYTIuNjE5IDIuNjE5IDAgMCAxLS4xODktLjk2YzAtLjY2LjI3LTEuMy43MjktMS43Ny4xMjEtLjExLjI1LS4yMi4zOC0uMzEuMTQxLS4wOS4yODEtLjE3LjQzMS0uMjMuMTQ5LS4wNi4zMS0uMTEuNDctLjE0LjMyLS4wNy42Ni0uMDcuOTggMCAuMTU5LjAzLjMyLjA4LjQ3LjE0LjE0OS4wNi4yOS4xNC40My4yMy4xMy4wOS4yNTkuMi4zOC4zMS40NTkuNDcuNzMgMS4xMS43MyAxLjc3IDAgLjE2LS4wMjEuMzMtLjA1LjQ5LS4wMy4xNi0uMDguMzItLjE0LjQ3LS4wNy4xNS0uMTQuMjktLjIzLjQzLS4wOS4xMy0uMi4yNi0uMzEuMzgtLjEyMS4xMS0uMjUuMjItLjM4LjMxLS4xNC4wOS0uMjgxLjE3LS40My4yM2EyLjU2NSAyLjU2NSAwIDAgMS0uOTYuMTkiIGZpbGw9IiMwMDAiLz48L2c+PC9zdmc+"}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[6005],{86005:(M,L,j)=>{j.r(L),j.d(L,{default:()=>N});const N="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjRkZGIiBkPSJNOTkgNTJoODR2MzRIOTl6Ii8+PHBhdGggZD0iTTIzIDE2M2MtNy4zOTggMC0xMy44NDMtNC4wMjctMTcuMzAzLTEwQTE5Ljg4NiAxOS44ODYgMCAwIDAgMyAxNjNjMCAxMS4wNDYgOC45NTQgMjAgMjAgMjBoMjB2LTIwSDIzeiIgZmlsbD0iIzNFQ0M1RiIvPjxwYXRoIGQ9Ik0xMTIuOTggNTcuMzc2TDE4MyA1M1Y0M2MwLTExLjA0Ni04Ljk1NC0yMC0yMC0yMEg3M2wtMi41LTQuMzNjLTEuMTEyLTEuOTI1LTMuODg5LTEuOTI1LTUgMEw2MyAyM2wtMi41LTQuMzNjLTEuMTExLTEuOTI1LTMuODg5LTEuOTI1LTUgMEw1MyAyM2wtMi41LTQuMzNjLTEuMTExLTEuOTI1LTMuODg5LTEuOTI1LTUgMEw0MyAyM2MtLjAyMiAwLS4wNDIuMDAzLS4wNjUuMDAzbC00LjE0Mi00LjE0MWMtMS41Ny0xLjU3MS00LjI1Mi0uODUzLTQuODI4IDEuMjk0bC0xLjM2OSA1LjEwNC01LjE5Mi0xLjM5MmMtMi4xNDgtLjU3NS00LjExMSAxLjM4OS0zLjUzNSAzLjUzNmwxLjM5IDUuMTkzLTUuMTAyIDEuMzY3Yy0yLjE0OC41NzYtMi44NjcgMy4yNTktMS4yOTYgNC44M2w0LjE0MiA0LjE0MmMwIC4wMjEtLjAwMy4wNDItLjAwMy4wNjRsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgNTNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgNjNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgNzNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgODNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgOTNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgMTAzbC00LjMzIDIuNWMtMS45MjUgMS4xMTEtMS45MjUgMy44ODkgMCA1TDIzIDExM2wtNC4zMyAyLjVjLTEuOTI1IDEuMTExLTEuOTI1IDMuODg5IDAgNUwyMyAxMjNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgMTMzbC00LjMzIDIuNWMtMS45MjUgMS4xMTEtMS45MjUgMy44ODkgMCA1TDIzIDE0M2wtNC4zMyAyLjVjLTEuOTI1IDEuMTExLTEuOTI1IDMuODg5IDAgNUwyMyAxNTNsLTQuMzMgMi41Yy0xLjkyNSAxLjExMS0xLjkyNSAzLjg4OSAwIDVMMjMgMTYzYzAgMTEuMDQ2IDguOTU0IDIwIDIwIDIwaDEyMGMxMS4wNDYgMCAyMC04Ljk1NCAyMC0yMFY4M2wtNzAuMDItNC4zNzZBMTAuNjQ1IDEwLjY0NSAwIDAgMSAxMDMgNjhjMC01LjYyMSA0LjM3LTEwLjI3MyA5Ljk4LTEwLjYyNCIgZmlsbD0iIzNFQ0M1RiIvPjxwYXRoIGZpbGw9IiMzRUNDNUYiIGQ9Ik0xNDMgMTgzaDMwdi00MGgtMzB6Ii8+PHBhdGggZD0iTTE5MyAxNThjLS4yMTkgMC0uNDI4LjAzNy0uNjM5LjA2NC0uMDM4LS4xNS0uMDc0LS4zMDEtLjExNi0uNDUxQTUgNSAwIDAgMCAxOTAuMzIgMTQ4YTQuOTYgNC45NiAwIDAgMC0zLjAxNiAxLjAzNiAyNi41MzEgMjYuNTMxIDAgMCAwLS4zMzUtLjMzNiA0Ljk1NSA0Ljk1NSAwIDAgMCAxLjAxMS0yLjk4NyA1IDUgMCAwIDAtOS41OTktMS45NTljLS4xNDgtLjA0Mi0uMjk3LS4wNzctLjQ0NS0uMTE1LjAyNy0uMjExLjA2NC0uNDIuMDY0LS42MzlhNSA1IDAgMCAwLTUtNSA1IDUgMCAwIDAtNSA1YzAgLjIxOS4wMzcuNDI4LjA2NC42MzktLjE0OC4wMzgtLjI5Ny4wNzMtLjQ0NS4xMTVhNC45OTggNC45OTggMCAwIDAtOS41OTkgMS45NTljMCAxLjEyNS4zODQgMi4xNTEgMS4wMTEgMi45ODctMy43MTcgMy42MzItNi4wMzEgOC42OTMtNi4wMzEgMTQuMyAwIDExLjA0NiA4Ljk1NCAyMCAyMCAyMCA5LjMzOSAwIDE3LjE2LTYuNDEgMTkuMzYxLTE1LjA2NC4yMTEuMDI3LjQyLjA2NC42MzkuMDY0YTUgNSAwIDAgMCA1LTUgNSA1IDAgMCAwLTUtNSIgZmlsbD0iIzQ0RDg2MCIvPjxwYXRoIGZpbGw9IiMzRUNDNUYiIGQ9Ik0xNTMgMTIzaDMwdi0yMGgtMzB6Ii8+PHBhdGggZD0iTTE5MyAxMTUuNWEyLjUgMi41IDAgMSAwIDAtNWMtLjEwOSAwLS4yMTQuMDE5LS4zMTkuMDMyLS4wMi0uMDc1LS4wMzctLjE1LS4wNTgtLjIyNWEyLjUwMSAyLjUwMSAwIDAgMC0uOTYzLTQuODA3Yy0uNTY5IDAtMS4wODguMTk3LTEuNTA4LjUxOGE2LjY1MyA2LjY1MyAwIDAgMC0uMTY4LS4xNjhjLjMxNC0uNDE3LjUwNi0uOTMxLjUwNi0xLjQ5NGEyLjUgMi41IDAgMCAwLTQuOC0uOTc5QTkuOTg3IDkuOTg3IDAgMCAwIDE4MyAxMDNjLTUuNTIyIDAtMTAgNC40NzgtMTAgMTBzNC40NzggMTAgMTAgMTBjLjkzNCAwIDEuODMzLS4xMzggMi42OS0uMzc3YTIuNSAyLjUgMCAwIDAgNC44LS45NzljMC0uNTYzLS4xOTItMS4wNzctLjUwNi0xLjQ5NC4wNTctLjA1NS4xMTMtLjExMS4xNjgtLjE2OC40Mi4zMjEuOTM5LjUxOCAxLjUwOC41MThhMi41IDIuNSAwIDAgMCAuOTYzLTQuODA3Yy4wMjEtLjA3NC4wMzgtLjE1LjA1OC0uMjI1LjEwNS4wMTMuMjEuMDMyLjMxOS4wMzIiIGZpbGw9IiM0NEQ4NjAiLz48cGF0aCBkPSJNNjMgNTUuNWEyLjUgMi41IDAgMCAxLTIuNS0yLjVjMC00LjEzNi0zLjM2NC03LjUtNy41LTcuNXMtNy41IDMuMzY0LTcuNSA3LjVhMi41IDIuNSAwIDEgMS01IDBjMC02Ljg5MyA1LjYwNy0xMi41IDEyLjUtMTIuNVM2NS41IDQ2LjEwNyA2NS41IDUzYTIuNSAyLjUgMCAwIDEtMi41IDIuNSIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Ik0xMDMgMTgzaDYwYzExLjA0NiAwIDIwLTguOTU0IDIwLTIwVjkzaC02MGMtMTEuMDQ2IDAtMjAgOC45NTQtMjAgMjB2NzB6IiBmaWxsPSIjRkZGRjUwIi8+PHBhdGggZD0iTTE2OC4wMiAxMjRoLTUwLjA0YTEgMSAwIDEgMSAwLTJoNTAuMDRhMSAxIDAgMSAxIDAgMm0wIDIwaC01MC4wNGExIDEgMCAxIDEgMC0yaDUwLjA0YTEgMSAwIDEgMSAwIDJtMCAyMGgtNTAuMDRhMSAxIDAgMSAxIDAtMmg1MC4wNGExIDEgMCAxIDEgMCAybTAtNDkuODE0aC01MC4wNGExIDEgMCAxIDEgMC0yaDUwLjA0YTEgMSAwIDEgMSAwIDJtMCAxOS44MTRoLTUwLjA0YTEgMSAwIDEgMSAwLTJoNTAuMDRhMSAxIDAgMSAxIDAgMm0wIDIwaC01MC4wNGExIDEgMCAxIDEgMC0yaDUwLjA0YTEgMSAwIDEgMSAwIDJNMTgzIDYxLjYxMWMtLjAxMiAwLS4wMjItLjAwNi0uMDM0LS4wMDUtMy4wOS4xMDUtNC41NTIgMy4xOTYtNS44NDIgNS45MjMtMS4zNDYgMi44NS0yLjM4NyA0LjcwMy00LjA5MyA0LjY0Ny0xLjg4OS0uMDY4LTIuOTY5LTIuMjAyLTQuMTEzLTQuNDYtMS4zMTQtMi41OTQtMi44MTQtNS41MzYtNS45NjMtNS40MjYtMy4wNDYuMTA0LTQuNTEzIDIuNzk0LTUuODA3IDUuMTY3LTEuMzc3IDIuNTI4LTIuMzE0IDQuMDY1LTQuMTIxIDMuOTk0LTEuOTI3LS4wNy0yLjk1MS0xLjgwNS00LjEzNi0zLjgxMy0xLjMyMS0yLjIzNi0yLjg0OC00Ljc1LTUuOTM2LTQuNjY0LTIuOTk0LjEwMy00LjQ2NSAyLjM4NS01Ljc2MyA0LjQtMS4zNzMgMi4xMy0yLjMzNSAzLjQyOC00LjE2NSAzLjM1MS0xLjk3My0uMDctMi45OTItMS41MS00LjE3MS0zLjE3Ny0xLjMyNC0xLjg3My0yLjgxNi0zLjk5My01Ljg5NS0zLjg5LTIuOTI4LjEtNC4zOTkgMS45Ny01LjY5NiAzLjYxOC0xLjIzMiAxLjU2NC0yLjE5NCAyLjgwMi00LjIyOSAyLjcyNGExIDEgMCAwIDAtLjA3MiAyYzMuMDE3LjEwMSA0LjU0NS0xLjggNS44NzItMy40ODcgMS4xNzctMS40OTYgMi4xOTMtMi43ODcgNC4xOTMtMi44NTUgMS45MjYtLjA4MiAyLjgyOSAxLjExNSA0LjE5NSAzLjA0NSAxLjI5NyAxLjgzNCAyLjc2OSAzLjkxNCA1LjczMSA0LjAyMSAzLjEwMy4xMDQgNC41OTYtMi4yMTUgNS45MTgtNC4yNjcgMS4xODItMS44MzQgMi4yMDItMy40MTcgNC4xNS0zLjQ4NCAxLjc5My0uMDY3IDIuNzY5IDEuMzUgNC4xNDUgMy42ODEgMS4yOTcgMi4xOTcgMi43NjYgNC42ODYgNS43ODcgNC43OTYgMy4xMjUuMTA4IDQuNjM0LTIuNjIgNS45NDktNS4wMzUgMS4xMzktMi4wODggMi4yMTQtNC4wNiA0LjExOS00LjEyNiAxLjc5My0uMDQyIDIuNzI4IDEuNTk1IDQuMTExIDQuMzMgMS4yOTIgMi41NTMgMi43NTcgNS40NDUgNS44MjUgNS41NTZsLjE2OS4wMDNjMy4wNjQgMCA0LjUxOC0zLjA3NSA1LjgwNS01Ljc5NCAxLjEzOS0yLjQxIDIuMjE3LTQuNjggNC4wNjctNC43NzN2LTJ6IiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iIzNFQ0M1RiIgZD0iTTgzIDE4M2g0MHYtNDBIODN6Ii8+PHBhdGggZD0iTTE0MyAxNThjLS4yMTkgMC0uNDI4LjAzNy0uNjM5LjA2NC0uMDM4LS4xNS0uMDc0LS4zMDEtLjExNi0uNDUxQTUgNSAwIDAgMCAxNDAuMzIgMTQ4YTQuOTYgNC45NiAwIDAgMC0zLjAxNiAxLjAzNiAyNi41MzEgMjYuNTMxIDAgMCAwLS4zMzUtLjMzNiA0Ljk1NSA0Ljk1NSAwIDAgMCAxLjAxMS0yLjk4NyA1IDUgMCAwIDAtOS41OTktMS45NTljLS4xNDgtLjA0Mi0uMjk3LS4wNzctLjQ0NS0uMTE1LjAyNy0uMjExLjA2NC0uNDIuMDY0LS42MzlhNSA1IDAgMCAwLTUtNSA1IDUgMCAwIDAtNSA1YzAgLjIxOS4wMzcuNDI4LjA2NC42MzktLjE0OC4wMzgtLjI5Ny4wNzMtLjQ0NS4xMTVhNC45OTggNC45OTggMCAwIDAtOS41OTkgMS45NTljMCAxLjEyNS4zODQgMi4xNTEgMS4wMTEgMi45ODctMy43MTcgMy42MzItNi4wMzEgOC42OTMtNi4wMzEgMTQuMyAwIDExLjA0NiA4Ljk1NCAyMCAyMCAyMCA5LjMzOSAwIDE3LjE2LTYuNDEgMTkuMzYxLTE1LjA2NC4yMTEuMDI3LjQyLjA2NC42MzkuMDY0YTUgNSAwIDAgMCA1LTUgNSA1IDAgMCAwLTUtNSIgZmlsbD0iIzQ0RDg2MCIvPjxwYXRoIGZpbGw9IiMzRUNDNUYiIGQ9Ik04MyAxMjNoNDB2LTIwSDgzeiIvPjxwYXRoIGQ9Ik0xMzMgMTE1LjVhMi41IDIuNSAwIDEgMCAwLTVjLS4xMDkgMC0uMjE0LjAxOS0uMzE5LjAzMi0uMDItLjA3NS0uMDM3LS4xNS0uMDU4LS4yMjVhMi41MDEgMi41MDEgMCAwIDAtLjk2My00LjgwN2MtLjU2OSAwLTEuMDg4LjE5Ny0xLjUwOC41MThhNi42NTMgNi42NTMgMCAwIDAtLjE2OC0uMTY4Yy4zMTQtLjQxNy41MDYtLjkzMS41MDYtMS40OTRhMi41IDIuNSAwIDAgMC00LjgtLjk3OUE5Ljk4NyA5Ljk4NyAwIDAgMCAxMjMgMTAzYy01LjUyMiAwLTEwIDQuNDc4LTEwIDEwczQuNDc4IDEwIDEwIDEwYy45MzQgMCAxLjgzMy0uMTM4IDIuNjktLjM3N2EyLjUgMi41IDAgMCAwIDQuOC0uOTc5YzAtLjU2My0uMTkyLTEuMDc3LS41MDYtMS40OTQuMDU3LS4wNTUuMTEzLS4xMTEuMTY4LS4xNjguNDIuMzIxLjkzOS41MTggMS41MDguNTE4YTIuNSAyLjUgMCAwIDAgLjk2My00LjgwN2MuMDIxLS4wNzQuMDM4LS4xNS4wNTgtLjIyNS4xMDUuMDEzLjIxLjAzMi4zMTkuMDMyIiBmaWxsPSIjNDREODYwIi8+PHBhdGggZD0iTTE0MyA0MS43NWMtLjE2IDAtLjMzLS4wMi0uNDktLjA1YTIuNTIgMi41MiAwIDAgMS0uNDctLjE0Yy0uMTUtLjA2LS4yOS0uMTQtLjQzMS0uMjMtLjEzLS4wOS0uMjU5LS4yLS4zOC0uMzEtLjEwOS0uMTItLjIxOS0uMjQtLjMwOS0uMzhzLS4xNy0uMjgtLjIzMS0uNDNhMi42MTkgMi42MTkgMCAwIDEtLjE4OS0uOTZjMC0uMTYuMDItLjMzLjA1LS40OS4wMy0uMTYuMDgtLjMxLjEzOS0uNDcuMDYxLS4xNS4xNDEtLjI5LjIzMS0uNDMuMDktLjEzLjItLjI2LjMwOS0uMzguMTIxLS4xMS4yNS0uMjIuMzgtLjMxLjE0MS0uMDkuMjgxLS4xNy40MzEtLjIzLjE0OS0uMDYuMzEtLjExLjQ3LS4xNC4zMi0uMDcuNjUtLjA3Ljk4IDAgLjE1OS4wMy4zMi4wOC40Ny4xNC4xNDkuMDYuMjkuMTQuNDMuMjMuMTMuMDkuMjU5LjIuMzguMzEuMTEuMTIuMjIuMjUuMzEuMzguMDkuMTQuMTcuMjguMjMuNDMuMDYuMTYuMTEuMzEuMTQuNDcuMDI5LjE2LjA1LjMzLjA1LjQ5IDAgLjY2LS4yNzEgMS4zMS0uNzMgMS43Ny0uMTIxLjExLS4yNS4yMi0uMzguMzEtLjE0LjA5LS4yODEuMTctLjQzLjIzYTIuNTY1IDIuNTY1IDAgMCAxLS45Ni4xOW0yMC0xLjI1Yy0uNjYgMC0xLjMtLjI3LTEuNzcxLS43M2EzLjgwMiAzLjgwMiAwIDAgMS0uMzA5LS4zOGMtLjA5LS4xNC0uMTctLjI4LS4yMzEtLjQzYTIuNjE5IDIuNjE5IDAgMCAxLS4xODktLjk2YzAtLjY2LjI3LTEuMy43MjktMS43Ny4xMjEtLjExLjI1LS4yMi4zOC0uMzEuMTQxLS4wOS4yODEtLjE3LjQzMS0uMjMuMTQ5LS4wNi4zMS0uMTEuNDctLjE0LjMyLS4wNy42Ni0uMDcuOTggMCAuMTU5LjAzLjMyLjA4LjQ3LjE0LjE0OS4wNi4yOS4xNC40My4yMy4xMy4wOS4yNTkuMi4zOC4zMS40NTkuNDcuNzMgMS4xMS43MyAxLjc3IDAgLjE2LS4wMjEuMzMtLjA1LjQ5LS4wMy4xNi0uMDguMzItLjE0LjQ3LS4wNy4xNS0uMTQuMjktLjIzLjQzLS4wOS4xMy0uMi4yNi0uMzEuMzgtLjEyMS4xMS0uMjUuMjItLjM4LjMxLS4xNC4wOS0uMjgxLjE3LS40My4yM2EyLjU2NSAyLjU2NSAwIDAgMS0uOTYuMTkiIGZpbGw9IiMwMDAiLz48L2c+PC9zdmc+"}}]); \ No newline at end of file diff --git a/assets/js/635.be581cc4.js b/assets/js/635.be581cc4.js deleted file mode 100644 index d655c672..00000000 --- a/assets/js/635.be581cc4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[635],{30635:(s,e,t)=>{t.r(e),t.d(e,{default:()=>a});const a=t.p+"assets/images/project_icon-044438ba3230493516d84898d4700568.svg"}}]); \ No newline at end of file diff --git a/assets/js/6713985a.aaf3c6c8.js b/assets/js/6713985a.f57985da.js similarity index 94% rename from assets/js/6713985a.aaf3c6c8.js rename to assets/js/6713985a.f57985da.js index 16bf33d8..22f027c5 100644 --- a/assets/js/6713985a.aaf3c6c8.js +++ b/assets/js/6713985a.f57985da.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7031,7662],{33987:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>w,contentTitle:()=>h,default:()=>g,frontMatter:()=>m,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/custom/description","title":"\ud83d\udccb Custom description Component","description":"When your descriptions are written not in plain text (such as Markdown, reStructuredText, ...)","source":"@site/docs/demo-viewer/custom/description.mdx","sourceDirName":"demo-viewer/custom","slug":"/demo-viewer/custom/description","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/custom/description.mdx","tags":[],"version":"current","frontMatter":{"description":"When your descriptions are written not in plain text (such as Markdown, reStructuredText, ...)","title":"\ud83d\udccb Custom description Component"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udee0\ufe0f Customizations","permalink":"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations"},"next":{"title":"\u26a0\ufe0f Custom Unresolved Refs Component","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs"}}');var o=s(62540),i=s(28453),r=s(21432),a=s(37662),c=s(21344),d=s.n(c),u=s(54655),l=s(11470),p=s(19365);const m={description:"When your descriptions are written not in plain text (such as Markdown, reStructuredText, ...)",title:"\ud83d\udccb Custom description Component"},h="Custom description Component",w={},f=[];function x(e){const t={code:"code",h1:"h1",header:"header",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"custom-description-component",children:"Custom description Component"})}),"\n",(0,o.jsxs)(l.default,{children:[(0,o.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(d(),{schema:a,viewerOptions:{DescriptionComponent:({description:e})=>(0,o.jsx)(u.o,{children:e})}})}),(0,o.jsx)(p.default,{value:"viewerOptions",label:"viewerOptions",children:(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:"// import ReactMarkdown from 'react-markdown'\n{\n DescriptionComponent: ({description}) => \n}\n"})})}),(0,o.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(r.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function g(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(x,{...e})}):x(e)}},37662:e=>{e.exports=JSON.parse('{"title":"Custom Description Component","description":"This versatile schema harnesses the power of Markdown, enabling diverse text formatting possibilities. It supports:\\n\\n- *Italic*, **bold**, and ***combined emphasis*** for dynamic emphasis.\\n- Various heading sizes (#, ##, ###) for organized structuring.\\n- Lists (both ordered and unordered) for itemization.\\n- [Hyperlinks](https://www.example.com) to seamlessly embed URLs.\\n- `Inline code` and code blocks for technical content.\\n- > Blockquotes for emphasized excerpts or citations.\\n- Tables for organized data representation.\\n- ![Images](https://www.example.com/image.jpg) with alt text for visual content."}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7031,7662],{36364:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>w,contentTitle:()=>h,default:()=>g,frontMatter:()=>m,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/custom/description","title":"\ud83d\udccb Custom description Component","description":"When your descriptions are written not in plain text (such as Markdown, reStructuredText, ...)","source":"@site/docs/demo-viewer/custom/description.mdx","sourceDirName":"demo-viewer/custom","slug":"/demo-viewer/custom/description","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/custom/description.mdx","tags":[],"version":"current","frontMatter":{"description":"When your descriptions are written not in plain text (such as Markdown, reStructuredText, ...)","title":"\ud83d\udccb Custom description Component"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udee0\ufe0f Customizations","permalink":"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations"},"next":{"title":"\u26a0\ufe0f Custom Unresolved Refs Component","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs"}}');var o=s(62540),i=s(28453),r=s(58069),a=s(37662),c=s(88307),d=s.n(c),u=s(54655),l=s(65537),p=s(79329);const m={description:"When your descriptions are written not in plain text (such as Markdown, reStructuredText, ...)",title:"\ud83d\udccb Custom description Component"},h="Custom description Component",w={},f=[];function x(e){const t={code:"code",h1:"h1",header:"header",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"custom-description-component",children:"Custom description Component"})}),"\n",(0,o.jsxs)(l.default,{children:[(0,o.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(d(),{schema:a,viewerOptions:{DescriptionComponent:({description:e})=>(0,o.jsx)(u.o,{children:e})}})}),(0,o.jsx)(p.default,{value:"viewerOptions",label:"viewerOptions",children:(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:"// import ReactMarkdown from 'react-markdown'\n{\n DescriptionComponent: ({description}) => \n}\n"})})}),(0,o.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(r.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function g(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(x,{...e})}):x(e)}},37662:e=>{e.exports=JSON.parse('{"title":"Custom Description Component","description":"This versatile schema harnesses the power of Markdown, enabling diverse text formatting possibilities. It supports:\\n\\n- *Italic*, **bold**, and ***combined emphasis*** for dynamic emphasis.\\n- Various heading sizes (#, ##, ###) for organized structuring.\\n- Lists (both ordered and unordered) for itemization.\\n- [Hyperlinks](https://www.example.com) to seamlessly embed URLs.\\n- `Inline code` and code blocks for technical content.\\n- > Blockquotes for emphasized excerpts or citations.\\n- Tables for organized data representation.\\n- ![Images](https://www.example.com/image.jpg) with alt text for visual content."}')}}]); \ No newline at end of file diff --git a/assets/js/6c29c54d.3614b129.js b/assets/js/6c29c54d.3614b129.js new file mode 100644 index 00000000..0296234b --- /dev/null +++ b/assets/js/6c29c54d.3614b129.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[8369,9681],{8195:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>h,contentTitle:()=>m,default:()=>w,frontMatter:()=>p,metadata:()=>s,toc:()=>j});const s=JSON.parse('{"id":"demo-viewer/object/required","title":"\ud83d\udd34 Required","description":"object with required showcase","source":"@site/docs/demo-viewer/object/required.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/required","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/required.mdx","tags":[],"version":"current","frontMatter":{"description":"object with required showcase","title":"\ud83d\udd34 Required"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udff7\ufe0f PropertyNames","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames"},"next":{"title":"\ud83d\udfe6 Simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject"}}');var i=r(62540),d=r(28453),n=r(58069),o=r(68369),a=r(88307),c=r.n(a),u=r(65537),l=r(79329);const p={description:"object with required showcase",title:"\ud83d\udd34 Required"},m="Required",h={},j=[];function b(e){const t={h1:"h1",header:"header",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"required",children:"Required"})}),"\n",(0,i.jsxs)(u.default,{children:[(0,i.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(c(),{schema:o})}),(0,i.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(n.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,d.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(b,{...e})}):b(e)}},68369:e=>{e.exports=JSON.parse('{"type":"object","properties":{"id":{"type":"number","readOnly":true},"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"telephone":{"type":"string","deprecated":true},"password":{"type":"string","writeOnly":true},"kind":{"type":"string","const":"USER"}},"required":["name","email"]}')}}]); \ No newline at end of file diff --git a/assets/js/6c29c54d.98275556.js b/assets/js/6c29c54d.98275556.js deleted file mode 100644 index b603ac9b..00000000 --- a/assets/js/6c29c54d.98275556.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[8369,9681],{60381:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>h,contentTitle:()=>m,default:()=>w,frontMatter:()=>p,metadata:()=>s,toc:()=>j});const s=JSON.parse('{"id":"demo-viewer/object/required","title":"\ud83d\udd34 Required","description":"object with required showcase","source":"@site/docs/demo-viewer/object/required.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/required","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/required.mdx","tags":[],"version":"current","frontMatter":{"description":"object with required showcase","title":"\ud83d\udd34 Required"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udff7\ufe0f PropertyNames","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames"},"next":{"title":"\ud83d\udfe6 Simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject"}}');var i=r(62540),d=r(28453),n=r(21432),o=r(68369),a=r(21344),c=r.n(a),u=r(11470),l=r(19365);const p={description:"object with required showcase",title:"\ud83d\udd34 Required"},m="Required",h={},j=[];function b(e){const t={h1:"h1",header:"header",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"required",children:"Required"})}),"\n",(0,i.jsxs)(u.default,{children:[(0,i.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(c(),{schema:o})}),(0,i.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(n.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,d.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(b,{...e})}):b(e)}},68369:e=>{e.exports=JSON.parse('{"type":"object","properties":{"id":{"type":"number","readOnly":true},"name":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"telephone":{"type":"string","deprecated":true},"password":{"type":"string","writeOnly":true},"kind":{"type":"string","const":"USER"}},"required":["name","email"]}')}}]); \ No newline at end of file diff --git a/assets/js/6f77199a.2708583b.js b/assets/js/6f77199a.5870fc34.js similarity index 93% rename from assets/js/6f77199a.2708583b.js rename to assets/js/6f77199a.5870fc34.js index dc14b9ae..588156e7 100644 --- a/assets/js/6f77199a.2708583b.js +++ b/assets/js/6f77199a.5870fc34.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[9517,9534],{81250:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>w,frontMatter:()=>h,metadata:()=>i,toc:()=>f});const i=JSON.parse('{"id":"demo-viewer/schema_conditionally/if-then-else_multiple","title":"\ud83d\udd00 If-Then-Else (multiple)","description":"schema conditionally with multiple if-then-else clauses showcase","source":"@site/docs/demo-viewer/schema_conditionally/if-then-else_multiple.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/if-then-else_multiple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/if-then-else_multiple.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with multiple if-then-else clauses showcase","title":"\ud83d\udd00 If-Then-Else (multiple)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udfac If-Then-Else","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else"},"next":{"title":"\ud83e\uddf5 String","permalink":"/docusaurus-json-schema-plugin/docs/category/-string"}}');var l=s(62540),n=s(28453),a=s(21432),r=s(89534),o=s(21344),c=s.n(o),d=s(11470),u=s(19365);const h={description:"schema conditionally with multiple if-then-else clauses showcase",title:"\ud83d\udd00 If-Then-Else (multiple)"},p="If-Then-Else (multiple)",m={},f=[];function y(e){const t={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.header,{children:(0,l.jsx)(t.h1,{id:"if-then-else-multiple",children:"If-Then-Else (multiple)"})}),"\n",(0,l.jsxs)(d.default,{children:[(0,l.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,l.jsx)(c(),{schema:r})}),(0,l.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,l.jsx)(a.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(y,{...e})}):y(e)}},89534:e=>{e.exports=JSON.parse('{"type":"object","properties":{"street_address":{"type":"string"},"country":{"default":"United States of America","enum":["United States of America","Canada","Netherlands"]}},"allOf":[{"if":{"properties":{"country":{"const":"United States of America"}}},"then":{"properties":{"postal_code":{"pattern":"[0-9]{5}(-[0-9]{4})?"}}}},{"if":{"properties":{"country":{"const":"Canada"}},"required":["country"]},"then":{"properties":{"postal_code":{"pattern":"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]"}}}},{"if":{"properties":{"country":{"const":"Netherlands"}},"required":["country"]},"then":{"properties":{"postal_code":{"pattern":"[0-9]{4} [A-Z]{2}"}}}}]}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[9517,9534],{17339:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>w,frontMatter:()=>h,metadata:()=>i,toc:()=>f});const i=JSON.parse('{"id":"demo-viewer/schema_conditionally/if-then-else_multiple","title":"\ud83d\udd00 If-Then-Else (multiple)","description":"schema conditionally with multiple if-then-else clauses showcase","source":"@site/docs/demo-viewer/schema_conditionally/if-then-else_multiple.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/if-then-else_multiple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/if-then-else_multiple.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with multiple if-then-else clauses showcase","title":"\ud83d\udd00 If-Then-Else (multiple)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udfac If-Then-Else","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else"},"next":{"title":"\ud83e\uddf5 String","permalink":"/docusaurus-json-schema-plugin/docs/category/-string"}}');var l=s(62540),n=s(28453),a=s(58069),r=s(89534),o=s(88307),c=s.n(o),d=s(65537),u=s(79329);const h={description:"schema conditionally with multiple if-then-else clauses showcase",title:"\ud83d\udd00 If-Then-Else (multiple)"},p="If-Then-Else (multiple)",m={},f=[];function y(e){const t={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.header,{children:(0,l.jsx)(t.h1,{id:"if-then-else-multiple",children:"If-Then-Else (multiple)"})}),"\n",(0,l.jsxs)(d.default,{children:[(0,l.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,l.jsx)(c(),{schema:r})}),(0,l.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,l.jsx)(a.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(y,{...e})}):y(e)}},89534:e=>{e.exports=JSON.parse('{"type":"object","properties":{"street_address":{"type":"string"},"country":{"default":"United States of America","enum":["United States of America","Canada","Netherlands"]}},"allOf":[{"if":{"properties":{"country":{"const":"United States of America"}}},"then":{"properties":{"postal_code":{"pattern":"[0-9]{5}(-[0-9]{4})?"}}}},{"if":{"properties":{"country":{"const":"Canada"}},"required":["country"]},"then":{"properties":{"postal_code":{"pattern":"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]"}}}},{"if":{"properties":{"country":{"const":"Netherlands"}},"required":["country"]},"then":{"properties":{"postal_code":{"pattern":"[0-9]{4} [A-Z]{2}"}}}}]}')}}]); \ No newline at end of file diff --git a/assets/js/7082.22a17154.js b/assets/js/7082.22a17154.js deleted file mode 100644 index 8639ffbd..00000000 --- a/assets/js/7082.22a17154.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! For license information please see 7082.22a17154.js.LICENSE.txt */ -(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7082],{20899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;t.Cache=class{constructor(e={}){this._stats={hits:0,misses:0},this._data={},this._stdTTL=e.stdTTL}get stats(){return this._stats}get(e){const t=this._data[e];if(t&&(!this._stdTTL||(new Date).getTime()-t.ts{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveCrawler=void 0;const n=r(2535),o=r(55131),i=r(58156),s=r(26672);t.ResolveCrawler=class{constructor(e,t,r){this._resolved=r,this.resolvers=[],this.pointerGraph=new o.DepGraph({circular:!0}),this.pointerStemGraph=new o.DepGraph({circular:!0}),this.computeGraph=(e,t=[],r="#",n=[])=>{r||(r="#");let o=this._runner.computeRef({val:e,jsonPointer:r,pointerStack:n});if(void 0!==o)this._resolveRef({ref:o,val:e,parentPath:t,pointerStack:n,parentPointer:r,cacheKey:r,resolvingPointer:this.jsonPointer});else if("object"==typeof e)for(const i in e){if(!e.hasOwnProperty(i))continue;const a=e[i],u=s.addToJSONPointer(r,i);o=this._runner.computeRef({key:i,val:a,jsonPointer:u,pointerStack:n}),t.push(i),void 0!==o?this._resolveRef({ref:o,val:a,parentPath:t,parentPointer:u,pointerStack:n,cacheKey:s.uriToJSONPointer(o),resolvingPointer:this.jsonPointer}):"object"==typeof a&&this.computeGraph(a,t,u,n),t.pop()}},this._resolveRef=e=>{const{pointerStack:t,parentPath:r,parentPointer:o,ref:a}=e;if(s.uriIsJSONPointer(a)){if(this._runner.dereferenceInline){const e=s.uriToJSONPointer(a);let c;try{c=(0,n.pointerToPath)(e)}catch(u){return void this._resolved.errors.push({code:"PARSE_POINTER",message:`'${a}' JSON pointer is invalid`,uri:this._runner.baseUri,uriStack:this._runner.uriStack,pointerStack:[],path:[]})}let l=c.length>0;for(const t in c)if(r[t]!==c[t]){l=!1;break}if(l)return;this.pointerStemGraph.hasNode(e)||this.pointerStemGraph.addNode(e);let f="#",h="";for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultGetRef=t.Cache=void 0;r(31635).__exportStar(r(90163),t);var n=r(20899);Object.defineProperty(t,"Cache",{enumerable:!0,get:function(){return n.Cache}});var o=r(65799);Object.defineProperty(t,"defaultGetRef",{enumerable:!0,get:function(){return o.defaultGetRef}})},90163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resolver=void 0;const n=r(55131),o=r(20899),i=r(65799);t.Resolver=class{constructor(e={}){this.ctx={},this.uriCache=e.uriCache||new o.Cache,this.resolvers=e.resolvers||{},this.getRef=e.getRef,this.transformRef=e.transformRef,this.dereferenceInline=void 0===e.dereferenceInline||e.dereferenceInline,this.dereferenceRemote=void 0===e.dereferenceRemote||e.dereferenceRemote,this.parseResolveResult=e.parseResolveResult,this.transformDereferenceResult=e.transformDereferenceResult,this.ctx=e.ctx}resolve(e,t={}){const r=new n.DepGraph({circular:!0});return new i.ResolveRunner(e,r,Object.assign(Object.assign({uriCache:this.uriCache,resolvers:this.resolvers,getRef:this.getRef,transformRef:this.transformRef,dereferenceInline:this.dereferenceInline,dereferenceRemote:this.dereferenceRemote,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult},t),{ctx:Object.assign({},this.ctx||{},t.ctx||{})})).resolve(t)}}},65799:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveRunner=t.defaultGetRef=void 0;const n=r(31635),o=r(2535),i=r(58851),s=r(55131),a=r(75878),u=r(58156),c=r(63560),l=r(84193),f=r(32735),h=r(20899),p=r(20349),d=r(26672),m=r(74987);let g=0;t.defaultGetRef=(e,t)=>{if(t&&"object"==typeof t&&"string"==typeof t.$ref)return t.$ref};class y{constructor(e,r=new s.DepGraph({circular:!0}),a={}){this.ctx={},this.computeRef=e=>{const t=this.getRef(e.key,e.val);if(void 0===t)return;let r=new f.ExtendedURI(t);if("#"!==t[0]){if(this.isFile(r)){let e=r.toString();r.is("absolute")||(e=this.baseUri.toString()?(0,i.join)((0,i.dirname)(this.baseUri.toString()),(0,i.stripRoot)(e)):""),e&&(r=new l((0,i.toFSPath)(e)).fragment(r.fragment()))}else(r.scheme().includes("http")||""===r.scheme()&&this.baseUri.scheme().includes("http"))&&""!==this.baseUri.authority()&&""===r.authority()&&(r=r.absoluteTo(this.baseUri))}return String(r).length>0&&this.isFile(this.baseUri)&&this.isFile(r)&&this.baseUri.path()===r.path()&&(r=new f.ExtendedURI(`#${r.fragment()}`)),this.transformRef?this.transformRef(Object.assign(Object.assign({},e),{ref:r,uri:this.baseUri}),this.ctx):r},this.atMaxUriDepth=()=>this.uriStack.length>=100,this.lookupUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{ref:t}=e;let r=t.scheme();!this.resolvers[r]&&this.isFile(t)&&(r="file");const n=this.resolvers[r];if(!n)throw new Error(`No resolver defined for scheme '${t.scheme()||"file"}' in ref ${t.toString()}`);let o=yield n.resolve(t,this.ctx);if(this.parseResolveResult)try{o=(yield this.parseResolveResult({uriResult:o,result:o,targetAuthority:t,parentAuthority:this.baseUri,parentPath:e.parentPath,fragment:e.fragment})).result}catch(i){throw new Error(`Could not parse remote reference response for '${t.toString()}' - ${String(i)}`)}return new y(o,this.graph,{depth:this.depth+1,baseUri:t.toString(),root:t,uriStack:this.uriStack,uriCache:this.uriCache,resolvers:this.resolvers,transformRef:this.transformRef,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult,dereferenceRemote:this.dereferenceRemote,dereferenceInline:this.dereferenceInline,ctx:this.ctx})})),this.lookupAndResolveUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{val:t,ref:r,resolvingPointer:n,parentPointer:i,pointerStack:s}=e,a=e.parentPath?e.parentPath.slice():[],u=this.computeUriCacheKey(r),l={uri:r,pointerStack:s,targetPath:n===i?[]:a};if(this.uriStack.includes(u))return l.resolved={result:t,graph:this.graph,refMap:{},errors:[],runner:this},l;{let e;const n=this.baseUri.toString(),i=n&&0!==this.depth?n:null;try{if(this.atMaxUriDepth())throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`);e=yield this.lookupUri({ref:r.clone().fragment(""),fragment:r.fragment(),cacheKey:u,parentPath:a}),i&&(e.uriStack=e.uriStack.concat(i))}catch(f){l.error={code:"RESOLVE_URI",message:String(f),uri:r,uriStack:i?this.uriStack.concat(i):this.uriStack,pointerStack:s,path:a}}if(e&&(l.resolved=yield e.resolve({jsonPointer:d.uriToJSONPointer(r),parentPath:a}),l.resolved.errors.length))for(const s of l.resolved.errors)if("POINTER_MISSING"===s.code&&s.path.join("/")===r.fragment().slice(1)){const e=r.fragment?(0,o.trimStart)(s.path,(0,o.trimStart)(r.fragment(),"/").split("/")):s.path;e&&e.length?c(l.resolved.result,e,t):l.resolved.result&&(l.resolved.result=t)}}return l})),this.id=g+=1,this.depth=a.depth||0,this._source=e,this.resolvers=a.resolvers||{};const u=a.baseUri||"";let p=new l(u||"");this.isFile(p)&&(p=new l((0,i.toFSPath)(u))),this.baseUri=p,this.uriStack=a.uriStack||[],this.uriCache=a.uriCache||new h.Cache,this.root=a.root&&a.root.toString()||this.baseUri.toString()||"root",this.graph=r,this.graph.hasNode(this.root)||this.graph.addNode(this.root,{refMap:{},data:this._source}),this.baseUri&&0===this.depth&&this.uriCache.set(this.computeUriCacheKey(this.baseUri),this),this.getRef=a.getRef||t.defaultGetRef,this.transformRef=a.transformRef,this.depth?this.dereferenceInline=!0:this.dereferenceInline=void 0===a.dereferenceInline||a.dereferenceInline,this.dereferenceRemote=void 0===a.dereferenceRemote||a.dereferenceRemote,this.parseResolveResult=a.parseResolveResult,this.transformDereferenceResult=a.transformDereferenceResult,this.ctx=a.ctx,this.lookupUri=m(this.lookupUri,{serializer:this._cacheKeySerializer,cache:{create:()=>this.uriCache}})}get source(){return this._source}resolve(e){return n.__awaiter(this,void 0,void 0,(function*(){const t={result:this.source,graph:this.graph,refMap:{},errors:[],runner:this};let r;const n=e&&e.jsonPointer&&e.jsonPointer.trim();if(n&&"#"!==n&&"#/"!==n){try{r=(0,o.pointerToPath)(n)}catch(f){return t.errors.push({code:"PARSE_POINTER",message:`'${n}' JSON pointer is invalid`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:[]}),t}t.result=u(t.result,r)}if(void 0===t.result)return t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist @ '${this.baseUri.toString()}'`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:r||[]}),t;const i=new p.ResolveCrawler(this,n,t);i.computeGraph(t.result,r,n||"");let s=[];if(i.resolvers.length&&(s=yield Promise.all(i.resolvers)),s.length)for(const e of s){let n=e.targetPath;n.length||(n=r||[]),t.refMap[String(this.baseUri.clone().fragment((0,o.pathToPointer)(n)))]=String(e.uri),this._setGraphNodeEdge(String(this.root),(0,o.pathToPointer)(n),String(e.uri)),e.error&&t.errors.push(e.error),e.resolved&&(e.resolved.errors&&(t.errors=t.errors.concat(e.resolved.errors)),void 0!==e.resolved.result&&(this._source=(0,a.default)(this._source,(t=>{if(e.resolved){if(!n.length)return e.resolved.result;c(t,n,e.resolved.result),this._setGraphNodeData(String(e.uri),e.resolved.result)}}))))}if("object"==typeof this._source?(this.dereferenceInline&&(this._source=(0,a.default)(this._source,(e=>{let r=[];try{r=i.pointerGraph.overallOrder();for(const n of r){const r=i.pointerGraph.dependantsOf(n);if(!r.length)continue;const s=(0,o.pointerToPath)(n),l=0===s.length?(0,a.original)(e):u(e,s);for(const a of r){let r;const u=(0,o.pointerToPath)(a),f=i.pointerStemGraph.dependenciesOf(n);for(const e of f)if((0,o.startsWith)(u,(0,o.pointerToPath)(e))){r=!0;break}r||(t.refMap[(0,o.pathToPointer)(u)]=(0,o.pathToPointer)(s),this._setGraphNodeEdge(this.root,(0,o.pathToPointer)(u),(0,o.pathToPointer)(s)),void 0!==l?(c(e,u,l),this._setGraphNodeData((0,o.pathToPointer)(s),l)):t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist`,path:u,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[]}))}}}catch(n){}}))),t.result=r?u(this._source,r):this._source):t.result=this._source,this.transformDereferenceResult){const o=new l(n||"");try{const{result:r,error:n}=yield this.transformDereferenceResult({source:this.source,result:t.result,targetAuthority:o,parentAuthority:this.baseUri,parentPath:e&&e.parentPath||[],fragment:o.fragment()});if(t.result=r,n)throw new Error(`Could not transform dereferenced result for '${o.toString()}' - ${String(n)}`)}catch(h){t.errors.push({code:"TRANSFORM_DEREFERENCED",message:`Error: Could not transform dereferenced result for '${this.baseUri.toString()}${""!==o.fragment()?`#${o.fragment()}`:""}' - ${String(h)}`,uri:o,uriStack:this.uriStack,pointerStack:[],path:r})}}return this._setGraphNodeData(this.root,this._source),t}))}_cacheKeySerializer(e){return e&&"object"==typeof e&&e.cacheKey?e.cacheKey:JSON.stringify(arguments)}computeUriCacheKey(e){return e.clone().fragment("").toString()}isFile(e){const t=e.scheme();if("file"===t)return!0;if(t){if(!this.resolvers[t])return!0}else{if("/"===e.toString().charAt(0))return!0;if(this.baseUri){const e=this.baseUri.scheme();return Boolean(!e||"file"===e||!this.resolvers[e])}}return!1}_setGraphNodeData(e,t){if(!this.graph.hasNode(e))return;const r=this.graph.getNodeData(e)||{};r.data=t,this.graph.setNodeData(e,r)}_setGraphNodeEdge(e,t,r){if(!this.graph.hasNode(e))return;const n=this.graph.getNodeData(e)||{};n.refMap=n.refMap||{},n.refMap[t]=r,this.graph.setNodeData(e,n)}}t.ResolveRunner=y},32735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedURI=void 0;const n=r(84193);t.ExtendedURI=class extends n{constructor(e){super(e),this._value=e.trim()}get length(){return this._value.length}}},26672:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uriIsJSONPointer=t.uriToJSONPointer=t.addToJSONPointer=void 0;const r=(e,t,r)=>{const n=e.toString();let o="",i=n,s=0,a=i.indexOf(t);for(;a>-1;)o+=n.substring(s,s+a)+r,i=i.substring(a+t.length,i.length),s+=a+t.length,a=i.indexOf(t);return i.length>0&&(o+=n.substring(n.length-i.length,n.length)),o};t.addToJSONPointer=(e,t)=>{return`${e}/${n=t,r(r(n,"~","~0"),"/","~1")}`;var n};t.uriToJSONPointer=e=>"length"in e&&0===e.length?"":""!==e.fragment()?`#${e.fragment()}`:""===e.href()?"#":"";t.uriIsJSONPointer=e=>(!("length"in e)||e.length>0)&&""===e.path()},2535:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BUNDLE_ROOT:()=>ne,ERRORS_ROOT:()=>oe,KEYS:()=>Ne,bundleTarget:()=>ie,decodePointer:()=>H,decodePointerFragment:()=>ae,decodePointerUriFragment:()=>H,decycle:()=>ue,encodePointer:()=>ce,encodePointerFragment:()=>L,encodePointerUriFragment:()=>F,encodeUriPointer:()=>U,extractPointerFromRef:()=>le,extractSourceFromRef:()=>Z,getFirstPrimitiveProperty:()=>fe,getJsonPathForPosition:()=>he,getLastPathSegment:()=>pe,getLocationForJsonPath:()=>de,hasRef:()=>I,isExternalRef:()=>Q,isLocalRef:()=>R,isPlainObject:()=>j,parseTree:()=>ge,parseWithPointers:()=>me,pathToPointer:()=>B,pointerToPath:()=>W,remapRefs:()=>J,renameObjectKey:()=>_e,reparentBundleTarget:()=>xe,resolveExternalRef:()=>Se,resolveExternalRefWithLocation:()=>Ae,resolveInlineRef:()=>te,resolveInlineRefWithLocation:()=>re,safeParse:()=>$e,safeStringify:()=>Oe,startsWith:()=>Pe,stringify:()=>je,toPropertyPath:()=>Ce,trapAccess:()=>Re,traverse:()=>G,trimStart:()=>Me});var n,o=r(2543),i=r(58851);function s(e,t){void 0===t&&(t=!1);var r=e.length,n=0,o="",i=0,s=16,l=0,f=0,h=0,p=0,d=0;function m(t,r){for(var o=0,i=0;o=48&&s<=57)i=16*i+s-48;else if(s>=65&&s<=70)i=16*i+s-65+10;else{if(!(s>=97&&s<=102))break;i=16*i+s-97+10}n++,o++}return o=r)return i=r,s=17;var t=e.charCodeAt(n);if(a(t)){do{n++,o+=String.fromCharCode(t),t=e.charCodeAt(n)}while(a(t));return s=15}if(u(t))return n++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,o+="\n"),l++,h=n,s=14;switch(t){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,o=function(){for(var t="",o=n;;){if(n>=r){t+=e.substring(o,n),d=2;break}var i=e.charCodeAt(n);if(34===i){t+=e.substring(o,n),n++;break}if(92!==i){if(i>=0&&i<=31){if(u(i)){t+=e.substring(o,n),d=2;break}d=6}n++}else{if(t+=e.substring(o,n),++n>=r){d=2;break}switch(e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var s=m(4,!0);s>=0?t+=String.fromCharCode(s):d=4;break;default:d=5}o=n}}return t}(),s=10;case 47:var g=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n=12&&e<=15);return e}:g,getToken:function(){return s},getTokenValue:function(){return o},getTokenOffset:function(){return i},getTokenLength:function(){return n-i},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return i-p},getTokenError:function(){return d}}}function a(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function u(e){return 10===e||13===e||8232===e||8233===e}function c(e){return e>=48&&e<=57}function l(e,t,r){void 0===r&&(r=n.DEFAULT);var o=s(e,!1);function i(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function a(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}var u=i(t.onObjectBegin),c=a(t.onObjectProperty),l=i(t.onObjectEnd),f=i(t.onArrayBegin),h=i(t.onArrayEnd),p=a(t.onLiteralValue),d=a(t.onSeparator),m=i(t.onComment),g=a(t.onError),y=r&&r.disallowComments,v=r&&r.allowTrailingComma;function b(){for(;;){var e=o.scan();switch(o.getTokenError()){case 4:_(14);break;case 5:_(15);break;case 3:_(13);break;case 1:y||_(11);break;case 2:_(12);break;case 6:_(16)}switch(e){case 12:case 13:y?_(10):m();break;case 16:_(1);break;case 15:case 14:break;default:return e}}}function _(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=[]),g(e),t.length+r.length>0)for(var n=o.getToken();17!==n;){if(-1!==t.indexOf(n)){b();break}if(-1!==r.indexOf(n))break;n=b()}}function w(e){var t=o.getTokenValue();return e?p(t):c(t),b(),!0}function x(){switch(o.getToken()){case 3:return function(){f(),b();for(var e=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||_(4,[],[]),d(","),b(),4===o.getToken()&&v)break}else e&&_(6,[],[]);x()||_(4,[],[4,5]),e=!0}return h(),4!==o.getToken()?_(8,[4],[]):b(),!0}();case 1:return function(){u(),b();for(var e=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||_(4,[],[]),d(","),b(),2===o.getToken()&&v)break}else e&&_(6,[],[]);(10!==o.getToken()?(_(3,[],[2,5]),0):(w(!1),6===o.getToken()?(d(":"),b(),x()||_(4,[],[2,5])):_(5,[],[2,5]),1))||_(4,[],[2,5]),e=!0}return l(),2!==o.getToken()?_(7,[2],[]):b(),!0}();case 10:return w(!0);default:return function(){switch(o.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(o.getTokenValue()))&&(_(2),e=0)}catch(t){_(2)}p(e);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return b(),!0}()}}return b(),17===o.getToken()?!!r.allowEmptyContent||(_(4,[],[]),!1):x()?(17!==o.getToken()&&_(9,[],[]),!0):(_(4,[],[]),!1)}!function(e){e.DEFAULT={allowTrailingComma:!1}}(n||(n={}));var f=s,h=function e(t,r,n){if(void 0===n&&(n=!1),function(e,t,r){return void 0===r&&(r=!1),t>=e.offset&&t"}const g=`__object_order_${Math.floor(Date.now()/36e5)}__`,y=Symbol.for(g),v=(String(y),{defineProperty:(e,t,r)=>(!Object.prototype.hasOwnProperty.call(e,t)&&y in e?e[y].push(t):"value"in r&&t===y&&-1===r.value.lastIndexOf(y)&&r.value.push(y),Reflect.defineProperty(e,t,r)),deleteProperty(e,t){const r=Object.prototype.hasOwnProperty.call(e,t),n=Reflect.deleteProperty(e,t);if(n&&r&&y in e){const r=e[y].indexOf(t);-1!==r&&e[y].splice(r,1)}return n},ownKeys:e=>y in e?e[y]:Reflect.ownKeys(e),set(e,t,r){const n=Object.prototype.hasOwnProperty.call(e,t),o=Reflect.set(e,t,r);return o&&!n&&y in e&&e[y].push(t),o}});function b(e,t=Reflect.ownKeys(e)){x(e);const r=new Proxy(e,v);return function(e,t){y in e?(e[y].length=0,e[y].push(...t)):Reflect.defineProperty(e,y,{configurable:!0,value:t})}(r,t),r}function _(e){return null!==e&&"object"==typeof e}function w(e){if(!_(e))return!1;if(void 0!==e[Symbol.toStringTag]){const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}return"Object"===function(e){const t=e[Symbol.toStringTag];if("string"==typeof t)return t;const r=Reflect.apply(Object.prototype.toString,e,[]);return r.slice(8,r.length-1)}(e)}function x(e,t){if(function(){if("undefined"==typeof process||!_(process)||!_(process.env))return!1;return!1}()&&!w(e))throw new TypeError(t)}var E,S,A,$,k;!function(e){e.None="none",e.Declared="declared",e.InheritedFromService="inheritedFromService"}(E||(E={})),function(e){e.Unspecified="unspecified",e.Simple="simple",e.Matrix="matrix",e.Label="label",e.Form="form",e.CommaDelimited="commaDelimited",e.SpaceDelimited="spaceDelimited",e.PipeDelimited="pipeDelimited",e.DeepObject="deepObject",e.TabDelimited="tabDelimited"}(S||(S={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information",e[e.Hint=3]="Hint"}(A||(A={})),function(e){e.Article="article",e.HttpService="http_service",e.HttpServer="http_server",e.HttpOperation="http_operation",e.HttpCallback="http_callback",e.Model="model",e.Generic="generic",e.Unknown="unknown",e.TableOfContents="table_of_contents",e.SpectralRuleset="spectral_ruleset",e.Styleguide="styleguide",e.Image="image",e.StoplightResolutions="stoplight_resolutions",e.StoplightOverride="stoplight_override"}($||($={})),function(e){e.Json="json",e.Markdown="markdown",e.Yaml="yaml",e.Javascript="javascript",e.Apng="apng",e.Avif="avif",e.Bmp="bmp",e.Gif="gif",e.Jpeg="jpeg",e.Png="png",e.Svg="svg",e.Webp="webp"}(k||(k={}));var O=r(12068),P=r.n(O);function j(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype||"function"==typeof e.constructor&&Function.toString.call(Object)===Function.toString.call(e.constructor)}function C(e,t,r){if(!j(e)&&!Array.isArray(e)||!(t in e))throw new ReferenceError(`Could not resolve '${r}'`)}function T(e){if("string"!=typeof e.$ref)throw new TypeError("$ref should be a string")}const N=e=>j(e)&&"$ref"in e,I=e=>N(e)&&"string"==typeof e.$ref,R=e=>e.length>0&&("#"===e||/^#\S*$/.test(e)),M=(e,t,r)=>{const n=e.toString();let o="",i=n,s=0,a=i.indexOf(t);for(;a>-1;)o+=n.substring(s,s+a)+r,i=i.substring(a+t.length,i.length),s+=a+t.length,a=i.indexOf(t);return i.length>0&&(o+=n.substring(n.length-i.length,n.length)),o},L=e=>"number"==typeof e?e:M(M(e,"~","~0"),"/","~1"),D=/[^a-zA\u2013Z0\u20139_.!~*'()\/\-\u{D800}-\u{DFFF}]/gu;function U(e){return e.replace(D,encodeURIComponent)}const F=e=>{const t=L(e);return"number"==typeof t?t:U(t)},B=e=>z(e),z=e=>{if(e&&"object"!=typeof e)throw new TypeError("Invalid type: path must be an array of segments.");return 0===e.length?"#":`#/${e.map(F).join("/")}`};function q(e){try{return decodeURIComponent(e)}catch(t){return e}}const V=/%[0-9a-f]+/gi,H=e=>{let t;try{t=decodeURIComponent(e)}catch(r){t=e.replace(V,q)}return M(M(t,"~1","/"),"~0","~")},W=e=>K(e),K=e=>{if("string"!=typeof e)throw new TypeError("Invalid type: JSON Pointers are represented as strings.");if(0===e.length||"#"!==e[0])throw new URIError("Invalid JSON Pointer syntax; URI fragment identifiers must begin with a hash.");if(1===e.length)return[];if("/"!==e[1])throw new URIError("Invalid JSON Pointer syntax.");return(e=>{const t=e.length,r=[];let n=-1;for(;++n{const n={value:e,path:r};t.onEnter&&t.onEnter(n);for(const o of Object.keys(e)){const n=e[o];t.onProperty&&t.onProperty({parent:e,parentPath:r,property:o,propertyValue:n}),"object"==typeof n&&null!==n&&Y(n,t,r.concat(o))}t.onLeave&&t.onLeave(n)},G=(e,t)=>{"object"==typeof e&&null!==e&&Y(e,"function"==typeof t?{onProperty:t}:t,[])};function J(e,t,r){G(e,{onProperty({property:e,propertyValue:n,parent:o}){"$ref"===e&&"string"==typeof n&&n.startsWith(t)&&(o.$ref=`${r}${n.slice(t.length)}`)}})}const Q=e=>e.length>0&&"#"!==e[0],Z=e=>{if("string"!=typeof e||0===e.length||!Q(e))return null;const t=e.indexOf("#");return-1===t?e:e.slice(0,t)};function X(e,t){return j(t)&&j(e)&&("summary"in e||"description"in e)?Object.assign(Object.assign(Object.assign({},t),"description"in e?{description:e.description}:null),"summary"in e?{summary:e.summary}:null):t}function*ee(e,t,r){N(e.value)&&(T(e.value),yield[-1,e.value]);for(const[n,o]of t.entries())C(e.value,o,r),e.value=e.value[o],N(e.value)&&(T(e.value),yield[n,e.value])}function te(e,t){return re(e,t).value}function re(e,t){return function e(t,r,n,o){if(null!==Z(r))throw new ReferenceError("Cannot resolve external references");const i=W(r);let s=[...i];"#"===r&&N(t)&&(T(t),i.unshift(...W(t.$ref)));const a={value:t};for(const[u,c]of ee(a,i,r)){if(n.includes(c))return{source:null,location:null!=o?o:s,value:n[n.length-1]};n.push(c);const r=e(t,c.$ref,n,s);a.value=r.value,(s=r.location).push(...i.slice(u+1))}return{source:null,location:s,value:n.length>0?X(n[n.length-1],a.value):a.value}}(e,t,[])}const ne="#/__bundled__",oe="#/__errors__",ie=({document:e,path:t,bundleRoot:r="#/__bundled__",errorsRoot:n="#/__errors__",cloneDocument:i=!0,keyProvider:s},a)=>{if(t===r||t===n)throw new Error("Roots do not make any sense");const u=i?(0,o.cloneDeep)(e):e;return se(u,W(r),W(n),t,s)(t,{[t]:!0},a)},se=(e,t,r,n,i)=>{const s=new Set,a=(u,c,l,f={},h={},p={})=>{const d=W(u),m=(0,o.get)(e,d);G(l||m,{onEnter:({value:r})=>{if(I(r)&&R(r.$ref)){const l=r.$ref;if(p[l])return;if(l===u&&(f[l]="#"),f[l])return void(r.$ref=f[l]);let d,m,g,y,v;try{let r;d=W(l),i&&(r=i({document:e,path:d})),r||(r=(({document:e,path:t})=>0===t.length?"root":Array.isArray((0,o.get)(e,t.slice(0,-1)))?`${t[t.length-2]}_${t[t.length-1]}`:String(t[t.length-1]))({document:e,path:d})),g=r;let n=1;for(;s.has(g);)if(g=`${r}_${++n}`,n>20)throw new Error(`Keys ${r}_2 through ${r}_20 already taken.`);s.add(g),m=[...t,g],y=B(m)}catch(e){p[l]=e instanceof Error?e.message:String(e)}if(!d||!m||!y)return;if("object"==typeof e&&null!==e&&!(v=(0,o.get)(e,d)))try{v=te(Object(e),l)}catch(e){}void 0!==v&&(f[l]=y,r.$ref=y,(0,o.has)(h,m)||(Array.isArray(v)?(0,o.set)(h,m,new Array(v.length).fill(null)):"object"==typeof v&&(0,o.setWith)(h,m,{},Object),(0,o.set)(h,m,v),"#"===l?function(e,t,r,n){const i=r.map((e=>`[${JSON.stringify(e)}]`)).join(""),s=JSON.parse(JSON.stringify((0,o.omit)(Object(e),i))),a={};(0,o.set)(t,n,s),(0,o.set)(s,r,a),J(s,"#",B(n)),a.$ref="#"}(e,h,W(n),m):c[l]||(c[l]=!0,a(u,c,v,f,h,p),c[l]=!1)))}}});const g=(0,o.get)(h,t);return g&&Object.keys(g).length&&(0,o.set)(m,t,g),(Object.keys(p).length||(0,o.has)(e,r))&&(0,o.set)(m,r,(0,o.has)(e,r)?(0,o.get)(e,r):p),m};return a},ae=e=>M(M(e,"~1","/"),"~0","~"),ue=(e,t)=>{const r=new WeakMap;return function e(n,o){let i;if(t&&(n=t(n)),j(n)||Array.isArray(n)){const t=r.get(n);return t?{$ref:t}:(r.set(n,B(o)),Array.isArray(n)?i=n.map(((t,r)=>e(t,[...o,String(r)]))):(i={},Object.keys(n).forEach((t=>{i[t]=e(n[t],[...o,t])}))),r.delete(n),i)}return n}(e,[])},ce=e=>M(M(e,"~","~0"),"//","/~1"),le=e=>{if("string"!=typeof e||0===e.length)return null;const t=e.indexOf("#");return-1===t?null:e.slice(t)},fe=e=>{const t=f(e,!0);if(t.scan(),1!==t.getToken())return;if(t.scan(),2===t.getToken())return;if(10!==t.getToken())throw new SyntaxError("Unexpected character");const r=t.getTokenValue();if(t.scan(),6!==t.getToken())throw new SyntaxError("Colon expected");switch(t.scan(),t.getToken()){case 10:return[r,t.getTokenValue()];case 11:return[r,Number(t.getTokenValue())];case 8:return[r,!0];case 9:return[r,!1];case 7:return[r,null];case 16:throw new SyntaxError("Unexpected character");case 17:throw new SyntaxError("Unexpected end of file");default:return}},he=({lineMap:e,ast:t},r)=>{const n=e[r.line],o=e[r.line+1];if(void 0===n)return;const i=h(t,void 0===o?n+r.character:Math.min(o,n+r.character),!0);if(void 0===i)return;const s=p(i);return 0!==s.length?s:void 0};function pe(e){return ae(e.split("/").pop()||"")}const de=({ast:e},t,r=!1)=>{const n=function(e,t,r){e:for(const n of t){const t=Number.isInteger(Number(n))?Number(n):n;if("string"==typeof t||"number"==typeof t&&"array"!==e.type){if("object"!==e.type||!Array.isArray(e.children))return r?e:void 0;for(const r of e.children)if(Array.isArray(r.children)&&r.children[0].value===String(t)&&2===r.children.length){e=r.children[1];continue e}return r?e:void 0}if("array"!==e.type||t<0||!Array.isArray(e.children)||t>=e.children.length)return r?e:void 0;e=e.children[t]}return e}(e,t,r);if(void 0!==n&&void 0!==n.range)return{range:n.range}},me=(e,t={disallowComments:!0})=>{const r=[],{ast:n,data:o,lineMap:i}=ge(e,r,t);return{data:o,diagnostics:r,ast:n,lineMap:i}};function ge(e,t=[],r){const n=ve(e);let o={type:"array",offset:-1,length:-1,children:[],parent:void 0},i=null,s=[];const a=new WeakMap,u=[];function c(e){"property"===o.type&&(o.length=e-o.offset,o=o.parent)}function l(e,t,r){return{start:{line:e,character:t},end:{line:e,character:t+r}}}function f(e){return o.children.push(e),e}function h(e){Array.isArray(s)?s.push(e):null!==i&&(s[i]=e)}function p(e){h(e),u.push(s),s=e,i=null}function g(){s=u.pop()}d(e,{onObjectBegin:(e,t,n,i)=>{o=f({type:"object",offset:e,length:-1,parent:o,children:[],range:l(n,i,t)}),!1===r.ignoreDuplicateKeys&&a.set(o,[]),p(function(e){return e?b({}):{}}(!0===r.preserveKeyOrder))},onObjectProperty:(e,n,u,c,h)=>{if((o=f({type:"property",offset:n,length:-1,parent:o,children:[]})).children.push({type:"string",value:e,offset:n,length:u,parent:o}),!1===r.ignoreDuplicateKeys){const r=a.get(o.parent);r&&(0!==r.length&&r.includes(e)?t.push({range:l(c,h,u),message:"DuplicateKey",severity:A.Error,path:be(o),code:20}):r.push(e))}!0===r.preserveKeyOrder&&function(e,t){if(!(t in e))return;const r=e[y],n=r.indexOf(t);-1!==n&&(r.splice(n,1),r.push(t))}(s,e),i=e},onObjectEnd:(e,t,n,i)=>{!1===r.ignoreDuplicateKeys&&a.delete(o),o.length=e+t-o.offset,o.range&&(o.range.end.line=n,o.range.end.character=i+t),o=o.parent,c(e+t),g()},onArrayBegin:(e,t,r,n)=>{o=f({type:"array",offset:e,length:-1,parent:o,children:[],range:l(r,n,t)}),p([])},onArrayEnd:(e,t,r,n)=>{o.length=e+t-o.offset,o.range&&(o.range.end.line=r,o.range.end.character=n+t),o=o.parent,c(e+t),g()},onLiteralValue:(e,t,r,n,i)=>{f({type:ye(e),offset:t,length:r,parent:o,value:e,range:l(n,i,r)}),c(t+r),h(e)},onSeparator:(e,t)=>{"property"===o.type&&(":"===e?o.colonOffset=t:","===e&&c(t))},onError:(e,r,n,o,i)=>{t.push({range:l(o,i,n),message:m(e),severity:A.Error,code:e})}},r);const v=o.children[0];return v&&delete v.parent,{ast:v,data:s[0],lineMap:n}}function ye(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}const ve=e=>{const t=[0];let r=0;for(;r{if(!e||!Object.hasOwnProperty.call(e,t)||t===r)return e;const n={};for(const[o,i]of Object.entries(e))o===t?n[r]=i:o in n||(n[o]=i);return n};function we(e){return j(e)||Array.isArray(e)}function xe(e,t,r){if(r.length<=1||t.length<=1)throw Error("Source/target path must not be empty and point at root");if(0===t.indexOf(r))throw Error("Target path cannot be contained within source");const n=W(t);let o=e;for(const a of n){if(!we(o))return;o=o[a]}if(!we(o))return;const i=W(r);let s=e;for(const[a,u]of i.entries()){if(!we(s)||u in s)return;const e=a===i.length-1?o:{};s[u]=e,s=e}delete e[n[0]],function e(t,r,n){for(const o of Object.keys(t)){const i=t[o];if("$ref"!==o)we(i)&&e(i,r,n);else{if("string"!=typeof i||!R(i))continue;0===i.indexOf(r)&&(t[o]=i.replace(r,n))}}}(e,t,r)}async function Ee(e,t,r,n,o){let s=function(e,t){const r=Z(t);return null===r?e:(0,i.isAbsolute)(r)?r:(0,i.join)((0,i.dirname)(e),r)}(t,r);const a=le(r)||"#",u=await e[s],c=W(a);let l=[...c];const f={value:u};for(const[i,h]of ee(f,c,a)){if(n.includes(h))return{source:t,location:null!=o?o:l,value:n[n.length-1]};n.push(h);const r=await Ee(e,s,h.$ref,n,l);({source:s,location:l}=r),f.value=r.value,l.push(...c.slice(i+1))}return{source:s,location:l,value:n.length>0?X(n[n.length-1],f.value):f.value}}async function Se(e,t,r){return(await Ae(e,t,r)).value}function Ae(e,t,r){return Ee(e,t,r,[])}const $e=(e,t)=>{if("string"!=typeof e)return e;try{const r=ke(e);return"string"==typeof r?r:JSON.parse(e,t)}catch(e){return}},ke=e=>{const t=Number(e);return Number.isFinite(t)?String(t)===e?t:e:NaN},Oe=(e,t,r)=>{if("string"==typeof e)return e;try{return JSON.stringify(e,t,r)}catch(n){return P()(e,t,r)}},Pe=(e,t)=>{if(e instanceof Array){if(t instanceof Array){if(t.length>e.length)return!1;for(const r in t){if(!t.hasOwnProperty(r))continue;const n=parseInt(e[r]),o=parseInt(t[r]);if(isNaN(n)&&isNaN(o)){if(e[r]!==t[r])return!1}else if(n!==o)return!1}}}else{if("string"!=typeof e)return!1;if("string"==typeof t)return e.startsWith(t)}return!0},je=(e,t,r)=>{const n=Oe(e,t,r);if(void 0===n)throw new Error("The value could not be stringified");return n};function Ce(e){return e.replace(/^(\/|#\/)/,"").split("/").map(ae).map(Te).join(".")}function Te(e){return e.includes(".")?`["${e.replace(/"/g,'\\"')}"]`:e}const Ne=Symbol.for(g),Ie={ownKeys:e=>Ne in e?e[Ne]:Reflect.ownKeys(e)},Re=e=>new Proxy(e,Ie);function Me(e,t){if("string"==typeof e&&"string"==typeof t)return(0,o.trimStart)(e,t);if(!(e&&Array.isArray(e)&&e.length&&t&&Array.isArray(t)&&t.length))return e;let r=0;for(const n in e)if(e.hasOwnProperty(n)){if(e[n]!==t[n])break;r++}return e.slice(r)}},58851:(e,t,r)=>{"use strict";function n(e){let t="";return e.absolute&&("file"===e.protocol?(e.drive&&(t+=e.drive),t+="/"):(t+=e.protocol+"://",e.origin&&(t+=e.origin+"/"))),""===(t+=e.path.join("/"))&&(t="."),t}function o(e,t,r,n){this.message=e,this.expected=t,this.found=r,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,o)}r.r(t),r.d(t,{basename:()=>l,deserializeSrn:()=>w,dirname:()=>f,extname:()=>h,format:()=>n,isAbsolute:()=>p,isURL:()=>d,join:()=>m,normalize:()=>a,parse:()=>s,relative:()=>g,resolve:()=>y,sep:()=>v,serializeSrn:()=>x,startsWithWindowsDrive:()=>b,stripRoot:()=>_,toFSPath:()=>a}),function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(o,Error),o.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;tY&&(Y=W,G=[]),G.push(e))}function te(){var t;return(t=function(){var e,t,r,n,o;return e=W,(t=re())!==a&&(r=ne())!==a&&(n=ie())!==a&&(o=se())!==a?e=t=l(t,r,n,o):(W=e,e=a),e===a&&(e=W,(t=re())!==a&&(r=ne())!==a&&(n=function(){var e;return(e=v)!==a&&(e=N()),e}())!==a?e=t=f(t,r,n):(W=e,e=a)),e}())===a&&(t=function(){var t,r,n,o;return t=W,(r=function(){var t;return e.substr(W,7).toLowerCase()===w?(t=e.substr(W,7),W+=7):(t=a,ee(x)),t===a&&(e.substr(W,5).toLowerCase()===E?(t=e.substr(W,5),W+=5):(t=a,ee(S))),t!==a&&(t=A()),t}())!==a&&(n=oe())!==a&&(o=se())!==a?t=r=_(r,n,o):(W=t,t=a),t}())===a&&(t=function(){var e,t,r;return e=W,(t=oe())!==a&&(r=se())!==a?e=t=$(t,r):(W=e,e=a),e}())===a&&(t=function(){var t,r;return t=W,function(){var t;return(t=function(){var t,r,n;return t=W,46===e.charCodeAt(W)?(r=D,W++):(r=a,ee(U)),r!==a&&(n=ue())!==a?t=r=[r,n]:(W=t,t=a),t}())===a&&(t=v),t}()!==a&&(r=se())!==a?t=I(r):(W=t,t=a),t}()),t}function re(){var t,r;return e.substr(W,7).toLowerCase()===h?(r=e.substr(W,7),W+=7):(r=a,ee(p)),r!==a&&(r=d()),(t=r)===a&&(t=function(){var t;return e.substr(W,8).toLowerCase()===m?(t=e.substr(W,8),W+=8):(t=a,ee(g)),t!==a&&(t=y()),t}()),t}function ne(){var t,r,n;if(t=W,r=[],(n=ce())!==a)for(;n!==a;)r.push(n),n=ce();else r=a;return(t=r!==a?e.substring(t,W):r)===a&&(t=W,(r=v)!==a&&(r=b()),t=r),t}function oe(){var t;return(t=function(){var t,r,n,o;return t=W,(r=ue())===a&&(r=null),r!==a?(k.test(e.charAt(W))?(n=e.charAt(W),W++):(n=a,ee(O)),n!==a?(58===e.charCodeAt(W)?(o=P,W++):(o=a,ee(j)),o!==a&&ue()!==a?t=r=C(n):(W=t,t=a)):(W=t,t=a)):(W=t,t=a),t}())===a&&(t=ie()),t}function ie(){var e;return(e=ue())!==a&&(e=T()),e}function se(){var e;return(e=function e(){var t,r,n;return t=W,(r=ae())!==a&&ue()!==a&&(n=e())!==a?t=r=M(r,n):(W=t,t=a),t===a&&(t=W,(r=ae())!==a&&(r=L(r)),t=r),t}())!==a&&(e=R(e)),e}function ae(){var t,r,n;if(t=W,r=[],(n=ce())!==a)for(;n!==a;)r.push(n),n=ce();else r=a;return(t=r!==a?e.substring(t,W):r)===a&&(t=v),t}function ue(){var t;return 47===e.charCodeAt(W)?(t=F,W++):(t=a,ee(B)),t===a&&(92===e.charCodeAt(W)?(t=z,W++):(t=a,ee(q))),t}function ce(){var t;return V.test(e.charAt(W))?(t=e.charAt(W),W++):(t=a,ee(H)),t}if((r=c())!==a&&W===e.length)return r;throw r!==a&&W""!==e&&"."!==e));const r=[];for(const n of t)".."===n&&r.length&&".."!==r[r.length-1]?r.pop():".."===n&&e.absolute||r.push(n);return e.path=r,e}function c(e){let t=e.lastIndexOf(".");".."===e&&(t=-1),"."===e&&(t=-1);let r=e,n="";return t>0&&(r=e.slice(0,t),n=e.slice(t)),{name:r,ext:n}}const l=(e,t)=>{const r=u(s(e)).path.pop();if(!r)return"";const{name:n,ext:o}=c(r);return!0===t||t===o?n:`${n}${o}`},f=e=>{const t=u(s(e));return t.path.pop(),n(u(t))},h=e=>{const t=u(s(e)).path.pop();if(!t)return"";const{ext:r}=c(t);return r};function p(e){return s(e).absolute}function d(e){const t=s(e);return"http"===t.protocol||"https"===t.protocol}const m=(...e)=>{if(0===e.length)return".";const t=e.map(s),r=Object.assign({},t[0]);for(let n=1;nnull!==s(e).drive,_=e=>s(e).path.filter(Boolean).join("/");function w(e){const[t,r,n,...o]=e.split("/"),i=o.length?`/${o.join("/")}`:void 0;let s,a;return i&&(s=o.find((e=>e.includes("."))))&&(a=c(s).ext),{shortcode:t,orgSlug:r,projectSlug:n,uri:i,file:s,ext:a}}function x({shortcode:e,orgSlug:t,projectSlug:r,uri:n=""}){return[e,t,r,n.replace(/^\//,"")].filter(Boolean).join("/")}},63282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=r(4042),o=r(86144),i=r(36653),s=r(72079),a=["/properties"],u="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=r(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var f=r(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var h=r(13558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var p=r(34551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},41520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const r=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(41520),o=r(57845);var i=r(41520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var s=r(57845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class u extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?o.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=C(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=C(this.rhs,e,t),this}get names(){return j(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class l extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class h extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class p extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class d extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=C(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(T(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>P(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends m{}class v extends g{}v.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(N(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=C(this.condition,e,t),this}get names(){const e=super.names;return j(e,this.condition),this.else&&P(e,this.else.names),e}}b.kind="if";class _ extends g{}_.kind="for";class w extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=C(this.iteration,e,t),this}get names(){return P(super.names,this.iteration.names)}}class x extends _{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=j(super.names,this.from);return j(e,this.to)}}class E extends _{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=C(this.iterable,e,t),this}get names(){return P(super.names,this.iterable.names)}}class S extends g{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}S.kind="func";class A extends m{render(e){return"return "+super.render(e)}}A.kind="return";class $ extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&P(e,this.catch.names),this.finally&&P(e,this.finally.names),e}}class k extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}k.kind="catch";class O extends g{render(e){return"finally"+super.render(e)}}O.kind="finally";function P(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function j(e,t){return t instanceof n._CodeOrName?P(e,t.names):e}function C(e,t,r){return e instanceof n.Name?i(e):(o=e)instanceof n._Code&&o._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=i(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function T(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function N(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${L(e)}`}t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new u(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new l(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new d(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new b(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const s=this._scope.toName(e);return this._for(new x(i,s,t,r),(()=>n(s)))}forOf(e,t,r,i=o.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(s,n._`${e}[${t}]`),r(s)}))}return this._for(new E("of",i,s,t),(()=>r(s)))}forIn(e,t,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new E("in",i,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new h(e))}return(e){const t=new A;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new $;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new k(e),t(e)}return r&&(this._currNode=n.finally=new O,this.code(r)),this._endBlockNode(k,O)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,o){return this._blockNode(new S(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=N;const I=M(t.operators.AND);t.and=function(...e){return e.reduce(I)};const R=M(t.operators.OR);function M(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${L(t)} ${e} ${L(r)}`}function L(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(R)}},57845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(41520);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i||(t.UsedValueState=i={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=s;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const u=n._`\n`;t.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?u:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[o];if(s){const e=s.get(i);if(e)return e}else s=this._values[o]=new Map;s.set(i,n);const a=this._scope[o]||(this._scope[o]=[]),u=a.length;return a[u]=t.ref,n.setValue(t,{property:o,itemIndex:u}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},a){let u=n.nil;for(const c in e){const l=e[c];if(!l)continue;const f=s[c]=s[c]||new Map;l.forEach((e=>{if(f.has(e))return;f.set(e,i.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;u=n._`${u}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new o(e);u=n._`${u}${s}${this.opts._n}`}f.set(e,i.Completed)}))}return u}}},48708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(99029),o=r(94227),i=r(42023);function s(e,t){const r=e.const("err",t);e.if(n._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,n._`[${r}]`)),n._`${i.default.vErrors}.push(${r})`),e.code(n._`${i.default.errors}++`)}function a(e,t){const{gen:r,validateName:o,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,o,i){const{it:u}=e,{gen:l,compositeRule:f,allErrors:h}=u,p=c(e,r,o);(null!=i?i:f||h)?s(l,p):a(u,n._`[${p}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:u,compositeRule:l,allErrors:f}=o;s(u,c(e,r,n)),l||f||a(o,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(n._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:o,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const u=e.name("err");e.forRange("i",s,i.default.errors,(s=>{e.const(u,n._`${i.default.vErrors}[${s}]`),e.if(n._`${u}.instancePath === undefined`,(()=>e.assign(n._`${u}.instancePath`,(0,n.strConcat)(i.default.instancePath,a.errorPath)))),e.assign(n._`${u}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${u}.schema`,r),e.assign(n._`${u}.data`,o))}))};const u={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:s}=e,a=[l(s,r),f(e,r)];return function(e,{params:t,message:r},o){const{keyword:s,data:a,schemaValue:c,it:l}=e,{opts:f,propertyName:h,topSchemaRef:p,schemaPath:d}=l;o.push([u.keyword,s],[u.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&o.push([u.message,"function"==typeof r?r(e):r]);f.verbose&&o.push([u.schema,c],[u.parentSchema,n._`${p}${d}`],[i.default.data,a]);h&&o.push([u.propertyName,h])}(e,t,a),o.object(...a)}(e,t,r)}function l({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,o.getErrorPath)(t,o.Type.Str)}`:e;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,r)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let s=i?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,o.getErrorPath)(r,o.Type.Str)}`),[u.schemaPath,s]}},73835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(99029),o=r(13558),i=r(42023),s=r(66939),a=r(94227),u=r(62586);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function l(e){const t=h.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:l}=this.opts,f=new n.CodeGen(this.scope,{es5:a,lines:c,ownProperties:l});let p;e.$async&&(p=f.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const d=f.scopeName("validate");e.validateName=d;const m={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:d,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),(0,u.validateFunctionCode)(m),f.optimize(this.opts.code.optimize);const t=f.toString();g=`${f.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const r=new Function(`${i.default.self}`,`${i.default.scope}`,g)(this,this.scope.get());if(this.scope.value(d,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:d,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(y){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),y}finally{this._compilations.delete(e)}}function f(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:l.call(this,e)}function h(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||d.call(this,e,t)}function d(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let o=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return g.call(this,r,e);const i=(0,s.normalizeId)(n),a=this.refs[i]||this.schemas[i];if("string"==typeof a){const t=d.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||l.call(this,a),i===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,s.resolveUrl)(this.opts.uriResolver,o,n)),new c({schema:t,schemaId:r,root:e,baseId:o})}return g.call(this,r,a)}}t.SchemaEnv=c,t.compileSchema=l,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let i=p.call(this,e,r);if(void 0===i){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;o&&(i=new c({schema:o,schemaId:s,root:e,baseId:t}))}return void 0!==i?e.refs[r]=f.call(this,i):void 0},t.getCompilingSchema=h,t.resolveSchema=d;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const c of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(c)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(c)&&n&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,n))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=d.call(this,n,e)}const{schemaId:u}=this.opts;return i=i||new c({schema:r,schemaId:u,root:n,baseId:t}),i.schema!==i.root.schema?i:void 0}},42023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=o},34551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(66939);class o extends Error{constructor(e,t,r,o){super(o||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=o},66939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(94227),o=r(32017),i=r(7106),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!u(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(u))return!0;if("object"==typeof r&&u(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=c(e))),t===1/0))return 1/0}return t}function l(e,t="",r){!1!==r&&(t=p(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=l,t._getFullPath=f;const h=/#\/?$/;function p(e){return e?e.replace(h,""):""}t.normalizeId=p,t.resolveUrl=function(e,t,r){return r=p(r),e.resolve(t,r)};const d=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=p(e[r]||t),a={"":s},u=l(n,s,!1),c={},f=new Set;return i(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const i=u+t;let s=a[o];function l(t){const r=this.opts.uriResolver.resolve;if(t=p(s?r(s,t):t),f.has(t))throw m(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?h(e,n.schema,t):t!==p(i)&&("#"===t[0]?(h(e,c[t],t),c[t]=e):this.refs[t]=i),t}function g(e){if("string"==typeof e){if(!d.test(e))throw new Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=l.call(this,e[r])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),a[t]=s})),c;function h(e,t,r){if(void 0!==t&&!o(e,t))throw m(r)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},10396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},94227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(99029),o=r(41520);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const i in t)o[i]||d(e,`unknown keyword: "${i}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(i,s,a,u)=>{const c=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(i,s,a):t(i,s,a),a):s instanceof n.Name?(t(i,a,s),s):r(s,a);return u!==n.Name||c instanceof n.Name?c:o(i,c)}}function l(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&f(e,r,t),r}function f(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(i(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,i){if(!i){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(o)}`},t.unescapeFragment=function(e){return u(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=u,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),f(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=l,t.setEvaluated=f;const h={};var p;function d(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:h[t.code]||(h[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(p||(t.Type=p={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===p.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=d},7887:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},28727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(48708),o=r(99029),i=r(42023),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:o}=e,i={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(i,s,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(i.default.data):(t.assign(o._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},10208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(10396),o=r(7887),i=r(48708),s=r(99029),a=r(94227);var u;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(u||(t.DataType=u={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:i}=e,a=function(e,t){return t?e.filter((e=>l.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,o.schemaHasRulesForType)(e,t[0]));if(c){const o=h(t,n,i.strictNumbers,u.Wrong);r.if(o,(()=>{a.length?function(e,t,r){const{gen:n,data:o,opts:i}=e,a=n.let("dataType",s._`typeof ${o}`),u=n.let("coerced",s._`undefined`);"array"===i.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>n.assign(o,s._`${o}[0]`).assign(a,s._`typeof ${o}`).if(h(t,o,i.strictNumbers),(()=>n.assign(u,o)))));n.if(s._`${u} !== undefined`);for(const s of r)(l.has(s)||"array"===s&&"array"===i.coerceTypes)&&c(s);function c(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(u,s._`"" + ${o}`).elseIf(s._`${o} === null`).assign(u,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${o} === null - || (${a} == "string" && ${o} && ${o} == +${o})`).assign(u,s._`+${o}`);case"integer":return void n.elseIf(s._`${a} === "boolean" || ${o} === null - || (${a} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(u,s._`+${o}`);case"boolean":return void n.elseIf(s._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(u,!1).elseIf(s._`${o} === "true" || ${o} === 1`).assign(u,!0);case"null":return n.elseIf(s._`${o} === "" || ${o} === 0 || ${o} === false`),void n.assign(u,null);case"array":n.elseIf(s._`${a} === "string" || ${a} === "number" - || ${a} === "boolean" || ${o} === null`).assign(u,s._`[${o}]`)}}n.else(),d(e),n.endIf(),n.if(s._`${u} !== undefined`,(()=>{n.assign(o,u),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,u)}))}(e,t,a):d(e)}))}return c};const l=new Set(["string","number","integer","boolean","null"]);function f(e,t,r,n=u.Correct){const o=n===u.Correct?s.operators.EQ:s.operators.NEQ;let i;switch(e){case"null":return s._`${t} ${o} null`;case"array":i=s._`Array.isArray(${t})`;break;case"object":i=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return s._`typeof ${t} ${o} ${e}`}return n===u.Correct?i:(0,s.not)(i);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function h(e,t,r,n){if(1===e.length)return f(e[0],t,r,n);let o;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=s._`typeof ${t} != "object"`;o=i.null?e:s._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=s.nil;i.number&&delete i.integer;for(const a in i)o=(0,s.and)(o,f(a,t,r,n));return o}t.checkDataType=f,t.checkDataTypes=h;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,p)}t.reportTypeError=d},7870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(99029),o=r(94227);function i(e,t,r){const{gen:i,compositeRule:s,data:a,opts:u}=e;if(void 0===r)return;const c=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,o.checkStrictMode)(e,`default is ignored for: ${c}`);let l=n._`${c} === undefined`;"empty"===u.useDefaults&&(l=n._`${l} || ${c} === null || ${c} === ""`),i.if(l,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const o in r)i(e,o,r[o].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(e,r,t.default)))}},62586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(28727),o=r(10208),i=r(7887),s=r(10208),a=r(7870),u=r(33673),c=r(24495),l=r(99029),f=r(42023),h=r(66939),p=r(94227),d=r(48708);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,l._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(l._`"use strict"; ${g(r,o)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,l._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,l._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,l._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,l._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,l._`""`),e.var(f.default.parentData,l._`undefined`),e.var(f.default.parentDataProperty,l._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`{}`)}))}(e,o),e.code(i)})):e.func(t,l._`${f.default.data}, ${function(e){return l._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?l._`, ${f.default.dynamicAnchors}={}`:l.nil}}={}`}(o)}`,n.$async,(()=>e.code(g(r,o)).code(i)))}function g(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}function y(e,t){b(e)&&(_(e),v(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&x(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,h.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",f.default.errors);w(e,i),n.var(t,l._`${i} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}function v({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function _(e){(0,p.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return E(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);E(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function x({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(l._`${f.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=l.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(l._`${f.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function E(e,t,r,n){const{gen:o,schema:a,data:u,allErrors:c,opts:h,self:d}=e,{RULES:m}=d;function g(p){(0,i.shouldUseGroup)(a,p)&&(p.type?(o.if((0,s.checkDataType)(p.type,u,h.strictNumbers)),S(e,p),1===t.length&&t[0]===p.type&&r&&(o.else(),(0,s.reportTypeError)(e)),o.endIf()):S(e,p),c||o.if(l._`${f.default.errors} === ${n||0}`))}!a.$ref||!h.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(a,m)?(h.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{$(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)$(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&k(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const n in r){const o=r[n];if("object"==typeof o&&(0,i.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>A(t,e)))&&k(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),o.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):o.block((()=>P(e,"$ref",m.all.$ref.definition)))}function S(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function A(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function $(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(_(e),v(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,(()=>{r.$comment&&t.$comment&&x(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",l._`${r}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(l._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(l._`new ${o}(${f.default.vErrors})`))):(t.assign(l._`${n}.errors`,f.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof l.Name&&e.assign(l._`${t}.props`,r);n instanceof l.Name&&e.assign(l._`${t}.items`,n)}(e),t.return(l._`${f.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class O{constructor(e,t,r){if((0,u.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,r){this.failResult((0,l.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,l.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?d.reportExtraError:d.reportError)(this,this.def.error,t)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:i}=this;r.if((0,l.or)(l._`${n} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(o.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return(0,l.or)(function(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,s.checkDataTypes)(e,t,o.opts.strictNumbers,s.DataType.Wrong)}`}return l.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return l._`!${r}(${t})`}return l.nil}())}subschema(e,t){const r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return y(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function P(e,t,r,n){const o=new O(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,u.funcKeywordCode)(o,r):"macro"in r?(0,u.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,u.funcKeywordCode)(o,r)}t.KeywordCxt=O;const j=/^\/(?:[^~]|~0|~1)*$/,C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return f.default.rootData;if("/"===e[0]){if(!j.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=f.default.rootData}else{const s=C.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(o=s[2],"#"===o){if(a>=t)throw new Error(u("property/index",a));return n[t-a]}if(a>t)throw new Error(u("data",a));if(i=r[t-a],!o)return i}let s=i;const a=o.split("/");for(const c of a)c&&(i=l._`${i}${(0,l.getProperty)((0,p.unescapeJsonPointer)(c))}`,s=l._`${s} && ${i}`);return s;function u(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=T},33673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(99029),o=r(42023),i=r(15765),s=r(48708);function a(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.parentDataProperty}]`)))}function u(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:i,parentSchema:s,it:a}=e,c=t.macro.call(a.self,i,s,a),l=u(r,o,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const f=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:l,schema:f,parentSchema:h,$data:p,it:d}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(d,t);const m=!p&&t.compile?t.compile.call(d.self,f,h,d):t.validate,g=u(c,l,m),y=c.let("valid");function v(r=(t.async?n._`await `:n.nil)){const s=d.opts.passContext?o.default.this:o.default.self,a=!("compile"in t&&!p||!1===t.schema);c.assign(y,n._`${r}${(0,i.callValidateCode)(e,g,s,a)}`,t.modifying)}function b(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&a(e),b((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>v(n._`await `)),(t=>c.assign(y,!1).if(n._`${t} instanceof ${d.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${g}.errors`;return c.assign(e,null),v(n.nil),e}();t.modifying&&a(e),b((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},24495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(99029),o=r(94227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:s,errSchemaPath:a,topSchemaRef:u}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,o.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===s||void 0===a||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:s,topSchemaRef:u,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:s,dataTypes:a,propertyName:u}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:u}=t;l(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,o.getErrorPath)(r,i,u.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}if(void 0!==s){l(s instanceof n.Name?s:c.let("data",s,!0)),void 0!==u&&(e.propertyName=u)}function l(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=r(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(13558),s=r(34551),a=r(10396),u=r(73835),c=r(99029),l=r(66939),f=r(10208),h=r(94227),p=r(63837),d=r(55944),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(e){var t,r,n,o,i,s,a,u,c,l,f,h,p,g,y,v,b,_,w,x,E,S,A,$,k;const O=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,j=!0===P||void 0===P?1:P||0,C=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,T=null!==(o=e.uriResolver)&&void 0!==o?o:d.default;return{strictSchema:null===(s=null!==(i=e.strictSchema)&&void 0!==i?i:O)||void 0===s||s,strictNumbers:null===(u=null!==(a=e.strictNumbers)&&void 0!==a?a:O)||void 0===u||u,strictTypes:null!==(l=null!==(c=e.strictTypes)&&void 0!==c?c:O)&&void 0!==l?l:"log",strictTuples:null!==(h=null!==(f=e.strictTuples)&&void 0!==f?f:O)&&void 0!==h?h:"log",strictRequired:null!==(g=null!==(p=e.strictRequired)&&void 0!==p?p:O)&&void 0!==g&&g,code:e.code?{...e.code,optimize:j,regExp:C}:{optimize:j,regExp:C},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(x=e.schemaId)&&void 0!==x?x:"$id",addUsedSchema:null===(E=e.addUsedSchema)||void 0===E||E,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(A=e.validateFormats)||void 0===A||A,unicodeRegExp:null===($=e.unicodeRegExp)||void 0===$||$,int32range:null===(k=e.int32range)||void 0===k||k,uriResolver:T}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:t,lines:r}),this.logger=function(e){if(!1===e)return O;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),x.call(this,v,e,"NOT SUPPORTED"),x.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=k.call(this),e.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&$.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;"id"===r&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await u.call(this,t.missingSchema),i.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function u(e){const r=await c.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=E.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new u.SchemaEnv({schema:{},schemaId:r});if(t=u.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=E.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(j.call(this,r,t),!t)return(0,h.eachItem)(r,(e=>C.call(this,e))),this;N.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,h.eachItem)(r,0===n.type.length?e=>C.call(this,e,n):e=>n.type.forEach((t=>C.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=R(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:s}=this.opts;if("object"==typeof e)i=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,l.normalizeId)(i||r);const c=l.getSchemaRefs.call(this,e,r);return a=new u.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):u.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{u.compileSchema.call(this,e)}finally{this.opts=t}}}function x(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function E(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function S(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function A(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function $(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function k(){const e={...this.opts};for(const t of g)delete e[t];return e}w.ValidationError=i.default,w.MissingRefError=s.default,t.default=w;const O={log(){},warn(){},error(){}};const P=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){const{RULES:r}=this;if((0,h.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function C(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let s=o?i.post:i.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?T.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function T(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,I]}}},76250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(32017);n.code='require("ajv/dist/runtime/equal").default',t.default=n},53853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o=55296&&r<=56319&&o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48343);n.code='require("ajv/dist/runtime/uri").default',t.default=n},13558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},15457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(99029),o=r(94227),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:i,data:s,keyword:a,it:u}=e;u.items=!0;const c=r.const("len",n._`${s}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof i&&!(0,o.alwaysValidSchema)(u,i)){const i=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:o.Type.Num},i),u.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=s,t.default=i},38660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i=r(42023),s=r(94227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:u,errsCount:c,it:l}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:f,opts:h}=l;if(l.props=!0,"all"!==h.removeAdditional&&(0,s.alwaysValidSchema)(l,r))return;const p=(0,n.allSchemaProperties)(a.properties),d=(0,n.allSchemaProperties)(a.patternProperties);function m(e){t.code(o._`delete ${u}[${e}]`)}function g(n){if("all"===h.removeAdditional||h.removeAdditional&&!1===r)m(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===h.removeAdditional?(y(n,r,!1),t.if((0,o.not)(r),(()=>{e.reset(),m(n)}))):(y(n,r),f||t.if((0,o.not)(r),(()=>t.break())))}}}function y(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",u,(r=>{p.length||d.length?t.if(function(r){let i;if(p.length>8){const e=(0,s.schemaRefOrVal)(l,a.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=p.length?(0,o.or)(...p.map((e=>o._`${r} === ${e}`))):o.nil;return d.length&&(i=(0,o.or)(i,...d.map((t=>o._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,o.not)(i)}(r),(()=>g(r))):g(r)})),e.ok(o._`${c} === ${i.default.errors}`)}};t.default=a},15844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(94227),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(o,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};t.default=o},16505:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(15765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},12661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:s,it:a}=e;let u,c;const{minContains:l,maxContains:f}=i;a.opts.next?(u=void 0===l?1:l,c=f):u=1;const h=t.const("len",n._`${s}.length`);if(e.setParams({min:u,max:c}),void 0===c&&0===u)return void(0,o.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&u>c)return(0,o.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(a,r)){let t=n._`${h} >= ${u}`;return void 0!==c&&(t=n._`${t} && ${h} <= ${c}`),void e.pass(t)}a.items=!0;const p=t.name("valid");function d(){const e=t.name("_valid"),r=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${u}`,(()=>t.assign(p,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(p,!1).break())),1===u?t.assign(p,!0):t.if(n._`${e} >= ${u}`,(()=>t.assign(p,!0))))}(r)))))}function m(r,n){t.forRange("i",0,h,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===u?m(p,(()=>t.if(p,(()=>t.break())))):0===u?(t.let(p,!0),void 0!==c&&t.if(n._`${s}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,(()=>e.reset()))}};t.default=i},83025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(99029),o=r(94227),i=r(15765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e}, - missingProperty: ${o}, - depsCount: ${t}, - deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);a(e,t),u(e,r)}};function a(e,t=e.schema){const{gen:r,data:o,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const u in t){const c=t[u];if(0===c.length)continue;const l=(0,i.propertyInData)(r,o,u,s.opts.ownProperties);e.setParams({property:u,depsCount:c.length,deps:c.join(", ")}),s.allErrors?r.if(l,(()=>{for(const t of c)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,i.checkMissingProp)(e,c,a)})`),(0,i.reportMissingProp)(e,a),r.else())}}function u(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,u=r.name("valid");for(const c in t)(0,o.alwaysValidSchema)(a,t[c])||(r.if((0,i.propertyInData)(r,n,c,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:c},u);e.mergeValidEvaluated(t,u)}),(()=>r.var(u,!0))),e.ok(u))}t.validatePropertyDeps=a,t.validateSchemaDeps=u,t.default=s},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:i}=e;void 0===r.then&&void 0===r.else&&(0,o.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=s(i,"then"),u=s(i,"else");if(!a&&!u)return;const c=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&u){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,f("then",r),f("else",r))}else a?t.if(l,f("then")):t.if((0,n.not)(l),f("else"));function f(r,o){return()=>{const i=e.subschema({keyword:r},l);t.assign(c,l),e.mergeValidEvaluated(i,c),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=i},56378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15457),o=r(65354),i=r(20494),s=r(93966),a=r(12661),u=r(83025),c=r(19713),l=r(38660),f=r(40117),h=r(45333),p=r(57923),d=r(16505),m=r(96163),g=r(15844),y=r(1239),v=r(14426);t.default=function(e=!1){const t=[p.default,d.default,m.default,g.default,y.default,v.default,c.default,l.default,u.default,f.default,h.default];return e?t.push(o.default,s.default):t.push(n.default,i.default),t.push(a.default),t}},20494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(99029),o=r(94227),i=r(15765),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,o.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:i,parentSchema:s,data:a,keyword:u,it:c}=e;!function(e){const{opts:n,errSchemaPath:i}=c,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${u}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,o.checkStrictMode)(c,e,n.strictTuples)}}(s),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(i,r.length,c.items));const l=i.name("valid"),f=i.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(c,t)||(i.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},93966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(15765),s=r(15457),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,o.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,i.validateArray)(e)))}};t.default=a},57923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(94227),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=o},96163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&i.discriminator)return;const a=r,u=t.let("valid",!1),c=t.let("passing",null),l=t.name("_valid");e.setParams({passing:c}),t.block((function(){a.forEach(((r,i)=>{let a;(0,o.alwaysValidSchema)(s,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},l),i>0&&t.if(n._`${l} && ${u}`).assign(u,!1).assign(c,n._`[${c}, ${i}]`).else(),t.if(l,(()=>{t.assign(u,!0),t.assign(c,i),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(u,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},45333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i=r(94227),s=r(94227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:u,it:c}=e,{opts:l}=c,f=(0,n.allSchemaProperties)(r),h=f.filter((e=>(0,i.alwaysValidSchema)(c,r[e])));if(0===f.length||h.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const p=l.strictSchema&&!l.allowMatchingProperties&&u.properties,d=t.name("valid");!0===c.props||c.props instanceof o.Name||(c.props=(0,s.evaluatedPropsToName)(t,c.props));const{props:m}=c;function g(e){for(const t in p)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",a,(i=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=h.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:s.Type.Str},d),c.opts.unevaluated&&!0!==m?t.assign(o._`${m}[${i}]`,!0):n||c.allErrors||t.if((0,o.not)(d),(()=>t.break()))}))}))}!function(){for(const e of f)p&&g(e),c.allErrors?y(e):(t.var(d,!0),y(e),t.if(d))}()}};t.default=a},65354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(20494),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},40117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(62586),o=r(15765),i=r(94227),s=r(38660),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(c,s.default,"additionalProperties"));const l=(0,o.allSchemaProperties)(r);for(const n of l)c.definedProperties.add(n);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(t,(0,i.toHash)(l),c.props));const f=l.filter((e=>!(0,i.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const h=t.name("valid");for(const n of f)p(n)?d(n):(t.if((0,o.propertyInData)(t,u,n,c.opts.ownProperties)),d(n),c.allErrors||t.else().var(h,!0),t.endIf()),e.it.definedProperties.add(n),e.ok(h);function p(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function d(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},h)}}};t.default=a},19713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:i,it:s}=e;if((0,o.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",i,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=i},14426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(94227),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=o},15765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(99029),o=r(94227),i=r(42023),s=r(94227);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function u(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function c(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(i,(0,n.not)(u(e,t,r))):i}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(c(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return(0,n.or)(...o.map((o=>(0,n.and)(c(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=u,t.propertyInData=function(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${i} && ${u(e,t,r)}`:i},t.noPropertyInData=c,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:s,errorPath:a},it:u},c,l,f){const h=f?n._`${e}, ${t}, ${o}${s}`:t,p=[[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,a)],[i.default.parentData,u.parentData],[i.default.parentDataProperty,u.parentDataProperty],[i.default.rootData,i.default.rootData]];u.opts.dynamicRef&&p.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const d=n._`${h}, ${r.object(...p)}`;return l!==n.nil?n._`${c}.call(${l}, ${d})`:n._`${c}(${d})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,o);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===i.code?f:(0,s.useFunc)(e,i)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return u((()=>t.assign(e,!1))),e}return t.var(a,!0),u((()=>t.break())),a;function u(s){const u=t.const("len",n._`${r}.length`);t.forRange("i",0,u,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),u=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const s=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},u);t.assign(a,n._`${a} || ${u}`);e.mergeValidEvaluated(s,u)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},83463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},72128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(83463),o=r(13693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.default];t.default=i},13693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(34551),o=r(15765),i=r(99029),s=r(42023),a=r(73835),u=r(94227),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:s,schemaEnv:u,validateName:c,opts:h,self:p}=o,{root:d}=u;if(("#"===r||"#/"===r)&&s===d.baseId)return function(){if(u===d)return f(e,c,u,u.$async);const r=t.scopeValue("root",{ref:d});return f(e,i._`${r}.validate`,d,d.$async)}();const m=a.resolveRef.call(p,d,s,r);if(void 0===m)throw new n.default(o.opts.uriResolver,s,r);return m instanceof a.SchemaEnv?function(t){const r=l(e,t);f(e,r,t,t.$async)}(m):function(n){const o=t.scopeValue("schema",!0===h.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(m)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:a,it:c}=e,{allErrors:l,schemaEnv:f,opts:h}=c,p=h.passContext?s.default.this:i.nil;function d(e){const t=i._`${e}.errors`;a.assign(s.default.vErrors,i._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,i._`${s.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=u.mergeEvaluated.props(a,n.props,c.props));else{const t=a.var("props",i._`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(a,t,c.props,i.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(a,n.items,c.items));else{const t=a.var("items",i._`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(a,t,c.items,i.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(i._`await ${(0,o.callValidateCode)(e,t,p)}`),m(t),l||a.assign(r,!0)}),(e=>{a.if(i._`!(${e} instanceof ${c.ValidationError})`,(()=>a.throw(e))),d(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,p),(()=>m(t)),(()=>d(t)))}t.getValidate=l,t.callRef=f,t.default=c},36653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(97652),i=r(73835),s=r(34551),a=r(94227),u={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:u,parentSchema:c,it:l}=e,{oneOf:f}=c;if(!l.opts.discriminator)throw new Error("discriminator: requires discriminator option");const h=u.propertyName;if("string"!=typeof h)throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!f)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(h)}`);function m(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(c);let n=!0;for(let c=0;ce.error(!1,{discrError:o.DiscrError.Tag,tag:d,tagName:h}))),e.ok(p)}};t.default=u},97652:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},86144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72128),o=r(67060),i=r(56378),s=r(97532),a=r(69857),u=[n.default,o.default,(0,i.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=u},94737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:o,$data:i,schema:s,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:h}=u;c.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:h.formats,code:c.code.formats}),s=r.const("fDef",n._`${i}[${a}]`),u=r.let("fType"),l=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(u,n._`${s}.type || "string"`).assign(l,n._`${s}.validate`)),(()=>r.assign(u,n._`"string"`).assign(l,s))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=f.$async?n._`(${s}.async ? await ${l}(${o}) : ${l}(${o}))`:n._`${l}(${o})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${o}))`;return n._`${l} && ${l} !== true && ${u} === ${t} && !${r}`}()))}():function(){const i=h.formats[s];if(!i)return void function(){if(!1===c.strictSchema)return void h.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}}();if(!0===i)return;const[a,u,p]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(s)}`:void 0,o=r.scopeValue("formats",{key:s,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,n._`${o}.validate`];return["string",e,o]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${p}(${o})`}return"function"==typeof u?n._`${p}(${o})`:n._`${p}.test(${o})`}())}())}};t.default=o},97532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(94737).default];t.default=n},69857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},27935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(76250),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:u}=e;s||u&&"object"==typeof u?e.fail$data(n._`!${(0,o.useFunc)(t,i.default)}(${r}, ${a})`):e.fail(n._`${u} !== ${r}`)}};t.default=s},28643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(76250),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:u,it:c}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=c.opts.loopEnum;let f;const h=()=>null!=f?f:f=(0,o.useFunc)(t,i.default);let p;if(l||s)p=t.let("valid"),e.block$data(p,(function(){t.assign(p,!1),t.forOf("v",u,(e=>t.if(n._`${h()}(${r}, ${e})`,(()=>t.assign(p,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",u);p=(0,n.or)(...a.map(((t,o)=>function(e,t){const o=a[t];return"object"==typeof o&&null!==o?n._`${h()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(p)}};t.default=s},67060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(75882),o=r(63439),i=r(77307),s=r(90422),a=r(34486),u=r(34003),c=r(61163),l=r(60617),f=r(27935),h=r(28643),p=[n.default,o.default,i.default,s.default,a.default,u.default,c.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,h.default];t.default=p},61163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},77307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(53853),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${c} ${u} ${s}`)}};t.default=s},75882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || isNaN(${r})`)}};t.default=a},34486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},63439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:o,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),u=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${o} === 0 || (${a} = ${r}/${o}, ${u}))`)}};t.default=o},90422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:s,it:a}=e,u=a.opts.unicodeRegExp?"u":"",c=r?o._`(new RegExp(${s}, ${u}))`:(0,n.usePattern)(e,i);e.fail$data(o._`!${c}.test(${t})`)}};t.default=i},34003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i=r(94227),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:u,it:c}=e,{opts:l}=c;if(!u&&0===r.length)return;const f=r.length>=l.loopRequired;if(c.allErrors?function(){if(f||u)e.block$data(o.nil,h);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(f||u){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(i,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,o.not)(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function h(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=s},60617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10208),o=r(99029),i=r(94227),s=r(76250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:u,parentSchema:c,schemaCode:l,it:f}=e;if(!a&&!u)return;const h=t.let("valid"),p=c.items?(0,n.getSchemaTypes)(c.items):[];function d(i,s){const a=t.name("item"),u=(0,n.checkDataTypes)(p,a,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(a,o._`${r}[${i}]`),t.if(u,o._`continue`),p.length>1&&t.if(o._`typeof ${a} == "string"`,o._`${a} += "_"`),t.if(o._`typeof ${c}[${a}] == "number"`,(()=>{t.assign(s,o._`${c}[${a}]`),e.error(),t.assign(h,!1).break()})).code(o._`${c}[${a}] = ${i}`)}))}function m(n,a){const u=(0,i.useFunc)(t,s.default),c=t.name("outer");t.label(c).for(o._`;${n}--;`,(()=>t.for(o._`${a} = ${n}; ${a}--;`,(()=>t.if(o._`${u}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(h,!1).break(c)}))))))}e.block$data(h,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(h,!0),t.if(o._`${n} > 1`,(()=>(p.length>0&&!p.some((e=>"object"===e||"array"===e))?d:m)(n,i)))}),o._`${l} === false`),e.ok(h)}};t.default=a},27293:(e,t,r)=>{"use strict";r.d(t,{A:()=>T});var n=r(63696),o=r(62540);function i(e){const{mdxAdmonitionTitle:t,rest:r}=function(e){const t=n.Children.toArray(e),r=t.find((e=>n.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),i=t.filter((e=>e!==r)),s=r?.props.children;return{mdxAdmonitionTitle:s,rest:i.length>0?(0,o.jsx)(o.Fragment,{children:i}):null}}(e.children),i=e.title??t;return{...e,...i&&{title:i},children:r}}var s=r(34164),a=r(21312),u=r(17559);const c="admonition_xJq3",l="admonitionHeading_Gvgb",f="admonitionIcon_Rf37",h="admonitionContent_BuS1";function p(e){let{type:t,className:r,children:n}=e;return(0,o.jsx)("div",{className:(0,s.A)(u.G.common.admonition,u.G.common.admonitionType(t),c,r),children:n})}function d(e){let{icon:t,title:r}=e;return(0,o.jsxs)("div",{className:l,children:[(0,o.jsx)("span",{className:f,children:t}),r]})}function m(e){let{children:t}=e;return t?(0,o.jsx)("div",{className:h,children:t}):null}function g(e){const{type:t,icon:r,title:n,children:i,className:s}=e;return(0,o.jsxs)(p,{type:t,className:s,children:[n||r?(0,o.jsx)(d,{title:n,icon:r}):null,(0,o.jsx)(m,{children:i})]})}function y(e){return(0,o.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const v={icon:(0,o.jsx)(y,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function b(e){return(0,o.jsx)(g,{...v,...e,className:(0,s.A)("alert alert--secondary",e.className),children:e.children})}function _(e){return(0,o.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const w={icon:(0,o.jsx)(_,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function x(e){return(0,o.jsx)(g,{...w,...e,className:(0,s.A)("alert alert--success",e.className),children:e.children})}function E(e){return(0,o.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const S={icon:(0,o.jsx)(E,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function A(e){return(0,o.jsx)(g,{...S,...e,className:(0,s.A)("alert alert--info",e.className),children:e.children})}function $(e){return(0,o.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const k={icon:(0,o.jsx)($,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function O(e){return(0,o.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const P={icon:(0,o.jsx)(O,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const j={icon:(0,o.jsx)($,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const C={...{note:b,tip:x,info:A,warning:function(e){return(0,o.jsx)(g,{...k,...e,className:(0,s.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,o.jsx)(g,{...P,...e,className:(0,s.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,o.jsx)(b,{title:"secondary",...e}),important:e=>(0,o.jsx)(A,{title:"important",...e}),success:e=>(0,o.jsx)(x,{title:"success",...e}),caution:function(e){return(0,o.jsx)(g,{...j,...e,className:(0,s.A)("alert alert--warning",e.className),children:e.children})}}};function T(e){const t=i(e),r=(n=t.type,C[n]||(console.warn(`No admonition component found for admonition type "${n}". Using Info as fallback.`),C.info));var n;return(0,o.jsx)(r,{...t})}},55131:(e,t)=>{function r(e,t,r,n){var i={};return function(s){if(!i[s]){var a={},u=[],c=[];for(c.push({node:s,processed:!1});c.length>0;){var l=c[c.length-1],f=l.processed,h=l.node;if(f)c.pop(),u.pop(),a[h]=!1,i[h]=!0,t&&0!==e[h].length||r.push(h);else{if(i[h]){c.pop();continue}if(a[h]){if(n){c.pop();continue}throw u.push(h),new o(u)}a[h]=!0,u.push(h);for(var p=e[h],d=p.length-1;d>=0;d--)c.push({node:p[d],processed:!1});l.processed=!0}}}}}var n=t.DepGraph=function(e){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=e&&!!e.circular};n.prototype={size:function(){return Object.keys(this.nodes).length},addNode:function(e,t){this.hasNode(e)||(this.nodes[e]=2===arguments.length?t:e,this.outgoingEdges[e]=[],this.incomingEdges[e]=[])},removeNode:function(e){this.hasNode(e)&&(delete this.nodes[e],delete this.outgoingEdges[e],delete this.incomingEdges[e],[this.incomingEdges,this.outgoingEdges].forEach((function(t){Object.keys(t).forEach((function(r){var n=t[r].indexOf(e);n>=0&&t[r].splice(n,1)}),this)})))},hasNode:function(e){return this.nodes.hasOwnProperty(e)},getNodeData:function(e){if(this.hasNode(e))return this.nodes[e];throw new Error("Node does not exist: "+e)},setNodeData:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);this.nodes[e]=t},addDependency:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);if(!this.hasNode(t))throw new Error("Node does not exist: "+t);return-1===this.outgoingEdges[e].indexOf(t)&&this.outgoingEdges[e].push(t),-1===this.incomingEdges[t].indexOf(e)&&this.incomingEdges[t].push(e),!0},removeDependency:function(e,t){var r;this.hasNode(e)&&(r=this.outgoingEdges[e].indexOf(t))>=0&&this.outgoingEdges[e].splice(r,1),this.hasNode(t)&&(r=this.incomingEdges[t].indexOf(e))>=0&&this.incomingEdges[t].splice(r,1)},clone:function(){var e=this,t=new n;return Object.keys(e.nodes).forEach((function(r){t.nodes[r]=e.nodes[r],t.outgoingEdges[r]=e.outgoingEdges[r].slice(0),t.incomingEdges[r]=e.incomingEdges[r].slice(0)})),t},directDependenciesOf:function(e){if(this.hasNode(e))return this.outgoingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},directDependantsOf:function(e){if(this.hasNode(e))return this.incomingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},dependenciesOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.outgoingEdges,t,n,this.circular)(e);var o=n.indexOf(e);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+e)},dependantsOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.incomingEdges,t,n,this.circular)(e);var o=n.indexOf(e);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+e)},overallOrder:function(e){var t=this,n=[],o=Object.keys(this.nodes);if(0===o.length)return n;if(!this.circular){var i=r(this.outgoingEdges,!1,[],this.circular);o.forEach((function(e){i(e)}))}var s=r(this.outgoingEdges,e,n,this.circular);return o.filter((function(e){return 0===t.incomingEdges[e].length})).forEach((function(e){s(e)})),this.circular&&o.filter((function(e){return-1===n.indexOf(e)})).forEach((function(e){s(e)})),n},entryNodes:function(){var e=this;return Object.keys(this.nodes).filter((function(t){return 0===e.incomingEdges[t].length}))}},n.prototype.directDependentsOf=n.prototype.directDependantsOf,n.prototype.dependentsOf=n.prototype.dependantsOf;var o=t.DepGraphCycleError=function(e){var t="Dependency Cycle Found: "+e.join(" -> "),r=new Error(t);return r.cyclePath=e,Object.setPrototypeOf(r,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(r,o),r};o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error)},32017:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},74987:e=>{function t(e,t,r,n){var o,i=null==(o=n)||"number"==typeof o||"boolean"==typeof o?n:r(n),s=t.get(i);return void 0===s&&(s=e.call(this,n),t.set(i,s)),s}function r(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=t.get(o);return void 0===i&&(i=e.apply(this,n),t.set(o,i)),i}function n(e,t,r,n,o){return r.bind(t,e,n,o)}function o(e,o){return n(e,this,1===e.length?t:r,o.cache.create(),o.serializer)}function i(){return JSON.stringify(arguments)}function s(){this.cache=Object.create(null)}s.prototype.has=function(e){return e in this.cache},s.prototype.get=function(e){return this.cache[e]},s.prototype.set=function(e,t){this.cache[e]=t};var a={create:function(){return new s}};e.exports=function(e,t){var r=t&&t.cache?t.cache:a,n=t&&t.serializer?t.serializer:i;return(t&&t.strategy?t.strategy:o)(e,{cache:r,serializer:n})},e.exports.strategies={variadic:function(e,t){return n(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,r){return n(e,this,t,r.cache.create(),r.serializer)}}},56477:(e,t)=>{function r(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.t-4:t.t:Array.isArray(e)?1:f(e)?2:h(e)?3:0}function a(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){return 2===s(e)?e.get(t):e[t]}function c(e,t,r){var n=s(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function l(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return q&&e instanceof Map}function h(e){return V&&e instanceof Set}function p(e){return e.i||e.u}function d(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Z(e);delete t[Y];for(var r=Q(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&i(e,(function(e,t){return m(t,!0)}),!0)),e}function g(){r(2)}function y(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(e){var t=X[e];return t||r(18,e),t}function b(e,t){X[e]||(X[e]=t)}function _(){return B}function w(e,t){t&&(v("Patches"),e.o=[],e.v=[],e.s=t)}function x(e){E(e),e.p.forEach(A),e.p=null}function E(e){e===B&&(B=e.l)}function S(e){return B={p:[],l:B,h:e,_:!0,m:0}}function A(e){var t=e[Y];0===t.t||1===t.t?t.j():t.O=!0}function $(e,t){t.m=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.S||v("ES5").P(t,e,i),i?(n[Y].g&&(x(t),r(4)),o(e)&&(e=k(t,e),t.l||P(t,e)),t.o&&v("Patches").M(n[Y].u,e,t.o,t.v)):e=k(t,n,[]),x(t),t.o&&t.s(t.o,t.v),e!==W?e:void 0}function k(e,t,r){if(y(t))return t;var n=t[Y];if(!n)return i(t,(function(o,i){return O(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.g)return P(e,n.u,!0),n.u;if(!n.R){n.R=!0,n.A.m--;var o=4===n.t||5===n.t?n.i=d(n.k):n.i,s=o,a=!1;3===n.t&&(s=new Set(o),o.clear(),a=!0),i(s,(function(t,i){return O(e,n,o,t,i,r,a)})),P(e,o,!1),r&&e.o&&v("Patches").F(n,r,e.o,e.v)}return n.i}function O(e,t,r,i,s,u,l){if(n(s)){var f=k(e,s,u&&t&&3!==t.t&&!a(t.N,i)?u.concat(i):void 0);if(c(r,i,f),!n(f))return;e._=!1}else l&&r.add(s);if(o(s)&&!y(s)){if(!e.h.D&&e.m<1)return;k(e,s),t&&t.A.l||P(e,s)}}function P(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e._&&m(t,r)}function j(e,t){var r=e[Y];return(r?p(r):e)[t]}function C(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function T(e){e.g||(e.g=!0,e.l&&T(e.l))}function N(e){e.i||(e.i=d(e.u))}function I(e,t,r){var n=f(t)?v("MapSet").K(t,r):h(t)?v("MapSet").$(t,r):e.S?function(e,t){var r=Array.isArray(e),n={t:r?1:0,A:t?t.A:_(),g:!1,R:!1,N:{},l:t,u:e,k:null,i:null,j:null,C:!1},o=n,i=ee;r&&(o=[n],i=te);var s=Proxy.revocable(o,i),a=s.revoke,u=s.proxy;return n.k=u,n.j=a,u}(t,r):v("ES5").I(t,r);return(r?r.A:_()).p.push(n),n}function R(e){return n(e)||r(22,e),function e(t){if(!o(t))return t;var r,n=t[Y],a=s(t);if(n){if(!n.g&&(n.t<4||!v("ES5").J(n)))return n.u;n.R=!0,r=M(t,a),n.R=!1}else r=M(t,a);return i(r,(function(t,o){n&&u(n.u,t)===o||c(r,t,e(o))})),3===a?new Set(r):r}(e)}function M(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return d(e)}function L(){function e(e,t){var r=s[e];return r?r.enumerable=t:s[e]=r={configurable:!0,enumerable:t,get:function(){return ee.get(this[Y],e)},set:function(t){ee.set(this[Y],e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var n=e[t][Y];if(!n.g)switch(n.t){case 5:o(n)&&T(n);break;case 4:r(n)&&T(n)}}}function r(e){for(var t=e.u,r=e.k,n=Q(r),o=n.length-1;o>=0;o--){var i=n[o];if(i!==Y){var s=t[i];if(void 0===s&&!a(t,i))return!0;var u=r[i],c=u&&u[Y];if(c?c.u!==s:!l(u,s))return!0}}var f=!!t[Y];return n.length!==Q(t).length+(f?0:1)}function o(e){var t=e.k;if(t.length!==e.u.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;n1?r-1:0),i=1;i1?n-1:0),i=1;i=0;r--){var o=t[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(t=t.slice(r+1));var i=v("Patches").W;return n(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),ne=new re,oe=ne.produce,ie=ne.produceWithPatches.bind(ne),se=ne.setAutoFreeze.bind(ne),ae=ne.setUseProxies.bind(ne),ue=ne.applyPatches.bind(ne),ce=ne.createDraft.bind(ne),le=ne.finishDraft.bind(ne);t.Immer=re,t.applyPatches=ue,t.castDraft=function(e){return e},t.castImmutable=function(e){return e},t.createDraft=ce,t.current=R,t.default=oe,t.enableAllPlugins=function(){L(),U(),D()},t.enableES5=L,t.enableMapSet=U,t.enablePatches=D,t.finishDraft=le,t.freeze=m,t.immerable=K,t.isDraft=n,t.isDraftable=o,t.nothing=W,t.original=function(e){return n(e)||r(23,e),e[Y].u},t.produce=oe,t.produceWithPatches=ie,t.setAutoFreeze=se,t.setUseProxies=ae},75878:(e,t,r)=>{"use strict";e.exports=r(56477)},37172:e=>{function t(e){var t="Parsing error";throw e&&(t+=": "+e),new Error(t)}var r={"\\":"\\",'"':'"',"/":"/",b:"\b",t:"\t",n:"\n",f:"\f",r:"\r"};e.exports=function(e){for(var n=[],o=0,i=s();i;)n.push(i),i=s();return n;function s(){for(var n,i,s,a,u,c,l=e.length;o=48&&u<=57||u>=97&&u<=102||u>=65&&u<=70))return t("Invalid Unicode escape sequence.");n+=String.fromCharCode("0x"+e.slice(i,o));break;default:return t("Invalid escape sequence.")}else{if('"'===c)break;for(c=e[o],i=o,u=e.charCodeAt(o);u>=32&&92!==u&&34!==u;)u=e.charCodeAt(++o);n+=e.slice(i,o)}}return'"'===e[o]?(o++,{type:"string",value:n,raw:e.slice(h,o)}):t("Unterminated string.");default:if(i=o,"-"===c&&(a=!0,u=e.charCodeAt(++o),c=e[o]),(u=e.charCodeAt(o))>=48&&u<=57){if(48===u&&((u=e.charCodeAt(o+1))>=48&&u<=57))return t("Illegal octal literal.");for(a=!1;o=48&&u<=57);o++);if(46===e.charCodeAt(o)){for(s=++o;s=48&&u<=57);s++);if(s===o)return t("Illegal trailing decimal.");o=s}if(101===(u=e.charCodeAt(o))||69===u){for(43!==(u=e.charCodeAt(++o))&&45!==u||o++,s=o;s=48&&u<=57);s++);if(s===o)return t("Illegal empty exponent.");o=s}var p=e.slice(i,o);return{type:"number",value:+p,raw:p}}if(a)return t("A negative sign may only precede numbers.");var d=e.slice(o,o+4);return"true"===d?(o+=4,{type:"literal",value:!0,raw:"true"}):"fals"===d&&"e"===e[o+4]?(o+=5,{type:"literal",value:!1,raw:"false"}):"null"===d?(o+=4,{type:"literal",value:null,raw:"null"}):t("Unrecognized token.")}return!1}}},7106:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,o,i,s,a,u,c,l,f){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var h in n(i,s,a,u,c,l,f),i){var p=i[h];if(Array.isArray(p)){if(h in t.arrayKeywords)for(var d=0;d{var n=r(22032),o=r(63862),i=r(66721),s=r(12749),a=r(35749);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(63702),o=r(70080),i=r(24739),s=r(48655),a=r(31175);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(56110)(r(9325),"Map");e.exports=n},53661:(e,t,r)=>{var n=r(63040),o=r(17670),i=r(90289),s=r(4509),a=r(72949);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(9325).Symbol;e.exports=n},34932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r{var n=r(43360),o=r(75288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];i.call(e,t)&&o(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},26025:(e,t,r)=>{var n=r(75288);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},43360:(e,t,r)=>{var n=r(93243);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},47422:(e,t,r)=>{var n=r(31769),o=r(77797);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r{var n=r(51873),o=r(659),i=r(59350),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},45083:(e,t,r)=>{var n=r(1882),o=r(87296),i=r(23805),s=r(47473),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?h:a).test(s(e))}},73170:(e,t,r)=>{var n=r(16547),o=r(31769),i=r(30361),s=r(23805),a=r(77797);e.exports=function(e,t,r,u){if(!s(e))return e;for(var c=-1,l=(t=o(t,e)).length,f=l-1,h=e;null!=h&&++c{var n=r(51873),o=r(34932),i=r(56449),s=r(44394),a=n?n.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},31769:(e,t,r)=>{var n=r(56449),o=r(28586),i=r(61802),s=r(13222);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(s(e))}},55481:(e,t,r)=>{var n=r(9325)["__core-js_shared__"];e.exports=n},93243:(e,t,r)=>{var n=r(56110),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},34840:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},12651:(e,t,r)=>{var n=r(74218);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},56110:(e,t,r)=>{var n=r(45083),o=r(10392);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},659:(e,t,r)=>{var n=r(51873),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(u){}var o=s.call(e);return n&&(t?e[a]=r:delete e[a]),o}},10392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},22032:(e,t,r)=>{var n=r(81042);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},63862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},66721:(e,t,r)=>{var n=r(81042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},12749:(e,t,r)=>{var n=r(81042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},35749:(e,t,r)=>{var n=r(81042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},30361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(56449),o=r(44394),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(s.test(e)||!i.test(e)||null!=t&&e in Object(t))}},74218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},87296:(e,t,r)=>{var n,o=r(55481),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},63702:e=>{e.exports=function(){this.__data__=[],this.size=0}},70080:(e,t,r)=>{var n=r(26025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},24739:(e,t,r)=>{var n=r(26025);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},48655:(e,t,r)=>{var n=r(26025);e.exports=function(e){return n(this.__data__,e)>-1}},31175:(e,t,r)=>{var n=r(26025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},63040:(e,t,r)=>{var n=r(21549),o=r(80079),i=r(68223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},17670:(e,t,r)=>{var n=r(12651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},90289:(e,t,r)=>{var n=r(12651);e.exports=function(e){return n(this,e).get(e)}},4509:(e,t,r)=>{var n=r(12651);e.exports=function(e){return n(this,e).has(e)}},72949:(e,t,r)=>{var n=r(12651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},62224:(e,t,r)=>{var n=r(50104);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},81042:(e,t,r)=>{var n=r(56110)(Object,"create");e.exports=n},59350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9325:(e,t,r)=>{var n=r(34840),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},61802:(e,t,r)=>{var n=r(62224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=s},77797:(e,t,r)=>{var n=r(44394);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},47473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},75288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},58156:(e,t,r)=>{var n=r(47422);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},56449:e=>{var t=Array.isArray;e.exports=t},1882:(e,t,r)=>{var n=r(72552),o=r(23805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},23805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},40346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},44394:(e,t,r)=>{var n=r(72552),o=r(40346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},2543:function(e,t,r){var n;e=r.nmd(e),function(){var o,i="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=16,c=32,l=64,f=128,h=256,p=1/0,d=9007199254740991,m=NaN,g=4294967295,y=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",h]],v="[object Arguments]",b="[object Array]",_="[object Boolean]",w="[object Date]",x="[object Error]",E="[object Function]",S="[object GeneratorFunction]",A="[object Map]",$="[object Number]",k="[object Object]",O="[object Promise]",P="[object RegExp]",j="[object Set]",C="[object String]",T="[object Symbol]",N="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",M="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",U="[object Int16Array]",F="[object Int32Array]",B="[object Uint8Array]",z="[object Uint8ClampedArray]",q="[object Uint16Array]",V="[object Uint32Array]",H=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,J=RegExp(Y.source),Q=RegExp(G.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(oe.source),se=/^\s+/,ae=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,_e=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Ae="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$e="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="['\u2019]",Te="["+Se+"]",Ne="["+je+"]",Ie="["+Ae+"]",Re="\\d+",Me="["+$e+"]",Le="["+ke+"]",De="[^"+Se+je+Re+$e+ke+Oe+"]",Ue="\\ud83c[\\udffb-\\udfff]",Fe="[^"+Se+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Oe+"]",Ve="\\u200d",He="(?:"+Le+"|"+De+")",We="(?:"+qe+"|"+De+")",Ke="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Ie+"|"+Ue+")"+"?",Je="["+Pe+"]?",Qe=Je+Ge+("(?:"+Ve+"(?:"+[Fe,Be,ze].join("|")+")"+Je+Ge+")*"),Ze="(?:"+[Me,Be,ze].join("|")+")"+Qe,Xe="(?:"+[Fe+Ie+"?",Ie,Be,ze,Te].join("|")+")",et=RegExp(Ce,"g"),tt=RegExp(Ie,"g"),rt=RegExp(Ue+"(?="+Ue+")|"+Xe+Qe,"g"),nt=RegExp([qe+"?"+Le+"+"+Ke+"(?="+[Ne,qe,"$"].join("|")+")",We+"+"+Ye+"(?="+[Ne,qe+He,"$"].join("|")+")",qe+"?"+He+"+"+Ke,qe+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Ze].join("|"),"g"),ot=RegExp("["+Ve+Se+Ae+Pe+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,ut={};ut[M]=ut[L]=ut[D]=ut[U]=ut[F]=ut[B]=ut[z]=ut[q]=ut[V]=!0,ut[v]=ut[b]=ut[I]=ut[_]=ut[R]=ut[w]=ut[x]=ut[E]=ut[A]=ut[$]=ut[k]=ut[P]=ut[j]=ut[C]=ut[N]=!1;var ct={};ct[v]=ct[b]=ct[I]=ct[R]=ct[_]=ct[w]=ct[M]=ct[L]=ct[D]=ct[U]=ct[F]=ct[A]=ct[$]=ct[k]=ct[P]=ct[j]=ct[C]=ct[T]=ct[B]=ct[z]=ct[q]=ct[V]=!0,ct[x]=ct[E]=ct[N]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,ht=parseInt,pt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,dt="object"==typeof self&&self&&self.Object===Object&&self,mt=pt||dt||Function("return this")(),gt=t&&!t.nodeType&&t,yt=gt&&e&&!e.nodeType&&e,vt=yt&&yt.exports===gt,bt=vt&&pt.process,_t=function(){try{var e=yt&&yt.require&&yt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),wt=_t&&_t.isArrayBuffer,xt=_t&&_t.isDate,Et=_t&&_t.isMap,St=_t&&_t.isRegExp,At=_t&&_t.isSet,$t=_t&&_t.isTypedArray;function kt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ot(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o-1}function It(e,t,r){for(var n=-1,o=null==e?0:e.length;++n-1;);return r}function nr(e,t){for(var r=e.length;r--&&qt(t,e[r],0)>-1;);return r}var or=Yt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),ir=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sr(e){return"\\"+lt[e]}function ar(e){return ot.test(e)}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function cr(e,t){return function(r){return e(t(r))}}function lr(e,t){for(var r=-1,n=e.length,o=0,i=[];++r",""":'"',"'":"'"});var yr=function e(t){var r,n=(t=null==t?mt:yr.defaults(mt.Object(),t,yr.pick(mt,st))).Array,ae=t.Date,Se=t.Error,Ae=t.Function,$e=t.Math,ke=t.Object,Oe=t.RegExp,Pe=t.String,je=t.TypeError,Ce=n.prototype,Te=Ae.prototype,Ne=ke.prototype,Ie=t["__core-js_shared__"],Re=Te.toString,Me=Ne.hasOwnProperty,Le=0,De=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ue=Ne.toString,Fe=Re.call(ke),Be=mt._,ze=Oe("^"+Re.call(Me).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=vt?t.Buffer:o,Ve=t.Symbol,He=t.Uint8Array,We=qe?qe.allocUnsafe:o,Ke=cr(ke.getPrototypeOf,ke),Ye=ke.create,Ge=Ne.propertyIsEnumerable,Je=Ce.splice,Qe=Ve?Ve.isConcatSpreadable:o,Ze=Ve?Ve.iterator:o,Xe=Ve?Ve.toStringTag:o,rt=function(){try{var e=pi(ke,"defineProperty");return e({},"",{}),e}catch(t){}}(),ot=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,lt=ae&&ae.now!==mt.Date.now&&ae.now,pt=t.setTimeout!==mt.setTimeout&&t.setTimeout,dt=$e.ceil,gt=$e.floor,yt=ke.getOwnPropertySymbols,bt=qe?qe.isBuffer:o,_t=t.isFinite,Ft=Ce.join,Yt=cr(ke.keys,ke),vr=$e.max,br=$e.min,_r=ae.now,wr=t.parseInt,xr=$e.random,Er=Ce.reverse,Sr=pi(t,"DataView"),Ar=pi(t,"Map"),$r=pi(t,"Promise"),kr=pi(t,"Set"),Or=pi(t,"WeakMap"),Pr=pi(ke,"create"),jr=Or&&new Or,Cr={},Tr=Ui(Sr),Nr=Ui(Ar),Ir=Ui($r),Rr=Ui(kr),Mr=Ui(Or),Lr=Ve?Ve.prototype:o,Dr=Lr?Lr.valueOf:o,Ur=Lr?Lr.toString:o;function Fr(e){if(ra(e)&&!Hs(e)&&!(e instanceof Vr)){if(e instanceof qr)return e;if(Me.call(e,"__wrapped__"))return Fi(e)}return new qr(e)}var Br=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function zr(){}function qr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function cn(e,t,r,n,i,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=i?r(e,n,i,s):r(e)),a!==o)return a;if(!ta(e))return e;var f=Hs(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Me.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!u)return Co(e,a)}else{var h=gi(e),p=h==E||h==S;if(Gs(e))return Ao(e,u);if(h==k||h==v||p&&!i){if(a=c||p?{}:vi(e),!u)return c?function(e,t){return To(e,mi(e),t)}(e,function(e,t){return e&&To(t,Na(t),e)}(a,e)):function(e,t){return To(e,di(e),t)}(e,on(a,e))}else{if(!ct[h])return i?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case I:return $o(e);case _:case w:return new n(+e);case R:return function(e,t){var r=t?$o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case M:case L:case D:case U:case F:case B:case z:case q:case V:return ko(e,r);case A:return new n;case $:case C:return new n(e);case P:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new n;case T:return o=e,Dr?ke(Dr.call(o)):{}}var o}(e,h,u)}}s||(s=new Gr);var d=s.get(e);if(d)return d;s.set(e,a),aa(e)?e.forEach((function(n){a.add(cn(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,o){a.set(o,cn(n,t,r,o,e,s))}));var m=f?o:(l?c?si:ii:c?Na:Ta)(e);return Pt(m||e,(function(n,o){m&&(n=e[o=n]),tn(a,o,cn(n,t,r,o,e,s))})),a}function ln(e,t,r){var n=r.length;if(null==e)return!n;for(e=ke(e);n--;){var i=r[n],s=t[i],a=e[i];if(a===o&&!(i in e)||!s(a))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new je(i);return Ti((function(){e.apply(o,r)}),t)}function hn(e,t,r,n){var o=-1,i=Nt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Rt(t,Xt(r))),n?(i=It,s=!1):t.length>=200&&(i=tr,s=!1,t=new Yr(t));e:for(;++o-1},Wr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Kr.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(Ar||Wr),string:new Hr}},Kr.prototype.delete=function(e){var t=fi(this,e).delete(e);return this.size-=t?1:0,t},Kr.prototype.get=function(e){return fi(this,e).get(e)},Kr.prototype.has=function(e){return fi(this,e).has(e)},Kr.prototype.set=function(e,t){var r=fi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Yr.prototype.add=Yr.prototype.push=function(e){return this.__data__.set(e,s),this},Yr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Gr.prototype.get=function(e){return this.__data__.get(e)},Gr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!Ar||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Kr(n)}return r.set(e,t),this.size=r.size,this};var pn=Ro(wn),dn=Ro(xn,!0);function mn(e,t){var r=!0;return pn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function gn(e,t,r){for(var n=-1,i=e.length;++n0&&r(a)?t>1?vn(a,t-1,r,n,o):Mt(o,a):n||(o[o.length]=a)}return o}var bn=Mo(),_n=Mo(!0);function wn(e,t){return e&&bn(e,t,Ta)}function xn(e,t){return e&&_n(e,t,Ta)}function En(e,t){return Tt(t,(function(t){return Zs(e[t])}))}function Sn(e,t){for(var r=0,n=(t=wo(t,e)).length;null!=e&&rt}function On(e,t){return null!=e&&Me.call(e,t)}function Pn(e,t){return null!=e&&t in ke(e)}function jn(e,t,r){for(var i=r?It:Nt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var h=e[u];u&&t&&(h=Rt(h,Xt(t))),l=br(h.length,l),c[u]=!r&&(t||s>=120&&h.length>=120)?new Yr(u&&h):o}h=e[0];var p=-1,d=c[0];e:for(;++p=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Wn(e,t,r){for(var n=-1,o=t.length,i={};++n-1;)a!==e&&Je.call(a,u,1),Je.call(e,u,1);return e}function Yn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;_i(o)?Je.call(e,o,1):ho(e,o)}}return e}function Gn(e,t){return e+gt(xr()*(t-e+1))}function Jn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=gt(t/2))&&(e+=e)}while(t);return r}function Qn(e,t){return Ni(Oi(e,t,ou),e+"")}function Zn(e){return Qr(Ba(e))}function Xn(e,t){var r=Ba(e);return Mi(r,un(t,0,r.length))}function eo(e,t,r,n){if(!ta(e))return e;for(var i=-1,s=(t=wo(t,e)).length,a=s-1,u=e;null!=u&&++ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=n(i);++o>>1,s=e[i];null!==s&&!ca(s)&&(r?s<=t:s=200){var c=t?null:Qo(e);if(c)return fr(c);s=!1,o=tr,u=new Yr}else u=t?[]:a;e:for(;++n=n?e:oo(e,t,r)}var So=ot||function(e){return mt.clearTimeout(e)};function Ao(e,t){if(t)return e.slice();var r=e.length,n=We?We(r):new e.constructor(r);return e.copy(n),n}function $o(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function ko(e,t){var r=t?$o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var r=e!==o,n=null===e,i=e==e,s=ca(e),a=t!==o,u=null===t,c=t==t,l=ca(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!i)return 1;if(!n&&!s&&!l&&e1?r[i-1]:o,a=i>2?r[2]:o;for(s=e.length>3&&"function"==typeof s?(i--,s):o,a&&wi(r[0],r[1],a)&&(s=i<3?o:s,i=1),t=ke(t);++n-1?i[s?t[a]:a]:o}}function Bo(e){return oi((function(t){var r=t.length,n=r,s=qr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new je(i);if(s&&!u&&"wrapper"==ui(a))var u=new qr([],!0)}for(n=u?n:r;++n1&&_.reverse(),p&&lu))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var h=-1,p=!0,d=2&r?new Yr:o;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Pt(y,(function(r){var n="_."+r[0];t&r[1]&&!Nt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(n),r)))}function Ri(e){var t=0,r=0;return function(){var n=_r(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Mi(e,t){var r=-1,n=e.length,i=n-1;for(t=t===o?n:t;++r1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,ss(e,r)}));function ps(e){var t=Fr(e);return t.__chain__=!0,t}function ds(e,t){return t(e)}var ms=oi((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return an(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Vr&&_i(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ds,args:[i],thisArg:o}),new qr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var gs=No((function(e,t,r){Me.call(e,r)?++e[r]:sn(e,r,1)}));var ys=Fo(Vi),vs=Fo(Hi);function bs(e,t){return(Hs(e)?Pt:pn)(e,li(t,3))}function _s(e,t){return(Hs(e)?jt:dn)(e,li(t,3))}var ws=No((function(e,t,r){Me.call(e,r)?e[r].push(t):sn(e,r,[t])}));var xs=Qn((function(e,t,r){var o=-1,i="function"==typeof t,s=Ks(e)?n(e.length):[];return pn(e,(function(e){s[++o]=i?kt(t,e,r):Cn(e,t,r)})),s})),Es=No((function(e,t,r){sn(e,r,t)}));function Ss(e,t){return(Hs(e)?Rt:Fn)(e,li(t,3))}var As=No((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var $s=Qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&wi(e,t[0],t[1])?t=[]:r>2&&wi(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,vn(t,1),[])})),ks=lt||function(){return mt.Date.now()};function Os(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Xo(e,f,o,o,o,o,t)}function Ps(e,t){var r;if("function"!=typeof t)throw new je(i);return e=ma(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var js=Qn((function(e,t,r){var n=1;if(r.length){var o=lr(r,ci(js));n|=c}return Xo(e,n,t,r,o)})),Cs=Qn((function(e,t,r){var n=3;if(r.length){var o=lr(r,ci(Cs));n|=c}return Xo(t,n,e,r,o)}));function Ts(e,t,r){var n,s,a,u,c,l,f=0,h=!1,p=!1,d=!0;if("function"!=typeof e)throw new je(i);function m(t){var r=n,i=s;return n=s=o,f=t,u=e.apply(i,r)}function g(e){var r=e-l;return l===o||r>=t||r<0||p&&e-f>=a}function y(){var e=ks();if(g(e))return v(e);c=Ti(y,function(e){var r=t-(e-l);return p?br(r,a-(e-f)):r}(e))}function v(e){return c=o,d&&n?m(e):(n=s=o,u)}function b(){var e=ks(),r=g(e);if(n=arguments,s=this,l=e,r){if(c===o)return function(e){return f=e,c=Ti(y,t),h?m(e):u}(l);if(p)return So(c),c=Ti(y,t),m(l)}return c===o&&(c=Ti(y,t)),u}return t=ya(t)||0,ta(r)&&(h=!!r.leading,a=(p="maxWait"in r)?vr(ya(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d),b.cancel=function(){c!==o&&So(c),f=0,n=l=s=c=o},b.flush=function(){return c===o?u:v(ks())},b}var Ns=Qn((function(e,t){return fn(e,1,t)})),Is=Qn((function(e,t,r){return fn(e,ya(t)||0,r)}));function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(i);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Rs.Cache||Kr),r}function Ms(e){if("function"!=typeof e)throw new je(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Rs.Cache=Kr;var Ls=xo((function(e,t){var r=(t=1==t.length&&Hs(t[0])?Rt(t[0],Xt(li())):Rt(vn(t,1),Xt(li()))).length;return Qn((function(n){for(var o=-1,i=br(n.length,r);++o=t})),Vs=Tn(function(){return arguments}())?Tn:function(e){return ra(e)&&Me.call(e,"callee")&&!Ge.call(e,"callee")},Hs=n.isArray,Ws=wt?Xt(wt):function(e){return ra(e)&&$n(e)==I};function Ks(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ys(e){return ra(e)&&Ks(e)}var Gs=bt||yu,Js=xt?Xt(xt):function(e){return ra(e)&&$n(e)==w};function Qs(e){if(!ra(e))return!1;var t=$n(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ia(e)}function Zs(e){if(!ta(e))return!1;var t=$n(e);return t==E||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=Et?Xt(Et):function(e){return ra(e)&&gi(e)==A};function oa(e){return"number"==typeof e||ra(e)&&$n(e)==$}function ia(e){if(!ra(e)||$n(e)!=k)return!1;var t=Ke(e);if(null===t)return!0;var r=Me.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Re.call(r)==Fe}var sa=St?Xt(St):function(e){return ra(e)&&$n(e)==P};var aa=At?Xt(At):function(e){return ra(e)&&gi(e)==j};function ua(e){return"string"==typeof e||!Hs(e)&&ra(e)&&$n(e)==C}function ca(e){return"symbol"==typeof e||ra(e)&&$n(e)==T}var la=$t?Xt($t):function(e){return ra(e)&&ea(e.length)&&!!ut[$n(e)]};var fa=Yo(Un),ha=Yo((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(Ks(e))return ua(e)?dr(e):Co(e);if(Ze&&e[Ze])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ze]());var t=gi(e);return(t==A?ur:t==j?fr:Ba)(e)}function da(e){return e?(e=ya(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=da(e),r=t%1;return t==t?r?t-r:t:0}function ga(e){return e?un(ma(e),0,g):0}function ya(e){if("number"==typeof e)return e;if(ca(e))return m;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=ye.test(e);return r||be.test(e)?ht(e.slice(2),r?2:8):ge.test(e)?m:+e}function va(e){return To(e,Na(e))}function ba(e){return null==e?"":lo(e)}var _a=Io((function(e,t){if(Ai(t)||Ks(t))To(t,Ta(t),e);else for(var r in t)Me.call(t,r)&&tn(e,r,t[r])})),wa=Io((function(e,t){To(t,Na(t),e)})),xa=Io((function(e,t,r,n){To(t,Na(t),e,n)})),Ea=Io((function(e,t,r,n){To(t,Ta(t),e,n)})),Sa=oi(an);var Aa=Qn((function(e,t){e=ke(e);var r=-1,n=t.length,i=n>2?t[2]:o;for(i&&wi(t[0],t[1],i)&&(n=1);++r1),t})),To(e,si(e),r),n&&(r=cn(r,7,ri));for(var o=t.length;o--;)ho(r,t[o]);return r}));var La=oi((function(e,t){return null==e?{}:function(e,t){return Wn(e,t,(function(t,r){return Oa(e,r)}))}(e,t)}));function Da(e,t){if(null==e)return{};var r=Rt(si(e),(function(e){return[e]}));return t=li(t),Wn(e,r,(function(e,r){return t(e,r[0])}))}var Ua=Zo(Ta),Fa=Zo(Na);function Ba(e){return null==e?[]:er(e,Ta(e))}var za=Do((function(e,t,r){return t=t.toLowerCase(),e+(r?qa(t):t)}));function qa(e){return Qa(ba(e).toLowerCase())}function Va(e){return(e=ba(e))&&e.replace(we,or).replace(tt,"")}var Ha=Do((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Wa=Do((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ka=Lo("toLowerCase");var Ya=Do((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Ga=Do((function(e,t,r){return e+(r?" ":"")+Qa(t)}));var Ja=Do((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Qa=Lo("toUpperCase");function Za(e,t,r){return e=ba(e),(t=r?o:t)===o?function(e){return it.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var Xa=Qn((function(e,t){try{return kt(e,o,t)}catch(r){return Qs(r)?r:new Se(r)}})),eu=oi((function(e,t){return Pt(t,(function(t){t=Di(t),sn(e,t,js(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=Bo(),nu=Bo(!0);function ou(e){return e}function iu(e){return Mn("function"==typeof e?e:cn(e,1))}var su=Qn((function(e,t){return function(r){return Cn(r,e,t)}})),au=Qn((function(e,t){return function(r){return Cn(e,r,t)}}));function uu(e,t,r){var n=Ta(t),o=En(t,n);null!=r||ta(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=En(t,Ta(t)));var i=!(ta(r)&&"chain"in r&&!r.chain),s=Zs(e);return Pt(o,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=Co(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Mt([this.value()],arguments))})})),e}function cu(){}var lu=Ho(Rt),fu=Ho(Ct),hu=Ho(Ut);function pu(e){return xi(e)?Kt(Di(e)):function(e){return function(t){return Sn(t,e)}}(e)}var du=Ko(),mu=Ko(!0);function gu(){return[]}function yu(){return!1}var vu=Vo((function(e,t){return e+t}),0),bu=Jo("ceil"),_u=Vo((function(e,t){return e/t}),1),wu=Jo("floor");var xu,Eu=Vo((function(e,t){return e*t}),1),Su=Jo("round"),Au=Vo((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new je(i);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Os,Fr.assign=_a,Fr.assignIn=wa,Fr.assignInWith=xa,Fr.assignWith=Ea,Fr.at=Sa,Fr.before=Ps,Fr.bind=js,Fr.bindAll=eu,Fr.bindKey=Cs,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Hs(e)?e:[e]},Fr.chain=ps,Fr.chunk=function(e,t,r){t=(r?wi(e,t,r):t===o)?1:vr(ma(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,u=n(dt(i/t));si?0:i+r),(n=n===o||n>i?i:ma(n))<0&&(n+=i),n=r>n?0:ga(n);r>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=lo(t))&&ar(e)?Eo(dr(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new je(i);return t=null==t?0:vr(ma(t),0),Qn((function(r){var n=r[t],o=Eo(r,0,t);return n&&Mt(o,n),kt(e,this,o)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===o?1:ma(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=n-(t=r||t===o?1:ma(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?mo(e,li(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?mo(e,li(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new je(i);return ta(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ts(e,t,{leading:n,maxWait:t,trailing:o})},Fr.thru=ds,Fr.toArray=pa,Fr.toPairs=Ua,Fr.toPairsIn=Fa,Fr.toPath=function(e){return Hs(e)?Rt(e,Di):ca(e)?[e]:Co(Li(ba(e)))},Fr.toPlainObject=va,Fr.transform=function(e,t,r){var n=Hs(e),o=n||Gs(e)||la(e);if(t=li(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:ta(e)&&Zs(i)?Br(Ke(e)):{}}return(o?Pt:wn)(e,(function(e,n,o){return t(r,e,n,o)})),r},Fr.unary=function(e){return Os(e,1)},Fr.union=rs,Fr.unionBy=ns,Fr.unionWith=os,Fr.uniq=function(e){return e&&e.length?fo(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?fo(e,li(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?fo(e,o,t):[]},Fr.unset=function(e,t){return null==e||ho(e,t)},Fr.unzip=is,Fr.unzipWith=ss,Fr.update=function(e,t,r){return null==e?e:po(e,t,_o(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:po(e,t,_o(r),n)},Fr.values=Ba,Fr.valuesIn=function(e){return null==e?[]:er(e,Na(e))},Fr.without=as,Fr.words=Za,Fr.wrap=function(e,t){return Ds(_o(t),e)},Fr.xor=us,Fr.xorBy=cs,Fr.xorWith=ls,Fr.zip=fs,Fr.zipObject=function(e,t){return vo(e||[],t||[],tn)},Fr.zipObjectDeep=function(e,t){return vo(e||[],t||[],eo)},Fr.zipWith=hs,Fr.entries=Ua,Fr.entriesIn=Fa,Fr.extend=wa,Fr.extendWith=xa,uu(Fr,Fr),Fr.add=vu,Fr.attempt=Xa,Fr.camelCase=za,Fr.capitalize=qa,Fr.ceil=bu,Fr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=ya(r))==r?r:0),t!==o&&(t=(t=ya(t))==t?t:0),un(ya(e),t,r)},Fr.clone=function(e){return cn(e,4)},Fr.cloneDeep=function(e){return cn(e,5)},Fr.cloneDeepWith=function(e,t){return cn(e,5,t="function"==typeof t?t:o)},Fr.cloneWith=function(e,t){return cn(e,4,t="function"==typeof t?t:o)},Fr.conformsTo=function(e,t){return null==t||ln(e,t,Ta(t))},Fr.deburr=Va,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=_u,Fr.endsWith=function(e,t,r){e=ba(e),t=lo(t);var n=e.length,i=r=r===o?n:un(ma(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Fr.eq=Bs,Fr.escape=function(e){return(e=ba(e))&&Q.test(e)?e.replace(G,ir):e},Fr.escapeRegExp=function(e){return(e=ba(e))&&ie.test(e)?e.replace(oe,"\\$&"):e},Fr.every=function(e,t,r){var n=Hs(e)?Ct:mn;return r&&wi(e,t,r)&&(t=o),n(e,li(t,3))},Fr.find=ys,Fr.findIndex=Vi,Fr.findKey=function(e,t){return Bt(e,li(t,3),wn)},Fr.findLast=vs,Fr.findLastIndex=Hi,Fr.findLastKey=function(e,t){return Bt(e,li(t,3),xn)},Fr.floor=wu,Fr.forEach=bs,Fr.forEachRight=_s,Fr.forIn=function(e,t){return null==e?e:bn(e,li(t,3),Na)},Fr.forInRight=function(e,t){return null==e?e:_n(e,li(t,3),Na)},Fr.forOwn=function(e,t){return e&&wn(e,li(t,3))},Fr.forOwnRight=function(e,t){return e&&xn(e,li(t,3))},Fr.get=ka,Fr.gt=zs,Fr.gte=qs,Fr.has=function(e,t){return null!=e&&yi(e,t,On)},Fr.hasIn=Oa,Fr.head=Ki,Fr.identity=ou,Fr.includes=function(e,t,r,n){e=Ks(e)?e:Ba(e),r=r&&!n?ma(r):0;var o=e.length;return r<0&&(r=vr(o+r,0)),ua(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&qt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ma(r);return o<0&&(o=vr(n+o,0)),qt(e,t,o)},Fr.inRange=function(e,t,r){return t=da(t),r===o?(r=t,t=0):r=da(r),function(e,t,r){return e>=br(t,r)&&e=-9007199254740991&&e<=d},Fr.isSet=aa,Fr.isString=ua,Fr.isSymbol=ca,Fr.isTypedArray=la,Fr.isUndefined=function(e){return e===o},Fr.isWeakMap=function(e){return ra(e)&&gi(e)==N},Fr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==$n(e)},Fr.join=function(e,t){return null==e?"":Ft.call(e,t)},Fr.kebabCase=Ha,Fr.last=Qi,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=ma(r))<0?vr(n+i,0):br(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):zt(e,Ht,i,!0)},Fr.lowerCase=Wa,Fr.lowerFirst=Ka,Fr.lt=fa,Fr.lte=ha,Fr.max=function(e){return e&&e.length?gn(e,ou,kn):o},Fr.maxBy=function(e,t){return e&&e.length?gn(e,li(t,2),kn):o},Fr.mean=function(e){return Wt(e,ou)},Fr.meanBy=function(e,t){return Wt(e,li(t,2))},Fr.min=function(e){return e&&e.length?gn(e,ou,Un):o},Fr.minBy=function(e,t){return e&&e.length?gn(e,li(t,2),Un):o},Fr.stubArray=gu,Fr.stubFalse=yu,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Eu,Fr.nth=function(e,t){return e&&e.length?Vn(e,ma(t)):o},Fr.noConflict=function(){return mt._===this&&(mt._=Be),this},Fr.noop=cu,Fr.now=ks,Fr.pad=function(e,t,r){e=ba(e);var n=(t=ma(t))?pr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Wo(gt(o),r)+e+Wo(dt(o),r)},Fr.padEnd=function(e,t,r){e=ba(e);var n=(t=ma(t))?pr(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=xr();return br(e+i*(t-e+ft("1e-"+((i+"").length-1))),t)}return Gn(e,t)},Fr.reduce=function(e,t,r){var n=Hs(e)?Lt:Gt,o=arguments.length<3;return n(e,li(t,4),r,o,pn)},Fr.reduceRight=function(e,t,r){var n=Hs(e)?Dt:Gt,o=arguments.length<3;return n(e,li(t,4),r,o,dn)},Fr.repeat=function(e,t,r){return t=(r?wi(e,t,r):t===o)?1:ma(t),Jn(ba(e),t)},Fr.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,i=(t=wo(t,e)).length;for(i||(i=1,e=o);++nd)return[];var r=g,n=br(e,g);t=li(t),e-=g;for(var o=Qt(n,t);++r=s)return e;var u=r-pr(n);if(u<1)return n;var c=a?Eo(a,0,u).join(""):e.slice(0,u);if(i===o)return c+n;if(a&&(u+=c.length-u),sa(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=Oe(i.source,ba(me.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var h=l.index;c=c.slice(0,h===o?u:h)}}else if(e.indexOf(lo(i),u)!=u){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+n},Fr.unescape=function(e){return(e=ba(e))&&J.test(e)?e.replace(Y,gr):e},Fr.uniqueId=function(e){var t=++Le;return ba(e)+t},Fr.upperCase=Ja,Fr.upperFirst=Qa,Fr.each=bs,Fr.eachRight=_s,Fr.first=Ki,uu(Fr,(xu={},wn(Fr,(function(e,t){Me.call(Fr.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),Fr.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),Pt(["drop","take"],(function(e,t){Vr.prototype[e]=function(r){r=r===o?1:vr(ma(r),0);var n=this.__filtered__&&!t?new Vr(this):this.clone();return n.__filtered__?n.__takeCount__=br(r,n.__takeCount__):n.__views__.push({size:br(r,g),type:e+(n.__dir__<0?"Right":"")}),n},Vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:li(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Pt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Vr.prototype[e]=function(){return this[r](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}})),Vr.prototype.compact=function(){return this.filter(ou)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Qn((function(e,t){return"function"==typeof e?new Vr(this):this.map((function(r){return Cn(r,e,t)}))})),Vr.prototype.reject=function(e){return this.filter(Ms(li(e)))},Vr.prototype.slice=function(e,t){e=ma(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=ma(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(g)},wn(Vr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Fr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);i&&(Fr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Vr,c=a[0],l=u||Hs(t),f=function(e){var t=i.apply(Fr,Mt([e],a));return n&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,p=!!this.__actions__.length,d=s&&!h,m=u&&!p;if(!s&&l){t=m?t:new Vr(this);var g=e.apply(t,a);return g.__actions__.push({func:ds,args:[f],thisArg:o}),new qr(g,h)}return d&&m?e.apply(this,a):(g=this.thru(f),d?n?g.value()[0]:g.value():g)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Hs(o)?o:[],e)}return this[r]((function(r){return t.apply(Hs(r)?r:[],e)}))}})),wn(Vr.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Me.call(Cr,n)||(Cr[n]=[]),Cr[n].push({name:t,func:r})}})),Cr[zo(o,2).name]=[{name:"wrapper",func:o}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=Co(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Co(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Co(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Hs(e),n=t<0,o=r?e.length:0,i=function(e,t,r){var n=-1,o=r.length;for(;++n=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof zr;){var n=Fi(r);n.__index__=0,n.__values__=o,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:ds,args:[ts],thisArg:o}),new qr(t,this.__chain__)}return this.thru(ts)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Ze&&(Fr.prototype[Ze]=function(){return this}),Fr}();mt._=yr,(n=function(){return yr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},50104:(e,t,r)=>{var n=r(53661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},63560:(e,t,r)=>{var n=r(73170);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},13222:(e,t,r)=>{var n=r(77556);e.exports=function(e){return null==e?"":n(e)}},42113:()=>{},12068:(e,t,r)=>{"use strict";const n=r(74869);e.exports=n,n.default=n},74869:e=>{"use strict";e.exports=function(e,r,n){var o,i="";if(t="",arguments.length>1){if("number"==typeof n)for(o=0;o100)return e.replace(n,i);for(var t="",s=0,a=0;an;)e[r]=e[r-1],r--;e[r]=n}return e}},21430:function(e,t,r){var n,o;!function(i,s){"use strict";e.exports?e.exports=s():void 0===(o="function"==typeof(n=s)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,i=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(i=7),t=0;t1);a++)r.splice(0,1);n[s]=r.join("")}var u=-1,c=0,l=0,f=-1,h=!1;for(s=0;sc&&(u=f,c=l)):"0"===n[s]&&(h=!0,f=s,l=1);l>c&&(u=f,c=l),c>1&&n.splice(u,c,""),o=n.length;var p="";for(""===n[0]&&(p=":"),s=0;s=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},84193:function(e,t,r){var n,o,i;!function(s,a){"use strict";e.exports?e.exports=a(r(39340),r(21430),r(4704)):(o=[r(39340),r(21430),r(4704)],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i))}(0,(function(e,t,r,n){"use strict";var o=n&&n.URI;function i(e,t){var r=arguments.length>=1;if(!(this instanceof i))return r?arguments.length>=2?new i(e,t):new i(e):new i;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.11";var s=i.prototype,a=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===c(e)}function f(e,t){var r,n,o={};if("RegExp"===c(t))o=null;else if(l(t))for(r=0,n=t.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var r=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(r){return e}};var y,v={encode:"encode",decode:"decode"},b=function(e,t){return function(r){try{return i[t](r+"").replace(i.characters[e][t].expression,(function(r){return i.characters[e][t].map[r]}))}catch(n){return r}}};for(y in v)i[y+"PathSegment"]=b("pathname",v[y]),i[y+"UrnPathSegment"]=b("urnpath",v[y]);var _=function(e,t,r){return function(n){var o;o=r?function(e){return i[t](i[r](e))}:i[t];for(var s=(n+"").split(e),a=0,u=s.length;a-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),u=e.indexOf(":",s+1);-1!==u&&(-1===a||u-1?o:e.length-1);return s>-1&&(-1===o||s-1?p.slice(0,d)+p.slice(d).replace(s,""):p.replace(s,"")).length<=c[0].length||r.ignore&&r.ignore.test(p))){var y=t(p,l,h=l+p.length,e);void 0!==y?(y=String(y),e=e.slice(0,l)+y+e.slice(h),n.lastIndex=l+y.length):n.lastIndex=h}}return n.lastIndex=0,e},i.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=h(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},s.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new i(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=w("protocol"),s.username=w("username"),s.password=w("password"),s.hostname=w("hostname"),s.port=w("port"),s.query=x("query","?"),s.fragment=x("fragment","#"),s.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},s.path=s.pathname,s.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var n=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[i.getDomAttribute(e)]||"",o=!1);if(!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var s=n?e._parts:e;for(r in s)"query"!==r&&a.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!t),this},s.is=function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),a=(s=!(t=n||o))&&r&&r.has(this._parts.hostname),u=s&&i.idn_expression.test(this._parts.hostname),c=s&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var E=s.protocol,S=s.port,A=s.hostname;s.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},s.scheme=s.protocol,s.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),S.call(this,e,t))},s.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return A.call(this,e,t)},s.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},s.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},s.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},s.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),s=new RegExp("^"+u(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},s.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},s.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},s.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),a=new RegExp("^"+u(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},s.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?i.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var s=new RegExp(u(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),o?this.normalizePath(t):this.build(!t),this},s.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(r=o.substring(s+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,c=this.suffix();if(c)a=e?new RegExp(u(c)+"$"):new RegExp(u("."+c)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return a&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},s.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),s=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(l(t)){s=[];for(var a=0,u=t.length;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function d(e){throw new RangeError(f[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function g(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(l,".")).split("."),t).join(".")}function y(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?h(e/700):e>>1,e+=h(e/t);e>455;n+=a)e=h(e/35);return h(n+36*e/(e+38))}function w(e){var t,r,n,o,i,u,c,l,f,p,m,g=[],y=e.length,b=0,w=128,x=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&d("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=y&&d("invalid-input"),((l=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:a)>=a||l>h((s-b)/u))&&d("overflow"),b+=l*u,!(l<(f=c<=x?1:c>=x+26?26:c-x));c+=a)u>h(s/(p=a-f))&&d("overflow"),u*=p;x=_(b-i,t=g.length+1,0==i),h(b/t)>s-w&&d("overflow"),w+=h(b/t),b%=t,g.splice(b++,0,w)}return v(g)}function x(e){var t,r,n,o,i,u,c,l,f,m,g,v,w,x,E,S=[];for(v=(e=y(e)).length,t=128,r=0,i=72,u=0;u=t&&gh((s-r)/(w=n+1))&&d("overflow"),r+=(c-t)*w,t=c,u=0;us&&d("overflow"),g==t){for(l=r,f=a;!(l<(m=f<=i?1:f>=i+26?26:f-i));f+=a)E=l-m,x=a-m,S.push(p(b(m+E%x,0))),l=h(E/x);S.push(p(b(l,0))),i=_(r,w,n==o),r=0,++n}++r,++t}return S.join("")}i={version:"1.3.2",ucs2:{decode:y,encode:v},decode:w,encode:x,toASCII:function(e){return g(e,(function(e){return c.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},48343:(e,t,r)=>{"use strict";const{normalizeIPv6:n,normalizeIPv4:o,removeDotSegments:i,recomposeAuthority:s,normalizeComponentEncoding:a}=r(34834),u=r(343);function c(e,t,r,n){const o={};return n||(e=p(l(e,r),r),t=p(l(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=i(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function l(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],a=u[(n.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&o.push(r.scheme,":");const c=s(r,n);if(void 0!==c&&("suffix"!==n.reference&&o.push("//"),o.push(c),r.path&&"/"!==r.path.charAt(0)&&o.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=i(e)),void 0===c&&(e=e.replace(/^\/\//u,"/%2F")),o.push(e)}return void 0!==r.query&&o.push("?",r.query),void 0!==r.fragment&&o.push("#",r.fragment),o.join("")}const f=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t))));const h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(e,t){const r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const c=e.match(h);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||"",i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host){const e=o(i.host);if(!1===e.isIPV4){const t=n(e.host,{isIPV4:!1});i.host=t.host.toLowerCase(),a=t.isIPV6}else i.host=e.host,a=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||i.path||void 0!==i.query?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const e=u[(r.scheme||i.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&i.host&&(r.domainHost||e&&e.domainHost)&&!1===a&&function(e){let t=0;for(let r=0,n=e.length;r126||f[t])return!0;return!1}(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(l){i.error=i.error||"Host's domain name can not be converted to ASCII: "+l}(!e||e&&!e.skipNormalize)&&(s&&void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),s&&void 0!==i.host&&(i.host=unescape(i.host)),void 0!==i.path&&i.path.length&&(i.path=escape(unescape(i.path))),void 0!==i.fragment&&i.fragment.length&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),e&&e.parse&&e.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return i}const d={SCHEMES:u,normalize:function(e,t){return"string"==typeof e?e=l(p(e,t),t):"object"==typeof e&&(e=p(l(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return l(c(p(e,n),p(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:c,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=l(a(p(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=l(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=l(a(p(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=l(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:l,parse:p};e.exports=d,e.exports.default=d,e.exports.fastUri=d},343:e=>{"use strict";const t=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function n(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const s={scheme:"http",domainHost:!0,parse:o,serialize:i},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},u={http:s,https:{scheme:"https",domainHost:s.domainHost,parse:o,serialize:i},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(r);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const o=`${r}:${t.nid||e.nid}`,i=u[o];e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,i=u[o];i&&(e=i.serialize(e,t));const s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,r){const n=e;return n.uuid=n.nss,n.nss=void 0,r.tolerant||n.uuid&&t.test(n.uuid)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};e.exports=u},64914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},34834:(e,t,r)=>{"use strict";const{HEX:n}=r(64914);function o(e){if(u(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=t;return r?{host:a(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function i(e,t=!1){let r="",o=!0;for(const i of e){if(void 0===n[i])return;"0"!==i&&!0===o&&(o=!1),o||(r+=i)}return t&&0===r.length&&(r="0"),r}function s(e,t={}){if(u(e,":")<2)return{host:e,isIPV6:!1};const r=function(e){let t=0;const r={error:!1,address:"",zone:""},n=[],o=[];let s=!1,a=!1,u=!1;function c(){if(o.length){if(!1===s){const e=i(o);if(void 0===e)return r.error=!0,!1;n.push(e)}o.length=0}return!0}for(let i=0;i7){r.error=!0;break}i-1>=0&&":"===e[i-1]&&(a=!0)}}return o.length&&(s?r.zone=o.join(""):u?n.push(o.join("")):n.push(i(o))),r.address=n.join(""),r}(e);if(r.error)return{host:e,isIPV6:!1};{let e=r.address,t=r.address;return r.zone&&(e+="%"+r.zone,t+="%25"+r.zone),{host:e,escapedHost:t,isIPV6:!0}}}function a(e,t){let r="",n=!0;const o=e.length;for(let i=0;i{"use strict";r.d(t,{o4:()=>D});const n="3.7.7",o=n,i="function"==typeof Buffer,s="function"==typeof TextDecoder?new TextDecoder:void 0,a="function"==typeof TextEncoder?new TextEncoder:void 0,u=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),c=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(u),l=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,f=String.fromCharCode.bind(String),h="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),p=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),d=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),m=e=>{let t,r,n,o,i="";const s=e.length%3;for(let a=0;a255||(n=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|o,i+=u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}return s?i.slice(0,s-3)+"===".substring(s):i},g="function"==typeof btoa?e=>btoa(e):i?e=>Buffer.from(e,"binary").toString("base64"):m,y=i?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;rt?p(y(e)):y(e),b=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?f(192|t>>>6)+f(128|63&t):f(224|t>>>12&15)+f(128|t>>>6&63)+f(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return f(240|t>>>18&7)+f(128|t>>>12&63)+f(128|t>>>6&63)+f(128|63&t)},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,w=e=>e.replace(_,b),x=i?e=>Buffer.from(e,"utf8").toString("base64"):a?e=>y(a.encode(e)):e=>g(w(e)),E=(e,t=!1)=>t?p(x(e)):x(e),S=e=>E(e,!0),A=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,$=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return f(55296+(t>>>10))+f(56320+(1023&t));case 3:return f((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return f((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},k=e=>e.replace(A,$),O=e=>{if(e=e.replace(/\s+/g,""),!l.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,o="";for(let i=0;i>16&255):64===n?f(t>>16&255,t>>8&255):f(t>>16&255,t>>8&255,255&t);return o},P="function"==typeof atob?e=>atob(d(e)):i?e=>Buffer.from(e,"base64").toString("binary"):O,j=i?e=>h(Buffer.from(e,"base64")):e=>h(P(e).split("").map((e=>e.charCodeAt(0)))),C=e=>j(N(e)),T=i?e=>Buffer.from(e,"base64").toString("utf8"):s?e=>s.decode(j(e)):e=>k(P(e)),N=e=>d(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),I=e=>T(N(e)),R=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),M=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,R(t));e("fromBase64",(function(){return I(this)})),e("toBase64",(function(e){return E(this,e)})),e("toBase64URI",(function(){return E(this,!0)})),e("toBase64URL",(function(){return E(this,!0)})),e("toUint8Array",(function(){return C(this)}))},L=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,R(t));e("toBase64",(function(e){return v(this,e)})),e("toBase64URI",(function(){return v(this,!0)})),e("toBase64URL",(function(){return v(this,!0)}))},D={version:n,VERSION:o,atob:P,atobPolyfill:O,btoa:g,btoaPolyfill:m,fromBase64:I,toBase64:E,encode:E,encodeURI:S,encodeURL:S,utob:w,btou:k,decode:I,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:v,toUint8Array:C,extendString:M,extendUint8Array:L,extendBuiltins:()=>{M(),L()}}},25691:(e,t,r)=>{"use strict";var n,o;r.d(t,{N:()=>ze}),function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).$RefParser=e()}((function(){return function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,(function(e){return o(t[s][1][e]||e)}),l,l.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s0?u:a;i.sort(c),i.run(c,"parse",e).then((function(t){!t.plugin.allowEmpty&&function(e){return void 0===e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length||r.isBuffer(e)&&0===e.length}(t.result)?s(n.syntax('Error parsing "%s" as %s. \nParsed value is empty',e.url,t.plugin.name)):o(t)}),(function(t){t?(t=t instanceof Error?t:new Error(t),s(n.syntax(t,"Error parsing %s",e.url))):s(n.syntax("Unable to parse %s",e.url))}))}))}(u,s)})).then((function(e){return a.value=e.result,e.result}))}catch(e){return Promise.reject(e)}}}).call(this,{isBuffer:e("../node_modules/is-buffer/index.js")})},{"../node_modules/is-buffer/index.js":32,"./util/plugins":17,"./util/url":18,ono:64}],7:[function(e,t,r){(function(e){var r=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;t.exports={order:400,allowEmpty:!0,canParse:function(t){return e.isBuffer(t.data)&&r.test(t.url)},parse:function(t){return e.isBuffer(t.data)?t.data:new e(t.data)}}}).call(this,e("buffer").Buffer)},{buffer:23}],8:[function(e,t,r){(function(e){t.exports={order:100,allowEmpty:!0,canParse:".json",parse:function(t){return new Promise((function(r,n){var o=t.data;e.isBuffer(o)&&(o=o.toString()),"string"==typeof o?0===o.trim().length?r(void 0):r(JSON.parse(o)):r(o)}))}}}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":32}],9:[function(e,t,r){(function(e){var r=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;t.exports={order:300,allowEmpty:!0,encoding:"utf8",canParse:function(t){return("string"==typeof t.data||e.isBuffer(t.data))&&r.test(t.url)},parse:function(t){if("string"==typeof t.data)return t.data;if(e.isBuffer(t.data))return t.data.toString(this.encoding);throw new Error("data is not text")}}}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":32}],10:[function(e,t,r){(function(r){var n=e("../util/yaml");t.exports={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],parse:function(e){return new Promise((function(t,o){var i=e.data;r.isBuffer(i)&&(i=i.toString()),t("string"==typeof i?n.parse(i):i)}))}}}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":32,"../util/yaml":19}],11:[function(e,t,r){t.exports=l;var n=e("./ref"),o=e("./util/url"),i=e("ono"),s=/\//g,a=/~/g,u=/~1/g,c=/~0/g;function l(e,t,r){this.$ref=e,this.path=t,this.originalPath=r||t,this.value=void 0,this.circular=!1,this.indirections=0}function f(e,t){if(n.isAllowed$Ref(e.value,t)){var r=o.resolve(e.path,e.value.$ref);if(r!==e.path){var i=e.$ref.$refs._resolve(r,t);return e.indirections+=i.indirections+1,n.isExtended$Ref(e.value)?(e.value=n.dereference(e.value,i.value),!1):(e.$ref=i.$ref,e.path=i.path,e.value=i.value,!0)}e.circular=!0}}function h(e,t,r){if(!e.value||"object"!=typeof e.value)throw i.syntax('Error assigning $ref pointer "%s". \nCannot set "%s" of a non-object.',e.path,t);return"-"===t&&Array.isArray(e.value)?e.value.push(r):e.value[t]=r,r}l.prototype.resolve=function(e,t){var r=l.parse(this.path);this.value=e;for(var n=0;n0},o.isExternal$Ref=function(e){return o.is$Ref(e)&&"#"!==e.$ref[0]},o.isAllowed$Ref=function(e,t){if(o.is$Ref(e)){if("#/"===e.$ref.substr(0,2)||"#"===e.$ref)return!0;if("#"!==e.$ref[0]&&(!t||t.resolve.external))return!0}},o.isExtended$Ref=function(e){return o.is$Ref(e)&&Object.keys(e).length>1},o.dereference=function(e,t){if(t&&"object"==typeof t&&o.isExtended$Ref(e)){var r={};return Object.keys(e).forEach((function(t){"$ref"!==t&&(r[t]=e[t])})),Object.keys(t).forEach((function(e){e in r||(r[e]=t[e])})),r}return t}},{"./pointer":11}],13:[function(e,t,r){var n=e("ono"),o=e("./ref"),i=e("./util/url");function s(){this.circular=!1,this._$refs={},this._root$Ref=null}function a(e,t){var r=Object.keys(e);return(t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t)).length>0&&t[0]&&(r=r.filter((function(r){return-1!==t.indexOf(e[r].pathType)}))),r.map((function(t){return{encoded:t,decoded:"file"===e[t].pathType?i.toFileSystemPath(t,!0):t}}))}t.exports=s,s.prototype.paths=function(e){return a(this._$refs,arguments).map((function(e){return e.decoded}))},s.prototype.values=function(e){var t=this._$refs;return a(t,arguments).reduce((function(e,r){return e[r.decoded]=t[r.encoded].value,e}),{})},s.prototype.toJSON=s.prototype.values,s.prototype.exists=function(e,t){try{return this._resolve(e,t),!0}catch(e){return!1}},s.prototype.get=function(e,t){return this._resolve(e,t).value},s.prototype.set=function(e,t){var r=i.resolve(this._root$Ref.path,e),o=i.stripHash(r),s=this._$refs[o];if(!s)throw n('Error resolving $ref pointer "%s". \n"%s" not found.',e,o);s.set(r,t)},s.prototype._add=function(e){var t=i.stripHash(e),r=new o;return r.path=t,r.$refs=this,this._$refs[t]=r,this._root$Ref=this._root$Ref||r,r},s.prototype._resolve=function(e,t){var r=i.resolve(this._root$Ref.path,e),o=i.stripHash(r),s=this._$refs[o];if(!s)throw n('Error resolving $ref pointer "%s". \n"%s" not found.',e,o);return s.resolve(r,t,e)},s.prototype._get$Ref=function(e){e=i.resolve(this._root$Ref.path,e);var t=i.stripHash(e);return this._$refs[t]}},{"./ref":12,"./util/url":18,ono:64}],14:[function(e,t,r){var n=e("./ref"),o=e("./pointer"),i=e("./parse"),s=e("./util/url");function a(e,t,r,i){var s=[];return e&&"object"==typeof e&&(n.isExternal$Ref(e)?s.push(u(e,t,r,i)):Object.keys(e).forEach((function(c){var l=o.join(t,c),f=e[c];n.isExternal$Ref(f)?s.push(u(f,l,r,i)):s=s.concat(a(f,l,r,i))}))),s}function u(e,t,r,n){var o=s.resolve(t,e.$ref),u=s.stripHash(o);return(e=r._$refs[u])?Promise.resolve(e.value):i(o,r,n).then((function(e){var t=a(e,u+"#",r,n);return Promise.all(t)}))}t.exports=function(e,t){if(!t.resolve.external)return Promise.resolve();try{var r=a(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(e){return Promise.reject(e)}}},{"./parse":6,"./pointer":11,"./ref":12,"./util/url":18}],15:[function(e,t,r){var n=e("fs"),o=e("ono"),i=e("../util/url");t.exports={order:100,canRead:function(e){return i.isFileSystemPath(e.url)},read:function(e){return new Promise((function(t,r){var s;try{s=i.toFileSystemPath(e.url)}catch(t){r(o.uri(t,"Malformed URI: %s",e.url))}try{n.readFile(s,(function(e,n){e?r(o(e,'Error opening file "%s"',s)):t(n)}))}catch(e){r(o(e,'Error opening file "%s"',s))}}))}}},{"../util/url":18,fs:21,ono:64}],16:[function(e,t,r){(function(r,n){var o=e("http"),i=e("https"),s=e("ono"),a=e("../util/url");function u(e,t,r){return new Promise((function(c,l){e=a.parse(e),(r=r||[]).push(e.href),function(e,t){return new Promise((function(r,s){var a=("https:"===e.protocol?i:o).get({hostname:e.hostname,port:e.port,path:e.path,auth:e.auth,protocol:e.protocol,headers:t.headers||{},withCredentials:t.withCredentials});"function"==typeof a.setTimeout&&a.setTimeout(t.timeout),a.on("timeout",(function(){a.abort()})),a.on("error",s),a.once("response",(function(e){e.body=new n(0),e.on("data",(function(t){e.body=n.concat([e.body,new n(t)])})),e.on("error",s),e.on("end",(function(){r(e)}))}))}))}(e,t).then((function(o){if(o.statusCode>=400)throw s({status:o.statusCode},"HTTP ERROR %d",o.statusCode);if(o.statusCode>=300)if(r.length>t.redirects)l(s({status:o.statusCode},"Error downloading %s. \nToo many redirects: \n %s",r[0],r.join(" \n ")));else{if(!o.headers.location)throw s({status:o.statusCode},"HTTP %d redirect with no location header",o.statusCode);u(a.resolve(e,o.headers.location),t,r).then(c,l)}else c(o.body||new n(0))})).catch((function(t){l(s(t,"Error downloading",e.href))}))}))}t.exports={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:!1,canRead:function(e){return a.isHttp(e.url)},read:function(e){var t=a.parse(e.url);return r.browser&&!t.protocol&&(t.protocol=a.parse(location.href).protocol),u(t,this)}}}).call(this,e("_process"),e("buffer").Buffer)},{"../util/url":18,_process:66,buffer:23,http:80,https:29,ono:64}],17:[function(e,t,r){function n(e,t,r,n){var o=e[t];if("function"==typeof o)return o.apply(e,[r,n]);if(!n){if(o instanceof RegExp)return o.test(r.url);if("string"==typeof o)return o===r.extension;if(Array.isArray(o))return-1!==o.indexOf(r.extension)}return o}r.all=function(e){return Object.keys(e).filter((function(t){return"object"==typeof e[t]})).map((function(t){return e[t].name=t,e[t]}))},r.filter=function(e,t,r){return e.filter((function(e){return!!n(e,t,r)}))},r.sort=function(e){return e.forEach((function(e){e.order=e.order||Number.MAX_SAFE_INTEGER})),e.sort((function(e,t){return e.order-t.order}))},r.run=function(e,t,r){var o,i,s=0;return new Promise((function(a,u){function c(){if(!(o=e[s++]))return u(i);try{var a=n(o,t,r,l);a&&"function"==typeof a.then?a.then(f,h):void 0!==a&&f(a)}catch(e){h(e)}}function l(e,t){e?h(e):f(t)}function f(e){a({plugin:o,result:e})}function h(e){i=e,c()}c()}))}},{}],18:[function(e,t,r){(function(n){var o=/^win/.test(n.platform),i=/\//g,s=/^(\w{2,}):\/\//i,a=t.exports,u=[/\?/g,"%3F",/\#/g,"%23"],c=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];r.parse=e("url").parse,r.resolve=e("url").resolve,r.cwd=function(){return n.browser?location.href:n.cwd()+"/"},r.getProtocol=function(e){var t=s.exec(e);if(t)return t[1].toLowerCase()},r.getExtension=function(e){var t=e.lastIndexOf(".");return t>=0?e.substr(t).toLowerCase():""},r.getHash=function(e){var t=e.indexOf("#");return t>=0?e.substr(t):"#"},r.stripHash=function(e){var t=e.indexOf("#");return t>=0&&(e=e.substr(0,t)),e},r.isHttp=function(e){var t=a.getProtocol(e);return"http"===t||"https"===t||void 0===t&&n.browser},r.isFileSystemPath=function(e){if(n.browser)return!1;var t=a.getProtocol(e);return void 0===t||"file"===t},r.fromFileSystemPath=function(e){o&&(e=e.replace(/\\/g,"/")),e=encodeURI(e);for(var t=0;t0?n-4:n,f=0;f>16&255,a[c++]=t>>8&255,a[c++]=255&t;return 2===s&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,a[c++]=255&t),1===s&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t),a},r.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],s=0,a=r-o;sa?a:s+16383));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],o[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,r){for(var n,o=[],i=t;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,g=String.fromCharCode;function y(e){throw new RangeError(d[e])}function v(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+v((e=e.replace(p,".")).split("."),t).join(".")}function _(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+g(e)})).join("")}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,r){var n=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;n+=l)e=m(e/35);return m(n+36*e/(e+38))}function S(e){var t,r,n,o,i,s,a,u,f,h,p,d=[],g=e.length,v=0,b=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&y("not-basic"),d.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=g&&y("invalid-input"),((u=(p=e.charCodeAt(o++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:l)>=l||u>m((c-v)/s))&&y("overflow"),v+=u*s,!(u<(f=a<=_?1:a>=_+26?26:a-_));a+=l)s>m(c/(h=l-f))&&y("overflow"),s*=h;_=E(v-i,t=d.length+1,0==i),m(v/t)>c-b&&y("overflow"),b+=m(v/t),v%=t,d.splice(v++,0,b)}return w(d)}function A(e){var t,r,n,o,i,s,a,u,f,h,p,d,v,b,w,S=[];for(d=(e=_(e)).length,t=128,r=0,i=72,s=0;s=t&&pm((c-r)/(v=n+1))&&y("overflow"),r+=(a-t)*v,t=a,s=0;sc&&y("overflow"),p==t){for(u=r,f=l;!(u<(h=f<=i?1:f>=i+26?26:f-i));f+=l)w=u-h,b=l-h,S.push(g(x(h+w%b,0))),u=m(w/b);S.push(g(x(u,0))),i=E(r,v,n==o),r=0,++n}++r,++t}return S.join("")}if(a={version:"1.4.1",ucs2:{decode:_,encode:w},decode:S,encode:A,toASCII:function(e){return b(e,(function(e){return h.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return b(e,(function(e){return f.test(e)?S(e.slice(4).toLowerCase()):e}))}},o&&i)if(t.exports==o)i.exports=a;else for(u in a)a.hasOwnProperty(u)&&(o[u]=a[u]);else n.punycode=a}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(e,t,r){var n=e("base64-js"),o=e("ieee754");r.Buffer=a,r.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function s(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=a.prototype,t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=s(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(o)return n?-1:D(e).length;t=(""+t).toLowerCase(),o=!0}}function d(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,o){var i,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=r;ia&&(r=a-u),i=r;i>=0;i--){for(var f=!0,h=0;ho&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var r="",n=0;nt&&(e+=" ... "),""},a.prototype.compare=function(e,t,r,n,o){if(B(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(i,s),c=this.slice(n,o),l=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;function k(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;on)&&(r=n);for(var o="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,n,o,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function R(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,8),o.write(e,t,r,n,52,8),r+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e],o=1,i=0;++i>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},a.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),o.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),o.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),o.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),o.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);T(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>>=0,!n){var o=Math.pow(2,8*r-1);T(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e&&(e&=255);if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function U(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function z(e){return e!=e}},{"base64-js":20,ieee754:30}],24:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],25:[function(e,t,r){(function(e,r){var n=r.process&&e.nextTick||r.setImmediate||function(e){setTimeout(e,0)};t.exports=function(e,t){return e?void t.then((function(t){n((function(){e(null,t)}))}),(function(t){n((function(){e(t)}))})):t}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:66}],26:[function(e,t,r){(function(e){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":32}],27:[function(e,t,r){var o=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},s=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=o(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var u,c=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),u=0===l.x}catch(n){u=!1}function f(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function h(e,t,r,n){var i,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]):(s=e._events=o(null),e._eventsCount=0),a){if("function"==typeof a?a=s[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(i=f(e))&&i>0&&a.length>i){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else a=s[t]=r,++e._eventsCount;return e}function p(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(r=s[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,o=y(e,n),i=0;i=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(var r=t,n=r+1,o=e.length;n=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return m(this,e,!0)},a.prototype.rawListeners=function(e){return m(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],28:[function(e,t,r){t.exports=function(e){var t=Array.prototype.slice.call(arguments,1);return t.length&&(e=e.replace(/(%?)(%([jds]))/g,(function(e,r,n,o){var i=t.shift();switch(o){case"s":i=""+i;break;case"d":i=Number(i);break;case"j":i=JSON.stringify(i)}return r?(t.unshift(i),e):i}))),t.length&&(e+=" "+t.join(" ")),""+e.replace(/%{2,2}/g,"%")}},{}],29:[function(e,t,r){var n=e("http"),o=e("url"),i=t.exports;for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);function a(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=a(e),n.request.call(this,e,t)},i.get=function(e,t){return e=a(e),n.get.call(this,e,t)}},{http:80,url:87}],30:[function(e,t,r){r.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,u=(1<>1,l=-7,f=r?o-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=c}return(p?-1:1)*s*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var s,a,u,c=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*m}},{}],31:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],32:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],33:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],34:[function(e,t,r){var n=e("./lib/js-yaml.js");t.exports=n},{"./lib/js-yaml.js":35}],35:[function(e,t,r){var n=e("./js-yaml/loader"),o=e("./js-yaml/dumper");function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=n.load,t.exports.loadAll=n.loadAll,t.exports.safeLoad=n.safeLoad,t.exports.safeLoadAll=n.safeLoadAll,t.exports.dump=o.dump,t.exports.safeDump=o.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=i("scan"),t.exports.parse=i("parse"),t.exports.compose=i("compose"),t.exports.addConstructor=i("addConstructor")},{"./js-yaml/dumper":37,"./js-yaml/exception":38,"./js-yaml/loader":39,"./js-yaml/schema":41,"./js-yaml/schema/core":42,"./js-yaml/schema/default_full":43,"./js-yaml/schema/default_safe":44,"./js-yaml/schema/failsafe":45,"./js-yaml/schema/json":46,"./js-yaml/type":47}],36:[function(e,t,r){function n(e){return null==e}t.exports.isNothing=n,t.exports.isObject=function(e){return"object"==typeof e&&null!==e},t.exports.toArray=function(e){return Array.isArray(e)?e:n(e)?[]:[e]},t.exports.repeat=function(e,t){var r,n="";for(r=0;rn&&" "!==e[l+1],l=i);else if(!g(s))return 5;f=f&&y(s)}u=u||c&&i-l-1>n&&" "!==e[l+1]}return a||u?r>9&&v(e)?5:u?4:3:f&&!o(e)?1:2}function _(e,t,r,n){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==l.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,r),s=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),a=n||e.flowLevel>-1&&r>=e.flowLevel;switch(b(t,a,e.indent,s,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r"+w(t,e.indent)+x(p(function(e,t){for(var r,n,o,i=/(\n+)([^\n]*)/g,s=(r=-1!==(r=e.indexOf("\n"))?r:e.length,i.lastIndex=r,E(e.slice(0,r),t)),a="\n"===e[0]||" "===e[0];o=i.exec(e);){var u=o[1],c=o[2];n=" "===c[0],s+=u+(a||n||""===c?"":"\n")+E(c,t),a=n}return s}(t,s),i));case 5:return'"'+function(e){for(var t,r,n,o="",i=0;i=55296&&t<=56319&&(r=e.charCodeAt(i+1))>=56320&&r<=57343?(o+=f(1024*(t-55296)+r-56320+65536),i++):o+=!(n=c[t])&&g(t)?e[i]:n||f(t);return o}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function w(e,t){var r=v(e)?String(t):"",n="\n"===e[e.length-1];return r+(!n||"\n"!==e[e.length-2]&&"\n"!==e?n?"":"-":"+")+"\n"}function x(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function E(e,t){if(""===e||" "===e[0])return e;for(var r,n,o=/ [^ ]/g,i=0,s=0,a=0,u="";r=o.exec(e);)(a=r.index)-i>t&&(n=s>i?s:a,u+="\n"+e.slice(i,n),i=n+1),s=a;return u+="\n",e.length-i>t&&s>i?u+=e.slice(i,s)+"\n"+e.slice(s+1):u+=e.slice(i),u.slice(1)}function S(e,t,r){var n,i,s,c,l,f;for(s=0,c=(i=r?e.explicitTypes:e.implicitTypes).length;s tag resolver accepts not "'+f+'" style');n=l.represent[f](t,f)}e.dump=n}return!0}return!1}function A(e,t,r,n,i,s){e.tag=null,e.dump=r,S(e,r,!1)||S(e,r,!0);var u=a.call(e.dump);n&&(n=e.flowLevel<0||e.flowLevel>t);var c,l,f="[object Object]"===u||"[object Array]"===u;if(f&&(l=-1!==(c=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&t>0)&&(i=!1),l&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(f&&l&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===u)n&&0!==Object.keys(e.dump).length?(function(e,t,r,n){var i,s,a,u,c,l,f="",h=e.tag,p=Object.keys(r);if(!0===e.sortKeys)p.sort();else if("function"==typeof e.sortKeys)p.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(i=0,s=p.length;i1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=d(e,t)),A(e,t+1,u,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",f+=l+=e.dump));e.tag=h,e.dump=f||"{}"}(e,t,e.dump,i),l&&(e.dump="&ref_"+c+e.dump)):(function(e,t,r){var n,o,i,s,a,u="",c=e.tag,l=Object.keys(r);for(n=0,o=l.length;n1024&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),A(e,t,s,!1,!1)&&(u+=a+=e.dump));e.tag=c,e.dump="{"+u+"}"}(e,t,e.dump),l&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===u){var h=e.noArrayIndent?t-1:t;n&&0!==e.dump.length?(function(e,t,r,n){var o,i,s="",a=e.tag;for(o=0,i=r.length;o "+e.dump)}return!0}function $(e,t){var r,n,o=[],i=[];for(k(e,o,i),r=0,n=i.length;r>10),56320+(e-65536&1023))}for(var E=new Array(256),S=new Array(256),A=0;A<256;A++)E[A]=w(A)?1:0,S[A]=w(A);function $(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function k(e,t){return new o(t,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function O(e,t){throw k(e,t)}function P(e,t){e.onWarning&&e.onWarning.call(null,k(e,t))}var j={YAML:function(e,t,r){var n,o,i;null!==e.version&&O(e,"duplication of %YAML directive"),1!==r.length&&O(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&O(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),i=parseInt(n[2],10),1!==o&&O(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&P(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,o;2!==r.length&&O(e,"TAG directive accepts exactly two arguments"),n=r[0],o=r[1],h.test(n)||O(e,"ill-formed tag handle (first argument) of the TAG directive"),u.call(e.tagMap,n)&&O(e,'there is a previously declared suffix for "'+n+'" tag handle'),p.test(o)||O(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=o}};function C(e,t,r,n){var o,i,s,a;if(t1&&(e.result+=n.repeat("\n",t-1))}function D(e,t){var r,n,o=e.tag,i=e.anchor,s=[],a=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),n=e.input.charCodeAt(e.position);0!==n&&45===n&&g(e.input.charCodeAt(e.position+1));)if(a=!0,e.position++,R(e,!0,-1)&&e.lineIndent<=t)s.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,B(e,t,3,!1,!0),s.push(e.result),R(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)O(e,"bad indentation of a sequence entry");else if(e.lineIndentt?A=1:e.lineIndent===t?A=0:e.lineIndentt?A=1:e.lineIndent===t?A=0:e.lineIndentt)&&(B(e,t,4,!0,o)&&(y?p=e.result:d=e.result),y||(N(e,l,f,h,p,d,i,s),h=p=d=null),R(e,!0,-1),a=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==a)O(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===i?O(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?O(e,"repeat of an indentation width identifier"):(l=t+i-1,c=!0)}if(m(s)){do{s=e.input.charCodeAt(++e.position)}while(m(s));if(35===s)do{s=e.input.charCodeAt(++e.position)}while(!d(s)&&0!==s)}for(;0!==s;){for(I(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!c||e.lineIndentl&&(l=e.lineIndent),d(s))f++;else{if(e.lineIndent0){for(o=s,i=0;o>0;o--)(s=v(a=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+s:O(e,"expected hexadecimal character");e.result+=x(i),e.position++}else O(e,"unknown escape sequence");r=n=e.position}else d(a)?(C(e,r,n,!0),L(e,R(e,!1,t)),r=n=e.position):e.position===e.lineStart&&M(e)?O(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}O(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?k=!0:function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!g(n)&&!y(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(r)||O(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],R(e,!0,-1),!0}(e)?(k=!0,null===e.tag&&null===e.anchor||O(e,"alias node should not have any properties")):function(e,t,r){var n,o,i,s,a,u,c,l,f=e.kind,h=e.result;if(g(l=e.input.charCodeAt(e.position))||y(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(g(n=e.input.charCodeAt(e.position+1))||r&&y(n)))return!1;for(e.kind="scalar",e.result="",o=i=e.position,s=!1;0!==l;){if(58===l){if(g(n=e.input.charCodeAt(e.position+1))||r&&y(n))break}else if(35===l){if(g(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&M(e)||r&&y(l))break;if(d(l)){if(a=e.line,u=e.lineStart,c=e.lineIndent,R(e,!1,-1),e.lineIndent>=t){s=!0,l=e.input.charCodeAt(e.position);continue}e.position=i,e.line=a,e.lineStart=u,e.lineIndent=c;break}}s&&(C(e,o,i,!1),L(e,e.line-a),o=i=e.position,s=!1),m(l)||(i=e.position+1),l=e.input.charCodeAt(++e.position)}return C(e,o,i,!1),!!e.result||(e.kind=f,e.result=h,!1)}(e,p,1===r)&&(k=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===A&&(k=c&&D(e,w))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(l=0,f=e.implicitTypes.length;l tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result)?(e.result=h.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):O(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):O(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||k}function z(e){var t,r,n,o,i=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(o=e.input.charCodeAt(e.position))&&(R(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(s=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!g(o);)o=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&O(e,"directive name must not be less than one character in length");0!==o;){for(;m(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!d(o));break}if(d(o))break;for(t=e.position;0!==o&&!g(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==o&&I(e),u.call(j,r)?j[r](e,r,n):P(e,'unknown document directive "'+r+'"')}R(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,R(e,!0,-1)):s&&O(e,"directives end mark is expected"),B(e,e.lineIndent-1,4,!1,!0),R(e,!0,-1),e.checkLineBreaks&&l.test(e.input.slice(i,e.position))&&P(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&M(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,R(e,!0,-1)):e.position0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(o-1));)if(o-=1,this.position-o>t/2-1){r=" ... ",o+=5;break}for(i="",s=this.position;st/2-1){i=" ... ",s-=5;break}return a=this.buffer.slice(o,s),n.repeat(" ",e)+r+a+i+"\n"+n.repeat(" ",e+this.position-o+r.length)+"^"},o.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(r+=":\n"+t),r},t.exports=o},{"./common":36}],41:[function(e,t,r){var n=e("./common"),o=e("./exception"),i=e("./type");function s(e,t,r){var n=[];return e.include.forEach((function(e){r=s(e,t,r)})),e[t].forEach((function(e){r.forEach((function(t,r){t.tag===e.tag&&t.kind===e.kind&&n.push(r)})),r.push(e)})),r.filter((function(e,t){return-1===n.indexOf(t)}))}function a(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=s(this,"implicit",[]),this.compiledExplicit=s(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{}};function n(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,o=e.replace(/[\r\n=]/g,""),s=o.length,a=i,u=0,c=[];for(t=0;t>16&255),c.push(u>>8&255),c.push(255&u)),u=u<<6|a.indexOf(o.charAt(t));return 0==(r=s%4*6)?(c.push(u>>16&255),c.push(u>>8&255),c.push(255&u)):18===r?(c.push(u>>10&255),c.push(u>>2&255)):12===r&&c.push(u>>4&255),n?n.from?n.from(c):new n(c):c},predicate:function(e){return n&&n.isBuffer(e)},represent:function(e){var t,r,n="",o=0,s=e.length,a=i;for(t=0;t>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]),o=(o<<8)+e[t];return 0==(r=s%3)?(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]):2===r?(n+=a[o>>10&63],n+=a[o>>4&63],n+=a[o<<2&63],n+=a[64]):1===r&&(n+=a[o>>2&63],n+=a[o<<4&63],n+=a[64],n+=a[64]),n}})},{"../type":47}],49:[function(e,t,r){var n=e("../type");t.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":47}],50:[function(e,t,r){var n=e("../common"),o=e("../type"),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=/^[-+]?[0-9]+e/;t.exports=new o("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!i.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r,n,o;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,o=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){o.unshift(parseFloat(e,10))})),t=0,n=1,o.forEach((function(e){t+=e*n,n*=60})),r*t):r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return r=e.toString(10),s.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"})},{"../common":36,"../type":47}],51:[function(e,t,r){var n=e("../common"),o=e("../type");function i(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function s(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}t.exports=new o("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r=e.length,n=0,o=!1;if(!r)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===r)return!0;if("b"===(t=e[++n])){for(n++;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":36,"../type":47}],52:[function(e,t,r){var o;try{o=e("esprima")}catch(n){"undefined"!=typeof window&&(o=window.esprima)}var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",r=o.parse(t,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&("ArrowFunctionExpression"===r.body[0].expression.type||"FunctionExpression"===r.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,r="("+e+")",n=o.parse(r,{range:!0}),i=[];if("Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"ArrowFunctionExpression"!==n.body[0].expression.type&&"FunctionExpression"!==n.body[0].expression.type)throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach((function(e){i.push(e.name)})),t=n.body[0].expression.body.range,"BlockStatement"===n.body[0].expression.body.type?new Function(i,r.slice(t[0]+1,t[1]-1)):new Function(i,"return "+r.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},{"../../type":47}],53:[function(e,t,r){var n=e("../../type");t.exports=new n("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,r=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1}return!0},construct:function(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(r&&(n=r[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},{"../../type":47}],54:[function(e,t,r){var n=e("../../type");t.exports=new n("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},{"../../type":47}],55:[function(e,t,r){var n=e("../type");t.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":47}],56:[function(e,t,r){var n=e("../type");t.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},{"../type":47}],57:[function(e,t,r){var n=e("../type");t.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":47}],58:[function(e,t,r){var n=e("../type"),o=Object.prototype.hasOwnProperty,i=Object.prototype.toString;t.exports=new n("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,s,a,u=[],c=e;for(t=0,r=c.length;t0&&(d=t.exports.formatter.apply(null,a)),r&&r.message&&(d+=(d?" \n":"")+r.message);var m=new e(d);return function(e,t){(function(e,t){!function(e){if(!p)return!1;var t=Object.getOwnPropertyDescriptor(e,"stack");return!!t&&"function"==typeof t.get}(e)?e.stack=t?f(e.stack,t.stack):h(e.stack):t?function(e,t){var r=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return f(r.get.apply(e),t.stack)},enumerable:!1,configurable:!0})}(e,t):function(e){var t=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return h(t.get.apply(e))},enumerable:!1,configurable:!0})}(e)})(e,t),u(e,t)}(m,r),function(e){e.toJSON=c,e.inspect=l}(m),u(m,n),m}}function u(e,t){if(t&&"object"==typeof t)for(var r=Object.keys(t),n=0;n=0))try{e[o]=t[o]}catch(e){}}}function c(){var e={},t=Object.keys(this);t=t.concat(s);for(var r=0;r=0)return t.splice(r,1),t.join("\n");return e}}t.exports=a(Error),t.exports.error=a(Error),t.exports.eval=a(EvalError),t.exports.range=a(RangeError),t.exports.reference=a(ReferenceError),t.exports.syntax=a(SyntaxError),t.exports.type=a(TypeError),t.exports.uri=a(URIError),t.exports.formatter=n;var p=!(!Object.getOwnPropertyDescriptor||!Object.defineProperty||"undefined"!=typeof navigator&&/Android/.test(navigator.userAgent))},{"format-util":28}],65:[function(e,t,r){(function(e){!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,o){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,o)}));default:for(i=new Array(a-1),s=0;s1)for(var r=1;r0&&c>u&&(c=u);for(var l=0;l=0?(f=m.substr(0,g),h=m.substr(g+1)):(f=m,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),n(s,p)?o(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],68:[function(e,t,r){var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(s(e),(function(s){var a=encodeURIComponent(n(s))+r;return o(e[s])?i(e[s],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[s]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):$(e,s)):w(e,s,t,!1))):n||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(A,e):A(e))}function A(e){p("emit readable"),e.emit("readable"),j(e)}function $(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;return ei.length?i.length:e;if(s===i.length?o+=i:o+=i.slice(0,e),0==(e-=s)){s===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(s));break}++n}return t.length-=n,o}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,o=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,s),0==(e-=s)){s===i.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(s));break}++o}return t.length-=o,r}(e,t),n}(e,t.buffer,t.decoder),r);var r}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):S(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&T(this),null;var n,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&T(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var u=t&&!1===t.end||e===r.stdout||e===r.stderr?v:c;function c(){p("onend"),e.end()}i.endEmitted?o.nextTick(u):n.once("end",u),e.on("unpipe",(function t(r,o){p("onunpipe"),r===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,p("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",t),n.removeListener("end",c),n.removeListener("end",v),n.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",l);var f=!1,h=!1;function d(t){p("ondata"),h=!1,!1!==e.write(t)||h||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==I(i.pipes,e))&&!f&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,h=!0),n.pause())}function m(t){p("onerror",t),v(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),v()}function y(){p("onfinish"),e.removeListener("close",g),v()}function v(){p("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",y),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1?i:s.nextTick;b.WritableState=v;var l=e("core-util-is");l.inherits=e("inherits");var f,h={deprecate:e("util-deprecate")},p=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,m=o.Uint8Array||function(){},g=e("./internal/streams/destroy");function y(){}function v(t,r){u=u||e("./_stream_duplex"),t=t||{};var n=r instanceof u;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var o=t.highWaterMark,i=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(i||0===i)?i:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(s.nextTick(o,n),s.nextTick($,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),$(e,t))}(e,r,n,t,o);else{var i=S(r);i||r.corked||r.bufferProcessing||!r.bufferedRequest||E(e,r),n?c(x,e,r,i,o):x(e,r,i,o)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(t){if(u=u||e("./_stream_duplex"),!(f.call(b,this)||this instanceof u))return new b(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),p.call(this)}function _(e,t,r,n,o,i){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r)),t}(t,n,o);n!==s&&(r=!0,o="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,$(e,t),r&&(t.finished?s.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":70,"./internal/streams/destroy":76,"./internal/streams/stream":77,_process:66,"core-util-is":26,inherits:31,"process-nextick-args":65,"safe-buffer":79,timers:85,"util-deprecate":89}],75:[function(e,t,r){var n=e("safe-buffer").Buffer,o=e("util");function i(e,t,r){e.copy(t,r)}t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t=n.allocUnsafe(e>>>0),r=this.head,o=0;r;)i(r.data,t,o),o+=r.data.length,r=r.next;return t},e}(),o&&o.inspect&&o.inspect.custom&&(t.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":79,util:21}],76:[function(e,t,r){var n=e("process-nextick-args");function o(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(o,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":65}],77:[function(e,t,r){t.exports=e("events").EventEmitter},{events:27}],78:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":70,"./lib/_stream_passthrough.js":71,"./lib/_stream_readable.js":72,"./lib/_stream_transform.js":73,"./lib/_stream_writable.js":74}],79:[function(e,t,r){var n=e("buffer"),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=s),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:23}],80:[function(e,t,r){(function(t){var n=e("./lib/request"),o=e("./lib/response"),i=e("xtend"),s=e("builtin-status-codes"),a=e("url"),u=r;u.request=function(e,r){e="string"==typeof e?a.parse(e):i(e);var o=-1===t.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||o,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":82,"./lib/response":83,"builtin-status-codes":24,url:87,xtend:90}],81:[function(e,t,r){(function(e){r.fetch=a(e.fetch)&&a(e.ReadableStream),r.writableStream=a(e.WritableStream),r.abortController=a(e.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(u){}var t;function n(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(u){t=null}}else t=null;return t}function o(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var i=void 0!==e.ArrayBuffer,s=i&&a(e.ArrayBuffer.prototype.slice);function a(e){return"function"==typeof e}r.arraybuffer=r.fetch||i&&o("arraybuffer"),r.msstream=!r.fetch&&s&&o("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&i&&o("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&a(n().overrideMimeType),r.vbArray=a(e.VBArray),t=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],82:[function(e,t,r){(function(r,n,o){var i=e("./capability"),s=e("inherits"),a=e("./response"),u=e("readable-stream"),c=e("to-arraybuffer"),l=a.IncomingMessage,f=a.readyStates,h=t.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new o(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":i.vbArray&&e?"text:vbarray":"text"}(t,n),r._fetchTimer=null,r.on("finish",(function(){r._onFinish()}))};s(h,u.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,s=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=i.arraybuffer?c(o.concat(e._body)):i.blobConstructor?new n.Blob(e._body.map((function(e){return c(e)})),{type:(s["content-type"]||{}).value||""}):o.concat(e._body).toString());var u=[];if(Object.keys(s).forEach((function(e){var t=s[e].name,r=s[e].value;Array.isArray(r)?r.forEach((function(e){u.push([t,e])})):u.push([t,r])})),"fetch"===e._mode){var l=null;if(i.abortController){var h=new AbortController;l=h.signal,e._fetchAbortController=h,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){n.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var p=e._xhr=new n.XMLHttpRequest;try{p.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in p&&(p.responseType=e._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(p.timeout=t.requestTimeout,p.ontimeout=function(){e.emit("requestTimeout")}),u.forEach((function(e){p.setRequestHeader(e[0],e[1])})),e._response=null,p.onreadystatechange=function(){switch(p.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(p.onprogress=function(){e._onXHRProgress()}),p.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{p.send(a)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},h.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":81,"./response":83,_process:66,buffer:23,inherits:31,"readable-stream":78,"to-arraybuffer":86}],83:[function(e,t,r){(function(t,n,o){var i=e("./capability"),s=e("inherits"),a=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,s,u){var c=this;if(a.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===s){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),i.writableStream){var l=new WritableStream({write:function(e){return new Promise((function(t,r){c._destroyed?r():c.push(new o(e))?t():c._resumeFetch=t}))},close:function(){n.clearTimeout(u),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void r.body.pipeTo(l).catch((function(e){n.clearTimeout(u),c._destroyed||c.emit("error",e)}))}catch(e){}}var f=r.body.getReader();!function e(){f.read().then((function(t){if(!c._destroyed){if(t.done)return n.clearTimeout(u),void c.push(null);c.push(new o(t.value)),e()}})).catch((function(e){n.clearTimeout(u),c._destroyed||c.emit("error",e)}))}()}else if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!i.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var p=h.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}};s(c,a.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new o(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var i=r.substr(e._pos);if("x-user-defined"===e._charset){for(var s=new o(i.length),a=0;ae._pos&&(e.push(new o(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":81,_process:66,buffer:23,inherits:31,"readable-stream":78}],84:[function(e,t,r){var n=e("safe-buffer").Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(o>0&&(e.lastNeed=o-1),o):--n=0?(o>0&&(e.lastNeed=o-2),o):--n=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":79}],85:[function(e,t,r){(function(t,n){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,s=Array.prototype.slice,a={},u=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=u++,n=!(arguments.length<2)&&s.call(arguments,1);return a[t]=!0,o((function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":66,timers:85}],86:[function(e,t,r){var n=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,o=0;o",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=e("querystring");function b(e,t,r){if(e&&o.isObject(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),a=-1!==i&&i127?N+="x":N+=T[I];if(!N.match(p)){var M=j.slice(0,k),L=j.slice(k+1),D=T.match(d);D&&(M.push(D[1]),L.unshift(D[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var U=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+U,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[x])for(k=0,C=l.length;k0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=E.slice(-1)[0],$=(r.host||e.host||E.length>1)&&("."===A||".."===A)||""===A,k=0,O=E.length;O>=0;O--)"."===(A=E[O])?E.splice(O,1):".."===A?(E.splice(O,1),k++):k&&(E.splice(O,1),k--);if(!w&&!x)for(;k--;k)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),$&&"/"!==E.join("/").substr(-1)&&E.push("");var P,j=""===E[0]||E[0]&&"/"===E[0].charAt(0);return S&&(r.hostname=r.host=j?"":E.length?E.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),(w=w||r.host&&E.length)&&!j&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":88,punycode:22,querystring:69}],88:[function(e,t,r){t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],89:[function(e,t,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],90:[function(e,t,r){t.exports=function(){for(var e={},t=0;te.length)))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return t.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!t.binary_ops[String.fromCharCode(e)]||t.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return t.isIdentifierStart(e)||t.isDecimalDigit(e)}throwError(e){const t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,r){if(t.hooks[e]){const n={context:this,node:r};return t.hooks.run(e,n),n.node}return r}searchHook(e){if(t.hooks[e]){const r={context:this};return t.hooks[e].find((function(e){return e.call(r.context,r),r.node})),r.node}}gobbleSpaces(){let e=this.code;for(;e===t.SPACE_CODE||e===t.TAB_CODE||e===t.LF_CODE||e===t.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const e=this.gobbleExpressions(),r=1===e.length?e[0]:{type:t.COMPOUND,body:e};return this.runHook("after-all",r)}gobbleExpressions(e){let r,n,o=[];for(;this.index0;){if(t.binary_ops.hasOwnProperty(e)&&(!t.isIdentifierStart(this.code)||this.index+e.lengthi.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;o.length>2&&u(o[o.length-2]);)a=o.pop(),r=o.pop().value,s=o.pop(),e={type:t.BINARY_EXP,operator:r,left:s,right:a},o.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+c),o.push(i,e)}for(u=o.length-1,e=o[u];u>1;)e={type:t.BINARY_EXP,operator:o[u-1].value,left:o[u-2],right:e},u-=2;return e}gobbleToken(){let e,r,n,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(e=this.code,t.isDecimalDigit(e)||e===t.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===t.SQUOTE_CODE||e===t.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(e===t.OBRACK_CODE)o=this.gobbleArray();else{for(r=this.expr.substr(this.index,t.max_unop_len),n=r.length;n>0;){if(t.unary_ops.hasOwnProperty(r)&&(!t.isIdentifierStart(this.code)||this.index+r.length=r.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(i===t.COMMA_CODE){if(this.index++,o++,o!==r.length)if(e===t.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===t.CBRACK_CODE)for(let e=r.length;e{if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)}))}}(t),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),t.max_unop_len=t.getMaxKeyLen(t.unary_ops),t.max_binop_len=t.getMaxKeyLen(t.binary_ops);const n=e=>new t(e).parse(),o=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(t).filter((e=>!o.includes(e)&&void 0===n[e])).forEach((e=>{n[e]=t[e]})),n.Jsep=t;var i={name:"ternary",init(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;const r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}}))}};n.plugins.register(i);var s={name:"regex",init(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){const r=++this.index;let n=!1;for(;this.index=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57))break;i+=this.char}try{o=new RegExp(n,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:o,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}};const a={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|="]),updateOperators:[43,45],assignmentPrecedence:.9,init(e){const t=[e.IDENTIFIER,e.MEMBER_EXP];function r(e){a.assignmentOperators.has(e.operator)?(e.type="AssignmentExpression",r(e.left),r(e.right)):e.operator||Object.values(e).forEach((e=>{e&&"object"==typeof e&&r(e)}))}a.assignmentOperators.forEach((t=>e.addBinaryOp(t,a.assignmentPrecedence,!0))),e.hooks.add("gobble-token",(function(e){const r=this.code;a.updateOperators.some((e=>e===r&&e===this.expr.charCodeAt(this.index+1)))&&(this.index+=2,e.node={type:"UpdateExpression",operator:43===r?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},e.node.argument&&t.includes(e.node.argument.type)||this.throwError(`Unexpected ${e.node.operator}`))})),e.hooks.add("after-token",(function(e){if(e.node){const r=this.code;a.updateOperators.some((e=>e===r&&e===this.expr.charCodeAt(this.index+1)))&&(t.includes(e.node.type)||this.throwError(`Unexpected ${e.node.operator}`),this.index+=2,e.node={type:"UpdateExpression",operator:43===r?"++":"--",argument:e.node,prefix:!1})}})),e.hooks.add("after-expression",(function(e){e.node&&r(e.node)}))}};n.plugins.register(s,a),n.addUnaryOp("typeof"),n.addLiteral("null",null),n.addLiteral("undefined",void 0);const u={evalAst(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":return u.evalBinaryExpression(e,t);case"Compound":return u.evalCompound(e,t);case"ConditionalExpression":return u.evalConditionalExpression(e,t);case"Identifier":return u.evalIdentifier(e,t);case"Literal":return u.evalLiteral(e,t);case"MemberExpression":return u.evalMemberExpression(e,t);case"UnaryExpression":return u.evalUnaryExpression(e,t);case"ArrayExpression":return u.evalArrayExpression(e,t);case"CallExpression":return u.evalCallExpression(e,t);case"AssignmentExpression":return u.evalAssignmentExpression(e,t);default:throw SyntaxError("Unexpected expression",e)}},evalBinaryExpression:(e,t)=>({"||":(e,t)=>e||t(),"&&":(e,t)=>e&&t(),"|":(e,t)=>e|t(),"^":(e,t)=>e^t(),"&":(e,t)=>e&t(),"==":(e,t)=>e==t(),"!=":(e,t)=>e!=t(),"===":(e,t)=>e===t(),"!==":(e,t)=>e!==t(),"<":(e,t)=>e":(e,t)=>e>t(),"<=":(e,t)=>e<=t(),">=":(e,t)=>e>=t(),"<<":(e,t)=>e<>":(e,t)=>e>>t(),">>>":(e,t)=>e>>>t(),"+":(e,t)=>e+t(),"-":(e,t)=>e-t(),"*":(e,t)=>e*t(),"/":(e,t)=>e/t(),"%":(e,t)=>e%t()}[e.operator](u.evalAst(e.left,t),(()=>u.evalAst(e.right,t)))),evalCompound(e,t){let r;for(let n=0;nu.evalAst(e.test,t)?u.evalAst(e.consequent,t):u.evalAst(e.alternate,t),evalIdentifier(e,t){if(e.name in t)return t[e.name];throw ReferenceError(`${e.name} is not defined`)},evalLiteral:e=>e.value,evalMemberExpression(e,t){if("Identifier"===e.property.type&&"constructor"===e.property.name||"Identifier"===e.object.type&&"constructor"===e.object.name)throw new Error("'constructor' property is disabled");const r=e.computed?u.evalAst(e.property):e.property.name,n=u.evalAst(e.object,t),o=n[r];if("function"==typeof o){if(n===Function&&"bind"===r)throw new Error("Function.prototype.bind is disabled");if(n===Function&&("call"===r||"apply"===r))throw new Error("Function.prototype.call and Function.prototype.apply are disabled");return o===Function?o:o.bind(n)}return o},evalUnaryExpression:(e,t)=>({"-":e=>-u.evalAst(e,t),"!":e=>!u.evalAst(e,t),"~":e=>~u.evalAst(e,t),"+":e=>+u.evalAst(e,t),typeof:e=>typeof u.evalAst(e,t)}[e.operator](e.argument)),evalArrayExpression:(e,t)=>e.elements.map((e=>u.evalAst(e,t))),evalCallExpression(e,t){const r=e.arguments.map((e=>u.evalAst(e,t))),n=u.evalAst(e.callee,t);if(n===Function)throw new Error("Function constructor is disabled");return n(...r)},evalAssignmentExpression(e,t){if("Identifier"!==e.left.type)throw SyntaxError("Invalid left-hand side in assignment");const r=e.left.name;if("__proto__"===r)throw new Error("Assignment to __proto__ is disabled");const n=u.evalAst(e.right,t);return t[r]=n,t[r]}};function c(e,t){return(e=e.slice()).push(t),e}function l(e,t){return(t=t.slice()).unshift(e),t}class f extends Error{constructor(e){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=e,this.name="NewError"}}function h(e,t,r,n,o){if(!(this instanceof h))try{return new h(e,t,r,n,o)}catch(e){if(!e.avoidNew)throw e;return e.value}"string"==typeof e&&(o=n,n=r,r=t,t=e,e=null);const i=e&&"object"==typeof e;if(e=e||{},this.json=e.json||r,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=!Object.hasOwn(e,"wrap")||e.wrap,this.sandbox=e.sandbox||{},this.eval=void 0===e.eval?"safe":e.eval,this.ignoreEvalErrors=void 0!==e.ignoreEvalErrors&&e.ignoreEvalErrors,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||n||null,this.otherTypeCallback=e.otherTypeCallback||o||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==e.autostart){const n={path:i?e.path:t};i?"json"in e&&(n.json=e.json):n.json=r;const o=this.evaluate(n);if(!o||"object"!=typeof o)throw new f(o);return o}}h.prototype.evaluate=function(e,t,r,n){let o=this.parent,i=this.parentProperty,{flatten:s,wrap:a}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,t=t||this.json,(e=e||this.path)&&"object"==typeof e&&!Array.isArray(e)){if(!e.path&&""!==e.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=e),s=Object.hasOwn(e,"flatten")?e.flatten:s,this.currResultType=Object.hasOwn(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=Object.hasOwn(e,"sandbox")?e.sandbox:this.currSandbox,a=Object.hasOwn(e,"wrap")?e.wrap:a,this.currEval=Object.hasOwn(e,"eval")?e.eval:this.currEval,r=Object.hasOwn(e,"callback")?e.callback:r,this.currOtherTypeCallback=Object.hasOwn(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,o=Object.hasOwn(e,"parent")?e.parent:o,i=Object.hasOwn(e,"parentProperty")?e.parentProperty:i,e=e.path}if(o=o||null,i=i||null,Array.isArray(e)&&(e=h.toPathString(e)),!e&&""!==e||!t)return;const u=h.toPathArray(e);"$"===u[0]&&u.length>1&&u.shift(),this._hasParentSelector=null;const c=this._trace(u,t,["$"],o,i,r).filter((function(e){return e&&!e.isParentSelector}));return c.length?a||1!==c.length||c[0].hasArrExpr?c.reduce(((e,t)=>{const r=this._getPreferredOutput(t);return s&&Array.isArray(r)?e=e.concat(r):e.push(r),e}),[]):this._getPreferredOutput(c[0]):a?[]:void 0},h.prototype._getPreferredOutput=function(e){const t=this.currResultType;switch(t){case"all":{const t=Array.isArray(e.path)?e.path:h.toPathArray(e.path);return e.pointer=h.toPointer(t),e.path="string"==typeof e.path?e.path:h.toPathString(e.path),e}case"value":case"parent":case"parentProperty":return e[t];case"path":return h.toPathString(e[t]);case"pointer":return h.toPointer(e.path);default:throw new TypeError("Unknown result type")}},h.prototype._handleCallback=function(e,t,r){if(t){const n=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:h.toPathString(e.path),t(n,r,e)}},h.prototype._trace=function(e,t,r,n,o,i,s,a){let u;if(!e.length)return u={path:r,value:t,parent:n,parentProperty:o,hasArrExpr:s},this._handleCallback(u,i,"value"),u;const f=e[0],h=e.slice(1),p=[];function d(e){Array.isArray(e)?e.forEach((e=>{p.push(e)})):p.push(e)}if(("string"!=typeof f||a)&&t&&Object.hasOwn(t,f))d(this._trace(h,t[f],c(r,f),t,f,i,s));else if("*"===f)this._walk(t,(e=>{d(this._trace(h,t[e],c(r,e),t,e,i,!0,!0))}));else if(".."===f)d(this._trace(h,t,r,n,o,i,s)),this._walk(t,(n=>{"object"==typeof t[n]&&d(this._trace(e.slice(),t[n],c(r,n),t,n,i,!0))}));else{if("^"===f)return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:h,isParentSelector:!0};if("~"===f)return u={path:c(r,f),value:o,parent:n,parentProperty:null},this._handleCallback(u,i,"property"),u;if("$"===f)d(this._trace(h,t,r,null,null,i,s));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(f))d(this._slice(f,h,t,r,n,o,i));else if(0===f.indexOf("?(")){if(!1===this.currEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const e=f.replace(/^\?\((.*?)\)$/u,"$1"),s=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(e);s?this._walk(t,(e=>{const a=[s[2]],u=s[1]?t[e][s[1]]:t[e];this._trace(a,u,r,n,o,i,!0).length>0&&d(this._trace(h,t[e],c(r,e),t,e,i,!0))})):this._walk(t,(s=>{this._eval(e,t[s],s,r,n,o)&&d(this._trace(h,t[s],c(r,s),t,s,i,!0))}))}else if("("===f[0]){if(!1===this.currEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");d(this._trace(l(this._eval(f,t,r.at(-1),r.slice(0,-1),n,o),h),t,r,n,o,i,s))}else if("@"===f[0]){let e=!1;const s=f.slice(1,-2);switch(s){case"scalar":t&&["object","function"].includes(typeof t)||(e=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===s&&(e=!0);break;case"integer":!Number.isFinite(t)||t%1||(e=!0);break;case"number":Number.isFinite(t)&&(e=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(e=!0);break;case"object":t&&typeof t===s&&(e=!0);break;case"array":Array.isArray(t)&&(e=!0);break;case"other":e=this.currOtherTypeCallback(t,r,n,o);break;case"null":null===t&&(e=!0);break;default:throw new TypeError("Unknown value type "+s)}if(e)return u={path:r,value:t,parent:n,parentProperty:o},this._handleCallback(u,i,"value"),u}else if("`"===f[0]&&t&&Object.hasOwn(t,f.slice(1))){const e=f.slice(1);d(this._trace(h,t[e],c(r,e),t,e,i,s,!0))}else if(f.includes(",")){const e=f.split(",");for(const s of e)d(this._trace(l(s,h),t,r,n,o,i,!0))}else!a&&t&&Object.hasOwn(t,f)&&d(this._trace(h,t[f],c(r,f),t,f,i,s,!0))}if(this._hasParentSelector)for(let c=0;c{t(e)}))},h.prototype._slice=function(e,t,r,n,o,i,s){if(!Array.isArray(r))return;const a=r.length,u=e.split(":"),c=u[2]&&Number.parseInt(u[2])||1;let f=u[0]&&Number.parseInt(u[0])||0,h=u[1]&&Number.parseInt(u[1])||a;f=f<0?Math.max(0,f+a):Math.min(a,f),h=h<0?Math.max(0,h+a):Math.min(a,h);const p=[];for(let d=f;d{p.push(e)}));return p},h.prototype._eval=function(e,t,r,n,o,i){this.currSandbox._$_parentProperty=i,this.currSandbox._$_parent=o,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const s=e.includes("@path");s&&(this.currSandbox._$_path=h.toPathString(n.concat([r])));const a=this.currEval+"Script:"+e;if(!h.cache[a]){let t=e.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(s&&(t=t.replaceAll("@path","_$_path")),"safe"===this.currEval||!0===this.currEval||void 0===this.currEval)h.cache[a]=new this.safeVm.Script(t);else if("native"===this.currEval)h.cache[a]=new this.vm.Script(t);else if("function"==typeof this.currEval&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const e=this.currEval;h.cache[a]=new e(t)}else{if("function"!=typeof this.currEval)throw new TypeError(`Unknown "eval" property "${this.currEval}"`);h.cache[a]={runInNewContext:e=>this.currEval(t,e)}}}try{return h.cache[a].runInNewContext(this.currSandbox)}catch(t){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+t.message+": "+e)}},h.cache={},h.toPathString=function(e){const t=e,r=t.length;let n="$";for(let o=1;o"function"==typeof e[t]));const o=r.map((t=>e[t]));t=n.reduce(((t,r)=>{let n=e[r].toString();return/function/u.test(n)||(n="function "+n),"var "+r+"="+n+";"+t}),"")+t,/(['"])use strict\1/u.test(t)||r.includes("arguments")||(t="var arguments = undefined;"+t),t=t.replace(/;\s*$/u,"");const i=t.lastIndexOf(";"),s=i>-1?t.slice(0,i+1)+" return "+t.slice(i+1):" return "+t;return new Function(...r,s)(...o)}}},e.JSONPath=h},"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((n="undefined"!=typeof globalThis?globalThis:n||self).JSONPath={});var i=Object.create,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,f=(e,t)=>function(){return t||(0,e[u(e)[0]])((t={exports:{}}).exports,t),t.exports},h=(e,t,r)=>(r=null!=e?i(c(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of u(t))l.call(e,o)||o===r||s(e,o,{get:()=>t[o],enumerable:!(n=a(t,o))||n.enumerable});return e})(!t&&e&&e.__esModule?r:s(r,"default",{value:e,enumerable:!0}),e)),p=f({"node_modules/ret/lib/types.js"(e,t){t.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}}}),d=f({"node_modules/ret/lib/sets.js"(e){var t=p(),r=()=>[{type:t.RANGE,from:48,to:57}],n=()=>[{type:t.CHAR,value:95},{type:t.RANGE,from:97,to:122},{type:t.RANGE,from:65,to:90}].concat(r()),o=()=>[{type:t.CHAR,value:9},{type:t.CHAR,value:10},{type:t.CHAR,value:11},{type:t.CHAR,value:12},{type:t.CHAR,value:13},{type:t.CHAR,value:32},{type:t.CHAR,value:160},{type:t.CHAR,value:5760},{type:t.RANGE,from:8192,to:8202},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233},{type:t.CHAR,value:8239},{type:t.CHAR,value:8287},{type:t.CHAR,value:12288},{type:t.CHAR,value:65279}];e.words=()=>({type:t.SET,set:n(),not:!1}),e.notWords=()=>({type:t.SET,set:n(),not:!0}),e.ints=()=>({type:t.SET,set:r(),not:!1}),e.notInts=()=>({type:t.SET,set:r(),not:!0}),e.whitespace=()=>({type:t.SET,set:o(),not:!1}),e.notWhitespace=()=>({type:t.SET,set:o(),not:!0}),e.anyChar=()=>({type:t.SET,set:[{type:t.CHAR,value:10},{type:t.CHAR,value:13},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233}],not:!0})}}),m=f({"node_modules/ret/lib/util.js"(e){var t=p(),r=d(),n={0:0,t:9,n:10,v:11,f:12,r:13};e.strToChars=function(e){return e=e.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(e,t,r,o,i,s,a,u){if(r)return e;var c=t?8:o?parseInt(o,16):i?parseInt(i,16):s?parseInt(s,8):a?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(a):n[u],l=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(l)&&(l="\\"+l),l}))},e.tokenizeClass=(n,o)=>{for(var i,s,a=[],u=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(i=u.exec(n));)if(i[1])a.push(r.words());else if(i[2])a.push(r.ints());else if(i[3])a.push(r.whitespace());else if(i[4])a.push(r.notWords());else if(i[5])a.push(r.notInts());else if(i[6])a.push(r.notWhitespace());else if(i[7])a.push({type:t.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else{if(!(s=i[12]))return[a,u.lastIndex];a.push({type:t.CHAR,value:s.charCodeAt(0)})}e.error(o,"Unterminated character class")},e.error=(e,t)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+t)}}}),g=f({"node_modules/ret/lib/positions.js"(e){var t=p();e.wordBoundary=()=>({type:t.POSITION,value:"b"}),e.nonWordBoundary=()=>({type:t.POSITION,value:"B"}),e.begin=()=>({type:t.POSITION,value:"^"}),e.end=()=>({type:t.POSITION,value:"$"})}}),y=f({"node_modules/ret/lib/index.js"(e,t){var r=m(),n=p(),o=d(),i=g();t.exports=e=>{var t,s,a=0,u={type:n.ROOT,stack:[]},c=u,l=u.stack,f=[],h=t=>{r.error(e,"Nothing to repeat at column "+(t-1))},p=r.strToChars(e);for(t=p.length;ae.high)}touches(e){return!(this.high+1e.high)}add(t){return new e(Math.min(this.low,t.low),Math.max(this.high,t.high))}subtract(t){return t.low<=this.low&&t.high>=this.high?[]:t.low>this.low&&t.highe+t.length),0)}add(t,n){var o=e=>{for(var t=0;t{for(var t=0;t{for(var t=0;t{for(var r=t.low;r<=t.high;)e.push(r),r++;return e}),[])}subranges(){return this.ranges.map((e=>({low:e.low,high:e.high,length:1+e.high-e.low})))}}}}),b=f({"node_modules/randexp/lib/randexp.js"(e,t){var r=y(),n=v(),o=r.types;t.exports=class e{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else{if("string"!=typeof e)throw new Error("Expected a regexp or string");this.ignoreCase=t&&-1!==t.indexOf("i"),this.multiline=t&&-1!==t.indexOf("m")}this.tokens=r(e)}_setDefaults(t){this.max=null!=t.max?t.max:null!=e.prototype.max?e.prototype.max:100,this.defaultRange=t.defaultRange?t.defaultRange:this.defaultRange.clone(),t.randInt&&(this.randInt=t.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var r,n,i,s,a;switch(e.type){case o.ROOT:case o.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&void 0===e.groupNumber&&(e.groupNumber=t.push(null)-1),n="",s=0,a=(r=e.options?this._randSelect(e.options):e.stack).length;sn.length)return null;for(let o=0;o=1)||e>r.length)return null;const i=r[e-1];let s=r[e];for(;s&&s>i&&"\n"===n[s-1];)--s;return n.slice(i,s)}(e.line,r);if(!i)return null;let{col:s}=e;if(i.length>n)if(s<=n-10)i=i.substr(0,n-1)+"\u2026";else{const e=Math.round(n/2);i.length>s+e&&(i=i.substr(0,s+e-1)+"\u2026"),s-=i.length-n,i="\u2026"+i.substr(1-n)}let a=1,u="";t&&(t.line===e.line&&s+(t.col-e.col)<=n+1?a=t.col-e.col:(a=Math.min(i.length+1,n)-s,u="\u2026"));return`${i}\n${s>1?" ".repeat(s-1):""}${"^".repeat(a)}${u}`}var a=class e{static copy(t){return new e(t.start,t.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return"number"!=typeof this.start||!this.end||this.end<=this.start}setOrigRange(e,t){const{start:r,end:n}=this;if(0===e.length||n<=e[0])return this.origStart=r,this.origEnd=n,t;let o=t;for(;or);)++o;this.origStart=r+o;const i=o;for(;o=n);)++o;return this.origEnd=n+o,i}},u=class e{static addStringTerminator(t,r,n){if("\n"===n[n.length-1])return n;const o=e.endOfWhiteSpace(t,r);return o>=t.length||"\n"===t[o]?n+"\n":n}static atDocumentBoundary(e,r,n){const o=e[r];if(!o)return!0;const i=e[r-1];if(i&&"\n"!==i)return!1;if(n){if(o!==n)return!1}else if(o!==t.DIRECTIVES_END&&o!==t.DOCUMENT_END)return!1;const s=e[r+1],a=e[r+2];if(s!==o||a!==o)return!1;const u=e[r+3];return!u||"\n"===u||"\t"===u||" "===u}static endOfIdentifier(e,t){let r=e[t];const n="<"===r,o=n?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;r&&-1===o.indexOf(r);)r=e[t+=1];return n&&">"===r&&(t+=1),t}static endOfIndent(e,t){let r=e[t];for(;" "===r;)r=e[t+=1];return t}static endOfLine(e,t){let r=e[t];for(;r&&"\n"!==r;)r=e[t+=1];return t}static endOfWhiteSpace(e,t){let r=e[t];for(;"\t"===r||" "===r;)r=e[t+=1];return t}static startOfLine(e,t){let r=e[t-1];if("\n"===r)return t;for(;r&&"\n"!==r;)r=e[t-=1];return t+1}static endOfBlockIndent(t,r,n){const o=e.endOfIndent(t,n);if(o>n+r)return o;{const r=e.endOfWhiteSpace(t,o),n=t[r];if(!n||"\n"===n)return r}return null}static atBlank(e,t,r){const n=e[t];return"\n"===n||"\t"===n||" "===n||r&&!n}static nextNodeIsIndented(e,t,r){return!(!e||t<0)&&(t>0||r&&"-"===e)}static normalizeOffset(t,r){const n=t[r];return n?"\n"!==n&&"\n"===t[r-1]?r-1:e.endOfWhiteSpace(t,r):r}static foldNewline(t,r,n){let o=0,i=!1,s="",a=t[r+1];for(;" "===a||"\t"===a||"\n"===a;){switch(a){case"\n":o=0,r+=1,s+="\n";break;case"\t":o<=n&&(i=!0),r=e.endOfWhiteSpace(t,r+2)-1;break;case" ":o+=1,r+=1}a=t[r+1]}return s||(s=" "),a&&o<=n&&(i=!0),{fold:s,offset:r,error:i}}constructor(e,t,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=t||[],this.type=e,this.value=null}getPropValue(e,t,r){if(!this.context)return null;const{src:n}=this.context,o=this.props[e];return o&&n[o.start]===t?n.slice(o.start+(r?1:0),o.end):null}get anchor(){for(let e=0;e0?e.join("\n"):null}commentHasRequiredWhitespace(t){const{src:r}=this.context;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;const{end:n}=this.valueRange;return t!==n||e.atBlank(r,n-1)}get hasComment(){if(this.context){const{src:e}=this.context;for(let r=0;rr.setOrigRange(e,t))),t}toString(){const{context:{src:t},range:r,value:n}=this;if(null!=n)return n;const o=t.slice(r.start,r.end);return e.addStringTerminator(t,r.end,o)}},c=class extends Error{constructor(e,t,r){if(!(r&&t instanceof u))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;const e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new a(this.offset,this.offset+1);const t=e&&i(this.offset,e);if(t){const e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){const{line:t,col:r}=this.linePos.start;this.message+=` at line ${t}, column ${r}`;const n=e&&s(this.linePos,e);n&&(this.message+=`:\n\n${n}\n`)}delete this.source}},l=class extends c{constructor(e,t){super("YAMLSemanticError",e,t)}};e.Char=t,e.Node=u,e.PlainValue=class e extends u{static endOfLine(e,t,r){let n=e[t],o=t;for(;n&&"\n"!==n&&(!r||"["!==n&&"]"!==n&&"{"!==n&&"}"!==n&&","!==n);){const t=e[o+1];if(":"===n&&(!t||"\n"===t||"\t"===t||" "===t||r&&","===t))break;if((" "===n||"\t"===n)&&"#"===t)break;o+=1,n=t}return o}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{src:r}=this.context;let n=r[t-1];for(;en?r.slice(n,s+1):e)}else o+=e}const i=r[e];switch(i){case"\t":return{errors:[new l(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":return{errors:[new l(this,`Plain value cannot start with reserved character ${i}`)],str:o};default:return o}}parseBlockValue(t){const{indent:r,inFlow:n,src:o}=this.context;let i=t,s=t;for(let a=o[i];"\n"===a&&!u.atDocumentBoundary(o,i+1);a=o[i]){const t=u.endOfBlockIndent(o,r,i+1);if(null===t||"#"===o[t])break;"\n"===o[t]?i=t:(s=e.endOfLine(o,t,n),i=s)}return this.valueRange.isEmpty()&&(this.valueRange.start=t),this.valueRange.end=s,s}parse(t,r){this.context=t;const{inFlow:n,src:o}=t;let i=r;const s=o[i];return s&&"#"!==s&&"\n"!==s&&(i=e.endOfLine(o,r,n)),this.valueRange=new a(r,i),i=u.endOfWhiteSpace(o,i),i=this.parseComment(i),this.hasComment&&!this.valueRange.isEmpty()||(i=this.parseBlockValue(i)),i}},e.Range=a,e.Type=r,e.YAMLError=c,e.YAMLReferenceError=class extends c{constructor(e,t){super("YAMLReferenceError",e,t)}},e.YAMLSemanticError=l,e.YAMLSyntaxError=class extends c{constructor(e,t){super("YAMLSyntaxError",e,t)}},e.YAMLWarning=class extends c{constructor(e,t){super("YAMLWarning",e,t)}},e._defineProperty=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.defaultTagPrefix="tag:yaml.org,2002:",e.defaultTags={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}}}),w=f({"node_modules/yaml/dist/resolveSeq-d03cb037.js"(e){var t=_();function r(e,t,r){return r?-1===r.indexOf("\n")?`${e} #${r}`:`${e}\n`+r.replace(/^/gm,`${t||""}#`):e}var n=class{};function o(e,t,r){if(Array.isArray(e))return e.map(((e,t)=>o(e,String(t),r)));if(e&&"function"==typeof e.toJSON){const n=r&&r.anchors&&r.anchors.get(e);n&&(r.onCreate=e=>{n.res=e,delete r.onCreate});const o=e.toJSON(t,r);return n&&r.onCreate&&r.onCreate(o),o}return r&&r.keep||"bigint"!=typeof e?e:Number(e)}var i=class extends n{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:o(this.value,e,t)}toString(){return String(this.value)}};function s(e,t,r){let n=r;for(let o=t.length-1;o>=0;--o){const e=t[o];if(Number.isInteger(e)&&e>=0){const t=[];t[e]=n,n=t}else{const t={};Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0}),n=t}}return e.createNode(n,!1)}var a=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done,u=class e extends n{constructor(e){super(),t._defineProperty(this,"items",[]),this.schema=e}addIn(t,r){if(a(t))this.add(r);else{const[n,...o]=t,i=this.get(n,!0);if(i instanceof e)i.addIn(o,r);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`);this.set(n,s(this.schema,o,r))}}}deleteIn([t,...r]){if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(n instanceof e)return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn([t,...r],n){const o=this.get(t,!0);return 0===r.length?!n&&o instanceof i?o.value:o:o instanceof e?o.getIn(r,n):void 0}hasAllNullValues(){return this.items.every((e=>{if(!e||"PAIR"!==e.type)return!1;const t=e.value;return null==t||t instanceof i&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}hasIn([t,...r]){if(0===r.length)return this.has(t);const n=this.get(t,!0);return n instanceof e&&n.hasIn(r)}setIn([t,...r],n){if(0===r.length)this.set(t,n);else{const o=this.get(t,!0);if(o instanceof e)o.setIn(r,n);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`);this.set(t,s(this.schema,r,n))}}}toJSON(){return null}toString(n,{blockItem:o,flowChars:i,isMap:s,itemIndent:a},u,c){const{indent:l,indentStep:f,stringify:h}=n,p=this.type===t.Type.FLOW_MAP||this.type===t.Type.FLOW_SEQ||n.inFlow;p&&(a+=f);const d=s&&this.hasAllNullValues();n=Object.assign({},n,{allNullValues:d,indent:a,inFlow:p,type:null});let m=!1,g=!1;const y=this.items.reduce(((e,t,o)=>{let i;t&&(!m&&t.spaceBefore&&e.push({type:"comment",str:""}),t.commentBefore&&t.commentBefore.match(/^.*$/gm).forEach((t=>{e.push({type:"comment",str:`#${t}`})})),t.comment&&(i=t.comment),p&&(!m&&t.spaceBefore||t.commentBefore||t.comment||t.key&&(t.key.commentBefore||t.key.comment)||t.value&&(t.value.commentBefore||t.value.comment))&&(g=!0)),m=!1;let s=h(t,n,(()=>i=null),(()=>m=!0));return p&&!g&&s.includes("\n")&&(g=!0),p&&oe.str));if(g||n.reduce(((e,t)=>e+t.length+2),2)>e.maxFlowStringSingleLineLength){v=t;for(const e of n)v+=e?`\n${f}${l}${e}`:"\n";v+=`\n${l}${r}`}else v=`${t} ${n.join(" ")} ${r}`}else{const e=y.map(o);v=e.shift();for(const t of e)v+=t?`\n${l}${t}`:"\n"}return this.comment?(v+="\n"+this.comment.replace(/^/gm,`${l}#`),u&&u()):m&&c&&c(),v}};function c(e){let t=e instanceof i?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}t._defineProperty(u,"maxFlowStringSingleLineLength",60);var l=class extends u{add(e){this.items.push(e)}delete(e){const t=c(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const r=c(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&n instanceof i?n.value:n}has(e){const t=c(e);return"number"==typeof t&&t"comment"===e.type?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,r):JSON.stringify(this)}},f=class e extends n{constructor(t,r=null){super(),this.key=t,this.value=r,this.type=e.Type.PAIR}get commentBefore(){return this.key instanceof n?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new i(null)),!(this.key instanceof n)){throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.")}this.key.commentBefore=e}addToJSMap(e,t){const r=o(this.key,"",e);if(t instanceof Map){const n=o(this.value,r,e);t.set(r,n)}else if(t instanceof Set)t.add(r);else{const i=((e,t,r)=>null===t?"":"object"!=typeof t?String(t):e instanceof n&&r&&r.doc?e.toString({anchors:Object.create(null),doc:r.doc,indent:"",indentStep:r.indentStep,inFlow:!0,inStringifyKey:!0,stringify:r.stringify}):JSON.stringify(t))(this.key,r,e),s=o(this.value,i,e);i in t?Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[i]=s}return t}toJSON(e,t){const r=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,r)}toString(e,o,s){if(!e||!e.doc)return JSON.stringify(this);const{indent:a,indentSeq:c,simpleKeys:f}=e.doc.options;let{key:h,value:p}=this,d=h instanceof n&&h.comment;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(h instanceof u){throw new Error("With simple keys, collection cannot be used as a key value")}}let m=!f&&(!h||d||(h instanceof n?h instanceof u||h.type===t.Type.BLOCK_FOLDED||h.type===t.Type.BLOCK_LITERAL:"object"==typeof h));const{doc:g,indent:y,indentStep:v,stringify:b}=e;e=Object.assign({},e,{implicitKey:!m,indent:y+v});let _=!1,w=b(h,e,(()=>d=null),(()=>_=!0));if(w=r(w,e.indent,d),!m&&w.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(e.allNullValues&&!f)return this.comment?(w=r(w,e.indent,this.comment),o&&o()):_&&!d&&s&&s(),e.inFlow&&!m?w:`? ${w}`;w=m?`? ${w}\n${y}:`:`${w}:`,this.comment&&(w=r(w,e.indent,this.comment),o&&o());let x="",E=null;if(p instanceof n){if(p.spaceBefore&&(x="\n"),p.commentBefore){x+=`\n${p.commentBefore.replace(/^/gm,`${e.indent}#`)}`}E=p.comment}else p&&"object"==typeof p&&(p=g.schema.createNode(p,!0));e.implicitKey=!1,!m&&!this.comment&&p instanceof i&&(e.indentAtStart=w.length+1),_=!1,!c&&a>=2&&!e.inFlow&&!m&&p instanceof l&&p.type!==t.Type.FLOW_SEQ&&!p.tag&&!g.anchors.getName(p)&&(e.indent=e.indent.substr(2));const S=b(p,e,(()=>E=null),(()=>_=!0));let A=" ";if(x||this.comment)A=`${x}\n${e.indent}`;else if(!m&&p instanceof u){("["===S[0]||"{"===S[0])&&!S.includes("\n")||(A=`\n${e.indent}`)}else"\n"===S[0]&&(A="");return _&&!E&&s&&s(),r(w+A+S,e.indent,E)}};t._defineProperty(f,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var h=(e,t)=>{if(e instanceof p){const r=t.get(e.source);return r.count*r.aliasCount}if(e instanceof u){let r=0;for(const n of e.items){const e=h(n,t);e>r&&(r=e)}return r}if(e instanceof f){const r=h(e.key,t),n=h(e.value,t);return Math.max(r,n)}return 1},p=class e extends n{static stringify({range:e,source:t},{anchors:r,doc:n,implicitKey:o,inStringifyKey:i}){let s=Object.keys(r).find((e=>r[e]===t));if(!s&&i&&(s=n.anchors.getName(t)||n.anchors.newName()),s)return`*${s}${o?" ":""}`;const a=n.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${a} [${e}]`)}constructor(e){super(),this.source=e,this.type=t.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,r){if(!r)return o(this.source,e,r);const{anchors:n,maxAliasCount:i}=r,s=n.get(this.source);if(!s||void 0===s.res){const e="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(i>=0&&(s.count+=1,0===s.aliasCount&&(s.aliasCount=h(this.source,n)),s.count*s.aliasCount>i)){const e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return s.res}toString(t){return e.stringify(this,t)}};function d(e,t){const r=t instanceof i?t.value:t;for(const n of e)if(n instanceof f){if(n.key===t||n.key===r)return n;if(n.key&&n.key.value===r)return n}}t._defineProperty(p,"default",!0);var m=class extends u{add(e,t){e?e instanceof f||(e=new f(e.key||e,e.value)):e=new f(e);const r=d(this.items,e.key),n=this.schema&&this.schema.sortMapEntries;if(r){if(!t)throw new Error(`Key ${e.key} already set`);r.value=e.value}else if(n){const t=this.items.findIndex((t=>n(e,t)<0));-1===t?this.items.push(e):this.items.splice(t,0,e)}else this.items.push(e)}delete(e){const t=d(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=d(this.items,e),n=r&&r.value;return!t&&n instanceof i?n.value:n}has(e){return!!d(this.items,e)}set(e,t){this.add(new f(e,t),!0)}toJSON(e,t,r){const n=r?new r:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(n);for(const o of this.items)o.addToJSMap(t,n);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const n of this.items)if(!(n instanceof f))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,r)}},g=class extends f{constructor(e){if(e instanceof f){let t=e.value;t instanceof l||(t=new l,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new i("<<"),new l);this.type=f.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:r}of this.value.items){if(!(r instanceof m))throw new Error("Merge sources must be maps");const n=r.toJSON(null,e,Map);for(const[e,r]of n)t instanceof Map?t.has(e)||t.set(e,r):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}return t}toString(e,t){const r=this.value;if(r.items.length>1)return super.toString(e,t);this.value=r.items[0];const n=super.toString(e,t);return this.value=r,n}},y={defaultType:t.Type.BLOCK_LITERAL,lineWidth:76},v={defaultType:t.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function b(e,t,r){for(const{format:n,test:o,resolve:s}of t)if(o){const t=e.match(o);if(t){let e=s.apply(null,t);return e instanceof i||(e=new i(e)),n&&(e.format=n),e}}return r&&(e=r(e)),new i(e)}var w="flow",x="block",E="quoted",S=(e,t)=>{let r=e[t+1];for(;" "===r||"\t"===r;){do{r=e[t+=1]}while(r&&"\n"!==r);r=e[t+1]}return t};function A(e,t,r,{indentAtStart:n,lineWidth:o=80,minContentWidth:i=20,onFold:s,onOverflow:a}){if(!o||o<0)return e;const u=Math.max(1+i,1+o-t.length);if(e.length<=u)return e;const c=[],l={};let f,h,p=o-t.length;"number"==typeof n&&(n>o-Math.max(2,i)?c.push(0):p=o-n);let d=!1,m=-1,g=-1,y=-1;r===x&&(m=S(e,m),-1!==m&&(p=m+u));for(let b;b=e[m+=1];){if(r===E&&"\\"===b){switch(g=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}y=m}if("\n"===b)r===x&&(m=S(e,m)),p=m+u,f=void 0;else{if(" "===b&&h&&" "!==h&&"\n"!==h&&"\t"!==h){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(f=m)}if(m>=p)if(f)c.push(f),p=f+u,f=void 0;else if(r===E){for(;" "===h||"\t"===h;)h=b,b=e[m+=1],d=!0;const t=m>y+1?m-2:g-1;if(l[t])return e;c.push(t),l[t]=!0,p=t+u,f=void 0}else d=!0}h=b}if(d&&a&&a(),0===c.length)return e;s&&s();let v=e.slice(0,c[0]);for(let b=0;be?Object.assign({indentAtStart:e},v.fold):v.fold,k=e=>/^(%|---|\.\.\.)/m.test(e);function O(e,t){const{implicitKey:r}=t,{jsonEncoding:n,minMultiLineLength:o}=v.doubleQuoted,i=JSON.stringify(e);if(n)return i;const s=t.indent||(k(e)?" ":"");let a="",u=0;for(let c=0,l=i[c];l;l=i[++c])if(" "===l&&"\\"===i[c+1]&&"n"===i[c+2]&&(a+=i.slice(u,c)+"\\ ",c+=1,u=c,l="\\"),"\\"===l)switch(i[c+1]){case"u":{a+=i.slice(u,c);const e=i.substr(c+2,4);switch(e){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===e.substr(0,2)?a+="\\x"+e.substr(2):a+=i.substr(c,6)}c+=5,u=c+1}break;case"n":if(r||'"'===i[c+2]||i.lengthn)return!0;if(s=i+1,o-s<=n)return!1}return!0}(n,v.fold.lineWidth,a.length));let l=c?"|":">";if(!n)return l+"\n";let f="",h="";if(n=n.replace(/[\n\t ]*$/,(e=>{const t=e.indexOf("\n");return-1===t?l+="-":n!==e&&t===e.length-1||(l+="+",s&&s()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(e=>{-1!==e.indexOf(" ")&&(l+=u);const t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,`$&${a}`)),f&&(f=f.replace(/\n+/g,`$&${a}`)),e&&(l+=" #"+e.replace(/ ?[\r\n]+/g," "),i&&i()),!n)return`${l}${u}\n${a}${h}`;if(c)return n=n.replace(/\n+/g,`$&${a}`),`${l}\n${a}${f}${n}${h}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);const p=A(`${f}${n}${h}`,a,x,v.fold);return`${l}\n${a}${p}`}function C(e,r){let n,o,i;switch(r.type){case t.Type.FLOW_MAP:n="}",o="flow map";break;case t.Type.FLOW_SEQ:n="]",o="flow sequence";break;default:return void e.push(new t.YAMLSemanticError(r,"Not a flow collection!?"))}for(let s=r.items.length-1;s>=0;--s){const e=r.items[s];if(!e||e.type!==t.Type.COMMENT){i=e;break}}if(i&&i.char!==n){const s=`Expected ${o} to end with ${n}`;let a;"number"==typeof i.offset?(a=new t.YAMLSemanticError(r,s),a.offset=i.offset+1):(a=new t.YAMLSemanticError(i,s),i.range&&i.range.end&&(a.offset=i.range.end-i.range.start)),e.push(a)}}function T(e,r){const n=r.context.src[r.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){const n="Comments must be separated from other tokens by white space characters";e.push(new t.YAMLSemanticError(r,n))}}function N(e,r){const n=String(r),o=n.substr(0,8)+"..."+n.substr(-8);return new t.YAMLSemanticError(e,`The "${o}" key is too long`)}function I(e,t){for(const{afterKey:r,before:n,comment:o}of t){let t=e.items[n];t?(r&&t.value&&(t=t.value),void 0===o?!r&&t.commentBefore||(t.spaceBefore=!0):t.commentBefore?t.commentBefore+="\n"+o:t.commentBefore=o):void 0!==o&&(e.comment?e.comment+="\n"+o:e.comment=o)}}function R(e,t){const r=t.strValue;return r?"string"==typeof r?r:(r.errors.forEach((r=>{r.source||(r.source=t),e.errors.push(r)})),r.str):""}function M(e,r){const{tag:n,type:o}=r;let i=!1;if(n){const{handle:o,suffix:a,verbatim:u}=n;if(u){if("!"!==u&&"!!"!==u)return u;const n=`Verbatim tags aren't resolved, so ${u} is invalid.`;e.errors.push(new t.YAMLSemanticError(r,n))}else if("!"!==o||a)try{return function(e,r){const{handle:n,suffix:o}=r.tag;let i=e.tagPrefixes.find((e=>e.handle===n));if(!i){const o=e.getDefaults().tagPrefixes;if(o&&(i=o.find((e=>e.handle===n))),!i)throw new t.YAMLSemanticError(r,`The ${n} tag handle is non-default and was not declared.`)}if(!o)throw new t.YAMLSemanticError(r,`The ${n} tag has no suffix.`);if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===o[0])return e.warnings.push(new t.YAMLWarning(r,"YAML 1.0 ^ tag expansion is not supported")),o;if(/[:/]/.test(o)){const e=o.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${o}`}}return i.prefix+decodeURIComponent(o)}(e,r)}catch(s){e.errors.push(s)}else i=!0}switch(o){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:case t.Type.QUOTE_DOUBLE:case t.Type.QUOTE_SINGLE:return t.defaultTags.STR;case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;case t.Type.PLAIN:return i?t.defaultTags.STR:null;default:return null}}function L(e,t,r){const{tags:n}=e.schema,o=[];for(const a of n)if(a.tag===r){if(!a.test){const r=a.resolve(e,t);return r instanceof u?r:new i(r)}o.push(a)}const s=R(e,t);return"string"==typeof s&&o.length>0?b(s,o,n.scalarFallback):null}function D(e,r,n){try{const t=L(e,r,n);if(t)return n&&r.tag&&(t.tag=n),t}catch(o){return o.source||(o.source=r),e.errors.push(o),null}try{const o=function({type:e}){switch(e){case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;default:return t.defaultTags.STR}}(r);if(!o)throw new Error(`The tag ${n} is unavailable`);const i=`The tag ${n} is unavailable, falling back to ${o}`;e.warnings.push(new t.YAMLWarning(r,i));const s=L(e,r,o);return s.tag=n,s}catch(o){const n=new t.YAMLReferenceError(r,o.message);return n.stack=o.stack,e.errors.push(n),null}}function U(e,r){const n={before:[],after:[]};let o=!1,i=!1;const s=(e=>{if(!e)return!1;const{type:r}=e;return r===t.Type.MAP_KEY||r===t.Type.MAP_VALUE||r===t.Type.SEQ_ITEM})(r.context.parent)?r.context.parent.props.concat(r.props):r.props;for(const{start:a,end:u}of s)switch(r.context.src[a]){case t.Char.COMMENT:{if(!r.commentHasRequiredWhitespace(a)){const n="Comments must be separated from other tokens by white space characters";e.push(new t.YAMLSemanticError(r,n))}const{header:o,valueRange:i}=r;(i&&(a>i.start||o&&a>o.start)?n.after:n.before).push(r.context.src.slice(a+1,u));break}case t.Char.ANCHOR:if(o){const n="A node can have at most one anchor";e.push(new t.YAMLSemanticError(r,n))}o=!0;break;case t.Char.TAG:if(i){const n="A node can have at most one tag";e.push(new t.YAMLSemanticError(r,n))}i=!0}return{comments:n,hasAnchor:o,hasTag:i}}function F(e,r){if(!r)return null;r.error&&e.errors.push(r.error);const{comments:n,hasAnchor:o,hasTag:i}=U(e.errors,r);if(o){const{anchors:t}=e,n=r.anchor,o=t.getNode(n);o&&(t.map[t.newName(n)]=o),t.map[n]=r}if(r.type===t.Type.ALIAS&&(o||i)){const n="An alias node must not specify any properties";e.errors.push(new t.YAMLSemanticError(r,n))}const s=function(e,r){const{anchors:n,errors:o,schema:i}=e;if(r.type===t.Type.ALIAS){const e=r.rawValue,i=n.getNode(e);if(!i){const n=`Aliased anchor not found: ${e}`;return o.push(new t.YAMLReferenceError(r,n)),null}const s=new p(i);return n._cstAliases.push(s),s}const s=M(e,r);if(s)return D(e,r,s);if(r.type!==t.Type.PLAIN){const e=`Failed to resolve ${r.type} node here`;return o.push(new t.YAMLSyntaxError(r,e)),null}try{return b(R(e,r),i.tags,i.tags.scalarFallback)}catch(a){return a.source||(a.source=r),o.push(a),null}}(e,r);if(s){s.range=[r.range.start,r.range.end],e.options.keepCstNodes&&(s.cstNode=r),e.options.keepNodeTypes&&(s.type=r.type);const t=n.before.join("\n");t&&(s.commentBefore=s.commentBefore?`${s.commentBefore}\n${t}`:t);const o=n.after.join("\n");o&&(s.comment=s.comment?`${s.comment}\n${o}`:o)}return r.resolved=s}function B(e,r){if(!(({context:{lineStart:e,node:r,src:n},props:o})=>{if(0===o.length)return!1;const{start:i}=o[0];if(r&&i>r.valueRange.start)return!1;if(n[i]!==t.Char.COMMENT)return!1;for(let t=e;t0){n=new t.PlainValue(t.Type.PLAIN,[]),n.context={parent:u,src:u.context.src};const e=u.range.start+1;if(n.range={start:e,end:e},n.valueRange={start:e,end:e},"number"==typeof u.range.origStart){const e=u.range.origStart+1;n.range.origStart=n.range.origEnd=e,n.valueRange.origStart=n.valueRange.origEnd=e}}const a=new f(i,F(e,n));B(u,a),o.push(a),i&&"number"==typeof s&&u.range.start>s+1024&&e.errors.push(N(r,i)),i=void 0,s=null}break;default:void 0!==i&&o.push(new f(i)),i=F(e,u),s=u.range.start,u.error&&e.errors.push(u.error);e:for(let n=a+1;;++n){const o=r.items[n];switch(o&&o.type){case t.Type.BLANK_LINE:case t.Type.COMMENT:continue e;case t.Type.MAP_VALUE:break e;default:{const r="Implicit map keys need to be followed by map values";e.errors.push(new t.YAMLSemanticError(u,r));break e}}}if(u.valueRangeContainsNewline){const r="Implicit map keys need to be on a single line";e.errors.push(new t.YAMLSemanticError(u,r))}}}void 0!==i&&o.push(new f(i));return{comments:n,items:o}}(e,r),i=new m;i.items=o,I(i,n);let s=!1;for(let a=0;a{if(e instanceof p){const{type:r}=e.source;return r!==t.Type.MAP&&r!==t.Type.FLOW_MAP&&(i="Merge nodes aliases can only point to maps")}return i="Merge nodes can only have Alias nodes as values"})),i&&e.errors.push(new t.YAMLSemanticError(r,i))}else for(let i=a+1;ia+1024&&e.errors.push(N(r,i));const{src:o}=c.context;for(let r=a;re instanceof f&&e.key instanceof u))){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new t.YAMLWarning(r,n))}return r.resolved=i,i},e.resolveString=R,e.strOptions=v,e.stringifyNumber=function({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let o=JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(o)){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let r=t-(o.length-e-1);for(;r-- >0;)o+="0"}return o},e.stringifyString=function(e,r,n,o){const{defaultType:i}=v,{implicitKey:s,inFlow:a}=r;let{type:u,value:c}=e;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));const l=i=>{switch(i){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return j(e,r,n,o);case t.Type.QUOTE_DOUBLE:return O(c,r);case t.Type.QUOTE_SINGLE:return P(c,r);case t.Type.PLAIN:return function(e,r,n,o){const{comment:i,type:s,value:a}=e,{actualString:u,implicitKey:c,indent:l,inFlow:f}=r;if(c&&/[\n[\]{},]/.test(a)||f&&/[[\]{},]/.test(a))return O(a,r);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return c||f||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?P(a,r):O(a,r):j(e,r,n,o);if(!c&&!f&&s!==t.Type.PLAIN&&-1!==a.indexOf("\n"))return j(e,r,n,o);if(""===l&&k(a))return r.forceBlockIndent=!0,j(e,r,n,o);const h=a.replace(/\n+/g,`$&\n${l}`);if(u){const{tags:e}=r.doc.schema;if("string"!=typeof b(h,e,e.scalarFallback).value)return O(a,r)}const p=c?h:A(h,l,w,$(r));return!i||f||-1===p.indexOf("\n")&&-1===i.indexOf("\n")?p:(n&&n(),function(e,t,r){return r?`#${r.replace(/[\s\S]^/gm,`$&${t}#`)}\n${t}${e}`:e}(p,l,i))}(e,r,n,o);default:return null}};u!==t.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?u=t.Type.QUOTE_DOUBLE:!s&&!a||u!==t.Type.BLOCK_FOLDED&&u!==t.Type.BLOCK_LITERAL||(u=t.Type.QUOTE_DOUBLE);let f=l(u);if(null===f&&(f=l(i),null===f))throw new Error(`Unsupported default string type ${i}`);return f},e.toJSON=o}}),x=f({"node_modules/yaml/dist/warnings-1000a372.js"(e){var t=_(),r=w(),n={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,n)=>{const o=r.resolveString(e,n);if("function"==typeof Buffer)return Buffer.from(o,"base64");if("function"==typeof atob){const e=atob(o.replace(/[\n\r]/g,"")),t=new Uint8Array(e.length);for(let r=0;r{let u;if("function"==typeof Buffer)u=o instanceof Buffer?o.toString("base64"):Buffer.from(o.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t1){const e="Each pair must have its own sequence indicator";throw new t.YAMLSemanticError(n,e)}const o=e.items[0]||new r.Pair;e.commentBefore&&(o.commentBefore=o.commentBefore?`${e.commentBefore}\n${o.commentBefore}`:e.commentBefore),e.comment&&(o.comment=o.comment?`${e.comment}\n${o.comment}`:e.comment),e=o}o.items[i]=e instanceof r.Pair?e:new r.Pair(e)}}return o}function i(e,t,n){const o=new r.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";for(const r of t){let t,i;if(Array.isArray(r)){if(2!==r.length)throw new TypeError(`Expected [key, value] tuple: ${r}`);t=r[0],i=r[1]}else if(r&&r instanceof Object){const e=Object.keys(r);if(1!==e.length)throw new TypeError(`Expected { key: value } tuple: ${r}`);t=e[0],i=r[t]}else t=r;const s=e.createPair(t,i,n);o.items.push(s)}return o}var s={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o,createNode:i},a=class e extends r.YAMLSeq{constructor(){super(),t._defineProperty(this,"add",r.YAMLMap.prototype.add.bind(this)),t._defineProperty(this,"delete",r.YAMLMap.prototype.delete.bind(this)),t._defineProperty(this,"get",r.YAMLMap.prototype.get.bind(this)),t._defineProperty(this,"has",r.YAMLMap.prototype.has.bind(this)),t._defineProperty(this,"set",r.YAMLMap.prototype.set.bind(this)),this.tag=e.tag}toJSON(e,t){const n=new Map;t&&t.onCreate&&t.onCreate(n);for(const o of this.items){let e,i;if(o instanceof r.Pair?(e=r.toJSON(o.key,"",t),i=r.toJSON(o.value,e,t)):e=r.toJSON(o,"",t),n.has(e))throw new Error("Ordered maps must not include duplicate keys");n.set(e,i)}return n}};t._defineProperty(a,"tag","tag:yaml.org,2002:omap");var u={identify:e=>e instanceof Map,nodeClass:a,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,n){const i=o(e,n),s=[];for(const{key:o}of i.items)if(o instanceof r.Scalar){if(s.includes(o.value)){const e="Ordered maps must not include duplicate keys";throw new t.YAMLSemanticError(n,e)}s.push(o.value)}return Object.assign(new a,i)},createNode:function(e,t,r){const n=i(e,t,r),o=new a;return o.items=n.items,o}},c=class e extends r.YAMLMap{constructor(){super(),this.tag=e.tag}add(e){const t=e instanceof r.Pair?e:new r.Pair(e);r.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=r.findPair(this.items,e);return!t&&n instanceof r.Pair?n.key instanceof r.Scalar?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=r.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new r.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,r);throw new Error("Set items must all have null values")}};t._defineProperty(c,"tag","tag:yaml.org,2002:set");var l={identify:e=>e instanceof Set,nodeClass:c,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,n){const o=r.resolveMap(e,n);if(!o.hasAllNullValues())throw new t.YAMLSemanticError(n,"Set items must all have null values");return Object.assign(new c,o)},createNode:function(e,t,r){const n=new c;for(const o of t)n.items.push(e.createPair(o,null,r));return n}},f=(e,t)=>{const r=t.split(":").reduce(((e,t)=>60*e+Number(t)),0);return"-"===e?-r:r},h=({value:e})=>{if(isNaN(e)||!isFinite(e))return r.stringifyNumber(e);let t="";e<0&&(t="-",e=Math.abs(e));const n=[e%60];return e<60?n.unshift(0):(e=Math.round((e-n[0])/60),n.unshift(e%60),e>=60&&(e=Math.round((e-n[0])/60),n.unshift(e))),t+n.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")},p={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,r)=>f(t,r.replace(/_/g,"")),stringify:h},d={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(e,t,r)=>f(t,r.replace(/_/g,"")),stringify:h},m={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(e,t,r,n,o,i,s,a,u)=>{a&&(a=(a+"00").substr(1,3));let c=Date.UTC(t,r-1,n,o||0,i||0,s||0,a||0);if(u&&"Z"!==u){let e=f(u[0],u.slice(1));Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function g(e){const t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function y(e,t){if(g(!1)){const r="undefined"!=typeof process&&process.emitWarning;r?r(e,t):console.warn(t?`${t}: ${e}`:e)}}var v={};e.binary=n,e.floatTime=d,e.intTime=p,e.omap=u,e.pairs=s,e.set=l,e.timestamp=m,e.warn=y,e.warnFileDeprecation=function(e){if(g(!0)){y(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/")}' will be removed in a future release.`,"DeprecationWarning")}},e.warnOptionDeprecation=function(e,t){if(!v[e]&&g(!0)){v[e]=!0;let r=`The option '${e}' will be removed in a future release`;r+=t?`, use '${t}' instead.`:".",y(r,"DeprecationWarning")}}}}),E=f({"node_modules/yaml/dist/Schema-88e323a7.js"(e){var t=_(),r=w(),n=x();var o={createNode:function(e,t,n){const o=new r.YAMLMap(e);if(t instanceof Map)for(const[r,i]of t)o.items.push(e.createPair(r,i,n));else if(t&&"object"==typeof t)for(const r of Object.keys(t))o.items.push(e.createPair(r,t[r],n));return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o},default:!0,nodeClass:r.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:r.resolveMap};var i={createNode:function(e,t,n){const o=new r.YAMLSeq(e);if(t&&t[Symbol.iterator])for(const r of t){const t=e.createNode(r,n.wrapScalars,null,n);o.items.push(t)}return o},default:!0,nodeClass:r.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:r.resolveSeq},s={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:r.resolveString,stringify:(e,t,n,o)=>(t=Object.assign({actualString:!0},t),r.stringifyString(e,t,n,o)),options:r.strOptions},a=[o,i,s],u=e=>"bigint"==typeof e||Number.isInteger(e),c=(e,t,n)=>r.intOptions.asBigInt?BigInt(e):parseInt(t,n);function l(e,t,n){const{value:o}=e;return u(o)&&o>=0?n+o.toString(t):r.stringifyNumber(e)}var f={identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new r.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:r.nullOptions,stringify:()=>r.nullOptions.nullStr},h={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>"t"===e[0]||"T"===e[0],options:r.boolOptions,stringify:({value:e})=>e?r.boolOptions.trueStr:r.boolOptions.falseStr},p={identify:e=>u(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>c(e,t,8),options:r.intOptions,stringify:e=>l(e,8,"0o")},d={identify:u,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>c(e,e,10),options:r.intOptions,stringify:r.stringifyNumber},m={identify:e=>u(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>c(e,t,16),options:r.intOptions,stringify:e=>l(e,16,"0x")},g={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:r.stringifyNumber},y={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify:({value:e})=>Number(e).toExponential()},v={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,n){const o=t||n,i=new r.Scalar(parseFloat(e));return o&&"0"===o[o.length-1]&&(i.minFractionDigits=o.length),i},stringify:r.stringifyNumber},b=a.concat([f,h,p,d,m,g,y,v]),E=e=>"bigint"==typeof e||Number.isInteger(e),S=({value:e})=>JSON.stringify(e),A=[o,i,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:r.resolveString,stringify:S},{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new r.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:S},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:S},{identify:E,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>r.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>E(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:S}];A.scalarFallback=e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};var $=({value:e})=>e?r.boolOptions.trueStr:r.boolOptions.falseStr,k=e=>"bigint"==typeof e||Number.isInteger(e);function O(e,t,n){let o=t.replace(/_/g,"");if(r.intOptions.asBigInt){switch(n){case 2:o=`0b${o}`;break;case 8:o=`0o${o}`;break;case 16:o=`0x${o}`}const t=BigInt(o);return"-"===e?BigInt(-1)*t:t}const i=parseInt(o,n);return"-"===e?-1*i:i}function P(e,t,n){const{value:o}=e;if(k(o)){const e=o.toString(t);return o<0?"-"+n+e.substr(1):n+e}return r.stringifyNumber(e)}var j=a.concat([{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new r.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:r.nullOptions,stringify:()=>r.nullOptions.nullStr},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:r.boolOptions,stringify:$},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:r.boolOptions,stringify:$},{identify:k,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,r)=>O(t,r,2),stringify:e=>P(e,2,"0b")},{identify:k,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,r)=>O(t,r,8),stringify:e=>P(e,8,"0")},{identify:k,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,r)=>O(t,r,10),stringify:r.stringifyNumber},{identify:k,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,r)=>O(t,r,16),stringify:e=>P(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:r.stringifyNumber},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify:({value:e})=>Number(e).toExponential()},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){const n=new r.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:r.stringifyNumber}],n.binary,n.omap,n.pairs,n.set,n.intTime,n.floatTime,n.timestamp),C={core:b,failsafe:a,json:A,yaml11:j},T={binary:n.binary,bool:h,float:v,floatExp:y,floatNaN:g,floatTime:n.floatTime,int:d,intHex:m,intOct:p,intTime:n.intTime,map:o,null:f,omap:n.omap,pairs:n.pairs,seq:i,set:n.set,timestamp:n.timestamp};function N(e,t,n){if(e instanceof r.Node)return e;const{defaultPrefix:s,onTagObj:a,prevObjects:u,schema:c,wrapScalars:l}=n;t&&t.startsWith("!!")&&(t=s+t.slice(2));let f=function(e,t,r){if(t){const e=r.filter((e=>e.tag===t)),n=e.find((e=>!e.format))||e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find((t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format))}(e,t,c.tags);if(!f){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return l?new r.Scalar(e):e;f=e instanceof Map?o:e[Symbol.iterator]?i:o}a&&(a(f),delete n.onTagObj);const h={value:void 0,node:void 0};if(e&&"object"==typeof e&&u){const t=u.get(e);if(t){const e=new r.Alias(t);return n.aliasNodes.push(e),e}h.value=e,u.set(e,h)}return h.node=f.createNode?f.createNode(n.schema,e,n):l?new r.Scalar(e):e,t&&h.node instanceof r.Node&&(h.node.tag=t),h.node}var I=(e,t)=>e.keyt.key?1:0,R=class e{constructor({customTags:e,merge:t,schema:r,sortMapEntries:o,tags:i}){this.merge=!!t,this.name=r,this.sortMapEntries=!0===o?I:o||null,!e&&i&&n.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,r,n){let o=e[n.replace(/\W/g,"")];if(!o){const t=Object.keys(e).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${t}`)}if(Array.isArray(r))for(const i of r)o=o.concat(i);else"function"==typeof r&&(o=r(o.slice()));for(let i=0;iJSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${r}`)}o[i]=r}}return o}(C,T,e||i,r)}createNode(t,r,n,o){const i={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:r};return N(t,n,o?Object.assign(o,i):i)}createPair(e,t,n){n||(n={wrapScalars:!0});const o=this.createNode(e,n.wrapScalars,null,n),i=this.createNode(t,n.wrapScalars,null,n);return new r.Pair(o,i)}};t._defineProperty(R,"defaultPrefix",t.defaultTagPrefix),t._defineProperty(R,"defaultTags",t.defaultTags),e.Schema=R}}),S=f({"node_modules/yaml/dist/types.js"(e){var t=w(),r=E();_(),x(),e.Alias=t.Alias,e.Collection=t.Collection,e.Merge=t.Merge,e.Node=t.Node,e.Pair=t.Pair,e.Scalar=t.Scalar,e.YAMLMap=t.YAMLMap,e.YAMLSeq=t.YAMLSeq,e.binaryOptions=t.binaryOptions,e.boolOptions=t.boolOptions,e.intOptions=t.intOptions,e.nullOptions=t.nullOptions,e.strOptions=t.strOptions,e.Schema=r.Schema}}),A={},$=()=>A,k=class{constructor(){this.data={}}unregister(e){e?delete this.data[e]:this.data={}}register(e,t){this.data[e]=t}registerMany(e){Object.keys(e).forEach((t=>{this.data[t]=e[t]}))}get(e){return this.data[e]}list(){return this.data}},O={},P=O;O.defaultInvalidTypeProduct=void 0,O.defaultRandExpMax=10,O.maxRegexRetry=100,O.pruneProperties=[],O.ignoreProperties=[],O.ignoreMissingRefs=!1,O.failOnInvalidTypes=!0,O.failOnInvalidFormat=!0,O.alwaysFakeOptionals=!1,O.optionalsProbability=null,O.fixedProbabilities=!1,O.useExamplesValue=!1,O.useDefaultValue=!1,O.requiredOnly=!1,O.omitNulls=!1,O.minItems=0,O.maxItems=null,O.minLength=0,O.maxLength=null,O.resolveJsonPath=!1,O.reuseProperties=!1,O.fillProperties=!0,O.sortProperties=!1,O.replaceEmptyByRandomValue=!1,O.random=Math.random,O.minDateTime=new Date("1889-12-31T00:00:00.000Z"),O.maxDateTime=new Date("1970-01-01T00:00:01.000Z"),O.renderTitle=!0,O.renderDescription=!0,O.renderComment=!1;var j=new class extends k{constructor(){super(),this.data={...P},this._defaults=P}get defaults(){return{...this._defaults}}};function C(e,t){return"string"==typeof e?void 0!==t?j.register(e,t):j.get(e):j.registerMany(e)}C.getDefaults=()=>j.defaults;var T=C,N=["integer","number","string","boolean"],I=N.concat(["null"]),R={ALLOWED_TYPES:N,SCALAR_TYPES:I,ALL_TYPES:["array","object"].concat(I),MIN_NUMBER:-100,MAX_NUMBER:100,MIN_INTEGER:-1e8,MAX_INTEGER:1e8,MOST_NEAR_DATETIME:2524608e6},M=h(b(),1);function L(e,t){return T("random")()*(t-e)+e}function D(e,t,r,n,o=!1){return r=void 0===r?R.MIN_NUMBER:r,n=void 0===n?R.MAX_NUMBER:n,(t=void 0===t?n:t)<(e=void 0===e?r:e)&&(t+=e),o?L(e,t):function(e,t){return e=void 0===e?R.MIN_INTEGER:e,t=void 0===t?R.MAX_INTEGER:t,Math.floor(T("random")()*(t-e+1))+e}(e,t)}var U={pick:function(e){return e[Math.floor(T("random")()*e.length)]},date:function(e){if(e)return function(e){switch(e){case"seconds":return 60*D(0,60);case"minutes":return 612*D(15,50);case"hours":return 36123*D(12,72);case"days":return 86412345*D(7,30);case"weeks":return 604812345*D(4,52);case"months":return 2592012345*D(2,13);case"years":return 31104012345*D(1,20)}}(e);let t=T("minDateTime"),r=T("maxDateTime");"string"==typeof t&&(t=new Date(t)),"string"==typeof r&&(r=new Date(r));const n=(new Date).getTime();return"number"==typeof t&&(t=new Date(n+t)),"number"==typeof r&&(r=new Date(n+r)),new Date(L(t.getTime(),r.getTime()))},shuffle:function(e){let t,r,n=e.length;const o=e.slice();for(;n>0;)r=Math.floor(T("random")()*n),n-=1,t=o[n],o[n]=o[r],o[r]=t;return o},number:D,randexp:function(e){return M.default.prototype.max=T("defaultRandExpMax"),M.default.prototype.randInt=(e,t)=>e+Math.floor(T("random")()*(t-e+1)),new M.default(e).gen()}},F=/^(0|[1-9][0-9]*)$/;function B(e){return"string"==typeof e&&F.test(e)}function z(e){if(e.includes(" "))return new Date(e).toISOString().substr(0,10);let[t,r,n]=e.split("T")[0].split("-");return r=`0${Math.max(1,Math.min(12,r))}`.slice(-2),n=`0${Math.max(1,Math.min(31,n))}`.slice(-2),`${t}-${r}-${n}`}function q(e,t){return Object.keys(t).forEach((r=>{"object"!=typeof t[r]||null===t[r]?e[r]=t[r]:Array.isArray(t[r])?(e[r]=e[r]||[],t[r].forEach(((n,o)=>{"array"===e.type&&"array"===t.type?e[r][o]=q(e[r][o]||{},n):Array.isArray(e[r])&&-1===e[r].indexOf(n)&&e[r].push(n)}))):"object"!=typeof e[r]||null===e[r]||Array.isArray(e[r])?e[r]=q({},t[r]):e[r]=q(e[r],t[r])})),e}function V(e,t=new Map){if(!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){const r=[];return t.set(e,r),r.push(...e.map((e=>V(e,t)))),r}const r={};return t.set(e,r),Object.keys(e).reduce(((r,n)=>(r[n]=V(e[n],t),r)),r)}function H(){return U.pick([!1,!0,null,-1,NaN,Math.PI,1/0,void 0,[],{},Math.random(),Math.random().toString(36).substr(2)])}function W(e,t){const r=void 0!==t.minimum,n=void 0!==t.maximum;return(r||n)&&(!r||e>=t.minimum)&&(!n||e<=t.maximum)}function K(e){return"[object Object]"===Object.prototype.toString.call(e)&&!Object.keys(e).length}function Y(e,t){t=t.items||t;const r=T("alwaysFakeOptionals"),n=Array.isArray(t.required)&&t.required.includes(e)||r,o="function"==typeof t.thunk||t.additionalProperties&&"function"==typeof t.additionalProperties.thunk;return!n&&!o}var G={hasProperties:function(e,...t){return t.filter((t=>void 0!==e[t])).length>0},getLocalRef:function(e,t,r){if(t=decodeURIComponent(t),r&&r[t])return V(r[t]);const n=t.replace("#/","/").split("/");let o=e.$ref&&r&&r[e.$ref]||e;for(o||n[0]||(n[0]=e.$ref.split("#/")[0]),r&&t.includes("#/")&&r[n[0]]&&(o=r[n.shift()]),n[0]||n.shift();o&&n.length>0;){const e=n.shift();if(!o[e])throw new Error(`Prop not found: ${e} (${t})`);o=o[e]}return o},omitProps:function(e,t){return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,r)=>(Array.isArray(e[r])?t[r]=e[r].slice():t[r]=e[r]instanceof Object?q({},e[r]):e[r],t)),{})},typecast:function(e,t,r){const n={};switch(e||t.type){case"integer":case"number":if(void 0!==t.minimum&&(n.minimum=t.minimum),void 0!==t.maximum&&(n.maximum=t.maximum),t.enum){let e=Math.max(n.minimum||0,0),r=Math.min(n.maximum||1/0,1/0);t.exclusiveMinimum&&e===t.minimum&&(e+=t.multipleOf||1),t.exclusiveMaximum&&r===t.maximum&&(r-=t.multipleOf||1),(e||r!==1/0)&&(t.enum=t.enum.filter((t=>t>=e&&t<=r)))}break;case"string":n.minLength=T("minLength")||0,n.maxLength=T("maxLength")||Number.MAX_SAFE_INTEGER,void 0!==t.minLength&&(n.minLength=Math.max(n.minLength,t.minLength)),void 0!==t.maxLength&&(n.maxLength=Math.min(n.maxLength,t.maxLength))}let o=r(n);if(null==o)return null;switch(e||t.type){case"number":o=B(o)?parseFloat(o):o;break;case"integer":o=B(o)?parseInt(o,10):o;break;case"boolean":o=!!o;break;case"string":{if(function(e){return["number","boolean"].includes(typeof e)}(o))return o;o=String(o);const e=Math.max(n.minLength||0,0),r=Math.min(n.maxLength||1/0,1/0);let i,s=0;for(;o.lengthr){o=o.substr(0,r);const n=t.pattern?new RegExp(t.pattern):null;if(n&&!n.test(o)){let t=o;const r=T("maxRegexRetry"),i=Math.max(o.length-r,e);for(;t.length>i&&!n.test(t);)t=t.slice(0,-1),n.test(t)&&(o=t)}}switch(t.format){case"date-time":case"datetime":o=new Date(function(e){if(e.includes(" "))return new Date(e).toISOString().substr(0,10);const[t,r]=e.split("T");let[n,o,i]=t.split("-"),[s,a,u]=r.substr(0,8).split(":");return o=`0${Math.max(1,Math.min(12,o))}`.slice(-2),i=`0${Math.max(1,Math.min(31,i))}`.slice(-2),s=`0${Math.max(1,Math.min(23,s))}`.slice(-2),a=`0${Math.max(1,Math.min(59,a))}`.slice(-2),u=`0${Math.max(1,Math.min(59,u))}`.slice(-2),`${n}-${o}-${i}T${s}:${a}:${u}.000Z`}(o)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":o=new Date(z(o)).toISOString().substr(0,10);break;case"time":o=new Date(`1969-01-01 ${o}`).toISOString().substr(11)}break}}return o},merge:q,clone:V,short:function(e){const t=JSON.stringify(e),r=JSON.stringify(e,null,2);return t.length>400?`${r.substr(0,400)}...`:r},hasValue:function(e,t){return e.enum?e.enum.includes(t):e.const?e.const===t:void 0},notValue:function(e,t){const r=q({},t);if(void 0!==e.minimum&&(r.maximum=e.minimum,r.exclusiveMaximum=!0),void 0!==e.maximum&&(r.minimum=e.maximum>r.maximum?0:e.maximum,r.exclusiveMinimum=!0),void 0!==e.minLength&&(r.maxLength=e.minLength),void 0!==e.maxLength&&(r.minLength=e.maxLength>r.maxLength?0:e.maxLength),e.type)r.type=U.pick(R.SCALAR_TYPES.filter((t=>(Array.isArray(e.type)?e.type:[e.type]).every((e=>"number"===t||"integer"===t?"number"!==e&&"integer"!==e:t!==e)))));else if(e.enum){let t;do{t=H()}while(-1!==e.enum.indexOf(t));r.enum=[t]}return e.required&&r.properties&&e.required.forEach((e=>{delete r.properties[e]})),r},anyValue:H,validate:function(e,t){return!t.every((t=>W(e,t)))},validateValueForSchema:W,validateValueForOneOf:function(e,t){return 1===t.reduce(((t,r)=>t+(W(e,r)?1:0)),0)},isKey:function(e){return["enum","const","default","examples","required","definitions","items","properties"].includes(e)},template:function e(t,r){return Array.isArray(t)?t.map((t=>e(t,r))):("string"==typeof t&&(t=t.replace(/#\{([\w.-]+)\}/g,((e,t)=>r[t]))),t)},shouldClean:Y,clean:function e(t,r,n=!1){return t&&"object"==typeof t?Array.isArray(t)?t.map((t=>e(t,r?.items,!0))).filter((e=>void 0!==e)):(Object.keys(t).forEach((n=>{if(K(t[n]))Y(n,r)&&delete t[n];else{let o=r;r&&r.properties&&r.properties[n]&&(o=r.properties[n]);const i=e(t[n],o);K(i)||(t[n]=i)}void 0===t[n]&&delete t[n]})),Object.keys(t).length||!n?t:void 0):t},isEmpty:K,clampDate:z};var J=class{constructor(){this.registry={},this.support={}}reset(e){e?(delete this.registry[e],delete this.support[e]):(this.registry={},this.support={})}extend(e,t){var r;this.registry[e]=t(this.registry[e]),this.support[e]||(this.support[e]=(r=()=>this.registry[e],(e,t,n,o)=>{let i=e,s=[];"object"==typeof e&&(i=Object.keys(e)[0],Array.isArray(e[i])?s=e[i]:s.push(e[i]));const a=i.split(".");let u=r();for(;a.length>1;)u=u[a.shift()];return"function"==typeof(e="object"==typeof u?u[a[0]]:u)&&(e=e.apply(u,s.map((e=>G.template(e,o))))),"[object Object]"===Object.prototype.toString.call(e)&&Object.keys(e).forEach((t=>{if("function"==typeof e[t])throw new Error(`Cannot resolve value for '${n}: ${i}', given: ${e}`)})),e}))}define(e,t){this.support[e]=t}get(e){if(void 0===this.registry[e])throw new ReferenceError(`'${e}' dependency doesn't exist.`);return this.registry[e]}wrap(e){if(!("generate"in e)){const t=Object.keys(e),r={};let n=t.length;for(;n--;){const o=t[n].replace(/^x-/,""),i=this.support[o];if("function"==typeof i){Object.defineProperty(e,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(o,s)=>i.call(r,e[t[n]],e,t[n],o,s.slice())});break}}}return e}},Q=new k;var Z=function(e,t){if(void 0===e)return Q.list();if("string"==typeof e)if("function"==typeof t)Q.register(e,t);else{if(null!==t&&!1!==t)return Q.get(e);Q.unregister(e)}else Q.registerMany(e)},X=class extends Error{constructor(e,t){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=e,this.path=t}},ee={array:["additionalItems","items","maxItems","minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties","dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern","format"]};ee.number=ee.integer;var te=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"];function re(e,t,r){return Object.keys(e).filter((e=>{const n=te.indexOf(t)>-1;return!(!(r.indexOf(e)>-1)||n)})).length>0}var ne=function(e,t){const r=Object.keys(ee);for(let n=0;n.5};var ie=function(){return null};var se=function(e,t,r,n){const o=[];if(!e.items&&!e.additionalItems){if(G.hasProperties(e,"minItems","maxItems","uniqueItems")&&(0!==e.minItems||0!==e.maxItems))throw new X(`missing items for ${G.short(e)}`,t);return o}if(Array.isArray(e.items))return e.items.map(((e,o)=>{const i=t.concat(["items",o]);return n(e,i,r)}));let i=e.minItems,s=e.maxItems;const a=T("minItems"),u=T("maxItems");a&&(i=void 0===i?a:Math.min(a,i)),u&&(s=void 0===s?u:Math.min(u,s),s&&s>u&&(s=u),i&&i>u&&(i=s));const c=!0===T("alwaysFakeOptionals")?1:T("optionalsProbability"),l=T("alwaysFakeOptionals")||T("fixedProbabilities")||!1;let f=U.number(i,s,0,5);null!==c&&(f=Math.max(l?Math.round((s||f)*c):Math.abs(U.number(i,s)*c),i||0));const h="object"==typeof e.additionalItems?e.additionalItems:{};for(let p=o.length;p0){const i=U.number(0,f-1);o[i]=n(e.contains,t.concat(["items",i]),r)}return e.uniqueItems?function(e,t,r,n,o,i){const s=[],a=[];function u(e){const t=JSON.stringify(e.value);return-1===a.indexOf(t)&&(a.push(t),s.push(e),!0)}t.forEach(u);let c=100;for(;s.length!==t.length&&(u(i(r.items||n,e,o))||(c-=1),c););return s}(t.concat(["items"]),o,e,h,r,n):o};var ae=function(e){let t=void 0===e.minimum||e.minimum===-Number.MAX_VALUE?R.MIN_INTEGER:e.minimum,r=void 0===e.maximum||e.maximum===Number.MAX_VALUE?R.MAX_INTEGER:e.maximum;const n=e.multipleOf,o=n&&String(n).match(/e-(\d)|\.(\d+)$/);if(o){const e=(Math.random()*U.number(0,10)+1)*n,i=o[1]||o[2].length,s=parseFloat(e.toFixed(i)),a=U.number(t,r-1);return String(s).includes(".")?a+s:(a+s).toExponential()}if(n&&(r=Math.floor(r/n)*n,t=Math.ceil(t/n)*n),e.exclusiveMinimum&&t===e.minimum&&(t+=n||1),e.exclusiveMaximum&&r===e.maximum&&(r-=n||1),t>r)return NaN;if(n){let e=U.number(Math.floor(t/n),Math.floor(r/n))*n;for(;e(-1===a.indexOf(t)&&e.push(t),e)),[]),h=a.concat(f),p=u&&!0===e.additionalProperties?fe:e.additionalProperties;if(!u&&0===c.length&&0===l.length&&G.hasProperties(e,"minProperties","maxProperties","dependencies","required"))return null;if(!0===T("requiredOnly"))return a.forEach((e=>{i[e]&&(o[e]=i[e])})),n(o,t.concat(["properties"]),r,e);const d=!0===T("alwaysFakeOptionals")?1:T("optionalsProbability"),m=T("alwaysFakeOptionals")||T("fixedProbabilities")||!1,g=T("ignoreProperties")||[],y=T("reuseProperties"),v=T("fillProperties"),b=e.maxProperties||h.length+(u?U.number(1,5):0);let _=Math.max(e.minProperties||0,a.length),w=Math.max(0,h.length-_);1!==h.length||a.length||(_=Math.max(U.number(v?1:0,b),_)),null!==d&&(w=!0===m?Math.round(_-a.length+d*(h.length-_)):U.number(_-a.length,d*(h.length-_)));const x=U.shuffle(f).slice(0,w),E=f.filter((e=>-1!==x.indexOf(e))),S=null!==d||a.length===b?b:U.number(0,b),A=a.concat(U.shuffle(E).slice(0,S)).slice(0,b),$=[],k=[];if(e.dependencies&&(Object.keys(e.dependencies).forEach((t=>{const r=e.dependencies[t];if(-1!==A.indexOf(t))if(Array.isArray(r))r.forEach((e=>{-1===A.indexOf(e)&&A.push(e)}));else if(Array.isArray(r.oneOf||r.anyOf)){const e=r.oneOf||r.anyOf;k.push({prop:t,values:e})}else $.push(r)})),$.length))return delete e.dependencies,n({allOf:$.concat(e)},t.concat(["properties"]),r,e);const O=[],P=[];A.forEach((e=>{if(i[e]&&["{}","true"].includes(JSON.stringify(i[e].not)))return;for(let r=0;r{e.match(new RegExp(r))&&(t=!0,o[e]?G.merge(o[e],s[r]):o[U.randexp(e)]=s[r])})),!t){const t=s[e]||p;t&&!1!==p?o[s[e]?U.randexp(e):e]=i[e]||t:P.push(e)}}));let j=Object.keys(o).length+(v?0:O.length);const C=e=>U.randexp("_?[_a-f\\d]{1,3}"+(e?"\\$?":""));function N(e){let t;do{if(!e.length)break;t=e.shift()}while(o[t]);return t}let I=_;if(u&&!a.length&&(I=Math.max(null===d||p?U.number(v?1:0,b):0,_)),!E.length&&!w&&u&&!0===m&&v){const e=U.number(0,b);for(let t=0;t=I);){if(u)if(y&&c.length-j>I){let e,t=0;do{if(t+=1,t>1e3)break;e=N(a)||U.pick(c)}while(void 0!==o[e]);void 0===o[e]&&(o[e]=i[e],j+=1)}else if(l.length&&!p){const e=U.pick(l),t=U.randexp(e);o[t]||(o[t]=s[e],j+=1)}else{const e=N(a)||le(1)+C();o[e]||(o[e]=p||fe,j+=1)}for(let e=0;j<_&&eT("sortProperties")?t.localeCompare(r):e.indexOf(t)-e.indexOf(r))).reduce(((e,t)=>(e[t]=o[t],e)),{})}const M=n(R,t.concat(["properties"]),r,e);return k.forEach((o=>{for(const i of o.values)if(G.hasValue(i.properties[o.prop],M.value[o.prop])){Object.keys(i.properties).forEach((s=>{s!==o.prop&&G.merge(M.value,n(i.properties,t.concat(["properties"]),r,e).value)}));break}})),M};function pe(){const e=U.number(1,5);return le(e).join(" ")}var de=function(e=0,t=140){const r=Math.max(0,e),n=U.number(r,t);let o=pe();for(;o.lengthn&&(o=o.substr(0,n)),o};var me=function(){return[0,0,0,0].map((()=>U.number(0,255))).join(".")};var ge=function(){return U.date().toISOString()};var ye=function(){return ge().slice(0,10)};var ve=function(){return ge().slice(11)},be="[a-zA-Z][a-zA-Z0-9+-.]*",_e=`https?://{hostname}(?:${be})+`,we={email:"[a-zA-Z\\d][a-zA-Z\\d-]{1,13}[a-zA-Z\\d]@{hostname}",hostname:"[a-zA-Z]{1,33}\\.[a-z]{2,4}",ipv6:"[a-f\\d]{4}(:[a-f\\d]{4}){7}",uri:_e,slug:"[a-zA-Z\\d_-]+","uri-reference":`${_e}(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?`,"uri-template":_e.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${be.replace("]*","/]*")}|~[01]))+`,uuid:"^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",duration:"^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$"};we.iri=we["uri-reference"],we["iri-reference"]=we["uri-reference"],we["idn-email"]=we.email,we["idn-hostname"]=we.hostname;var xe=new RegExp(`\\{(${Object.keys(we).join("|")})\\}`);var Ee=function(e){return U.randexp(we[e]).replace(xe,((e,t)=>U.randexp(we[t])))};var Se=function(e){return G.typecast("string",e,(t=>e.format?function(e,t){const r=Z(e.format);if("function"==typeof r)return r(e);switch(e.format){case"date-time":case"datetime":return ge();case"date":return ye();case"time":return ve();case"ipv4":return me();case"regex":return".+?";case"email":case"hostname":case"ipv6":case"uri":case"uri-reference":case"iri":case"iri-reference":case"idn-email":case"idn-hostname":case"json-pointer":case"slug":case"uri-template":case"uuid":case"duration":return Ee(e.format);default:if(void 0===r){if(T("failOnInvalidFormat"))throw new Error(`unknown registry key ${G.short(e.format)}`);return t()}throw new Error(`unsupported format '${e.format}'`)}}(e,(()=>de(t.minLength,t.maxLength))):e.pattern?U.randexp(e.pattern):de(t.minLength,t.maxLength)))},Ae={boolean:oe,null:ie,array:se,integer:ue,number:ae,object:he,string:Se};function $e({$comment:e,title:t,description:r}){return Object.entries({comment:e,title:t,description:r}).filter((([,e])=>e)).reduce(((e,[t,r])=>(e[t]=r,e)),{})}var ke=function e(t,r,o,i){if((t=o(t,null,r))&&(t.oneOf||t.anyOf||t.allOf)&&(t=o(t,null,r)),!t)throw new Error(`Cannot traverse at '${r.join(".")}', given '${JSON.stringify(i)}'`);const s={...$e(t),schemaPath:r};if("properties"!==r[r.length-1]){if(T("useExamplesValue")&&Array.isArray(t.examples)){const e=t.examples.concat("default"in t?[t.default]:[]);return{value:G.typecast(null,t,(()=>U.pick(e))),context:s}}if(T("useExamplesValue")&&void 0!==t.example)return{value:G.typecast(null,t,(()=>t.example)),context:s};if(T("useDefaultValue")&&"default"in t&&(""!==t.default||!T("replaceEmptyByRandomValue")))return{value:t.default,context:s};if("template"in t)return{value:G.template(t.template,i),context:s};if("const"in t)return{value:t.const,context:s}}if(t.not&&"object"==typeof t.not&&(t=G.notValue(t.not,G.omitProps(t,["not"]))).type&&"object"===t.type){const{value:n,context:a}=e(t,r.concat(["not"]),o,i);return{value:G.clean(n,t,!1),context:{...s,items:a}}}if("function"==typeof t.thunk){const{value:n,context:a}=e(t.thunk(i),r,o);return{value:n,context:{...s,items:a}}}if(t.jsonPath)return{value:t,context:s};let a=t.type;if(Array.isArray(a)?a=U.pick(a):void 0===a&&(a=ne(t,r)||a,a&&(t.type=a)),"function"==typeof t.generate){const e=G.typecast(null,t,(()=>t.generate(i,r))),n=null===e?"null":typeof e;if(n===a||"number"===n&&"integer"===a||Array.isArray(e)&&"array"===a)return{value:e,context:s}}if("string"==typeof t.pattern)return{value:G.typecast("string",t,(()=>U.randexp(t.pattern))),context:s};if(Array.isArray(t.enum))return{value:G.typecast(null,t,(()=>U.pick(t.enum))),context:s};if("string"==typeof a){if(!Ae[a]){if(T("failOnInvalidTypes"))throw new X(`unknown primitive ${G.short(a)}`,r.concat(["type"]));{const n=T("defaultInvalidTypeProduct");return"string"==typeof n&&Ae[n]?{value:Ae[n](t,r,o,e),context:s}:{value:n,context:s}}}try{const n=Ae[a](t,r,o,e);return"array"===a?{value:n.map((({value:e})=>e)),context:{...s,items:n.map(Array.isArray(t.items)?({context:e})=>e:({context:e})=>({...e,schemaPath:e.schemaPath.slice(0,-1)}))}}:"object"===a?null!==n?{value:n.value,context:{...s,items:n.context}}:{value:{},context:s}:{value:n,context:s}}catch(n){if(void 0===n.path)throw new X(n.stack,r);throw n}}let u={},c={...s};Array.isArray(t)&&(u=[]);const l=T("pruneProperties")||[];return Object.keys(t).forEach((n=>{if(!l.includes(n)&&null!==t[n])if("object"==typeof t[n]&&"definitions"!==n){const{value:i,context:s}=e(t[n],r.concat([n]),o,u);u[n]=G.clean(i,t[n],!1),c[n]=s,null===u[n]&&T("omitNulls")&&(delete u[n],delete c[n])}else u[n]=t[n]})),{value:u,context:c}},Oe=({refs:e,schema:t,container:r,synchronous:n,refDepthMax:o,refDepthMin:i})=>{const s={},a={};let u,c,l=0;return s.resolveSchema=(f,h,p)=>{if(null==f)return null;if("function"==typeof f.generate)return f;if("string"==typeof(f.$id||f.id)&&(delete f.id,delete f.$id,delete f.$schema),"string"==typeof f.$ref){const r=Math.max(i,o)-1;if("#"===f.$ref||a[f.$ref]<0||u===f.$ref&&++l>r)return"#"!==f.$ref&&c&&c.length===p.length?G.getLocalRef(t,f.$ref,n&&e):(delete f.$ref,f);let s,h;if(void 0===a[f.$ref]&&(a[f.$ref]=U.number(i,o)-1),c=p,u=f.$ref,s=-1===f.$ref.indexOf("#/")?e[f.$ref]||null:G.getLocalRef(t,f.$ref,n&&e)||null,void 0!==s){if(!s&&!0!==T("ignoreMissingRefs"))throw new Error(`Reference not found: ${f.$ref}`);a[f.$ref]-=1,G.merge(f,s||{}),h=n&&s&&s.$ref}return h||delete f.$ref,f}if(Array.isArray(f.allOf)){const e=f.allOf;delete f.allOf,e.forEach((e=>{const t=s.resolveSchema(e,null,p);G.merge(f,"function"==typeof t.thunk?t.thunk(f):t),Array.isArray(f.allOf)&&s.resolveSchema(f,h,p)}))}if(Array.isArray(f.oneOf||f.anyOf)&&"dependencies"!==p[p.length-2]){const e=f.oneOf||f.anyOf;return f.enum&&f.oneOf&&(f.enum=f.enum.filter((t=>G.validate(t,e)))),{thunk(t){const r=G.omitProps(f,["anyOf","oneOf"]),n=U.pick(e);return G.merge(r,n),e.forEach((e=>{e.required&&e!==n&&e.required.forEach((e=>{if(n.required&&n.required.includes(e))return;const o=r.required&&r.required.includes(e);r.properties&&!o&&delete r.properties[e],t&&t.properties&&delete t.properties[e]}))})),r}}}if(Object.keys(f).forEach((e=>{!Array.isArray(f[e])&&"object"!=typeof f[e]||G.isKey(e)||(f[e]=s.resolveSchema(f[e],e,p.concat(e)))})),p){const e=p[p.length-1];if("properties"===e||"items"===e)return f}return r.wrap(f)},s};function Pe(e,t,r,n){if(!e||"object"!=typeof e)return e;if(r||(r={}),t||(t=e),Array.isArray(e))return e.map((e=>Pe(e,t,r,n)));if(e.jsonPath){const{JSONPath:o}=$(),i="object"!=typeof e.jsonPath?{path:e.jsonPath}:e.jsonPath;i.group=e.group||i.group||n,i.cycle=e.cycle||i.cycle||!1,i.reverse=e.reverse||i.reverse||!1,i.count=e.count||i.count||1;const s=`${i.group}__${i.path}`;return r[s]||(i.count>1?r[s]=o(i.path,t).slice(0,i.count):r[s]=o(i.path,t)),i.cycle||i.reverse?function(e,t){if(!Array.isArray(e))return e;const r=t?e.pop():e.shift();return t?e.unshift(r):e.push(r),r}(r[s],i.reverse):function(e){return Array.isArray(e)?U.pick(e):e}(r[s])}return Object.keys(e).forEach((n=>{e[n]=Pe(e[n],t,r,n)})),e}var je=function(e,t,r,o){if("[object Object]"!==Object.prototype.toString.call(t))throw new Error("Invalid input, expecting object but given "+typeof t);const i=T("refDepthMin")||0,s=T("refDepthMax")||3;try{const{resolveSchema:n}=Oe({refs:e,schema:t,container:r,synchronous:o,refDepthMin:i,refDepthMax:s}),a=ke(G.clone(t),[],n);return T("resolveJsonPath")?{value:Pe(a.value),context:a.context}:a}catch(n){throw n.path?new Error(`${n.message} in /${n.path.join("/")}`):n}};var Ce=function(e){return e.value},Te=h(S(),1),Ne=(Te.default.binaryOptions,Te.default.boolOptions,Te.default.intOptions,Te.default.nullOptions,Te.default.strOptions,Te.default.Schema,Te.default.Alias,Te.default.Collection,Te.default.Merge,Te.default.Node,Te.default.Pair,Te.default.Scalar,Te.default.YAMLMap),Ie=Te.default.YAMLSeq;function Re(e,t,r,n=r){const{title:o,description:i,comment:s}=function(e,t){return t.reduce(((e,t)=>t in e?e[t]:{}),e)}(e,t),a=[];T("renderTitle")&&o&&a.push(` ${o}`,""),T("renderDescription")&&i&&a.push(` ${i}`),T("renderComment")&&s&&a.push(` ${s}`),r.commentBefore=a.join("\n"),n instanceof Ne?n.items.forEach((r=>{Re(e,[...t,"items",r.key.value],r.key,r.value)})):n instanceof Ie&&n.items.forEach(((r,n)=>{Re(e,[...t,"items",n],r)}))}var Me=function({value:e,context:t}){const r=Me.createNode(e);Re(t,[],r);const n=new Me.Document;return n.contents=r,n.toString()},Le=new J;function De(){Le.define("autoIncrement",(function(e,t){if(!this.offset){const r=t.minimum||1,n=r+R.MAX_NUMBER,o=e.initialOffset||t.initialOffset;this.offset=o||U.number(r,n)}return e?this.offset++:t})),Le.define("sequentialDate",(function(e,t){if(this.now||(this.now=U.date()),e){if(t=this.now.toISOString(),-1===["seconds","minutes","hours","days","weeks","months","years"].indexOf(e=!0===e?"days":e))throw new Error(`Unsupported increment by ${G.short(e)}`);this.now.setTime(this.now.getTime()+U.date(e))}return t}))}function Ue(e,t){let r={};function n(e){if(!e||"object"!=typeof e)return;if(Array.isArray(e))return e.forEach(n);const t=e.$id||e.id;"string"!=typeof t||r[t]||(r[t]=e),Object.keys(e).forEach((t=>{n(e[t])}))}return Array.isArray(e)?e.forEach((e=>{r[e.$id||e.id]=e})):r=e||{},n(e),n(t),r}var Fe=(e,t,r)=>(console.debug("[json-schema-faker] calling JSONSchemaFaker() is deprecated, call either .generate() or .resolve()"),r&&console.debug("[json-schema-faker] local references are only supported by calling .resolve()"),Fe.generate(e,t));Fe.generateWithContext=(e,t)=>{const r=Ue(t,e);return je(r,e,Le,!0)},Fe.generate=(e,t)=>Ce(Fe.generateWithContext(e,t)),Fe.generateYAML=(e,t)=>Me(Fe.generateWithContext(e,t)),Fe.resolveWithContext=(e,t,r)=>{"string"==typeof t&&(r=t,t={}),r=`${(r=r||("undefined"!=typeof process&&"function"==typeof process.cwd?process.cwd():"")).replace(/\/+$/,"")}/`;const o=Ue(t,e),i={order:1,canRead(e){const t=e.url.replace("/:",":");return o[t]||o[t.split("/").pop()]},read(e,t){try{t(null,this.canRead(e))}catch(n){t(n)}}},{$RefParser:s}=$();return s.bundle(r,e,{resolve:{file:{order:100},http:{order:200},fixedRefs:i},dereference:{circular:"ignore"}}).then((e=>je(o,e,Le))).catch((e=>{throw new Error(`Error while resolving schema (${e.message})`)}))},Fe.resolve=(e,t,r)=>Fe.resolveWithContext(e,t,r).then(Ce),Fe.resolveYAML=(e,t,r)=>Fe.resolveWithContext(e,t,r).then(Me),De(),Fe.format=Z,Fe.option=T,Fe.random=U,Fe.extend=(e,t)=>(Le.extend(e,t),Fe),Fe.define=(e,t)=>(Le.define(e,t),Fe),Fe.reset=e=>(Le.reset(e),De(),Fe),Fe.locate=e=>Le.get(e),Fe.VERSION="0.5.7";var Be,ze={...Fe};"undefined"!=typeof $RefParser&&"undefined"!=typeof JSONPath&&(Be={...JSONPath,$RefParser:$RefParser},Object.assign(A,Be))},37817:(e,t,r)=>{"use strict";r.d(t,{xJ:()=>y});var n=r(37172);function o(e,t){const r=e[t];return"whitespace"===(null==r?void 0:r.type)?{inc:1,whitespaceToken:r}:{inc:0}}function i(e,t){const r=o(e,t),n=e[t+r.inc];return++r.inc,{whitespaceToken:r.whitespaceToken,consumedTokens:r.inc,token:n}}function s(e,t){return e[t+o(e,t).inc]}function a(e){return{includeValueTokens:!1,...e}}function u(e,t=e){return{start:e.offset,end:t.offset+t.raw.length}}function c(e){return"string"===e.type?{kind:"string",token:e,range:u(e)}:"number"===e.type?{kind:"number",token:e,range:u(e)}:{kind:"literal",token:e,range:u(e)}}function l(e,t,r,n){const o=e[t];if(!o)throw new Error(`Failed to parse JSON as token pos ${t}`);if(o.type!==r)throw new Error(`Failed to parse JSON at pos ${o.offset}, expected ${r} got ${o.type}`);if(n&&o.value!==n)throw new Error(`Failed to parse JSON at pos ${o.offset} of type ${r}, expected punctuation ${n} got ${o.value}`)}function f(e,t){let r=t;const n=o(e,r);r+=n.inc,l(e,r,"punctuator",":");const i=e[r++],s=o(e,r);return r+=s.inc,{node:{kind:"object-property-colon",range:u(e[t],e[r-1]),whitespaceBefore:n.whitespaceToken,punctuatorToken:i,whitespaceAfter:s.whitespaceToken},consumedTokens:r-t}}function h(e,t,r){const n=e[t];if("string"===(a=n).type||"number"===a.type||"literal"===a.type)return{consumedTokens:1,node:c(n)};if("punctuator"===n.type&&"{"===n.value)return function(e,t,r){var n;const a=[];let c,p=t;for(;p{const r=e;return r.offset=t,t+=e.raw.length,r}))}(n(e));let s=0;const u=o(i,s);s+=u.inc;const{consumedTokens:c,node:l}=h(i,s,r),f=r.options.includeValueTokens?i.slice(s,s+c):[];s+=c;const p=o(i,s);return s+=p.inc,{root:l,whitespaceBefore:u.whitespaceToken,valueTokens:f,whitespaceAfter:p.whitespaceToken}}(e);return{json:t||JSON.parse(e),jsonString:e,jsonDoc:r}}function d(e){const t=e,r=e,n=e;if(t.path&&Array.isArray(t.path))return t.path;if("string"==typeof r.dotPath)return function(e){if(!e.startsWith(".")&&!e.startsWith("["))throw new SyntaxError(`parsePath(): Invalid dot-path, must begin with "." or "[": ${e}`);if("."===e)return[];const t=()=>{throw new Error(`parsePath(): Invalid dot-path: ${e}`)},r=[],n=(e,t)=>-1===e&&-1===t?-1:-1===e?t:-1===t||efunction(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}(e)))}(n.pointerPath);throw new TypeError("parsePath(): Missing path argument")}function m(e,t){t=Math.min(Math.max(t,0),e.length);const{count:r,lastPos:n}=function(e,t,r){let n=0,o=0,i=0;for(;i=t)break;i=s+1,i`${e}`));if(!r){if(0===i.length)return{start:{offset:0,line:1,column:1},end:{offset:9,line:1,column:10}};throw new Error("No such path in undefined")}const s=e=>`${(e=>"."+i.slice(0,e).join("."))(e)} [query: ${i.join(".")}]`,a=i.reduce(((e,t,r)=>"object"===(null==e?void 0:e.kind)?(()=>{const n=e.children.find((e=>e.keyToken.value===t));if(!n)throw new Error(`No such property ${t} in ${s(r)}`);return o&&r===i.length-1?n:n.valueNode})():"array"===(null==e?void 0:e.kind)?(()=>{const n=Number(t);if(isNaN(n))throw new Error(`Invalid non-numeric array index "${t}" in array at ${s(r)}`);if(n<0||n>=e.children.length)throw new RangeError(`Index ${n} out-of-bounds in array of size ${e.children.length} at ${s(r)}`);return e.children[Number(t)].valueNode})():(()=>{throw new Error(`No such property ${t} in ${s(r)}`)})()),r.root),u="object-property"===a.kind?{start:a.keyToken.offset,end:a.keyToken.offset+a.keyToken.raw.length}:a.range;return{start:m(n,u.start),end:m(n,u.end)}}function y(e,t){return g("string"==typeof e?p(e):function(e,t=4){const r=p(JSON.stringify(null!=e?e:null,null,t));return void 0===e&&(r.json=void 0,r.jsonString="undefined",r.jsonDoc=void 0),r}(e),t)}},99571:(e,t,r)=>{"use strict";r.d(t,{N9:()=>L,oR:()=>P});var n=r(63696),o=r(34164);const i=e=>"number"==typeof e&&!isNaN(e),s=e=>"string"==typeof e,a=e=>"function"==typeof e,u=e=>s(e)||a(e)?e:null,c=e=>(0,n.isValidElement)(e)||s(e)||a(e)||i(e);function l(e){let{enter:t,exit:r,appendPosition:o=!1,collapse:i=!0,collapseDuration:s=300}=e;return function(e){let{children:a,position:u,preventExitTransition:c,done:l,nodeRef:f,isIn:h,playToast:p}=e;const d=o?`${t}--${u}`:t,m=o?`${r}--${u}`:r,g=(0,n.useRef)(0);return(0,n.useLayoutEffect)((()=>{const e=f.current,t=d.split(" "),r=n=>{n.target===f.current&&(p(),e.removeEventListener("animationend",r),e.removeEventListener("animationcancel",r),0===g.current&&"animationcancel"!==n.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)}),[]),(0,n.useEffect)((()=>{const e=f.current,t=()=>{e.removeEventListener("animationend",t),i?function(e,t,r){void 0===r&&(r=300);const{scrollHeight:n,style:o}=e;requestAnimationFrame((()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame((()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)}))}))}(e,l,s):l()};h||(c?t():(g.current=1,e.className+=` ${m}`,e.addEventListener("animationend",t)))}),[h]),n.createElement(n.Fragment,null,a)}}function f(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const h=new Map;let p=[];const d=new Set,m=e=>d.forEach((t=>t(e))),g=()=>h.size>0;function y(e,t){var r;if(t)return!(null==(r=h.get(t))||!r.isToastActive(e));let n=!1;return h.forEach((t=>{t.isToastActive(e)&&(n=!0)})),n}function v(e,t){c(e)&&(g()||p.push({content:e,options:t}),h.forEach((r=>{r.buildToast(e,t)})))}function b(e,t){h.forEach((r=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===r.id&&r.toggle(e,null==t?void 0:t.id):r.toggle(e,null==t?void 0:t.id)}))}function _(e){const{subscribe:t,getSnapshot:r,setProps:o}=(0,n.useRef)(function(e){const t=e.containerId||1;return{subscribe(r){const o=function(e,t,r){let o=1,l=0,h=[],p=[],d=[],m=t;const g=new Map,y=new Set,v=()=>{d=Array.from(g.values()),y.forEach((e=>e()))},b=e=>{p=null==e?[]:p.filter((t=>t!==e)),v()},_=e=>{const{toastId:t,onOpen:o,updateId:i,children:s}=e.props,u=null==i;e.staleId&&g.delete(e.staleId),g.set(t,e),p=[...p,e.props.toastId].filter((t=>t!==e.staleId)),v(),r(f(e,u?"added":"updated")),u&&a(o)&&o((0,n.isValidElement)(s)&&s.props)};return{id:e,props:m,observe:e=>(y.add(e),()=>y.delete(e)),toggle:(e,t)=>{g.forEach((r=>{null!=t&&t!==r.props.toastId||a(r.toggle)&&r.toggle(e)}))},removeToast:b,toasts:g,clearQueue:()=>{l-=h.length,h=[]},buildToast:(t,p)=>{if((t=>{let{containerId:r,toastId:n,updateId:o}=t;const i=r?r!==e:1!==e,s=g.has(n)&&null==o;return i||s})(p))return;const{toastId:d,updateId:y,data:w,staleId:x,delay:E}=p,S=()=>{b(d)},A=null==y;A&&l++;const $={...m,style:m.toastStyle,key:o++,...Object.fromEntries(Object.entries(p).filter((e=>{let[t,r]=e;return null!=r}))),toastId:d,updateId:y,data:w,closeToast:S,isIn:!1,className:u(p.className||m.toastClassName),bodyClassName:u(p.bodyClassName||m.bodyClassName),progressClassName:u(p.progressClassName||m.progressClassName),autoClose:!p.isLoading&&(k=p.autoClose,O=m.autoClose,!1===k||i(k)&&k>0?k:O),deleteToast(){const e=g.get(d),{onClose:t,children:o}=e.props;a(t)&&t((0,n.isValidElement)(o)&&o.props),r(f(e,"removed")),g.delete(d),l--,l<0&&(l=0),h.length>0?_(h.shift()):v()}};var k,O;$.closeButton=m.closeButton,!1===p.closeButton||c(p.closeButton)?$.closeButton=p.closeButton:!0===p.closeButton&&($.closeButton=!c(m.closeButton)||m.closeButton);let P=t;(0,n.isValidElement)(t)&&!s(t.type)?P=(0,n.cloneElement)(t,{closeToast:S,toastProps:$,data:w}):a(t)&&(P=t({closeToast:S,toastProps:$,data:w}));const j={content:P,props:$,staleId:x};m.limit&&m.limit>0&&l>m.limit&&A?h.push(j):i(E)?setTimeout((()=>{_(j)}),E):_(j)},setProps(e){m=e},setToggle:(e,t)=>{g.get(e).toggle=t},isToastActive:e=>p.some((t=>t===e)),getSnapshot:()=>d}}(t,e,m);h.set(t,o);const l=o.observe(r);return p.forEach((e=>v(e.content,e.options))),p=[],()=>{l(),h.delete(t)}},setProps(e){var r;null==(r=h.get(t))||r.setProps(e)},getSnapshot(){var e;return null==(e=h.get(t))?void 0:e.getSnapshot()}}}(e)).current;o(e);const l=(0,n.useSyncExternalStore)(t,r,r);return{getToastToRender:function(t){if(!l)return[];const r=new Map;return e.newestOnTop&&l.reverse(),l.forEach((e=>{const{position:t}=e.props;r.has(t)||r.set(t,[]),r.get(t).push(e)})),Array.from(r,(e=>t(e[0],e[1])))},isToastActive:y,count:null==l?void 0:l.length}}function w(e){const[t,r]=(0,n.useState)(!1),[o,i]=(0,n.useState)(!1),s=(0,n.useRef)(null),a=(0,n.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:u,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:p}=e;var d,m;function g(){r(!0)}function y(){r(!1)}function v(r){const n=s.current;a.canDrag&&n&&(a.didMove=!0,t&&y(),a.delta="x"===e.draggableDirection?r.clientX-a.start:r.clientY-a.start,a.start!==r.clientX&&(a.canCloseOnClick=!1),n.style.transform=`translate3d(${"x"===e.draggableDirection?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,n.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function b(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",b);const t=s.current;if(a.canDrag&&a.didMove&&t){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}null==(m=h.get((d={id:e.toastId,containerId:e.containerId,fn:r}).containerId||1))||m.setToggle(d.id,d.fn),(0,n.useEffect)((()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||y(),window.addEventListener("focus",g),window.addEventListener("blur",y),()=>{window.removeEventListener("focus",g),window.removeEventListener("blur",y)}}),[e.pauseOnFocusLoss]);const _={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){a.didMove=!1,document.addEventListener("pointermove",v),document.addEventListener("pointerup",b);const r=s.current;a.canCloseOnClick=!0,a.canDrag=!0,r.style.transition="none","x"===e.draggableDirection?(a.start=t.clientX,a.removalDistance=r.offsetWidth*(e.draggablePercent/100)):(a.start=t.clientY,a.removalDistance=r.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){const{top:r,bottom:n,left:o,right:i}=s.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=o&&t.clientX<=i&&t.clientY>=r&&t.clientY<=n?y():g()}};return u&&c&&(_.onMouseEnter=y,e.stacked||(_.onMouseLeave=g)),p&&(_.onClick=e=>{f&&f(e),a.canCloseOnClick&&l()}),{playToast:g,pauseToast:y,isRunning:t,preventExitTransition:o,toastRef:s,eventHandlers:_}}function x(e){let{delay:t,isRunning:r,closeToast:i,type:s="default",hide:u,className:c,style:l,controlledProgress:f,progress:h,rtl:p,isIn:d,theme:m}=e;const g=u||f&&0===h,y={...l,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused"};f&&(y.transform=`scaleX(${h})`);const v=(0,o.A)("Toastify__progress-bar",f?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${m}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":p}),b=a(c)?c({rtl:p,type:s,defaultClassName:v}):(0,o.A)(v,c),_={[f&&h>=1?"onTransitionEnd":"onAnimationEnd"]:f&&h<1?null:()=>{d&&i()}};return n.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":g},n.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${m} Toastify__progress-bar--${s}`}),n.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:b,style:y,..._}))}let E=1;const S=()=>""+E++;function A(e){return e&&(s(e.toastId)||i(e.toastId))?e.toastId:S()}function $(e,t){return v(e,t),t.toastId}function k(e,t){return{...t,type:t&&t.type||e,toastId:A(t)}}function O(e){return(t,r)=>$(t,k(e,r))}function P(e,t){return $(e,k("default",t))}P.loading=(e,t)=>$(e,k("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),P.promise=function(e,t,r){let n,{pending:o,error:i,success:u}=t;o&&(n=s(o)?P.loading(o,r):P.loading(o.render,{...r,...o}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(e,t,o)=>{if(null==t)return void P.dismiss(n);const i={type:e,...c,...r,data:o},a=s(t)?{render:t}:t;return n?P.update(n,{...i,...a}):P(a.render,{...i,...a}),o},f=a(e)?e():e;return f.then((e=>l("success",u,e))).catch((e=>l("error",i,e))),f},P.success=O("success"),P.info=O("info"),P.error=O("error"),P.warning=O("warning"),P.warn=P.warning,P.dark=(e,t)=>$(e,k("default",{theme:"dark",...t})),P.dismiss=function(e){!function(e){var t;if(g()){if(null==e||s(t=e)||i(t))h.forEach((t=>{t.removeToast(e)}));else if(e&&("containerId"in e||"id"in e)){const t=h.get(e.containerId);t?t.removeToast(e.id):h.forEach((t=>{t.removeToast(e.id)}))}}else p=p.filter((t=>null!=e&&t.options.toastId!==e))}(e)},P.clearWaitingQueue=function(e){void 0===e&&(e={}),h.forEach((t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()}))},P.isActive=y,P.update=function(e,t){void 0===t&&(t={});const r=((e,t)=>{var r;let{containerId:n}=t;return null==(r=h.get(n||1))?void 0:r.toasts.get(e)})(e,t);if(r){const{props:n,content:o}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:S()};i.toastId!==e&&(i.staleId=e);const s=i.render||o;delete i.render,$(s,i)}},P.done=e=>{P.update(e,{progress:1})},P.onChange=function(e){return d.add(e),()=>{d.delete(e)}},P.play=e=>b(!0,e),P.pause=e=>b(!1,e);const j="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,C=e=>{let{theme:t,type:r,isLoading:o,...i}=e;return n.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${r})`,...i})},T={info:function(e){return n.createElement(C,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return n.createElement(C,{...e},n.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return n.createElement(C,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return n.createElement(C,{...e},n.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return n.createElement("div",{className:"Toastify__spinner"})}},N=e=>{const{isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:s,playToast:u}=w(e),{closeButton:c,children:l,autoClose:f,onClick:h,type:p,hideProgressBar:d,closeToast:m,transition:g,position:y,className:v,style:b,bodyClassName:_,bodyStyle:E,progressClassName:S,progressStyle:A,updateId:$,role:k,progress:O,rtl:P,toastId:j,deleteToast:C,isIn:N,isLoading:I,closeOnClick:R,theme:M}=e,L=(0,o.A)("Toastify__toast",`Toastify__toast-theme--${M}`,`Toastify__toast--${p}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":R}),D=a(v)?v({rtl:P,position:y,type:p,defaultClassName:L}):(0,o.A)(L,v),U=function(e){let{theme:t,type:r,isLoading:o,icon:i}=e,s=null;const u={theme:t,type:r};return!1===i||(a(i)?s=i({...u,isLoading:o}):(0,n.isValidElement)(i)?s=(0,n.cloneElement)(i,u):o?s=T.spinner():(e=>e in T)(r)&&(s=T[r](u))),s}(e),F=!!O||!f,B={closeToast:m,type:p,theme:M};let z=null;return!1===c||(z=a(c)?c(B):(0,n.isValidElement)(c)?(0,n.cloneElement)(c,B):function(e){let{closeToast:t,theme:r,ariaLabel:o="close"}=e;return n.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":o},n.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},n.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(B)),n.createElement(g,{isIn:N,done:C,position:y,preventExitTransition:r,nodeRef:i,playToast:u},n.createElement("div",{id:j,onClick:h,"data-in":N,className:D,...s,style:b,ref:i},n.createElement("div",{...N&&{role:k},className:a(_)?_({type:p}):(0,o.A)("Toastify__toast-body",_),style:E},null!=U&&n.createElement("div",{className:(0,o.A)("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!I})},U),n.createElement("div",null,l)),z,n.createElement(x,{...$&&!F?{key:`pb-${$}`}:{},rtl:P,theme:M,delay:f,isRunning:t,isIn:N,closeToast:m,hide:d,type:p,style:A,className:S,controlledProgress:F,progress:O||0})))},I=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},R=l(I("bounce",!0)),M=(l(I("slide",!0)),l(I("zoom")),l(I("flip")),{position:"top-right",transition:R,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"});function L(e){let t={...M,...e};const r=e.stacked,[i,s]=(0,n.useState)(!0),c=(0,n.useRef)(null),{getToastToRender:l,isToastActive:f,count:h}=_(t),{className:p,style:d,rtl:m,containerId:g}=t;function y(e){const t=(0,o.A)("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":m});return a(p)?p({position:e,rtl:m,defaultClassName:t}):(0,o.A)(t,u(p))}function v(){r&&(s(!0),P.play())}return j((()=>{if(r){var e;const r=c.current.querySelectorAll('[data-in="true"]'),n=12,o=null==(e=t.position)?void 0:e.includes("top");let s=0,a=0;Array.from(r).reverse().forEach(((e,t)=>{const r=e;r.classList.add("Toastify__toast--stacked"),t>0&&(r.dataset.collapsed=`${i}`),r.dataset.pos||(r.dataset.pos=o?"top":"bot");const u=s*(i?.2:1)+(i?0:n*t);r.style.setProperty("--y",`${o?u:-1*u}px`),r.style.setProperty("--g",`${n}`),r.style.setProperty("--s",""+(1-(i?a:0))),s+=r.offsetHeight,a+=.025}))}}),[i,h,r]),n.createElement("div",{ref:c,className:"Toastify",id:g,onMouseEnter:()=>{r&&(s(!1),P.pause())},onMouseLeave:v},l(((e,t)=>{const o=t.length?{...d}:{...d,pointerEvents:"none"};return n.createElement("div",{className:y(e),style:o,key:`container-${e}`},t.map((e=>{let{content:t,props:o}=e;return n.createElement(N,{...o,stacked:r,collapseAll:v,isIn:f(o.toastId,o.containerId),style:o.style,key:`toast-${o.key}`},t)})))})))}},63837:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},72079:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-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":true,"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":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"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":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"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":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"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":true}')}}]); \ No newline at end of file diff --git a/assets/js/7126.93b83561.js b/assets/js/7126.93b83561.js new file mode 100644 index 00000000..1114ba26 --- /dev/null +++ b/assets/js/7126.93b83561.js @@ -0,0 +1,8 @@ +/*! For license information please see 7126.93b83561.js.LICENSE.txt */ +(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7126],{20899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;t.Cache=class{constructor(e={}){this._stats={hits:0,misses:0},this._data={},this._stdTTL=e.stdTTL}get stats(){return this._stats}get(e){const t=this._data[e];if(t&&(!this._stdTTL||(new Date).getTime()-t.ts{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveCrawler=void 0;const n=r(2535),o=r(55131),i=r(58156),s=r(26672);t.ResolveCrawler=class{constructor(e,t,r){this._resolved=r,this.resolvers=[],this.pointerGraph=new o.DepGraph({circular:!0}),this.pointerStemGraph=new o.DepGraph({circular:!0}),this.computeGraph=(e,t=[],r="#",n=[])=>{r||(r="#");let o=this._runner.computeRef({val:e,jsonPointer:r,pointerStack:n});if(void 0!==o)this._resolveRef({ref:o,val:e,parentPath:t,pointerStack:n,parentPointer:r,cacheKey:r,resolvingPointer:this.jsonPointer});else if("object"==typeof e)for(const i in e){if(!e.hasOwnProperty(i))continue;const a=e[i],u=s.addToJSONPointer(r,i);o=this._runner.computeRef({key:i,val:a,jsonPointer:u,pointerStack:n}),t.push(i),void 0!==o?this._resolveRef({ref:o,val:a,parentPath:t,parentPointer:u,pointerStack:n,cacheKey:s.uriToJSONPointer(o),resolvingPointer:this.jsonPointer}):"object"==typeof a&&this.computeGraph(a,t,u,n),t.pop()}},this._resolveRef=e=>{const{pointerStack:t,parentPath:r,parentPointer:o,ref:a}=e;if(s.uriIsJSONPointer(a)){if(this._runner.dereferenceInline){const e=s.uriToJSONPointer(a);let c;try{c=(0,n.pointerToPath)(e)}catch(u){return void this._resolved.errors.push({code:"PARSE_POINTER",message:`'${a}' JSON pointer is invalid`,uri:this._runner.baseUri,uriStack:this._runner.uriStack,pointerStack:[],path:[]})}let l=c.length>0;for(const t in c)if(r[t]!==c[t]){l=!1;break}if(l)return;this.pointerStemGraph.hasNode(e)||this.pointerStemGraph.addNode(e);let f="#",h="";for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultGetRef=t.Cache=void 0;r(31635).__exportStar(r(90163),t);var n=r(20899);Object.defineProperty(t,"Cache",{enumerable:!0,get:function(){return n.Cache}});var o=r(65799);Object.defineProperty(t,"defaultGetRef",{enumerable:!0,get:function(){return o.defaultGetRef}})},90163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resolver=void 0;const n=r(55131),o=r(20899),i=r(65799);t.Resolver=class{constructor(e={}){this.ctx={},this.uriCache=e.uriCache||new o.Cache,this.resolvers=e.resolvers||{},this.getRef=e.getRef,this.transformRef=e.transformRef,this.dereferenceInline=void 0===e.dereferenceInline||e.dereferenceInline,this.dereferenceRemote=void 0===e.dereferenceRemote||e.dereferenceRemote,this.parseResolveResult=e.parseResolveResult,this.transformDereferenceResult=e.transformDereferenceResult,this.ctx=e.ctx}resolve(e,t={}){const r=new n.DepGraph({circular:!0});return new i.ResolveRunner(e,r,Object.assign(Object.assign({uriCache:this.uriCache,resolvers:this.resolvers,getRef:this.getRef,transformRef:this.transformRef,dereferenceInline:this.dereferenceInline,dereferenceRemote:this.dereferenceRemote,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult},t),{ctx:Object.assign({},this.ctx||{},t.ctx||{})})).resolve(t)}}},65799:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveRunner=t.defaultGetRef=void 0;const n=r(31635),o=r(2535),i=r(58851),s=r(55131),a=r(75878),u=r(58156),c=r(63560),l=r(84193),f=r(32735),h=r(20899),p=r(20349),d=r(26672),m=r(74987);let g=0;t.defaultGetRef=(e,t)=>{if(t&&"object"==typeof t&&"string"==typeof t.$ref)return t.$ref};class y{constructor(e,r=new s.DepGraph({circular:!0}),a={}){this.ctx={},this.computeRef=e=>{const t=this.getRef(e.key,e.val);if(void 0===t)return;let r=new f.ExtendedURI(t);if("#"!==t[0]){if(this.isFile(r)){let e=r.toString();r.is("absolute")||(e=this.baseUri.toString()?(0,i.join)((0,i.dirname)(this.baseUri.toString()),(0,i.stripRoot)(e)):""),e&&(r=new l((0,i.toFSPath)(e)).fragment(r.fragment()))}else(r.scheme().includes("http")||""===r.scheme()&&this.baseUri.scheme().includes("http"))&&""!==this.baseUri.authority()&&""===r.authority()&&(r=r.absoluteTo(this.baseUri))}return String(r).length>0&&this.isFile(this.baseUri)&&this.isFile(r)&&this.baseUri.path()===r.path()&&(r=new f.ExtendedURI(`#${r.fragment()}`)),this.transformRef?this.transformRef(Object.assign(Object.assign({},e),{ref:r,uri:this.baseUri}),this.ctx):r},this.atMaxUriDepth=()=>this.uriStack.length>=100,this.lookupUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{ref:t}=e;let r=t.scheme();!this.resolvers[r]&&this.isFile(t)&&(r="file");const n=this.resolvers[r];if(!n)throw new Error(`No resolver defined for scheme '${t.scheme()||"file"}' in ref ${t.toString()}`);let o=yield n.resolve(t,this.ctx);if(this.parseResolveResult)try{o=(yield this.parseResolveResult({uriResult:o,result:o,targetAuthority:t,parentAuthority:this.baseUri,parentPath:e.parentPath,fragment:e.fragment})).result}catch(i){throw new Error(`Could not parse remote reference response for '${t.toString()}' - ${String(i)}`)}return new y(o,this.graph,{depth:this.depth+1,baseUri:t.toString(),root:t,uriStack:this.uriStack,uriCache:this.uriCache,resolvers:this.resolvers,transformRef:this.transformRef,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult,dereferenceRemote:this.dereferenceRemote,dereferenceInline:this.dereferenceInline,ctx:this.ctx})})),this.lookupAndResolveUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{val:t,ref:r,resolvingPointer:n,parentPointer:i,pointerStack:s}=e,a=e.parentPath?e.parentPath.slice():[],u=this.computeUriCacheKey(r),l={uri:r,pointerStack:s,targetPath:n===i?[]:a};if(this.uriStack.includes(u))return l.resolved={result:t,graph:this.graph,refMap:{},errors:[],runner:this},l;{let e;const n=this.baseUri.toString(),i=n&&0!==this.depth?n:null;try{if(this.atMaxUriDepth())throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`);e=yield this.lookupUri({ref:r.clone().fragment(""),fragment:r.fragment(),cacheKey:u,parentPath:a}),i&&(e.uriStack=e.uriStack.concat(i))}catch(f){l.error={code:"RESOLVE_URI",message:String(f),uri:r,uriStack:i?this.uriStack.concat(i):this.uriStack,pointerStack:s,path:a}}if(e&&(l.resolved=yield e.resolve({jsonPointer:d.uriToJSONPointer(r),parentPath:a}),l.resolved.errors.length))for(const s of l.resolved.errors)if("POINTER_MISSING"===s.code&&s.path.join("/")===r.fragment().slice(1)){const e=r.fragment?(0,o.trimStart)(s.path,(0,o.trimStart)(r.fragment(),"/").split("/")):s.path;e&&e.length?c(l.resolved.result,e,t):l.resolved.result&&(l.resolved.result=t)}}return l})),this.id=g+=1,this.depth=a.depth||0,this._source=e,this.resolvers=a.resolvers||{};const u=a.baseUri||"";let p=new l(u||"");this.isFile(p)&&(p=new l((0,i.toFSPath)(u))),this.baseUri=p,this.uriStack=a.uriStack||[],this.uriCache=a.uriCache||new h.Cache,this.root=a.root&&a.root.toString()||this.baseUri.toString()||"root",this.graph=r,this.graph.hasNode(this.root)||this.graph.addNode(this.root,{refMap:{},data:this._source}),this.baseUri&&0===this.depth&&this.uriCache.set(this.computeUriCacheKey(this.baseUri),this),this.getRef=a.getRef||t.defaultGetRef,this.transformRef=a.transformRef,this.depth?this.dereferenceInline=!0:this.dereferenceInline=void 0===a.dereferenceInline||a.dereferenceInline,this.dereferenceRemote=void 0===a.dereferenceRemote||a.dereferenceRemote,this.parseResolveResult=a.parseResolveResult,this.transformDereferenceResult=a.transformDereferenceResult,this.ctx=a.ctx,this.lookupUri=m(this.lookupUri,{serializer:this._cacheKeySerializer,cache:{create:()=>this.uriCache}})}get source(){return this._source}resolve(e){return n.__awaiter(this,void 0,void 0,(function*(){const t={result:this.source,graph:this.graph,refMap:{},errors:[],runner:this};let r;const n=e&&e.jsonPointer&&e.jsonPointer.trim();if(n&&"#"!==n&&"#/"!==n){try{r=(0,o.pointerToPath)(n)}catch(f){return t.errors.push({code:"PARSE_POINTER",message:`'${n}' JSON pointer is invalid`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:[]}),t}t.result=u(t.result,r)}if(void 0===t.result)return t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist @ '${this.baseUri.toString()}'`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:r||[]}),t;const i=new p.ResolveCrawler(this,n,t);i.computeGraph(t.result,r,n||"");let s=[];if(i.resolvers.length&&(s=yield Promise.all(i.resolvers)),s.length)for(const e of s){let n=e.targetPath;n.length||(n=r||[]),t.refMap[String(this.baseUri.clone().fragment((0,o.pathToPointer)(n)))]=String(e.uri),this._setGraphNodeEdge(String(this.root),(0,o.pathToPointer)(n),String(e.uri)),e.error&&t.errors.push(e.error),e.resolved&&(e.resolved.errors&&(t.errors=t.errors.concat(e.resolved.errors)),void 0!==e.resolved.result&&(this._source=(0,a.default)(this._source,(t=>{if(e.resolved){if(!n.length)return e.resolved.result;c(t,n,e.resolved.result),this._setGraphNodeData(String(e.uri),e.resolved.result)}}))))}if("object"==typeof this._source?(this.dereferenceInline&&(this._source=(0,a.default)(this._source,(e=>{let r=[];try{r=i.pointerGraph.overallOrder();for(const n of r){const r=i.pointerGraph.dependantsOf(n);if(!r.length)continue;const s=(0,o.pointerToPath)(n),l=0===s.length?(0,a.original)(e):u(e,s);for(const a of r){let r;const u=(0,o.pointerToPath)(a),f=i.pointerStemGraph.dependenciesOf(n);for(const e of f)if((0,o.startsWith)(u,(0,o.pointerToPath)(e))){r=!0;break}r||(t.refMap[(0,o.pathToPointer)(u)]=(0,o.pathToPointer)(s),this._setGraphNodeEdge(this.root,(0,o.pathToPointer)(u),(0,o.pathToPointer)(s)),void 0!==l?(c(e,u,l),this._setGraphNodeData((0,o.pathToPointer)(s),l)):t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist`,path:u,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[]}))}}}catch(n){}}))),t.result=r?u(this._source,r):this._source):t.result=this._source,this.transformDereferenceResult){const o=new l(n||"");try{const{result:r,error:n}=yield this.transformDereferenceResult({source:this.source,result:t.result,targetAuthority:o,parentAuthority:this.baseUri,parentPath:e&&e.parentPath||[],fragment:o.fragment()});if(t.result=r,n)throw new Error(`Could not transform dereferenced result for '${o.toString()}' - ${String(n)}`)}catch(h){t.errors.push({code:"TRANSFORM_DEREFERENCED",message:`Error: Could not transform dereferenced result for '${this.baseUri.toString()}${""!==o.fragment()?`#${o.fragment()}`:""}' - ${String(h)}`,uri:o,uriStack:this.uriStack,pointerStack:[],path:r})}}return this._setGraphNodeData(this.root,this._source),t}))}_cacheKeySerializer(e){return e&&"object"==typeof e&&e.cacheKey?e.cacheKey:JSON.stringify(arguments)}computeUriCacheKey(e){return e.clone().fragment("").toString()}isFile(e){const t=e.scheme();if("file"===t)return!0;if(t){if(!this.resolvers[t])return!0}else{if("/"===e.toString().charAt(0))return!0;if(this.baseUri){const e=this.baseUri.scheme();return Boolean(!e||"file"===e||!this.resolvers[e])}}return!1}_setGraphNodeData(e,t){if(!this.graph.hasNode(e))return;const r=this.graph.getNodeData(e)||{};r.data=t,this.graph.setNodeData(e,r)}_setGraphNodeEdge(e,t,r){if(!this.graph.hasNode(e))return;const n=this.graph.getNodeData(e)||{};n.refMap=n.refMap||{},n.refMap[t]=r,this.graph.setNodeData(e,n)}}t.ResolveRunner=y},32735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedURI=void 0;const n=r(84193);t.ExtendedURI=class extends n{constructor(e){super(e),this._value=e.trim()}get length(){return this._value.length}}},26672:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uriIsJSONPointer=t.uriToJSONPointer=t.addToJSONPointer=void 0;const r=(e,t,r)=>{const n=e.toString();let o="",i=n,s=0,a=i.indexOf(t);for(;a>-1;)o+=n.substring(s,s+a)+r,i=i.substring(a+t.length,i.length),s+=a+t.length,a=i.indexOf(t);return i.length>0&&(o+=n.substring(n.length-i.length,n.length)),o};t.addToJSONPointer=(e,t)=>{return`${e}/${n=t,r(r(n,"~","~0"),"/","~1")}`;var n};t.uriToJSONPointer=e=>"length"in e&&0===e.length?"":""!==e.fragment()?`#${e.fragment()}`:""===e.href()?"#":"";t.uriIsJSONPointer=e=>(!("length"in e)||e.length>0)&&""===e.path()},2535:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BUNDLE_ROOT:()=>ne,ERRORS_ROOT:()=>oe,KEYS:()=>Ne,bundleTarget:()=>ie,decodePointer:()=>H,decodePointerFragment:()=>ae,decodePointerUriFragment:()=>H,decycle:()=>ue,encodePointer:()=>ce,encodePointerFragment:()=>L,encodePointerUriFragment:()=>F,encodeUriPointer:()=>U,extractPointerFromRef:()=>le,extractSourceFromRef:()=>Z,getFirstPrimitiveProperty:()=>fe,getJsonPathForPosition:()=>he,getLastPathSegment:()=>pe,getLocationForJsonPath:()=>de,hasRef:()=>I,isExternalRef:()=>Q,isLocalRef:()=>R,isPlainObject:()=>j,parseTree:()=>ge,parseWithPointers:()=>me,pathToPointer:()=>B,pointerToPath:()=>W,remapRefs:()=>J,renameObjectKey:()=>_e,reparentBundleTarget:()=>xe,resolveExternalRef:()=>Se,resolveExternalRefWithLocation:()=>Ae,resolveInlineRef:()=>te,resolveInlineRefWithLocation:()=>re,safeParse:()=>$e,safeStringify:()=>Oe,startsWith:()=>Pe,stringify:()=>je,toPropertyPath:()=>Ce,trapAccess:()=>Re,traverse:()=>G,trimStart:()=>Me});var n,o=r(2543),i=r(58851);function s(e,t){void 0===t&&(t=!1);var r=e.length,n=0,o="",i=0,s=16,l=0,f=0,h=0,p=0,d=0;function m(t,r){for(var o=0,i=0;o=48&&s<=57)i=16*i+s-48;else if(s>=65&&s<=70)i=16*i+s-65+10;else{if(!(s>=97&&s<=102))break;i=16*i+s-97+10}n++,o++}return o=r)return i=r,s=17;var t=e.charCodeAt(n);if(a(t)){do{n++,o+=String.fromCharCode(t),t=e.charCodeAt(n)}while(a(t));return s=15}if(u(t))return n++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,o+="\n"),l++,h=n,s=14;switch(t){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,o=function(){for(var t="",o=n;;){if(n>=r){t+=e.substring(o,n),d=2;break}var i=e.charCodeAt(n);if(34===i){t+=e.substring(o,n),n++;break}if(92!==i){if(i>=0&&i<=31){if(u(i)){t+=e.substring(o,n),d=2;break}d=6}n++}else{if(t+=e.substring(o,n),++n>=r){d=2;break}switch(e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var s=m(4,!0);s>=0?t+=String.fromCharCode(s):d=4;break;default:d=5}o=n}}return t}(),s=10;case 47:var g=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n=12&&e<=15);return e}:g,getToken:function(){return s},getTokenValue:function(){return o},getTokenOffset:function(){return i},getTokenLength:function(){return n-i},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return i-p},getTokenError:function(){return d}}}function a(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function u(e){return 10===e||13===e||8232===e||8233===e}function c(e){return e>=48&&e<=57}function l(e,t,r){void 0===r&&(r=n.DEFAULT);var o=s(e,!1);function i(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function a(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}var u=i(t.onObjectBegin),c=a(t.onObjectProperty),l=i(t.onObjectEnd),f=i(t.onArrayBegin),h=i(t.onArrayEnd),p=a(t.onLiteralValue),d=a(t.onSeparator),m=i(t.onComment),g=a(t.onError),y=r&&r.disallowComments,v=r&&r.allowTrailingComma;function b(){for(;;){var e=o.scan();switch(o.getTokenError()){case 4:_(14);break;case 5:_(15);break;case 3:_(13);break;case 1:y||_(11);break;case 2:_(12);break;case 6:_(16)}switch(e){case 12:case 13:y?_(10):m();break;case 16:_(1);break;case 15:case 14:break;default:return e}}}function _(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=[]),g(e),t.length+r.length>0)for(var n=o.getToken();17!==n;){if(-1!==t.indexOf(n)){b();break}if(-1!==r.indexOf(n))break;n=b()}}function w(e){var t=o.getTokenValue();return e?p(t):c(t),b(),!0}function x(){switch(o.getToken()){case 3:return function(){f(),b();for(var e=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||_(4,[],[]),d(","),b(),4===o.getToken()&&v)break}else e&&_(6,[],[]);x()||_(4,[],[4,5]),e=!0}return h(),4!==o.getToken()?_(8,[4],[]):b(),!0}();case 1:return function(){u(),b();for(var e=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||_(4,[],[]),d(","),b(),2===o.getToken()&&v)break}else e&&_(6,[],[]);(10!==o.getToken()?(_(3,[],[2,5]),0):(w(!1),6===o.getToken()?(d(":"),b(),x()||_(4,[],[2,5])):_(5,[],[2,5]),1))||_(4,[],[2,5]),e=!0}return l(),2!==o.getToken()?_(7,[2],[]):b(),!0}();case 10:return w(!0);default:return function(){switch(o.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(o.getTokenValue()))&&(_(2),e=0)}catch(t){_(2)}p(e);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return b(),!0}()}}return b(),17===o.getToken()?!!r.allowEmptyContent||(_(4,[],[]),!1):x()?(17!==o.getToken()&&_(9,[],[]),!0):(_(4,[],[]),!1)}!function(e){e.DEFAULT={allowTrailingComma:!1}}(n||(n={}));var f=s,h=function e(t,r,n){if(void 0===n&&(n=!1),function(e,t,r){return void 0===r&&(r=!1),t>=e.offset&&t"}const g=`__object_order_${Math.floor(Date.now()/36e5)}__`,y=Symbol.for(g),v=(String(y),{defineProperty:(e,t,r)=>(!Object.prototype.hasOwnProperty.call(e,t)&&y in e?e[y].push(t):"value"in r&&t===y&&-1===r.value.lastIndexOf(y)&&r.value.push(y),Reflect.defineProperty(e,t,r)),deleteProperty(e,t){const r=Object.prototype.hasOwnProperty.call(e,t),n=Reflect.deleteProperty(e,t);if(n&&r&&y in e){const r=e[y].indexOf(t);-1!==r&&e[y].splice(r,1)}return n},ownKeys:e=>y in e?e[y]:Reflect.ownKeys(e),set(e,t,r){const n=Object.prototype.hasOwnProperty.call(e,t),o=Reflect.set(e,t,r);return o&&!n&&y in e&&e[y].push(t),o}});function b(e,t=Reflect.ownKeys(e)){x(e);const r=new Proxy(e,v);return function(e,t){y in e?(e[y].length=0,e[y].push(...t)):Reflect.defineProperty(e,y,{configurable:!0,value:t})}(r,t),r}function _(e){return null!==e&&"object"==typeof e}function w(e){if(!_(e))return!1;if(void 0!==e[Symbol.toStringTag]){const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}return"Object"===function(e){const t=e[Symbol.toStringTag];if("string"==typeof t)return t;const r=Reflect.apply(Object.prototype.toString,e,[]);return r.slice(8,r.length-1)}(e)}function x(e,t){if(function(){if("undefined"==typeof process||!_(process)||!_(process.env))return!1;return!1}()&&!w(e))throw new TypeError(t)}var E,S,A,$,k;!function(e){e.None="none",e.Declared="declared",e.InheritedFromService="inheritedFromService"}(E||(E={})),function(e){e.Unspecified="unspecified",e.Simple="simple",e.Matrix="matrix",e.Label="label",e.Form="form",e.CommaDelimited="commaDelimited",e.SpaceDelimited="spaceDelimited",e.PipeDelimited="pipeDelimited",e.DeepObject="deepObject",e.TabDelimited="tabDelimited"}(S||(S={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information",e[e.Hint=3]="Hint"}(A||(A={})),function(e){e.Article="article",e.HttpService="http_service",e.HttpServer="http_server",e.HttpOperation="http_operation",e.HttpCallback="http_callback",e.Model="model",e.Generic="generic",e.Unknown="unknown",e.TableOfContents="table_of_contents",e.SpectralRuleset="spectral_ruleset",e.Styleguide="styleguide",e.Image="image",e.StoplightResolutions="stoplight_resolutions",e.StoplightOverride="stoplight_override"}($||($={})),function(e){e.Json="json",e.Markdown="markdown",e.Yaml="yaml",e.Javascript="javascript",e.Apng="apng",e.Avif="avif",e.Bmp="bmp",e.Gif="gif",e.Jpeg="jpeg",e.Png="png",e.Svg="svg",e.Webp="webp"}(k||(k={}));var O=r(12068),P=r.n(O);function j(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype||"function"==typeof e.constructor&&Function.toString.call(Object)===Function.toString.call(e.constructor)}function C(e,t,r){if(!j(e)&&!Array.isArray(e)||!(t in e))throw new ReferenceError(`Could not resolve '${r}'`)}function T(e){if("string"!=typeof e.$ref)throw new TypeError("$ref should be a string")}const N=e=>j(e)&&"$ref"in e,I=e=>N(e)&&"string"==typeof e.$ref,R=e=>e.length>0&&("#"===e||/^#\S*$/.test(e)),M=(e,t,r)=>{const n=e.toString();let o="",i=n,s=0,a=i.indexOf(t);for(;a>-1;)o+=n.substring(s,s+a)+r,i=i.substring(a+t.length,i.length),s+=a+t.length,a=i.indexOf(t);return i.length>0&&(o+=n.substring(n.length-i.length,n.length)),o},L=e=>"number"==typeof e?e:M(M(e,"~","~0"),"/","~1"),D=/[^a-zA\u2013Z0\u20139_.!~*'()\/\-\u{D800}-\u{DFFF}]/gu;function U(e){return e.replace(D,encodeURIComponent)}const F=e=>{const t=L(e);return"number"==typeof t?t:U(t)},B=e=>z(e),z=e=>{if(e&&"object"!=typeof e)throw new TypeError("Invalid type: path must be an array of segments.");return 0===e.length?"#":`#/${e.map(F).join("/")}`};function q(e){try{return decodeURIComponent(e)}catch(t){return e}}const V=/%[0-9a-f]+/gi,H=e=>{let t;try{t=decodeURIComponent(e)}catch(r){t=e.replace(V,q)}return M(M(t,"~1","/"),"~0","~")},W=e=>K(e),K=e=>{if("string"!=typeof e)throw new TypeError("Invalid type: JSON Pointers are represented as strings.");if(0===e.length||"#"!==e[0])throw new URIError("Invalid JSON Pointer syntax; URI fragment identifiers must begin with a hash.");if(1===e.length)return[];if("/"!==e[1])throw new URIError("Invalid JSON Pointer syntax.");return(e=>{const t=e.length,r=[];let n=-1;for(;++n{const n={value:e,path:r};t.onEnter&&t.onEnter(n);for(const o of Object.keys(e)){const n=e[o];t.onProperty&&t.onProperty({parent:e,parentPath:r,property:o,propertyValue:n}),"object"==typeof n&&null!==n&&Y(n,t,r.concat(o))}t.onLeave&&t.onLeave(n)},G=(e,t)=>{"object"==typeof e&&null!==e&&Y(e,"function"==typeof t?{onProperty:t}:t,[])};function J(e,t,r){G(e,{onProperty({property:e,propertyValue:n,parent:o}){"$ref"===e&&"string"==typeof n&&n.startsWith(t)&&(o.$ref=`${r}${n.slice(t.length)}`)}})}const Q=e=>e.length>0&&"#"!==e[0],Z=e=>{if("string"!=typeof e||0===e.length||!Q(e))return null;const t=e.indexOf("#");return-1===t?e:e.slice(0,t)};function X(e,t){return j(t)&&j(e)&&("summary"in e||"description"in e)?Object.assign(Object.assign(Object.assign({},t),"description"in e?{description:e.description}:null),"summary"in e?{summary:e.summary}:null):t}function*ee(e,t,r){N(e.value)&&(T(e.value),yield[-1,e.value]);for(const[n,o]of t.entries())C(e.value,o,r),e.value=e.value[o],N(e.value)&&(T(e.value),yield[n,e.value])}function te(e,t){return re(e,t).value}function re(e,t){return function e(t,r,n,o){if(null!==Z(r))throw new ReferenceError("Cannot resolve external references");const i=W(r);let s=[...i];"#"===r&&N(t)&&(T(t),i.unshift(...W(t.$ref)));const a={value:t};for(const[u,c]of ee(a,i,r)){if(n.includes(c))return{source:null,location:null!=o?o:s,value:n[n.length-1]};n.push(c);const r=e(t,c.$ref,n,s);a.value=r.value,(s=r.location).push(...i.slice(u+1))}return{source:null,location:s,value:n.length>0?X(n[n.length-1],a.value):a.value}}(e,t,[])}const ne="#/__bundled__",oe="#/__errors__",ie=({document:e,path:t,bundleRoot:r="#/__bundled__",errorsRoot:n="#/__errors__",cloneDocument:i=!0,keyProvider:s},a)=>{if(t===r||t===n)throw new Error("Roots do not make any sense");const u=i?(0,o.cloneDeep)(e):e;return se(u,W(r),W(n),t,s)(t,{[t]:!0},a)},se=(e,t,r,n,i)=>{const s=new Set,a=(u,c,l,f={},h={},p={})=>{const d=W(u),m=(0,o.get)(e,d);G(l||m,{onEnter:({value:r})=>{if(I(r)&&R(r.$ref)){const l=r.$ref;if(p[l])return;if(l===u&&(f[l]="#"),f[l])return void(r.$ref=f[l]);let d,m,g,y,v;try{let r;d=W(l),i&&(r=i({document:e,path:d})),r||(r=(({document:e,path:t})=>0===t.length?"root":Array.isArray((0,o.get)(e,t.slice(0,-1)))?`${t[t.length-2]}_${t[t.length-1]}`:String(t[t.length-1]))({document:e,path:d})),g=r;let n=1;for(;s.has(g);)if(g=`${r}_${++n}`,n>20)throw new Error(`Keys ${r}_2 through ${r}_20 already taken.`);s.add(g),m=[...t,g],y=B(m)}catch(e){p[l]=e instanceof Error?e.message:String(e)}if(!d||!m||!y)return;if("object"==typeof e&&null!==e&&!(v=(0,o.get)(e,d)))try{v=te(Object(e),l)}catch(e){}void 0!==v&&(f[l]=y,r.$ref=y,(0,o.has)(h,m)||(Array.isArray(v)?(0,o.set)(h,m,new Array(v.length).fill(null)):"object"==typeof v&&(0,o.setWith)(h,m,{},Object),(0,o.set)(h,m,v),"#"===l?function(e,t,r,n){const i=r.map((e=>`[${JSON.stringify(e)}]`)).join(""),s=JSON.parse(JSON.stringify((0,o.omit)(Object(e),i))),a={};(0,o.set)(t,n,s),(0,o.set)(s,r,a),J(s,"#",B(n)),a.$ref="#"}(e,h,W(n),m):c[l]||(c[l]=!0,a(u,c,v,f,h,p),c[l]=!1)))}}});const g=(0,o.get)(h,t);return g&&Object.keys(g).length&&(0,o.set)(m,t,g),(Object.keys(p).length||(0,o.has)(e,r))&&(0,o.set)(m,r,(0,o.has)(e,r)?(0,o.get)(e,r):p),m};return a},ae=e=>M(M(e,"~1","/"),"~0","~"),ue=(e,t)=>{const r=new WeakMap;return function e(n,o){let i;if(t&&(n=t(n)),j(n)||Array.isArray(n)){const t=r.get(n);return t?{$ref:t}:(r.set(n,B(o)),Array.isArray(n)?i=n.map(((t,r)=>e(t,[...o,String(r)]))):(i={},Object.keys(n).forEach((t=>{i[t]=e(n[t],[...o,t])}))),r.delete(n),i)}return n}(e,[])},ce=e=>M(M(e,"~","~0"),"//","/~1"),le=e=>{if("string"!=typeof e||0===e.length)return null;const t=e.indexOf("#");return-1===t?null:e.slice(t)},fe=e=>{const t=f(e,!0);if(t.scan(),1!==t.getToken())return;if(t.scan(),2===t.getToken())return;if(10!==t.getToken())throw new SyntaxError("Unexpected character");const r=t.getTokenValue();if(t.scan(),6!==t.getToken())throw new SyntaxError("Colon expected");switch(t.scan(),t.getToken()){case 10:return[r,t.getTokenValue()];case 11:return[r,Number(t.getTokenValue())];case 8:return[r,!0];case 9:return[r,!1];case 7:return[r,null];case 16:throw new SyntaxError("Unexpected character");case 17:throw new SyntaxError("Unexpected end of file");default:return}},he=({lineMap:e,ast:t},r)=>{const n=e[r.line],o=e[r.line+1];if(void 0===n)return;const i=h(t,void 0===o?n+r.character:Math.min(o,n+r.character),!0);if(void 0===i)return;const s=p(i);return 0!==s.length?s:void 0};function pe(e){return ae(e.split("/").pop()||"")}const de=({ast:e},t,r=!1)=>{const n=function(e,t,r){e:for(const n of t){const t=Number.isInteger(Number(n))?Number(n):n;if("string"==typeof t||"number"==typeof t&&"array"!==e.type){if("object"!==e.type||!Array.isArray(e.children))return r?e:void 0;for(const r of e.children)if(Array.isArray(r.children)&&r.children[0].value===String(t)&&2===r.children.length){e=r.children[1];continue e}return r?e:void 0}if("array"!==e.type||t<0||!Array.isArray(e.children)||t>=e.children.length)return r?e:void 0;e=e.children[t]}return e}(e,t,r);if(void 0!==n&&void 0!==n.range)return{range:n.range}},me=(e,t={disallowComments:!0})=>{const r=[],{ast:n,data:o,lineMap:i}=ge(e,r,t);return{data:o,diagnostics:r,ast:n,lineMap:i}};function ge(e,t=[],r){const n=ve(e);let o={type:"array",offset:-1,length:-1,children:[],parent:void 0},i=null,s=[];const a=new WeakMap,u=[];function c(e){"property"===o.type&&(o.length=e-o.offset,o=o.parent)}function l(e,t,r){return{start:{line:e,character:t},end:{line:e,character:t+r}}}function f(e){return o.children.push(e),e}function h(e){Array.isArray(s)?s.push(e):null!==i&&(s[i]=e)}function p(e){h(e),u.push(s),s=e,i=null}function g(){s=u.pop()}d(e,{onObjectBegin:(e,t,n,i)=>{o=f({type:"object",offset:e,length:-1,parent:o,children:[],range:l(n,i,t)}),!1===r.ignoreDuplicateKeys&&a.set(o,[]),p(function(e){return e?b({}):{}}(!0===r.preserveKeyOrder))},onObjectProperty:(e,n,u,c,h)=>{if((o=f({type:"property",offset:n,length:-1,parent:o,children:[]})).children.push({type:"string",value:e,offset:n,length:u,parent:o}),!1===r.ignoreDuplicateKeys){const r=a.get(o.parent);r&&(0!==r.length&&r.includes(e)?t.push({range:l(c,h,u),message:"DuplicateKey",severity:A.Error,path:be(o),code:20}):r.push(e))}!0===r.preserveKeyOrder&&function(e,t){if(!(t in e))return;const r=e[y],n=r.indexOf(t);-1!==n&&(r.splice(n,1),r.push(t))}(s,e),i=e},onObjectEnd:(e,t,n,i)=>{!1===r.ignoreDuplicateKeys&&a.delete(o),o.length=e+t-o.offset,o.range&&(o.range.end.line=n,o.range.end.character=i+t),o=o.parent,c(e+t),g()},onArrayBegin:(e,t,r,n)=>{o=f({type:"array",offset:e,length:-1,parent:o,children:[],range:l(r,n,t)}),p([])},onArrayEnd:(e,t,r,n)=>{o.length=e+t-o.offset,o.range&&(o.range.end.line=r,o.range.end.character=n+t),o=o.parent,c(e+t),g()},onLiteralValue:(e,t,r,n,i)=>{f({type:ye(e),offset:t,length:r,parent:o,value:e,range:l(n,i,r)}),c(t+r),h(e)},onSeparator:(e,t)=>{"property"===o.type&&(":"===e?o.colonOffset=t:","===e&&c(t))},onError:(e,r,n,o,i)=>{t.push({range:l(o,i,n),message:m(e),severity:A.Error,code:e})}},r);const v=o.children[0];return v&&delete v.parent,{ast:v,data:s[0],lineMap:n}}function ye(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}const ve=e=>{const t=[0];let r=0;for(;r{if(!e||!Object.hasOwnProperty.call(e,t)||t===r)return e;const n={};for(const[o,i]of Object.entries(e))o===t?n[r]=i:o in n||(n[o]=i);return n};function we(e){return j(e)||Array.isArray(e)}function xe(e,t,r){if(r.length<=1||t.length<=1)throw Error("Source/target path must not be empty and point at root");if(0===t.indexOf(r))throw Error("Target path cannot be contained within source");const n=W(t);let o=e;for(const a of n){if(!we(o))return;o=o[a]}if(!we(o))return;const i=W(r);let s=e;for(const[a,u]of i.entries()){if(!we(s)||u in s)return;const e=a===i.length-1?o:{};s[u]=e,s=e}delete e[n[0]],function e(t,r,n){for(const o of Object.keys(t)){const i=t[o];if("$ref"!==o)we(i)&&e(i,r,n);else{if("string"!=typeof i||!R(i))continue;0===i.indexOf(r)&&(t[o]=i.replace(r,n))}}}(e,t,r)}async function Ee(e,t,r,n,o){let s=function(e,t){const r=Z(t);return null===r?e:(0,i.isAbsolute)(r)?r:(0,i.join)((0,i.dirname)(e),r)}(t,r);const a=le(r)||"#",u=await e[s],c=W(a);let l=[...c];const f={value:u};for(const[i,h]of ee(f,c,a)){if(n.includes(h))return{source:t,location:null!=o?o:l,value:n[n.length-1]};n.push(h);const r=await Ee(e,s,h.$ref,n,l);({source:s,location:l}=r),f.value=r.value,l.push(...c.slice(i+1))}return{source:s,location:l,value:n.length>0?X(n[n.length-1],f.value):f.value}}async function Se(e,t,r){return(await Ae(e,t,r)).value}function Ae(e,t,r){return Ee(e,t,r,[])}const $e=(e,t)=>{if("string"!=typeof e)return e;try{const r=ke(e);return"string"==typeof r?r:JSON.parse(e,t)}catch(e){return}},ke=e=>{const t=Number(e);return Number.isFinite(t)?String(t)===e?t:e:NaN},Oe=(e,t,r)=>{if("string"==typeof e)return e;try{return JSON.stringify(e,t,r)}catch(n){return P()(e,t,r)}},Pe=(e,t)=>{if(e instanceof Array){if(t instanceof Array){if(t.length>e.length)return!1;for(const r in t){if(!t.hasOwnProperty(r))continue;const n=parseInt(e[r]),o=parseInt(t[r]);if(isNaN(n)&&isNaN(o)){if(e[r]!==t[r])return!1}else if(n!==o)return!1}}}else{if("string"!=typeof e)return!1;if("string"==typeof t)return e.startsWith(t)}return!0},je=(e,t,r)=>{const n=Oe(e,t,r);if(void 0===n)throw new Error("The value could not be stringified");return n};function Ce(e){return e.replace(/^(\/|#\/)/,"").split("/").map(ae).map(Te).join(".")}function Te(e){return e.includes(".")?`["${e.replace(/"/g,'\\"')}"]`:e}const Ne=Symbol.for(g),Ie={ownKeys:e=>Ne in e?e[Ne]:Reflect.ownKeys(e)},Re=e=>new Proxy(e,Ie);function Me(e,t){if("string"==typeof e&&"string"==typeof t)return(0,o.trimStart)(e,t);if(!(e&&Array.isArray(e)&&e.length&&t&&Array.isArray(t)&&t.length))return e;let r=0;for(const n in e)if(e.hasOwnProperty(n)){if(e[n]!==t[n])break;r++}return e.slice(r)}},58851:(e,t,r)=>{"use strict";function n(e){let t="";return e.absolute&&("file"===e.protocol?(e.drive&&(t+=e.drive),t+="/"):(t+=e.protocol+"://",e.origin&&(t+=e.origin+"/"))),""===(t+=e.path.join("/"))&&(t="."),t}function o(e,t,r,n){this.message=e,this.expected=t,this.found=r,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,o)}r.r(t),r.d(t,{basename:()=>l,deserializeSrn:()=>w,dirname:()=>f,extname:()=>h,format:()=>n,isAbsolute:()=>p,isURL:()=>d,join:()=>m,normalize:()=>a,parse:()=>s,relative:()=>g,resolve:()=>y,sep:()=>v,serializeSrn:()=>x,startsWithWindowsDrive:()=>b,stripRoot:()=>_,toFSPath:()=>a}),function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(o,Error),o.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;tY&&(Y=W,G=[]),G.push(e))}function te(){var t;return(t=function(){var e,t,r,n,o;return e=W,(t=re())!==a&&(r=ne())!==a&&(n=ie())!==a&&(o=se())!==a?e=t=l(t,r,n,o):(W=e,e=a),e===a&&(e=W,(t=re())!==a&&(r=ne())!==a&&(n=function(){var e;return(e=v)!==a&&(e=N()),e}())!==a?e=t=f(t,r,n):(W=e,e=a)),e}())===a&&(t=function(){var t,r,n,o;return t=W,(r=function(){var t;return e.substr(W,7).toLowerCase()===w?(t=e.substr(W,7),W+=7):(t=a,ee(x)),t===a&&(e.substr(W,5).toLowerCase()===E?(t=e.substr(W,5),W+=5):(t=a,ee(S))),t!==a&&(t=A()),t}())!==a&&(n=oe())!==a&&(o=se())!==a?t=r=_(r,n,o):(W=t,t=a),t}())===a&&(t=function(){var e,t,r;return e=W,(t=oe())!==a&&(r=se())!==a?e=t=$(t,r):(W=e,e=a),e}())===a&&(t=function(){var t,r;return t=W,function(){var t;return(t=function(){var t,r,n;return t=W,46===e.charCodeAt(W)?(r=D,W++):(r=a,ee(U)),r!==a&&(n=ue())!==a?t=r=[r,n]:(W=t,t=a),t}())===a&&(t=v),t}()!==a&&(r=se())!==a?t=I(r):(W=t,t=a),t}()),t}function re(){var t,r;return e.substr(W,7).toLowerCase()===h?(r=e.substr(W,7),W+=7):(r=a,ee(p)),r!==a&&(r=d()),(t=r)===a&&(t=function(){var t;return e.substr(W,8).toLowerCase()===m?(t=e.substr(W,8),W+=8):(t=a,ee(g)),t!==a&&(t=y()),t}()),t}function ne(){var t,r,n;if(t=W,r=[],(n=ce())!==a)for(;n!==a;)r.push(n),n=ce();else r=a;return(t=r!==a?e.substring(t,W):r)===a&&(t=W,(r=v)!==a&&(r=b()),t=r),t}function oe(){var t;return(t=function(){var t,r,n,o;return t=W,(r=ue())===a&&(r=null),r!==a?(k.test(e.charAt(W))?(n=e.charAt(W),W++):(n=a,ee(O)),n!==a?(58===e.charCodeAt(W)?(o=P,W++):(o=a,ee(j)),o!==a&&ue()!==a?t=r=C(n):(W=t,t=a)):(W=t,t=a)):(W=t,t=a),t}())===a&&(t=ie()),t}function ie(){var e;return(e=ue())!==a&&(e=T()),e}function se(){var e;return(e=function e(){var t,r,n;return t=W,(r=ae())!==a&&ue()!==a&&(n=e())!==a?t=r=M(r,n):(W=t,t=a),t===a&&(t=W,(r=ae())!==a&&(r=L(r)),t=r),t}())!==a&&(e=R(e)),e}function ae(){var t,r,n;if(t=W,r=[],(n=ce())!==a)for(;n!==a;)r.push(n),n=ce();else r=a;return(t=r!==a?e.substring(t,W):r)===a&&(t=v),t}function ue(){var t;return 47===e.charCodeAt(W)?(t=F,W++):(t=a,ee(B)),t===a&&(92===e.charCodeAt(W)?(t=z,W++):(t=a,ee(q))),t}function ce(){var t;return V.test(e.charAt(W))?(t=e.charAt(W),W++):(t=a,ee(H)),t}if((r=c())!==a&&W===e.length)return r;throw r!==a&&W""!==e&&"."!==e));const r=[];for(const n of t)".."===n&&r.length&&".."!==r[r.length-1]?r.pop():".."===n&&e.absolute||r.push(n);return e.path=r,e}function c(e){let t=e.lastIndexOf(".");".."===e&&(t=-1),"."===e&&(t=-1);let r=e,n="";return t>0&&(r=e.slice(0,t),n=e.slice(t)),{name:r,ext:n}}const l=(e,t)=>{const r=u(s(e)).path.pop();if(!r)return"";const{name:n,ext:o}=c(r);return!0===t||t===o?n:`${n}${o}`},f=e=>{const t=u(s(e));return t.path.pop(),n(u(t))},h=e=>{const t=u(s(e)).path.pop();if(!t)return"";const{ext:r}=c(t);return r};function p(e){return s(e).absolute}function d(e){const t=s(e);return"http"===t.protocol||"https"===t.protocol}const m=(...e)=>{if(0===e.length)return".";const t=e.map(s),r=Object.assign({},t[0]);for(let n=1;nnull!==s(e).drive,_=e=>s(e).path.filter(Boolean).join("/");function w(e){const[t,r,n,...o]=e.split("/"),i=o.length?`/${o.join("/")}`:void 0;let s,a;return i&&(s=o.find((e=>e.includes("."))))&&(a=c(s).ext),{shortcode:t,orgSlug:r,projectSlug:n,uri:i,file:s,ext:a}}function x({shortcode:e,orgSlug:t,projectSlug:r,uri:n=""}){return[e,t,r,n.replace(/^\//,"")].filter(Boolean).join("/")}},63282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=r(4042),o=r(86144),i=r(36653),s=r(72079),a=["/properties"],u="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=r(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var f=r(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var h=r(13558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var p=r(34551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},41520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const r=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(41520),o=r(57845);var i=r(41520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var s=r(57845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class u extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?o.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=C(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=C(this.rhs,e,t),this}get names(){return j(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class l extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class h extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class p extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class d extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=C(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(T(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>P(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends m{}class v extends g{}v.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(N(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=C(this.condition,e,t),this}get names(){const e=super.names;return j(e,this.condition),this.else&&P(e,this.else.names),e}}b.kind="if";class _ extends g{}_.kind="for";class w extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=C(this.iteration,e,t),this}get names(){return P(super.names,this.iteration.names)}}class x extends _{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=j(super.names,this.from);return j(e,this.to)}}class E extends _{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=C(this.iterable,e,t),this}get names(){return P(super.names,this.iterable.names)}}class S extends g{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}S.kind="func";class A extends m{render(e){return"return "+super.render(e)}}A.kind="return";class $ extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&P(e,this.catch.names),this.finally&&P(e,this.finally.names),e}}class k extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}k.kind="catch";class O extends g{render(e){return"finally"+super.render(e)}}O.kind="finally";function P(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function j(e,t){return t instanceof n._CodeOrName?P(e,t.names):e}function C(e,t,r){return e instanceof n.Name?i(e):(o=e)instanceof n._Code&&o._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=i(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function T(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function N(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${L(e)}`}t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new u(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new l(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new d(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new b(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const s=this._scope.toName(e);return this._for(new x(i,s,t,r),(()=>n(s)))}forOf(e,t,r,i=o.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(s,n._`${e}[${t}]`),r(s)}))}return this._for(new E("of",i,s,t),(()=>r(s)))}forIn(e,t,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new E("in",i,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new h(e))}return(e){const t=new A;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new $;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new k(e),t(e)}return r&&(this._currNode=n.finally=new O,this.code(r)),this._endBlockNode(k,O)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,o){return this._blockNode(new S(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=N;const I=M(t.operators.AND);t.and=function(...e){return e.reduce(I)};const R=M(t.operators.OR);function M(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${L(t)} ${e} ${L(r)}`}function L(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(R)}},57845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(41520);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i||(t.UsedValueState=i={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=s;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const u=n._`\n`;t.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?u:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[o];if(s){const e=s.get(i);if(e)return e}else s=this._values[o]=new Map;s.set(i,n);const a=this._scope[o]||(this._scope[o]=[]),u=a.length;return a[u]=t.ref,n.setValue(t,{property:o,itemIndex:u}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},a){let u=n.nil;for(const c in e){const l=e[c];if(!l)continue;const f=s[c]=s[c]||new Map;l.forEach((e=>{if(f.has(e))return;f.set(e,i.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;u=n._`${u}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new o(e);u=n._`${u}${s}${this.opts._n}`}f.set(e,i.Completed)}))}return u}}},48708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(99029),o=r(94227),i=r(42023);function s(e,t){const r=e.const("err",t);e.if(n._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,n._`[${r}]`)),n._`${i.default.vErrors}.push(${r})`),e.code(n._`${i.default.errors}++`)}function a(e,t){const{gen:r,validateName:o,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,o,i){const{it:u}=e,{gen:l,compositeRule:f,allErrors:h}=u,p=c(e,r,o);(null!=i?i:f||h)?s(l,p):a(u,n._`[${p}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:u,compositeRule:l,allErrors:f}=o;s(u,c(e,r,n)),l||f||a(o,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(n._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:o,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const u=e.name("err");e.forRange("i",s,i.default.errors,(s=>{e.const(u,n._`${i.default.vErrors}[${s}]`),e.if(n._`${u}.instancePath === undefined`,(()=>e.assign(n._`${u}.instancePath`,(0,n.strConcat)(i.default.instancePath,a.errorPath)))),e.assign(n._`${u}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${u}.schema`,r),e.assign(n._`${u}.data`,o))}))};const u={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:s}=e,a=[l(s,r),f(e,r)];return function(e,{params:t,message:r},o){const{keyword:s,data:a,schemaValue:c,it:l}=e,{opts:f,propertyName:h,topSchemaRef:p,schemaPath:d}=l;o.push([u.keyword,s],[u.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&o.push([u.message,"function"==typeof r?r(e):r]);f.verbose&&o.push([u.schema,c],[u.parentSchema,n._`${p}${d}`],[i.default.data,a]);h&&o.push([u.propertyName,h])}(e,t,a),o.object(...a)}(e,t,r)}function l({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,o.getErrorPath)(t,o.Type.Str)}`:e;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,r)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let s=i?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,o.getErrorPath)(r,o.Type.Str)}`),[u.schemaPath,s]}},73835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(99029),o=r(13558),i=r(42023),s=r(66939),a=r(94227),u=r(62586);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function l(e){const t=h.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:l}=this.opts,f=new n.CodeGen(this.scope,{es5:a,lines:c,ownProperties:l});let p;e.$async&&(p=f.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const d=f.scopeName("validate");e.validateName=d;const m={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:d,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),(0,u.validateFunctionCode)(m),f.optimize(this.opts.code.optimize);const t=f.toString();g=`${f.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const r=new Function(`${i.default.self}`,`${i.default.scope}`,g)(this,this.scope.get());if(this.scope.value(d,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:d,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(y){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),y}finally{this._compilations.delete(e)}}function f(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:l.call(this,e)}function h(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||d.call(this,e,t)}function d(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let o=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return g.call(this,r,e);const i=(0,s.normalizeId)(n),a=this.refs[i]||this.schemas[i];if("string"==typeof a){const t=d.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||l.call(this,a),i===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,s.resolveUrl)(this.opts.uriResolver,o,n)),new c({schema:t,schemaId:r,root:e,baseId:o})}return g.call(this,r,a)}}t.SchemaEnv=c,t.compileSchema=l,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let i=p.call(this,e,r);if(void 0===i){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;o&&(i=new c({schema:o,schemaId:s,root:e,baseId:t}))}return void 0!==i?e.refs[r]=f.call(this,i):void 0},t.getCompilingSchema=h,t.resolveSchema=d;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const c of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(c)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(c)&&n&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,n))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=d.call(this,n,e)}const{schemaId:u}=this.opts;return i=i||new c({schema:r,schemaId:u,root:n,baseId:t}),i.schema!==i.root.schema?i:void 0}},42023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=o},34551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(66939);class o extends Error{constructor(e,t,r,o){super(o||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=o},66939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(94227),o=r(32017),i=r(7106),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!u(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(u))return!0;if("object"==typeof r&&u(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=c(e))),t===1/0))return 1/0}return t}function l(e,t="",r){!1!==r&&(t=p(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=l,t._getFullPath=f;const h=/#\/?$/;function p(e){return e?e.replace(h,""):""}t.normalizeId=p,t.resolveUrl=function(e,t,r){return r=p(r),e.resolve(t,r)};const d=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=p(e[r]||t),a={"":s},u=l(n,s,!1),c={},f=new Set;return i(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const i=u+t;let s=a[o];function l(t){const r=this.opts.uriResolver.resolve;if(t=p(s?r(s,t):t),f.has(t))throw m(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?h(e,n.schema,t):t!==p(i)&&("#"===t[0]?(h(e,c[t],t),c[t]=e):this.refs[t]=i),t}function g(e){if("string"==typeof e){if(!d.test(e))throw new Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=l.call(this,e[r])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),a[t]=s})),c;function h(e,t,r){if(void 0!==t&&!o(e,t))throw m(r)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},10396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},94227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(99029),o=r(41520);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const i in t)o[i]||d(e,`unknown keyword: "${i}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(i,s,a,u)=>{const c=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(i,s,a):t(i,s,a),a):s instanceof n.Name?(t(i,a,s),s):r(s,a);return u!==n.Name||c instanceof n.Name?c:o(i,c)}}function l(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&f(e,r,t),r}function f(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(i(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,i){if(!i){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(o)}`},t.unescapeFragment=function(e){return u(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=u,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),f(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=l,t.setEvaluated=f;const h={};var p;function d(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:h[t.code]||(h[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(p||(t.Type=p={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===p.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=d},7887:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},28727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(48708),o=r(99029),i=r(42023),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:o}=e,i={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(i,s,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(i.default.data):(t.assign(o._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},10208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(10396),o=r(7887),i=r(48708),s=r(99029),a=r(94227);var u;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(u||(t.DataType=u={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:i}=e,a=function(e,t){return t?e.filter((e=>l.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,o.schemaHasRulesForType)(e,t[0]));if(c){const o=h(t,n,i.strictNumbers,u.Wrong);r.if(o,(()=>{a.length?function(e,t,r){const{gen:n,data:o,opts:i}=e,a=n.let("dataType",s._`typeof ${o}`),u=n.let("coerced",s._`undefined`);"array"===i.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>n.assign(o,s._`${o}[0]`).assign(a,s._`typeof ${o}`).if(h(t,o,i.strictNumbers),(()=>n.assign(u,o)))));n.if(s._`${u} !== undefined`);for(const s of r)(l.has(s)||"array"===s&&"array"===i.coerceTypes)&&c(s);function c(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(u,s._`"" + ${o}`).elseIf(s._`${o} === null`).assign(u,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${o} === null + || (${a} == "string" && ${o} && ${o} == +${o})`).assign(u,s._`+${o}`);case"integer":return void n.elseIf(s._`${a} === "boolean" || ${o} === null + || (${a} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(u,s._`+${o}`);case"boolean":return void n.elseIf(s._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(u,!1).elseIf(s._`${o} === "true" || ${o} === 1`).assign(u,!0);case"null":return n.elseIf(s._`${o} === "" || ${o} === 0 || ${o} === false`),void n.assign(u,null);case"array":n.elseIf(s._`${a} === "string" || ${a} === "number" + || ${a} === "boolean" || ${o} === null`).assign(u,s._`[${o}]`)}}n.else(),d(e),n.endIf(),n.if(s._`${u} !== undefined`,(()=>{n.assign(o,u),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,u)}))}(e,t,a):d(e)}))}return c};const l=new Set(["string","number","integer","boolean","null"]);function f(e,t,r,n=u.Correct){const o=n===u.Correct?s.operators.EQ:s.operators.NEQ;let i;switch(e){case"null":return s._`${t} ${o} null`;case"array":i=s._`Array.isArray(${t})`;break;case"object":i=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return s._`typeof ${t} ${o} ${e}`}return n===u.Correct?i:(0,s.not)(i);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function h(e,t,r,n){if(1===e.length)return f(e[0],t,r,n);let o;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=s._`typeof ${t} != "object"`;o=i.null?e:s._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=s.nil;i.number&&delete i.integer;for(const a in i)o=(0,s.and)(o,f(a,t,r,n));return o}t.checkDataType=f,t.checkDataTypes=h;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,p)}t.reportTypeError=d},7870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(99029),o=r(94227);function i(e,t,r){const{gen:i,compositeRule:s,data:a,opts:u}=e;if(void 0===r)return;const c=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,o.checkStrictMode)(e,`default is ignored for: ${c}`);let l=n._`${c} === undefined`;"empty"===u.useDefaults&&(l=n._`${l} || ${c} === null || ${c} === ""`),i.if(l,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const o in r)i(e,o,r[o].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(e,r,t.default)))}},62586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(28727),o=r(10208),i=r(7887),s=r(10208),a=r(7870),u=r(33673),c=r(24495),l=r(99029),f=r(42023),h=r(66939),p=r(94227),d=r(48708);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,l._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(l._`"use strict"; ${g(r,o)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,l._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,l._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,l._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,l._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,l._`""`),e.var(f.default.parentData,l._`undefined`),e.var(f.default.parentDataProperty,l._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`{}`)}))}(e,o),e.code(i)})):e.func(t,l._`${f.default.data}, ${function(e){return l._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?l._`, ${f.default.dynamicAnchors}={}`:l.nil}}={}`}(o)}`,n.$async,(()=>e.code(g(r,o)).code(i)))}function g(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}function y(e,t){b(e)&&(_(e),v(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&x(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,h.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",f.default.errors);w(e,i),n.var(t,l._`${i} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}function v({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function _(e){(0,p.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return E(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);E(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function x({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(l._`${f.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=l.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(l._`${f.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function E(e,t,r,n){const{gen:o,schema:a,data:u,allErrors:c,opts:h,self:d}=e,{RULES:m}=d;function g(p){(0,i.shouldUseGroup)(a,p)&&(p.type?(o.if((0,s.checkDataType)(p.type,u,h.strictNumbers)),S(e,p),1===t.length&&t[0]===p.type&&r&&(o.else(),(0,s.reportTypeError)(e)),o.endIf()):S(e,p),c||o.if(l._`${f.default.errors} === ${n||0}`))}!a.$ref||!h.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(a,m)?(h.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{$(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)$(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&k(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const n in r){const o=r[n];if("object"==typeof o&&(0,i.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>A(t,e)))&&k(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),o.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):o.block((()=>P(e,"$ref",m.all.$ref.definition)))}function S(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function A(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function $(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(_(e),v(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,(()=>{r.$comment&&t.$comment&&x(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",l._`${r}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(l._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(l._`new ${o}(${f.default.vErrors})`))):(t.assign(l._`${n}.errors`,f.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof l.Name&&e.assign(l._`${t}.props`,r);n instanceof l.Name&&e.assign(l._`${t}.items`,n)}(e),t.return(l._`${f.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class O{constructor(e,t,r){if((0,u.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,r){this.failResult((0,l.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,l.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?d.reportExtraError:d.reportError)(this,this.def.error,t)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:i}=this;r.if((0,l.or)(l._`${n} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(o.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return(0,l.or)(function(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,s.checkDataTypes)(e,t,o.opts.strictNumbers,s.DataType.Wrong)}`}return l.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return l._`!${r}(${t})`}return l.nil}())}subschema(e,t){const r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return y(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function P(e,t,r,n){const o=new O(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,u.funcKeywordCode)(o,r):"macro"in r?(0,u.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,u.funcKeywordCode)(o,r)}t.KeywordCxt=O;const j=/^\/(?:[^~]|~0|~1)*$/,C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return f.default.rootData;if("/"===e[0]){if(!j.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=f.default.rootData}else{const s=C.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(o=s[2],"#"===o){if(a>=t)throw new Error(u("property/index",a));return n[t-a]}if(a>t)throw new Error(u("data",a));if(i=r[t-a],!o)return i}let s=i;const a=o.split("/");for(const c of a)c&&(i=l._`${i}${(0,l.getProperty)((0,p.unescapeJsonPointer)(c))}`,s=l._`${s} && ${i}`);return s;function u(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=T},33673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(99029),o=r(42023),i=r(15765),s=r(48708);function a(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.parentDataProperty}]`)))}function u(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:i,parentSchema:s,it:a}=e,c=t.macro.call(a.self,i,s,a),l=u(r,o,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const f=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:l,schema:f,parentSchema:h,$data:p,it:d}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(d,t);const m=!p&&t.compile?t.compile.call(d.self,f,h,d):t.validate,g=u(c,l,m),y=c.let("valid");function v(r=(t.async?n._`await `:n.nil)){const s=d.opts.passContext?o.default.this:o.default.self,a=!("compile"in t&&!p||!1===t.schema);c.assign(y,n._`${r}${(0,i.callValidateCode)(e,g,s,a)}`,t.modifying)}function b(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&a(e),b((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>v(n._`await `)),(t=>c.assign(y,!1).if(n._`${t} instanceof ${d.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${g}.errors`;return c.assign(e,null),v(n.nil),e}();t.modifying&&a(e),b((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},24495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(99029),o=r(94227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:s,errSchemaPath:a,topSchemaRef:u}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,o.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===s||void 0===a||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:s,topSchemaRef:u,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:s,dataTypes:a,propertyName:u}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:u}=t;l(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,o.getErrorPath)(r,i,u.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}if(void 0!==s){l(s instanceof n.Name?s:c.let("data",s,!0)),void 0!==u&&(e.propertyName=u)}function l(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=r(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(13558),s=r(34551),a=r(10396),u=r(73835),c=r(99029),l=r(66939),f=r(10208),h=r(94227),p=r(63837),d=r(55944),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(e){var t,r,n,o,i,s,a,u,c,l,f,h,p,g,y,v,b,_,w,x,E,S,A,$,k;const O=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,j=!0===P||void 0===P?1:P||0,C=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,T=null!==(o=e.uriResolver)&&void 0!==o?o:d.default;return{strictSchema:null===(s=null!==(i=e.strictSchema)&&void 0!==i?i:O)||void 0===s||s,strictNumbers:null===(u=null!==(a=e.strictNumbers)&&void 0!==a?a:O)||void 0===u||u,strictTypes:null!==(l=null!==(c=e.strictTypes)&&void 0!==c?c:O)&&void 0!==l?l:"log",strictTuples:null!==(h=null!==(f=e.strictTuples)&&void 0!==f?f:O)&&void 0!==h?h:"log",strictRequired:null!==(g=null!==(p=e.strictRequired)&&void 0!==p?p:O)&&void 0!==g&&g,code:e.code?{...e.code,optimize:j,regExp:C}:{optimize:j,regExp:C},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(x=e.schemaId)&&void 0!==x?x:"$id",addUsedSchema:null===(E=e.addUsedSchema)||void 0===E||E,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(A=e.validateFormats)||void 0===A||A,unicodeRegExp:null===($=e.unicodeRegExp)||void 0===$||$,int32range:null===(k=e.int32range)||void 0===k||k,uriResolver:T}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:t,lines:r}),this.logger=function(e){if(!1===e)return O;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),x.call(this,v,e,"NOT SUPPORTED"),x.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=k.call(this),e.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&$.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;"id"===r&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await u.call(this,t.missingSchema),i.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function u(e){const r=await c.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=E.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new u.SchemaEnv({schema:{},schemaId:r});if(t=u.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=E.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(j.call(this,r,t),!t)return(0,h.eachItem)(r,(e=>C.call(this,e))),this;N.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,h.eachItem)(r,0===n.type.length?e=>C.call(this,e,n):e=>n.type.forEach((t=>C.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=R(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:s}=this.opts;if("object"==typeof e)i=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,l.normalizeId)(i||r);const c=l.getSchemaRefs.call(this,e,r);return a=new u.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):u.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{u.compileSchema.call(this,e)}finally{this.opts=t}}}function x(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function E(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function S(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function A(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function $(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function k(){const e={...this.opts};for(const t of g)delete e[t];return e}w.ValidationError=i.default,w.MissingRefError=s.default,t.default=w;const O={log(){},warn(){},error(){}};const P=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){const{RULES:r}=this;if((0,h.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function C(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let s=o?i.post:i.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?T.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function T(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,I]}}},76250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(32017);n.code='require("ajv/dist/runtime/equal").default',t.default=n},53853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o=55296&&r<=56319&&o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48343);n.code='require("ajv/dist/runtime/uri").default',t.default=n},13558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},15457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(99029),o=r(94227),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:i,data:s,keyword:a,it:u}=e;u.items=!0;const c=r.const("len",n._`${s}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof i&&!(0,o.alwaysValidSchema)(u,i)){const i=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:o.Type.Num},i),u.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=s,t.default=i},38660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i=r(42023),s=r(94227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:u,errsCount:c,it:l}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:f,opts:h}=l;if(l.props=!0,"all"!==h.removeAdditional&&(0,s.alwaysValidSchema)(l,r))return;const p=(0,n.allSchemaProperties)(a.properties),d=(0,n.allSchemaProperties)(a.patternProperties);function m(e){t.code(o._`delete ${u}[${e}]`)}function g(n){if("all"===h.removeAdditional||h.removeAdditional&&!1===r)m(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===h.removeAdditional?(y(n,r,!1),t.if((0,o.not)(r),(()=>{e.reset(),m(n)}))):(y(n,r),f||t.if((0,o.not)(r),(()=>t.break())))}}}function y(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",u,(r=>{p.length||d.length?t.if(function(r){let i;if(p.length>8){const e=(0,s.schemaRefOrVal)(l,a.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=p.length?(0,o.or)(...p.map((e=>o._`${r} === ${e}`))):o.nil;return d.length&&(i=(0,o.or)(i,...d.map((t=>o._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,o.not)(i)}(r),(()=>g(r))):g(r)})),e.ok(o._`${c} === ${i.default.errors}`)}};t.default=a},15844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(94227),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(o,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};t.default=o},16505:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(15765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},12661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:s,it:a}=e;let u,c;const{minContains:l,maxContains:f}=i;a.opts.next?(u=void 0===l?1:l,c=f):u=1;const h=t.const("len",n._`${s}.length`);if(e.setParams({min:u,max:c}),void 0===c&&0===u)return void(0,o.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&u>c)return(0,o.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(a,r)){let t=n._`${h} >= ${u}`;return void 0!==c&&(t=n._`${t} && ${h} <= ${c}`),void e.pass(t)}a.items=!0;const p=t.name("valid");function d(){const e=t.name("_valid"),r=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${u}`,(()=>t.assign(p,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(p,!1).break())),1===u?t.assign(p,!0):t.if(n._`${e} >= ${u}`,(()=>t.assign(p,!0))))}(r)))))}function m(r,n){t.forRange("i",0,h,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===u?m(p,(()=>t.if(p,(()=>t.break())))):0===u?(t.let(p,!0),void 0!==c&&t.if(n._`${s}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,(()=>e.reset()))}};t.default=i},83025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(99029),o=r(94227),i=r(15765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e}, + missingProperty: ${o}, + depsCount: ${t}, + deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);a(e,t),u(e,r)}};function a(e,t=e.schema){const{gen:r,data:o,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const u in t){const c=t[u];if(0===c.length)continue;const l=(0,i.propertyInData)(r,o,u,s.opts.ownProperties);e.setParams({property:u,depsCount:c.length,deps:c.join(", ")}),s.allErrors?r.if(l,(()=>{for(const t of c)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,i.checkMissingProp)(e,c,a)})`),(0,i.reportMissingProp)(e,a),r.else())}}function u(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,u=r.name("valid");for(const c in t)(0,o.alwaysValidSchema)(a,t[c])||(r.if((0,i.propertyInData)(r,n,c,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:c},u);e.mergeValidEvaluated(t,u)}),(()=>r.var(u,!0))),e.ok(u))}t.validatePropertyDeps=a,t.validateSchemaDeps=u,t.default=s},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:i}=e;void 0===r.then&&void 0===r.else&&(0,o.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=s(i,"then"),u=s(i,"else");if(!a&&!u)return;const c=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&u){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,f("then",r),f("else",r))}else a?t.if(l,f("then")):t.if((0,n.not)(l),f("else"));function f(r,o){return()=>{const i=e.subschema({keyword:r},l);t.assign(c,l),e.mergeValidEvaluated(i,c),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=i},56378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15457),o=r(65354),i=r(20494),s=r(93966),a=r(12661),u=r(83025),c=r(19713),l=r(38660),f=r(40117),h=r(45333),p=r(57923),d=r(16505),m=r(96163),g=r(15844),y=r(1239),v=r(14426);t.default=function(e=!1){const t=[p.default,d.default,m.default,g.default,y.default,v.default,c.default,l.default,u.default,f.default,h.default];return e?t.push(o.default,s.default):t.push(n.default,i.default),t.push(a.default),t}},20494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(99029),o=r(94227),i=r(15765),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,o.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:i,parentSchema:s,data:a,keyword:u,it:c}=e;!function(e){const{opts:n,errSchemaPath:i}=c,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${u}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,o.checkStrictMode)(c,e,n.strictTuples)}}(s),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(i,r.length,c.items));const l=i.name("valid"),f=i.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(c,t)||(i.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},93966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(15765),s=r(15457),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,o.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,i.validateArray)(e)))}};t.default=a},57923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(94227),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=o},96163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&i.discriminator)return;const a=r,u=t.let("valid",!1),c=t.let("passing",null),l=t.name("_valid");e.setParams({passing:c}),t.block((function(){a.forEach(((r,i)=>{let a;(0,o.alwaysValidSchema)(s,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},l),i>0&&t.if(n._`${l} && ${u}`).assign(u,!1).assign(c,n._`[${c}, ${i}]`).else(),t.if(l,(()=>{t.assign(u,!0),t.assign(c,i),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(u,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},45333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i=r(94227),s=r(94227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:u,it:c}=e,{opts:l}=c,f=(0,n.allSchemaProperties)(r),h=f.filter((e=>(0,i.alwaysValidSchema)(c,r[e])));if(0===f.length||h.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const p=l.strictSchema&&!l.allowMatchingProperties&&u.properties,d=t.name("valid");!0===c.props||c.props instanceof o.Name||(c.props=(0,s.evaluatedPropsToName)(t,c.props));const{props:m}=c;function g(e){for(const t in p)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",a,(i=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=h.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:s.Type.Str},d),c.opts.unevaluated&&!0!==m?t.assign(o._`${m}[${i}]`,!0):n||c.allErrors||t.if((0,o.not)(d),(()=>t.break()))}))}))}!function(){for(const e of f)p&&g(e),c.allErrors?y(e):(t.var(d,!0),y(e),t.if(d))}()}};t.default=a},65354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(20494),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},40117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(62586),o=r(15765),i=r(94227),s=r(38660),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(c,s.default,"additionalProperties"));const l=(0,o.allSchemaProperties)(r);for(const n of l)c.definedProperties.add(n);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(t,(0,i.toHash)(l),c.props));const f=l.filter((e=>!(0,i.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const h=t.name("valid");for(const n of f)p(n)?d(n):(t.if((0,o.propertyInData)(t,u,n,c.opts.ownProperties)),d(n),c.allErrors||t.else().var(h,!0),t.endIf()),e.it.definedProperties.add(n),e.ok(h);function p(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function d(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},h)}}};t.default=a},19713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:i,it:s}=e;if((0,o.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",i,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=i},14426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(94227),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=o},15765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(99029),o=r(94227),i=r(42023),s=r(94227);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function u(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function c(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(i,(0,n.not)(u(e,t,r))):i}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(c(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return(0,n.or)(...o.map((o=>(0,n.and)(c(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=u,t.propertyInData=function(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${i} && ${u(e,t,r)}`:i},t.noPropertyInData=c,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:s,errorPath:a},it:u},c,l,f){const h=f?n._`${e}, ${t}, ${o}${s}`:t,p=[[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,a)],[i.default.parentData,u.parentData],[i.default.parentDataProperty,u.parentDataProperty],[i.default.rootData,i.default.rootData]];u.opts.dynamicRef&&p.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const d=n._`${h}, ${r.object(...p)}`;return l!==n.nil?n._`${c}.call(${l}, ${d})`:n._`${c}(${d})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,o);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===i.code?f:(0,s.useFunc)(e,i)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return u((()=>t.assign(e,!1))),e}return t.var(a,!0),u((()=>t.break())),a;function u(s){const u=t.const("len",n._`${r}.length`);t.forRange("i",0,u,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),u=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const s=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},u);t.assign(a,n._`${a} || ${u}`);e.mergeValidEvaluated(s,u)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},83463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},72128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(83463),o=r(13693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.default];t.default=i},13693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(34551),o=r(15765),i=r(99029),s=r(42023),a=r(73835),u=r(94227),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:s,schemaEnv:u,validateName:c,opts:h,self:p}=o,{root:d}=u;if(("#"===r||"#/"===r)&&s===d.baseId)return function(){if(u===d)return f(e,c,u,u.$async);const r=t.scopeValue("root",{ref:d});return f(e,i._`${r}.validate`,d,d.$async)}();const m=a.resolveRef.call(p,d,s,r);if(void 0===m)throw new n.default(o.opts.uriResolver,s,r);return m instanceof a.SchemaEnv?function(t){const r=l(e,t);f(e,r,t,t.$async)}(m):function(n){const o=t.scopeValue("schema",!0===h.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(m)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:a,it:c}=e,{allErrors:l,schemaEnv:f,opts:h}=c,p=h.passContext?s.default.this:i.nil;function d(e){const t=i._`${e}.errors`;a.assign(s.default.vErrors,i._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,i._`${s.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=u.mergeEvaluated.props(a,n.props,c.props));else{const t=a.var("props",i._`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(a,t,c.props,i.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(a,n.items,c.items));else{const t=a.var("items",i._`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(a,t,c.items,i.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(i._`await ${(0,o.callValidateCode)(e,t,p)}`),m(t),l||a.assign(r,!0)}),(e=>{a.if(i._`!(${e} instanceof ${c.ValidationError})`,(()=>a.throw(e))),d(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,p),(()=>m(t)),(()=>d(t)))}t.getValidate=l,t.callRef=f,t.default=c},36653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(97652),i=r(73835),s=r(34551),a=r(94227),u={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:u,parentSchema:c,it:l}=e,{oneOf:f}=c;if(!l.opts.discriminator)throw new Error("discriminator: requires discriminator option");const h=u.propertyName;if("string"!=typeof h)throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!f)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(h)}`);function m(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(c);let n=!0;for(let c=0;ce.error(!1,{discrError:o.DiscrError.Tag,tag:d,tagName:h}))),e.ok(p)}};t.default=u},97652:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},86144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72128),o=r(67060),i=r(56378),s=r(97532),a=r(69857),u=[n.default,o.default,(0,i.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=u},94737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:o,$data:i,schema:s,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:h}=u;c.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:h.formats,code:c.code.formats}),s=r.const("fDef",n._`${i}[${a}]`),u=r.let("fType"),l=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(u,n._`${s}.type || "string"`).assign(l,n._`${s}.validate`)),(()=>r.assign(u,n._`"string"`).assign(l,s))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=f.$async?n._`(${s}.async ? await ${l}(${o}) : ${l}(${o}))`:n._`${l}(${o})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${o}))`;return n._`${l} && ${l} !== true && ${u} === ${t} && !${r}`}()))}():function(){const i=h.formats[s];if(!i)return void function(){if(!1===c.strictSchema)return void h.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}}();if(!0===i)return;const[a,u,p]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(s)}`:void 0,o=r.scopeValue("formats",{key:s,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,n._`${o}.validate`];return["string",e,o]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${p}(${o})`}return"function"==typeof u?n._`${p}(${o})`:n._`${p}.test(${o})`}())}())}};t.default=o},97532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(94737).default];t.default=n},69857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},27935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(76250),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:u}=e;s||u&&"object"==typeof u?e.fail$data(n._`!${(0,o.useFunc)(t,i.default)}(${r}, ${a})`):e.fail(n._`${u} !== ${r}`)}};t.default=s},28643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(76250),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:u,it:c}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=c.opts.loopEnum;let f;const h=()=>null!=f?f:f=(0,o.useFunc)(t,i.default);let p;if(l||s)p=t.let("valid"),e.block$data(p,(function(){t.assign(p,!1),t.forOf("v",u,(e=>t.if(n._`${h()}(${r}, ${e})`,(()=>t.assign(p,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",u);p=(0,n.or)(...a.map(((t,o)=>function(e,t){const o=a[t];return"object"==typeof o&&null!==o?n._`${h()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(p)}};t.default=s},67060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(75882),o=r(63439),i=r(77307),s=r(90422),a=r(34486),u=r(34003),c=r(61163),l=r(60617),f=r(27935),h=r(28643),p=[n.default,o.default,i.default,s.default,a.default,u.default,c.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,h.default];t.default=p},61163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},77307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(53853),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${c} ${u} ${s}`)}};t.default=s},75882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || isNaN(${r})`)}};t.default=a},34486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},63439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:o,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),u=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${o} === 0 || (${a} = ${r}/${o}, ${u}))`)}};t.default=o},90422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:s,it:a}=e,u=a.opts.unicodeRegExp?"u":"",c=r?o._`(new RegExp(${s}, ${u}))`:(0,n.usePattern)(e,i);e.fail$data(o._`!${c}.test(${t})`)}};t.default=i},34003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i=r(94227),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:u,it:c}=e,{opts:l}=c;if(!u&&0===r.length)return;const f=r.length>=l.loopRequired;if(c.allErrors?function(){if(f||u)e.block$data(o.nil,h);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(f||u){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(i,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,o.not)(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function h(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=s},60617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10208),o=r(99029),i=r(94227),s=r(76250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:u,parentSchema:c,schemaCode:l,it:f}=e;if(!a&&!u)return;const h=t.let("valid"),p=c.items?(0,n.getSchemaTypes)(c.items):[];function d(i,s){const a=t.name("item"),u=(0,n.checkDataTypes)(p,a,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(a,o._`${r}[${i}]`),t.if(u,o._`continue`),p.length>1&&t.if(o._`typeof ${a} == "string"`,o._`${a} += "_"`),t.if(o._`typeof ${c}[${a}] == "number"`,(()=>{t.assign(s,o._`${c}[${a}]`),e.error(),t.assign(h,!1).break()})).code(o._`${c}[${a}] = ${i}`)}))}function m(n,a){const u=(0,i.useFunc)(t,s.default),c=t.name("outer");t.label(c).for(o._`;${n}--;`,(()=>t.for(o._`${a} = ${n}; ${a}--;`,(()=>t.if(o._`${u}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(h,!1).break(c)}))))))}e.block$data(h,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(h,!0),t.if(o._`${n} > 1`,(()=>(p.length>0&&!p.some((e=>"object"===e||"array"===e))?d:m)(n,i)))}),o._`${l} === false`),e.ok(h)}};t.default=a},52362:(e,t,r)=>{"use strict";r.d(t,{A:()=>T});var n=r(63696),o=r(62540);function i(e){const{mdxAdmonitionTitle:t,rest:r}=function(e){const t=n.Children.toArray(e),r=t.find((e=>n.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),i=t.filter((e=>e!==r)),s=r?.props.children;return{mdxAdmonitionTitle:s,rest:i.length>0?(0,o.jsx)(o.Fragment,{children:i}):null}}(e.children),i=e.title??t;return{...e,...i&&{title:i},children:r}}var s=r(34164),a=r(50539),u=r(204);const c="admonition_xJq3",l="admonitionHeading_Gvgb",f="admonitionIcon_Rf37",h="admonitionContent_BuS1";function p(e){let{type:t,className:r,children:n}=e;return(0,o.jsx)("div",{className:(0,s.A)(u.G.common.admonition,u.G.common.admonitionType(t),c,r),children:n})}function d(e){let{icon:t,title:r}=e;return(0,o.jsxs)("div",{className:l,children:[(0,o.jsx)("span",{className:f,children:t}),r]})}function m(e){let{children:t}=e;return t?(0,o.jsx)("div",{className:h,children:t}):null}function g(e){const{type:t,icon:r,title:n,children:i,className:s}=e;return(0,o.jsxs)(p,{type:t,className:s,children:[n||r?(0,o.jsx)(d,{title:n,icon:r}):null,(0,o.jsx)(m,{children:i})]})}function y(e){return(0,o.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const v={icon:(0,o.jsx)(y,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function b(e){return(0,o.jsx)(g,{...v,...e,className:(0,s.A)("alert alert--secondary",e.className),children:e.children})}function _(e){return(0,o.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const w={icon:(0,o.jsx)(_,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function x(e){return(0,o.jsx)(g,{...w,...e,className:(0,s.A)("alert alert--success",e.className),children:e.children})}function E(e){return(0,o.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const S={icon:(0,o.jsx)(E,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function A(e){return(0,o.jsx)(g,{...S,...e,className:(0,s.A)("alert alert--info",e.className),children:e.children})}function $(e){return(0,o.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const k={icon:(0,o.jsx)($,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function O(e){return(0,o.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const P={icon:(0,o.jsx)(O,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const j={icon:(0,o.jsx)($,{}),title:(0,o.jsx)(a.default,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const C={...{note:b,tip:x,info:A,warning:function(e){return(0,o.jsx)(g,{...k,...e,className:(0,s.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,o.jsx)(g,{...P,...e,className:(0,s.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,o.jsx)(b,{title:"secondary",...e}),important:e=>(0,o.jsx)(A,{title:"important",...e}),success:e=>(0,o.jsx)(x,{title:"success",...e}),caution:function(e){return(0,o.jsx)(g,{...j,...e,className:(0,s.A)("alert alert--warning",e.className),children:e.children})}}};function T(e){const t=i(e),r=(n=t.type,C[n]||(console.warn(`No admonition component found for admonition type "${n}". Using Info as fallback.`),C.info));var n;return(0,o.jsx)(r,{...t})}},55131:(e,t)=>{function r(e,t,r,n){var i={};return function(s){if(!i[s]){var a={},u=[],c=[];for(c.push({node:s,processed:!1});c.length>0;){var l=c[c.length-1],f=l.processed,h=l.node;if(f)c.pop(),u.pop(),a[h]=!1,i[h]=!0,t&&0!==e[h].length||r.push(h);else{if(i[h]){c.pop();continue}if(a[h]){if(n){c.pop();continue}throw u.push(h),new o(u)}a[h]=!0,u.push(h);for(var p=e[h],d=p.length-1;d>=0;d--)c.push({node:p[d],processed:!1});l.processed=!0}}}}}var n=t.DepGraph=function(e){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=e&&!!e.circular};n.prototype={size:function(){return Object.keys(this.nodes).length},addNode:function(e,t){this.hasNode(e)||(this.nodes[e]=2===arguments.length?t:e,this.outgoingEdges[e]=[],this.incomingEdges[e]=[])},removeNode:function(e){this.hasNode(e)&&(delete this.nodes[e],delete this.outgoingEdges[e],delete this.incomingEdges[e],[this.incomingEdges,this.outgoingEdges].forEach((function(t){Object.keys(t).forEach((function(r){var n=t[r].indexOf(e);n>=0&&t[r].splice(n,1)}),this)})))},hasNode:function(e){return this.nodes.hasOwnProperty(e)},getNodeData:function(e){if(this.hasNode(e))return this.nodes[e];throw new Error("Node does not exist: "+e)},setNodeData:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);this.nodes[e]=t},addDependency:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);if(!this.hasNode(t))throw new Error("Node does not exist: "+t);return-1===this.outgoingEdges[e].indexOf(t)&&this.outgoingEdges[e].push(t),-1===this.incomingEdges[t].indexOf(e)&&this.incomingEdges[t].push(e),!0},removeDependency:function(e,t){var r;this.hasNode(e)&&(r=this.outgoingEdges[e].indexOf(t))>=0&&this.outgoingEdges[e].splice(r,1),this.hasNode(t)&&(r=this.incomingEdges[t].indexOf(e))>=0&&this.incomingEdges[t].splice(r,1)},clone:function(){var e=this,t=new n;return Object.keys(e.nodes).forEach((function(r){t.nodes[r]=e.nodes[r],t.outgoingEdges[r]=e.outgoingEdges[r].slice(0),t.incomingEdges[r]=e.incomingEdges[r].slice(0)})),t},directDependenciesOf:function(e){if(this.hasNode(e))return this.outgoingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},directDependantsOf:function(e){if(this.hasNode(e))return this.incomingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},dependenciesOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.outgoingEdges,t,n,this.circular)(e);var o=n.indexOf(e);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+e)},dependantsOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.incomingEdges,t,n,this.circular)(e);var o=n.indexOf(e);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+e)},overallOrder:function(e){var t=this,n=[],o=Object.keys(this.nodes);if(0===o.length)return n;if(!this.circular){var i=r(this.outgoingEdges,!1,[],this.circular);o.forEach((function(e){i(e)}))}var s=r(this.outgoingEdges,e,n,this.circular);return o.filter((function(e){return 0===t.incomingEdges[e].length})).forEach((function(e){s(e)})),this.circular&&o.filter((function(e){return-1===n.indexOf(e)})).forEach((function(e){s(e)})),n},entryNodes:function(){var e=this;return Object.keys(this.nodes).filter((function(t){return 0===e.incomingEdges[t].length}))}},n.prototype.directDependentsOf=n.prototype.directDependantsOf,n.prototype.dependentsOf=n.prototype.dependantsOf;var o=t.DepGraphCycleError=function(e){var t="Dependency Cycle Found: "+e.join(" -> "),r=new Error(t);return r.cyclePath=e,Object.setPrototypeOf(r,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(r,o),r};o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error)},32017:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},74987:e=>{function t(e,t,r,n){var o,i=null==(o=n)||"number"==typeof o||"boolean"==typeof o?n:r(n),s=t.get(i);return void 0===s&&(s=e.call(this,n),t.set(i,s)),s}function r(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=t.get(o);return void 0===i&&(i=e.apply(this,n),t.set(o,i)),i}function n(e,t,r,n,o){return r.bind(t,e,n,o)}function o(e,o){return n(e,this,1===e.length?t:r,o.cache.create(),o.serializer)}function i(){return JSON.stringify(arguments)}function s(){this.cache=Object.create(null)}s.prototype.has=function(e){return e in this.cache},s.prototype.get=function(e){return this.cache[e]},s.prototype.set=function(e,t){this.cache[e]=t};var a={create:function(){return new s}};e.exports=function(e,t){var r=t&&t.cache?t.cache:a,n=t&&t.serializer?t.serializer:i;return(t&&t.strategy?t.strategy:o)(e,{cache:r,serializer:n})},e.exports.strategies={variadic:function(e,t){return n(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,r){return n(e,this,t,r.cache.create(),r.serializer)}}},56477:(e,t)=>{function r(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.t-4:t.t:Array.isArray(e)?1:f(e)?2:h(e)?3:0}function a(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){return 2===s(e)?e.get(t):e[t]}function c(e,t,r){var n=s(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function l(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return q&&e instanceof Map}function h(e){return V&&e instanceof Set}function p(e){return e.i||e.u}function d(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Z(e);delete t[Y];for(var r=Q(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&i(e,(function(e,t){return m(t,!0)}),!0)),e}function g(){r(2)}function y(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(e){var t=X[e];return t||r(18,e),t}function b(e,t){X[e]||(X[e]=t)}function _(){return B}function w(e,t){t&&(v("Patches"),e.o=[],e.v=[],e.s=t)}function x(e){E(e),e.p.forEach(A),e.p=null}function E(e){e===B&&(B=e.l)}function S(e){return B={p:[],l:B,h:e,_:!0,m:0}}function A(e){var t=e[Y];0===t.t||1===t.t?t.j():t.O=!0}function $(e,t){t.m=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.S||v("ES5").P(t,e,i),i?(n[Y].g&&(x(t),r(4)),o(e)&&(e=k(t,e),t.l||P(t,e)),t.o&&v("Patches").M(n[Y].u,e,t.o,t.v)):e=k(t,n,[]),x(t),t.o&&t.s(t.o,t.v),e!==W?e:void 0}function k(e,t,r){if(y(t))return t;var n=t[Y];if(!n)return i(t,(function(o,i){return O(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.g)return P(e,n.u,!0),n.u;if(!n.R){n.R=!0,n.A.m--;var o=4===n.t||5===n.t?n.i=d(n.k):n.i,s=o,a=!1;3===n.t&&(s=new Set(o),o.clear(),a=!0),i(s,(function(t,i){return O(e,n,o,t,i,r,a)})),P(e,o,!1),r&&e.o&&v("Patches").F(n,r,e.o,e.v)}return n.i}function O(e,t,r,i,s,u,l){if(n(s)){var f=k(e,s,u&&t&&3!==t.t&&!a(t.N,i)?u.concat(i):void 0);if(c(r,i,f),!n(f))return;e._=!1}else l&&r.add(s);if(o(s)&&!y(s)){if(!e.h.D&&e.m<1)return;k(e,s),t&&t.A.l||P(e,s)}}function P(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e._&&m(t,r)}function j(e,t){var r=e[Y];return(r?p(r):e)[t]}function C(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function T(e){e.g||(e.g=!0,e.l&&T(e.l))}function N(e){e.i||(e.i=d(e.u))}function I(e,t,r){var n=f(t)?v("MapSet").K(t,r):h(t)?v("MapSet").$(t,r):e.S?function(e,t){var r=Array.isArray(e),n={t:r?1:0,A:t?t.A:_(),g:!1,R:!1,N:{},l:t,u:e,k:null,i:null,j:null,C:!1},o=n,i=ee;r&&(o=[n],i=te);var s=Proxy.revocable(o,i),a=s.revoke,u=s.proxy;return n.k=u,n.j=a,u}(t,r):v("ES5").I(t,r);return(r?r.A:_()).p.push(n),n}function R(e){return n(e)||r(22,e),function e(t){if(!o(t))return t;var r,n=t[Y],a=s(t);if(n){if(!n.g&&(n.t<4||!v("ES5").J(n)))return n.u;n.R=!0,r=M(t,a),n.R=!1}else r=M(t,a);return i(r,(function(t,o){n&&u(n.u,t)===o||c(r,t,e(o))})),3===a?new Set(r):r}(e)}function M(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return d(e)}function L(){function e(e,t){var r=s[e];return r?r.enumerable=t:s[e]=r={configurable:!0,enumerable:t,get:function(){return ee.get(this[Y],e)},set:function(t){ee.set(this[Y],e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var n=e[t][Y];if(!n.g)switch(n.t){case 5:o(n)&&T(n);break;case 4:r(n)&&T(n)}}}function r(e){for(var t=e.u,r=e.k,n=Q(r),o=n.length-1;o>=0;o--){var i=n[o];if(i!==Y){var s=t[i];if(void 0===s&&!a(t,i))return!0;var u=r[i],c=u&&u[Y];if(c?c.u!==s:!l(u,s))return!0}}var f=!!t[Y];return n.length!==Q(t).length+(f?0:1)}function o(e){var t=e.k;if(t.length!==e.u.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;n1?r-1:0),i=1;i1?n-1:0),i=1;i=0;r--){var o=t[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(t=t.slice(r+1));var i=v("Patches").W;return n(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),ne=new re,oe=ne.produce,ie=ne.produceWithPatches.bind(ne),se=ne.setAutoFreeze.bind(ne),ae=ne.setUseProxies.bind(ne),ue=ne.applyPatches.bind(ne),ce=ne.createDraft.bind(ne),le=ne.finishDraft.bind(ne);t.Immer=re,t.applyPatches=ue,t.castDraft=function(e){return e},t.castImmutable=function(e){return e},t.createDraft=ce,t.current=R,t.default=oe,t.enableAllPlugins=function(){L(),U(),D()},t.enableES5=L,t.enableMapSet=U,t.enablePatches=D,t.finishDraft=le,t.freeze=m,t.immerable=K,t.isDraft=n,t.isDraftable=o,t.nothing=W,t.original=function(e){return n(e)||r(23,e),e[Y].u},t.produce=oe,t.produceWithPatches=ie,t.setAutoFreeze=se,t.setUseProxies=ae},75878:(e,t,r)=>{"use strict";e.exports=r(56477)},37172:e=>{function t(e){var t="Parsing error";throw e&&(t+=": "+e),new Error(t)}var r={"\\":"\\",'"':'"',"/":"/",b:"\b",t:"\t",n:"\n",f:"\f",r:"\r"};e.exports=function(e){for(var n=[],o=0,i=s();i;)n.push(i),i=s();return n;function s(){for(var n,i,s,a,u,c,l=e.length;o=48&&u<=57||u>=97&&u<=102||u>=65&&u<=70))return t("Invalid Unicode escape sequence.");n+=String.fromCharCode("0x"+e.slice(i,o));break;default:return t("Invalid escape sequence.")}else{if('"'===c)break;for(c=e[o],i=o,u=e.charCodeAt(o);u>=32&&92!==u&&34!==u;)u=e.charCodeAt(++o);n+=e.slice(i,o)}}return'"'===e[o]?(o++,{type:"string",value:n,raw:e.slice(h,o)}):t("Unterminated string.");default:if(i=o,"-"===c&&(a=!0,u=e.charCodeAt(++o),c=e[o]),(u=e.charCodeAt(o))>=48&&u<=57){if(48===u&&((u=e.charCodeAt(o+1))>=48&&u<=57))return t("Illegal octal literal.");for(a=!1;o=48&&u<=57);o++);if(46===e.charCodeAt(o)){for(s=++o;s=48&&u<=57);s++);if(s===o)return t("Illegal trailing decimal.");o=s}if(101===(u=e.charCodeAt(o))||69===u){for(43!==(u=e.charCodeAt(++o))&&45!==u||o++,s=o;s=48&&u<=57);s++);if(s===o)return t("Illegal empty exponent.");o=s}var p=e.slice(i,o);return{type:"number",value:+p,raw:p}}if(a)return t("A negative sign may only precede numbers.");var d=e.slice(o,o+4);return"true"===d?(o+=4,{type:"literal",value:!0,raw:"true"}):"fals"===d&&"e"===e[o+4]?(o+=5,{type:"literal",value:!1,raw:"false"}):"null"===d?(o+=4,{type:"literal",value:null,raw:"null"}):t("Unrecognized token.")}return!1}}},7106:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,o,i,s,a,u,c,l,f){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var h in n(i,s,a,u,c,l,f),i){var p=i[h];if(Array.isArray(p)){if(h in t.arrayKeywords)for(var d=0;d{var n=r(22032),o=r(63862),i=r(66721),s=r(12749),a=r(35749);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(63702),o=r(70080),i=r(24739),s=r(48655),a=r(31175);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(56110)(r(9325),"Map");e.exports=n},53661:(e,t,r)=>{var n=r(63040),o=r(17670),i=r(90289),s=r(4509),a=r(72949);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(9325).Symbol;e.exports=n},34932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r{var n=r(43360),o=r(75288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];i.call(e,t)&&o(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},26025:(e,t,r)=>{var n=r(75288);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},43360:(e,t,r)=>{var n=r(93243);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},47422:(e,t,r)=>{var n=r(31769),o=r(77797);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r{var n=r(51873),o=r(659),i=r(59350),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},45083:(e,t,r)=>{var n=r(1882),o=r(87296),i=r(23805),s=r(47473),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?h:a).test(s(e))}},73170:(e,t,r)=>{var n=r(16547),o=r(31769),i=r(30361),s=r(23805),a=r(77797);e.exports=function(e,t,r,u){if(!s(e))return e;for(var c=-1,l=(t=o(t,e)).length,f=l-1,h=e;null!=h&&++c{var n=r(51873),o=r(34932),i=r(56449),s=r(44394),a=n?n.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},31769:(e,t,r)=>{var n=r(56449),o=r(28586),i=r(61802),s=r(13222);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(s(e))}},55481:(e,t,r)=>{var n=r(9325)["__core-js_shared__"];e.exports=n},93243:(e,t,r)=>{var n=r(56110),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},34840:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},12651:(e,t,r)=>{var n=r(74218);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},56110:(e,t,r)=>{var n=r(45083),o=r(10392);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},659:(e,t,r)=>{var n=r(51873),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(u){}var o=s.call(e);return n&&(t?e[a]=r:delete e[a]),o}},10392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},22032:(e,t,r)=>{var n=r(81042);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},63862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},66721:(e,t,r)=>{var n=r(81042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},12749:(e,t,r)=>{var n=r(81042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},35749:(e,t,r)=>{var n=r(81042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},30361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(56449),o=r(44394),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(s.test(e)||!i.test(e)||null!=t&&e in Object(t))}},74218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},87296:(e,t,r)=>{var n,o=r(55481),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},63702:e=>{e.exports=function(){this.__data__=[],this.size=0}},70080:(e,t,r)=>{var n=r(26025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},24739:(e,t,r)=>{var n=r(26025);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},48655:(e,t,r)=>{var n=r(26025);e.exports=function(e){return n(this.__data__,e)>-1}},31175:(e,t,r)=>{var n=r(26025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},63040:(e,t,r)=>{var n=r(21549),o=r(80079),i=r(68223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},17670:(e,t,r)=>{var n=r(12651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},90289:(e,t,r)=>{var n=r(12651);e.exports=function(e){return n(this,e).get(e)}},4509:(e,t,r)=>{var n=r(12651);e.exports=function(e){return n(this,e).has(e)}},72949:(e,t,r)=>{var n=r(12651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},62224:(e,t,r)=>{var n=r(50104);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},81042:(e,t,r)=>{var n=r(56110)(Object,"create");e.exports=n},59350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9325:(e,t,r)=>{var n=r(34840),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},61802:(e,t,r)=>{var n=r(62224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=s},77797:(e,t,r)=>{var n=r(44394);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},47473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},75288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},58156:(e,t,r)=>{var n=r(47422);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},56449:e=>{var t=Array.isArray;e.exports=t},1882:(e,t,r)=>{var n=r(72552),o=r(23805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},23805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},40346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},44394:(e,t,r)=>{var n=r(72552),o=r(40346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},2543:function(e,t,r){var n;e=r.nmd(e),function(){var o,i="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=16,c=32,l=64,f=128,h=256,p=1/0,d=9007199254740991,m=NaN,g=4294967295,y=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",h]],v="[object Arguments]",b="[object Array]",_="[object Boolean]",w="[object Date]",x="[object Error]",E="[object Function]",S="[object GeneratorFunction]",A="[object Map]",$="[object Number]",k="[object Object]",O="[object Promise]",P="[object RegExp]",j="[object Set]",C="[object String]",T="[object Symbol]",N="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",M="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",U="[object Int16Array]",F="[object Int32Array]",B="[object Uint8Array]",z="[object Uint8ClampedArray]",q="[object Uint16Array]",V="[object Uint32Array]",H=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,J=RegExp(Y.source),Q=RegExp(G.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(oe.source),se=/^\s+/,ae=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,_e=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Ae="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$e="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="['\u2019]",Te="["+Se+"]",Ne="["+je+"]",Ie="["+Ae+"]",Re="\\d+",Me="["+$e+"]",Le="["+ke+"]",De="[^"+Se+je+Re+$e+ke+Oe+"]",Ue="\\ud83c[\\udffb-\\udfff]",Fe="[^"+Se+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Oe+"]",Ve="\\u200d",He="(?:"+Le+"|"+De+")",We="(?:"+qe+"|"+De+")",Ke="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Ie+"|"+Ue+")"+"?",Je="["+Pe+"]?",Qe=Je+Ge+("(?:"+Ve+"(?:"+[Fe,Be,ze].join("|")+")"+Je+Ge+")*"),Ze="(?:"+[Me,Be,ze].join("|")+")"+Qe,Xe="(?:"+[Fe+Ie+"?",Ie,Be,ze,Te].join("|")+")",et=RegExp(Ce,"g"),tt=RegExp(Ie,"g"),rt=RegExp(Ue+"(?="+Ue+")|"+Xe+Qe,"g"),nt=RegExp([qe+"?"+Le+"+"+Ke+"(?="+[Ne,qe,"$"].join("|")+")",We+"+"+Ye+"(?="+[Ne,qe+He,"$"].join("|")+")",qe+"?"+He+"+"+Ke,qe+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Ze].join("|"),"g"),ot=RegExp("["+Ve+Se+Ae+Pe+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,ut={};ut[M]=ut[L]=ut[D]=ut[U]=ut[F]=ut[B]=ut[z]=ut[q]=ut[V]=!0,ut[v]=ut[b]=ut[I]=ut[_]=ut[R]=ut[w]=ut[x]=ut[E]=ut[A]=ut[$]=ut[k]=ut[P]=ut[j]=ut[C]=ut[N]=!1;var ct={};ct[v]=ct[b]=ct[I]=ct[R]=ct[_]=ct[w]=ct[M]=ct[L]=ct[D]=ct[U]=ct[F]=ct[A]=ct[$]=ct[k]=ct[P]=ct[j]=ct[C]=ct[T]=ct[B]=ct[z]=ct[q]=ct[V]=!0,ct[x]=ct[E]=ct[N]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,ht=parseInt,pt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,dt="object"==typeof self&&self&&self.Object===Object&&self,mt=pt||dt||Function("return this")(),gt=t&&!t.nodeType&&t,yt=gt&&e&&!e.nodeType&&e,vt=yt&&yt.exports===gt,bt=vt&&pt.process,_t=function(){try{var e=yt&&yt.require&&yt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),wt=_t&&_t.isArrayBuffer,xt=_t&&_t.isDate,Et=_t&&_t.isMap,St=_t&&_t.isRegExp,At=_t&&_t.isSet,$t=_t&&_t.isTypedArray;function kt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ot(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o-1}function It(e,t,r){for(var n=-1,o=null==e?0:e.length;++n-1;);return r}function nr(e,t){for(var r=e.length;r--&&qt(t,e[r],0)>-1;);return r}var or=Yt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),ir=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sr(e){return"\\"+lt[e]}function ar(e){return ot.test(e)}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function cr(e,t){return function(r){return e(t(r))}}function lr(e,t){for(var r=-1,n=e.length,o=0,i=[];++r",""":'"',"'":"'"});var yr=function e(t){var r,n=(t=null==t?mt:yr.defaults(mt.Object(),t,yr.pick(mt,st))).Array,ae=t.Date,Se=t.Error,Ae=t.Function,$e=t.Math,ke=t.Object,Oe=t.RegExp,Pe=t.String,je=t.TypeError,Ce=n.prototype,Te=Ae.prototype,Ne=ke.prototype,Ie=t["__core-js_shared__"],Re=Te.toString,Me=Ne.hasOwnProperty,Le=0,De=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ue=Ne.toString,Fe=Re.call(ke),Be=mt._,ze=Oe("^"+Re.call(Me).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=vt?t.Buffer:o,Ve=t.Symbol,He=t.Uint8Array,We=qe?qe.allocUnsafe:o,Ke=cr(ke.getPrototypeOf,ke),Ye=ke.create,Ge=Ne.propertyIsEnumerable,Je=Ce.splice,Qe=Ve?Ve.isConcatSpreadable:o,Ze=Ve?Ve.iterator:o,Xe=Ve?Ve.toStringTag:o,rt=function(){try{var e=pi(ke,"defineProperty");return e({},"",{}),e}catch(t){}}(),ot=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,lt=ae&&ae.now!==mt.Date.now&&ae.now,pt=t.setTimeout!==mt.setTimeout&&t.setTimeout,dt=$e.ceil,gt=$e.floor,yt=ke.getOwnPropertySymbols,bt=qe?qe.isBuffer:o,_t=t.isFinite,Ft=Ce.join,Yt=cr(ke.keys,ke),vr=$e.max,br=$e.min,_r=ae.now,wr=t.parseInt,xr=$e.random,Er=Ce.reverse,Sr=pi(t,"DataView"),Ar=pi(t,"Map"),$r=pi(t,"Promise"),kr=pi(t,"Set"),Or=pi(t,"WeakMap"),Pr=pi(ke,"create"),jr=Or&&new Or,Cr={},Tr=Ui(Sr),Nr=Ui(Ar),Ir=Ui($r),Rr=Ui(kr),Mr=Ui(Or),Lr=Ve?Ve.prototype:o,Dr=Lr?Lr.valueOf:o,Ur=Lr?Lr.toString:o;function Fr(e){if(ra(e)&&!Hs(e)&&!(e instanceof Vr)){if(e instanceof qr)return e;if(Me.call(e,"__wrapped__"))return Fi(e)}return new qr(e)}var Br=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function zr(){}function qr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function cn(e,t,r,n,i,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=i?r(e,n,i,s):r(e)),a!==o)return a;if(!ta(e))return e;var f=Hs(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Me.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!u)return Co(e,a)}else{var h=gi(e),p=h==E||h==S;if(Gs(e))return Ao(e,u);if(h==k||h==v||p&&!i){if(a=c||p?{}:vi(e),!u)return c?function(e,t){return To(e,mi(e),t)}(e,function(e,t){return e&&To(t,Na(t),e)}(a,e)):function(e,t){return To(e,di(e),t)}(e,on(a,e))}else{if(!ct[h])return i?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case I:return $o(e);case _:case w:return new n(+e);case R:return function(e,t){var r=t?$o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case M:case L:case D:case U:case F:case B:case z:case q:case V:return ko(e,r);case A:return new n;case $:case C:return new n(e);case P:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new n;case T:return o=e,Dr?ke(Dr.call(o)):{}}var o}(e,h,u)}}s||(s=new Gr);var d=s.get(e);if(d)return d;s.set(e,a),aa(e)?e.forEach((function(n){a.add(cn(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,o){a.set(o,cn(n,t,r,o,e,s))}));var m=f?o:(l?c?si:ii:c?Na:Ta)(e);return Pt(m||e,(function(n,o){m&&(n=e[o=n]),tn(a,o,cn(n,t,r,o,e,s))})),a}function ln(e,t,r){var n=r.length;if(null==e)return!n;for(e=ke(e);n--;){var i=r[n],s=t[i],a=e[i];if(a===o&&!(i in e)||!s(a))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new je(i);return Ti((function(){e.apply(o,r)}),t)}function hn(e,t,r,n){var o=-1,i=Nt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Rt(t,Xt(r))),n?(i=It,s=!1):t.length>=200&&(i=tr,s=!1,t=new Yr(t));e:for(;++o-1},Wr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Kr.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(Ar||Wr),string:new Hr}},Kr.prototype.delete=function(e){var t=fi(this,e).delete(e);return this.size-=t?1:0,t},Kr.prototype.get=function(e){return fi(this,e).get(e)},Kr.prototype.has=function(e){return fi(this,e).has(e)},Kr.prototype.set=function(e,t){var r=fi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Yr.prototype.add=Yr.prototype.push=function(e){return this.__data__.set(e,s),this},Yr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Gr.prototype.get=function(e){return this.__data__.get(e)},Gr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!Ar||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Kr(n)}return r.set(e,t),this.size=r.size,this};var pn=Ro(wn),dn=Ro(xn,!0);function mn(e,t){var r=!0;return pn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function gn(e,t,r){for(var n=-1,i=e.length;++n0&&r(a)?t>1?vn(a,t-1,r,n,o):Mt(o,a):n||(o[o.length]=a)}return o}var bn=Mo(),_n=Mo(!0);function wn(e,t){return e&&bn(e,t,Ta)}function xn(e,t){return e&&_n(e,t,Ta)}function En(e,t){return Tt(t,(function(t){return Zs(e[t])}))}function Sn(e,t){for(var r=0,n=(t=wo(t,e)).length;null!=e&&rt}function On(e,t){return null!=e&&Me.call(e,t)}function Pn(e,t){return null!=e&&t in ke(e)}function jn(e,t,r){for(var i=r?It:Nt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var h=e[u];u&&t&&(h=Rt(h,Xt(t))),l=br(h.length,l),c[u]=!r&&(t||s>=120&&h.length>=120)?new Yr(u&&h):o}h=e[0];var p=-1,d=c[0];e:for(;++p=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Wn(e,t,r){for(var n=-1,o=t.length,i={};++n-1;)a!==e&&Je.call(a,u,1),Je.call(e,u,1);return e}function Yn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;_i(o)?Je.call(e,o,1):ho(e,o)}}return e}function Gn(e,t){return e+gt(xr()*(t-e+1))}function Jn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=gt(t/2))&&(e+=e)}while(t);return r}function Qn(e,t){return Ni(Oi(e,t,ou),e+"")}function Zn(e){return Qr(Ba(e))}function Xn(e,t){var r=Ba(e);return Mi(r,un(t,0,r.length))}function eo(e,t,r,n){if(!ta(e))return e;for(var i=-1,s=(t=wo(t,e)).length,a=s-1,u=e;null!=u&&++ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=n(i);++o>>1,s=e[i];null!==s&&!ca(s)&&(r?s<=t:s=200){var c=t?null:Qo(e);if(c)return fr(c);s=!1,o=tr,u=new Yr}else u=t?[]:a;e:for(;++n=n?e:oo(e,t,r)}var So=ot||function(e){return mt.clearTimeout(e)};function Ao(e,t){if(t)return e.slice();var r=e.length,n=We?We(r):new e.constructor(r);return e.copy(n),n}function $o(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function ko(e,t){var r=t?$o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var r=e!==o,n=null===e,i=e==e,s=ca(e),a=t!==o,u=null===t,c=t==t,l=ca(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!i)return 1;if(!n&&!s&&!l&&e1?r[i-1]:o,a=i>2?r[2]:o;for(s=e.length>3&&"function"==typeof s?(i--,s):o,a&&wi(r[0],r[1],a)&&(s=i<3?o:s,i=1),t=ke(t);++n-1?i[s?t[a]:a]:o}}function Bo(e){return oi((function(t){var r=t.length,n=r,s=qr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new je(i);if(s&&!u&&"wrapper"==ui(a))var u=new qr([],!0)}for(n=u?n:r;++n1&&_.reverse(),p&&lu))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var h=-1,p=!0,d=2&r?new Yr:o;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Pt(y,(function(r){var n="_."+r[0];t&r[1]&&!Nt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(n),r)))}function Ri(e){var t=0,r=0;return function(){var n=_r(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Mi(e,t){var r=-1,n=e.length,i=n-1;for(t=t===o?n:t;++r1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,ss(e,r)}));function ps(e){var t=Fr(e);return t.__chain__=!0,t}function ds(e,t){return t(e)}var ms=oi((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return an(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Vr&&_i(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ds,args:[i],thisArg:o}),new qr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var gs=No((function(e,t,r){Me.call(e,r)?++e[r]:sn(e,r,1)}));var ys=Fo(Vi),vs=Fo(Hi);function bs(e,t){return(Hs(e)?Pt:pn)(e,li(t,3))}function _s(e,t){return(Hs(e)?jt:dn)(e,li(t,3))}var ws=No((function(e,t,r){Me.call(e,r)?e[r].push(t):sn(e,r,[t])}));var xs=Qn((function(e,t,r){var o=-1,i="function"==typeof t,s=Ks(e)?n(e.length):[];return pn(e,(function(e){s[++o]=i?kt(t,e,r):Cn(e,t,r)})),s})),Es=No((function(e,t,r){sn(e,r,t)}));function Ss(e,t){return(Hs(e)?Rt:Fn)(e,li(t,3))}var As=No((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var $s=Qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&wi(e,t[0],t[1])?t=[]:r>2&&wi(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,vn(t,1),[])})),ks=lt||function(){return mt.Date.now()};function Os(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Xo(e,f,o,o,o,o,t)}function Ps(e,t){var r;if("function"!=typeof t)throw new je(i);return e=ma(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var js=Qn((function(e,t,r){var n=1;if(r.length){var o=lr(r,ci(js));n|=c}return Xo(e,n,t,r,o)})),Cs=Qn((function(e,t,r){var n=3;if(r.length){var o=lr(r,ci(Cs));n|=c}return Xo(t,n,e,r,o)}));function Ts(e,t,r){var n,s,a,u,c,l,f=0,h=!1,p=!1,d=!0;if("function"!=typeof e)throw new je(i);function m(t){var r=n,i=s;return n=s=o,f=t,u=e.apply(i,r)}function g(e){var r=e-l;return l===o||r>=t||r<0||p&&e-f>=a}function y(){var e=ks();if(g(e))return v(e);c=Ti(y,function(e){var r=t-(e-l);return p?br(r,a-(e-f)):r}(e))}function v(e){return c=o,d&&n?m(e):(n=s=o,u)}function b(){var e=ks(),r=g(e);if(n=arguments,s=this,l=e,r){if(c===o)return function(e){return f=e,c=Ti(y,t),h?m(e):u}(l);if(p)return So(c),c=Ti(y,t),m(l)}return c===o&&(c=Ti(y,t)),u}return t=ya(t)||0,ta(r)&&(h=!!r.leading,a=(p="maxWait"in r)?vr(ya(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d),b.cancel=function(){c!==o&&So(c),f=0,n=l=s=c=o},b.flush=function(){return c===o?u:v(ks())},b}var Ns=Qn((function(e,t){return fn(e,1,t)})),Is=Qn((function(e,t,r){return fn(e,ya(t)||0,r)}));function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(i);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Rs.Cache||Kr),r}function Ms(e){if("function"!=typeof e)throw new je(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Rs.Cache=Kr;var Ls=xo((function(e,t){var r=(t=1==t.length&&Hs(t[0])?Rt(t[0],Xt(li())):Rt(vn(t,1),Xt(li()))).length;return Qn((function(n){for(var o=-1,i=br(n.length,r);++o=t})),Vs=Tn(function(){return arguments}())?Tn:function(e){return ra(e)&&Me.call(e,"callee")&&!Ge.call(e,"callee")},Hs=n.isArray,Ws=wt?Xt(wt):function(e){return ra(e)&&$n(e)==I};function Ks(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ys(e){return ra(e)&&Ks(e)}var Gs=bt||yu,Js=xt?Xt(xt):function(e){return ra(e)&&$n(e)==w};function Qs(e){if(!ra(e))return!1;var t=$n(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ia(e)}function Zs(e){if(!ta(e))return!1;var t=$n(e);return t==E||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=Et?Xt(Et):function(e){return ra(e)&&gi(e)==A};function oa(e){return"number"==typeof e||ra(e)&&$n(e)==$}function ia(e){if(!ra(e)||$n(e)!=k)return!1;var t=Ke(e);if(null===t)return!0;var r=Me.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Re.call(r)==Fe}var sa=St?Xt(St):function(e){return ra(e)&&$n(e)==P};var aa=At?Xt(At):function(e){return ra(e)&&gi(e)==j};function ua(e){return"string"==typeof e||!Hs(e)&&ra(e)&&$n(e)==C}function ca(e){return"symbol"==typeof e||ra(e)&&$n(e)==T}var la=$t?Xt($t):function(e){return ra(e)&&ea(e.length)&&!!ut[$n(e)]};var fa=Yo(Un),ha=Yo((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(Ks(e))return ua(e)?dr(e):Co(e);if(Ze&&e[Ze])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ze]());var t=gi(e);return(t==A?ur:t==j?fr:Ba)(e)}function da(e){return e?(e=ya(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=da(e),r=t%1;return t==t?r?t-r:t:0}function ga(e){return e?un(ma(e),0,g):0}function ya(e){if("number"==typeof e)return e;if(ca(e))return m;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=ye.test(e);return r||be.test(e)?ht(e.slice(2),r?2:8):ge.test(e)?m:+e}function va(e){return To(e,Na(e))}function ba(e){return null==e?"":lo(e)}var _a=Io((function(e,t){if(Ai(t)||Ks(t))To(t,Ta(t),e);else for(var r in t)Me.call(t,r)&&tn(e,r,t[r])})),wa=Io((function(e,t){To(t,Na(t),e)})),xa=Io((function(e,t,r,n){To(t,Na(t),e,n)})),Ea=Io((function(e,t,r,n){To(t,Ta(t),e,n)})),Sa=oi(an);var Aa=Qn((function(e,t){e=ke(e);var r=-1,n=t.length,i=n>2?t[2]:o;for(i&&wi(t[0],t[1],i)&&(n=1);++r1),t})),To(e,si(e),r),n&&(r=cn(r,7,ri));for(var o=t.length;o--;)ho(r,t[o]);return r}));var La=oi((function(e,t){return null==e?{}:function(e,t){return Wn(e,t,(function(t,r){return Oa(e,r)}))}(e,t)}));function Da(e,t){if(null==e)return{};var r=Rt(si(e),(function(e){return[e]}));return t=li(t),Wn(e,r,(function(e,r){return t(e,r[0])}))}var Ua=Zo(Ta),Fa=Zo(Na);function Ba(e){return null==e?[]:er(e,Ta(e))}var za=Do((function(e,t,r){return t=t.toLowerCase(),e+(r?qa(t):t)}));function qa(e){return Qa(ba(e).toLowerCase())}function Va(e){return(e=ba(e))&&e.replace(we,or).replace(tt,"")}var Ha=Do((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Wa=Do((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ka=Lo("toLowerCase");var Ya=Do((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Ga=Do((function(e,t,r){return e+(r?" ":"")+Qa(t)}));var Ja=Do((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Qa=Lo("toUpperCase");function Za(e,t,r){return e=ba(e),(t=r?o:t)===o?function(e){return it.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var Xa=Qn((function(e,t){try{return kt(e,o,t)}catch(r){return Qs(r)?r:new Se(r)}})),eu=oi((function(e,t){return Pt(t,(function(t){t=Di(t),sn(e,t,js(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=Bo(),nu=Bo(!0);function ou(e){return e}function iu(e){return Mn("function"==typeof e?e:cn(e,1))}var su=Qn((function(e,t){return function(r){return Cn(r,e,t)}})),au=Qn((function(e,t){return function(r){return Cn(e,r,t)}}));function uu(e,t,r){var n=Ta(t),o=En(t,n);null!=r||ta(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=En(t,Ta(t)));var i=!(ta(r)&&"chain"in r&&!r.chain),s=Zs(e);return Pt(o,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=Co(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Mt([this.value()],arguments))})})),e}function cu(){}var lu=Ho(Rt),fu=Ho(Ct),hu=Ho(Ut);function pu(e){return xi(e)?Kt(Di(e)):function(e){return function(t){return Sn(t,e)}}(e)}var du=Ko(),mu=Ko(!0);function gu(){return[]}function yu(){return!1}var vu=Vo((function(e,t){return e+t}),0),bu=Jo("ceil"),_u=Vo((function(e,t){return e/t}),1),wu=Jo("floor");var xu,Eu=Vo((function(e,t){return e*t}),1),Su=Jo("round"),Au=Vo((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new je(i);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Os,Fr.assign=_a,Fr.assignIn=wa,Fr.assignInWith=xa,Fr.assignWith=Ea,Fr.at=Sa,Fr.before=Ps,Fr.bind=js,Fr.bindAll=eu,Fr.bindKey=Cs,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Hs(e)?e:[e]},Fr.chain=ps,Fr.chunk=function(e,t,r){t=(r?wi(e,t,r):t===o)?1:vr(ma(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,u=n(dt(i/t));si?0:i+r),(n=n===o||n>i?i:ma(n))<0&&(n+=i),n=r>n?0:ga(n);r>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=lo(t))&&ar(e)?Eo(dr(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new je(i);return t=null==t?0:vr(ma(t),0),Qn((function(r){var n=r[t],o=Eo(r,0,t);return n&&Mt(o,n),kt(e,this,o)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===o?1:ma(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=n-(t=r||t===o?1:ma(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?mo(e,li(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?mo(e,li(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new je(i);return ta(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ts(e,t,{leading:n,maxWait:t,trailing:o})},Fr.thru=ds,Fr.toArray=pa,Fr.toPairs=Ua,Fr.toPairsIn=Fa,Fr.toPath=function(e){return Hs(e)?Rt(e,Di):ca(e)?[e]:Co(Li(ba(e)))},Fr.toPlainObject=va,Fr.transform=function(e,t,r){var n=Hs(e),o=n||Gs(e)||la(e);if(t=li(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:ta(e)&&Zs(i)?Br(Ke(e)):{}}return(o?Pt:wn)(e,(function(e,n,o){return t(r,e,n,o)})),r},Fr.unary=function(e){return Os(e,1)},Fr.union=rs,Fr.unionBy=ns,Fr.unionWith=os,Fr.uniq=function(e){return e&&e.length?fo(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?fo(e,li(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?fo(e,o,t):[]},Fr.unset=function(e,t){return null==e||ho(e,t)},Fr.unzip=is,Fr.unzipWith=ss,Fr.update=function(e,t,r){return null==e?e:po(e,t,_o(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:po(e,t,_o(r),n)},Fr.values=Ba,Fr.valuesIn=function(e){return null==e?[]:er(e,Na(e))},Fr.without=as,Fr.words=Za,Fr.wrap=function(e,t){return Ds(_o(t),e)},Fr.xor=us,Fr.xorBy=cs,Fr.xorWith=ls,Fr.zip=fs,Fr.zipObject=function(e,t){return vo(e||[],t||[],tn)},Fr.zipObjectDeep=function(e,t){return vo(e||[],t||[],eo)},Fr.zipWith=hs,Fr.entries=Ua,Fr.entriesIn=Fa,Fr.extend=wa,Fr.extendWith=xa,uu(Fr,Fr),Fr.add=vu,Fr.attempt=Xa,Fr.camelCase=za,Fr.capitalize=qa,Fr.ceil=bu,Fr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=ya(r))==r?r:0),t!==o&&(t=(t=ya(t))==t?t:0),un(ya(e),t,r)},Fr.clone=function(e){return cn(e,4)},Fr.cloneDeep=function(e){return cn(e,5)},Fr.cloneDeepWith=function(e,t){return cn(e,5,t="function"==typeof t?t:o)},Fr.cloneWith=function(e,t){return cn(e,4,t="function"==typeof t?t:o)},Fr.conformsTo=function(e,t){return null==t||ln(e,t,Ta(t))},Fr.deburr=Va,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=_u,Fr.endsWith=function(e,t,r){e=ba(e),t=lo(t);var n=e.length,i=r=r===o?n:un(ma(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Fr.eq=Bs,Fr.escape=function(e){return(e=ba(e))&&Q.test(e)?e.replace(G,ir):e},Fr.escapeRegExp=function(e){return(e=ba(e))&&ie.test(e)?e.replace(oe,"\\$&"):e},Fr.every=function(e,t,r){var n=Hs(e)?Ct:mn;return r&&wi(e,t,r)&&(t=o),n(e,li(t,3))},Fr.find=ys,Fr.findIndex=Vi,Fr.findKey=function(e,t){return Bt(e,li(t,3),wn)},Fr.findLast=vs,Fr.findLastIndex=Hi,Fr.findLastKey=function(e,t){return Bt(e,li(t,3),xn)},Fr.floor=wu,Fr.forEach=bs,Fr.forEachRight=_s,Fr.forIn=function(e,t){return null==e?e:bn(e,li(t,3),Na)},Fr.forInRight=function(e,t){return null==e?e:_n(e,li(t,3),Na)},Fr.forOwn=function(e,t){return e&&wn(e,li(t,3))},Fr.forOwnRight=function(e,t){return e&&xn(e,li(t,3))},Fr.get=ka,Fr.gt=zs,Fr.gte=qs,Fr.has=function(e,t){return null!=e&&yi(e,t,On)},Fr.hasIn=Oa,Fr.head=Ki,Fr.identity=ou,Fr.includes=function(e,t,r,n){e=Ks(e)?e:Ba(e),r=r&&!n?ma(r):0;var o=e.length;return r<0&&(r=vr(o+r,0)),ua(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&qt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ma(r);return o<0&&(o=vr(n+o,0)),qt(e,t,o)},Fr.inRange=function(e,t,r){return t=da(t),r===o?(r=t,t=0):r=da(r),function(e,t,r){return e>=br(t,r)&&e=-9007199254740991&&e<=d},Fr.isSet=aa,Fr.isString=ua,Fr.isSymbol=ca,Fr.isTypedArray=la,Fr.isUndefined=function(e){return e===o},Fr.isWeakMap=function(e){return ra(e)&&gi(e)==N},Fr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==$n(e)},Fr.join=function(e,t){return null==e?"":Ft.call(e,t)},Fr.kebabCase=Ha,Fr.last=Qi,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=ma(r))<0?vr(n+i,0):br(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):zt(e,Ht,i,!0)},Fr.lowerCase=Wa,Fr.lowerFirst=Ka,Fr.lt=fa,Fr.lte=ha,Fr.max=function(e){return e&&e.length?gn(e,ou,kn):o},Fr.maxBy=function(e,t){return e&&e.length?gn(e,li(t,2),kn):o},Fr.mean=function(e){return Wt(e,ou)},Fr.meanBy=function(e,t){return Wt(e,li(t,2))},Fr.min=function(e){return e&&e.length?gn(e,ou,Un):o},Fr.minBy=function(e,t){return e&&e.length?gn(e,li(t,2),Un):o},Fr.stubArray=gu,Fr.stubFalse=yu,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Eu,Fr.nth=function(e,t){return e&&e.length?Vn(e,ma(t)):o},Fr.noConflict=function(){return mt._===this&&(mt._=Be),this},Fr.noop=cu,Fr.now=ks,Fr.pad=function(e,t,r){e=ba(e);var n=(t=ma(t))?pr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Wo(gt(o),r)+e+Wo(dt(o),r)},Fr.padEnd=function(e,t,r){e=ba(e);var n=(t=ma(t))?pr(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=xr();return br(e+i*(t-e+ft("1e-"+((i+"").length-1))),t)}return Gn(e,t)},Fr.reduce=function(e,t,r){var n=Hs(e)?Lt:Gt,o=arguments.length<3;return n(e,li(t,4),r,o,pn)},Fr.reduceRight=function(e,t,r){var n=Hs(e)?Dt:Gt,o=arguments.length<3;return n(e,li(t,4),r,o,dn)},Fr.repeat=function(e,t,r){return t=(r?wi(e,t,r):t===o)?1:ma(t),Jn(ba(e),t)},Fr.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,i=(t=wo(t,e)).length;for(i||(i=1,e=o);++nd)return[];var r=g,n=br(e,g);t=li(t),e-=g;for(var o=Qt(n,t);++r=s)return e;var u=r-pr(n);if(u<1)return n;var c=a?Eo(a,0,u).join(""):e.slice(0,u);if(i===o)return c+n;if(a&&(u+=c.length-u),sa(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=Oe(i.source,ba(me.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var h=l.index;c=c.slice(0,h===o?u:h)}}else if(e.indexOf(lo(i),u)!=u){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+n},Fr.unescape=function(e){return(e=ba(e))&&J.test(e)?e.replace(Y,gr):e},Fr.uniqueId=function(e){var t=++Le;return ba(e)+t},Fr.upperCase=Ja,Fr.upperFirst=Qa,Fr.each=bs,Fr.eachRight=_s,Fr.first=Ki,uu(Fr,(xu={},wn(Fr,(function(e,t){Me.call(Fr.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),Fr.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),Pt(["drop","take"],(function(e,t){Vr.prototype[e]=function(r){r=r===o?1:vr(ma(r),0);var n=this.__filtered__&&!t?new Vr(this):this.clone();return n.__filtered__?n.__takeCount__=br(r,n.__takeCount__):n.__views__.push({size:br(r,g),type:e+(n.__dir__<0?"Right":"")}),n},Vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:li(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Pt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Vr.prototype[e]=function(){return this[r](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}})),Vr.prototype.compact=function(){return this.filter(ou)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Qn((function(e,t){return"function"==typeof e?new Vr(this):this.map((function(r){return Cn(r,e,t)}))})),Vr.prototype.reject=function(e){return this.filter(Ms(li(e)))},Vr.prototype.slice=function(e,t){e=ma(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=ma(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(g)},wn(Vr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Fr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);i&&(Fr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Vr,c=a[0],l=u||Hs(t),f=function(e){var t=i.apply(Fr,Mt([e],a));return n&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,p=!!this.__actions__.length,d=s&&!h,m=u&&!p;if(!s&&l){t=m?t:new Vr(this);var g=e.apply(t,a);return g.__actions__.push({func:ds,args:[f],thisArg:o}),new qr(g,h)}return d&&m?e.apply(this,a):(g=this.thru(f),d?n?g.value()[0]:g.value():g)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Hs(o)?o:[],e)}return this[r]((function(r){return t.apply(Hs(r)?r:[],e)}))}})),wn(Vr.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Me.call(Cr,n)||(Cr[n]=[]),Cr[n].push({name:t,func:r})}})),Cr[zo(o,2).name]=[{name:"wrapper",func:o}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=Co(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Co(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Co(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Hs(e),n=t<0,o=r?e.length:0,i=function(e,t,r){var n=-1,o=r.length;for(;++n=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof zr;){var n=Fi(r);n.__index__=0,n.__values__=o,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:ds,args:[ts],thisArg:o}),new qr(t,this.__chain__)}return this.thru(ts)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Ze&&(Fr.prototype[Ze]=function(){return this}),Fr}();mt._=yr,(n=function(){return yr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},50104:(e,t,r)=>{var n=r(53661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},63560:(e,t,r)=>{var n=r(73170);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},13222:(e,t,r)=>{var n=r(77556);e.exports=function(e){return null==e?"":n(e)}},57076:()=>{},12068:(e,t,r)=>{"use strict";const n=r(74869);e.exports=n,n.default=n},74869:e=>{"use strict";e.exports=function(e,r,n){var o,i="";if(t="",arguments.length>1){if("number"==typeof n)for(o=0;o100)return e.replace(n,i);for(var t="",s=0,a=0;an;)e[r]=e[r-1],r--;e[r]=n}return e}},21430:function(e,t,r){var n,o;!function(i,s){"use strict";e.exports?e.exports=s():void 0===(o="function"==typeof(n=s)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,i=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(i=7),t=0;t1);a++)r.splice(0,1);n[s]=r.join("")}var u=-1,c=0,l=0,f=-1,h=!1;for(s=0;sc&&(u=f,c=l)):"0"===n[s]&&(h=!0,f=s,l=1);l>c&&(u=f,c=l),c>1&&n.splice(u,c,""),o=n.length;var p="";for(""===n[0]&&(p=":"),s=0;s=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},84193:function(e,t,r){var n,o,i;!function(s,a){"use strict";e.exports?e.exports=a(r(39340),r(21430),r(4704)):(o=[r(39340),r(21430),r(4704)],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i))}(0,(function(e,t,r,n){"use strict";var o=n&&n.URI;function i(e,t){var r=arguments.length>=1;if(!(this instanceof i))return r?arguments.length>=2?new i(e,t):new i(e):new i;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.11";var s=i.prototype,a=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===c(e)}function f(e,t){var r,n,o={};if("RegExp"===c(t))o=null;else if(l(t))for(r=0,n=t.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var r=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(r){return e}};var y,v={encode:"encode",decode:"decode"},b=function(e,t){return function(r){try{return i[t](r+"").replace(i.characters[e][t].expression,(function(r){return i.characters[e][t].map[r]}))}catch(n){return r}}};for(y in v)i[y+"PathSegment"]=b("pathname",v[y]),i[y+"UrnPathSegment"]=b("urnpath",v[y]);var _=function(e,t,r){return function(n){var o;o=r?function(e){return i[t](i[r](e))}:i[t];for(var s=(n+"").split(e),a=0,u=s.length;a-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),u=e.indexOf(":",s+1);-1!==u&&(-1===a||u-1?o:e.length-1);return s>-1&&(-1===o||s-1?p.slice(0,d)+p.slice(d).replace(s,""):p.replace(s,"")).length<=c[0].length||r.ignore&&r.ignore.test(p))){var y=t(p,l,h=l+p.length,e);void 0!==y?(y=String(y),e=e.slice(0,l)+y+e.slice(h),n.lastIndex=l+y.length):n.lastIndex=h}}return n.lastIndex=0,e},i.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=h(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},s.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new i(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=w("protocol"),s.username=w("username"),s.password=w("password"),s.hostname=w("hostname"),s.port=w("port"),s.query=x("query","?"),s.fragment=x("fragment","#"),s.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},s.path=s.pathname,s.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var n=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[i.getDomAttribute(e)]||"",o=!1);if(!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var s=n?e._parts:e;for(r in s)"query"!==r&&a.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!t),this},s.is=function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),a=(s=!(t=n||o))&&r&&r.has(this._parts.hostname),u=s&&i.idn_expression.test(this._parts.hostname),c=s&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var E=s.protocol,S=s.port,A=s.hostname;s.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},s.scheme=s.protocol,s.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),S.call(this,e,t))},s.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return A.call(this,e,t)},s.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},s.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},s.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},s.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),s=new RegExp("^"+u(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},s.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},s.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},s.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),a=new RegExp("^"+u(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},s.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?i.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var s=new RegExp(u(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),o?this.normalizePath(t):this.build(!t),this},s.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(r=o.substring(s+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,c=this.suffix();if(c)a=e?new RegExp(u(c)+"$"):new RegExp(u("."+c)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return a&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},s.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),s=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(l(t)){s=[];for(var a=0,u=t.length;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function d(e){throw new RangeError(f[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function g(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(l,".")).split("."),t).join(".")}function y(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?h(e/700):e>>1,e+=h(e/t);e>455;n+=a)e=h(e/35);return h(n+36*e/(e+38))}function w(e){var t,r,n,o,i,u,c,l,f,p,m,g=[],y=e.length,b=0,w=128,x=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&d("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=y&&d("invalid-input"),((l=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:a)>=a||l>h((s-b)/u))&&d("overflow"),b+=l*u,!(l<(f=c<=x?1:c>=x+26?26:c-x));c+=a)u>h(s/(p=a-f))&&d("overflow"),u*=p;x=_(b-i,t=g.length+1,0==i),h(b/t)>s-w&&d("overflow"),w+=h(b/t),b%=t,g.splice(b++,0,w)}return v(g)}function x(e){var t,r,n,o,i,u,c,l,f,m,g,v,w,x,E,S=[];for(v=(e=y(e)).length,t=128,r=0,i=72,u=0;u=t&&gh((s-r)/(w=n+1))&&d("overflow"),r+=(c-t)*w,t=c,u=0;us&&d("overflow"),g==t){for(l=r,f=a;!(l<(m=f<=i?1:f>=i+26?26:f-i));f+=a)E=l-m,x=a-m,S.push(p(b(m+E%x,0))),l=h(E/x);S.push(p(b(l,0))),i=_(r,w,n==o),r=0,++n}++r,++t}return S.join("")}i={version:"1.3.2",ucs2:{decode:y,encode:v},decode:w,encode:x,toASCII:function(e){return g(e,(function(e){return c.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},48343:(e,t,r)=>{"use strict";const{normalizeIPv6:n,normalizeIPv4:o,removeDotSegments:i,recomposeAuthority:s,normalizeComponentEncoding:a}=r(34834),u=r(343);function c(e,t,r,n){const o={};return n||(e=p(l(e,r),r),t=p(l(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=i(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function l(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],a=u[(n.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&o.push(r.scheme,":");const c=s(r,n);if(void 0!==c&&("suffix"!==n.reference&&o.push("//"),o.push(c),r.path&&"/"!==r.path.charAt(0)&&o.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=i(e)),void 0===c&&(e=e.replace(/^\/\//u,"/%2F")),o.push(e)}return void 0!==r.query&&o.push("?",r.query),void 0!==r.fragment&&o.push("#",r.fragment),o.join("")}const f=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t))));const h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(e,t){const r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const c=e.match(h);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||"",i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host){const e=o(i.host);if(!1===e.isIPV4){const t=n(e.host,{isIPV4:!1});i.host=t.host.toLowerCase(),a=t.isIPV6}else i.host=e.host,a=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||i.path||void 0!==i.query?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const e=u[(r.scheme||i.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&i.host&&(r.domainHost||e&&e.domainHost)&&!1===a&&function(e){let t=0;for(let r=0,n=e.length;r126||f[t])return!0;return!1}(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(l){i.error=i.error||"Host's domain name can not be converted to ASCII: "+l}(!e||e&&!e.skipNormalize)&&(s&&void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),s&&void 0!==i.host&&(i.host=unescape(i.host)),void 0!==i.path&&i.path.length&&(i.path=escape(unescape(i.path))),void 0!==i.fragment&&i.fragment.length&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),e&&e.parse&&e.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return i}const d={SCHEMES:u,normalize:function(e,t){return"string"==typeof e?e=l(p(e,t),t):"object"==typeof e&&(e=p(l(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return l(c(p(e,n),p(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:c,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=l(a(p(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=l(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=l(a(p(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=l(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:l,parse:p};e.exports=d,e.exports.default=d,e.exports.fastUri=d},343:e=>{"use strict";const t=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function n(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const s={scheme:"http",domainHost:!0,parse:o,serialize:i},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},u={http:s,https:{scheme:"https",domainHost:s.domainHost,parse:o,serialize:i},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(r);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const o=`${r}:${t.nid||e.nid}`,i=u[o];e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,i=u[o];i&&(e=i.serialize(e,t));const s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,r){const n=e;return n.uuid=n.nss,n.nss=void 0,r.tolerant||n.uuid&&t.test(n.uuid)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};e.exports=u},64914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},34834:(e,t,r)=>{"use strict";const{HEX:n}=r(64914);function o(e){if(u(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=t;return r?{host:a(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function i(e,t=!1){let r="",o=!0;for(const i of e){if(void 0===n[i])return;"0"!==i&&!0===o&&(o=!1),o||(r+=i)}return t&&0===r.length&&(r="0"),r}function s(e,t={}){if(u(e,":")<2)return{host:e,isIPV6:!1};const r=function(e){let t=0;const r={error:!1,address:"",zone:""},n=[],o=[];let s=!1,a=!1,u=!1;function c(){if(o.length){if(!1===s){const e=i(o);if(void 0===e)return r.error=!0,!1;n.push(e)}o.length=0}return!0}for(let i=0;i7){r.error=!0;break}i-1>=0&&":"===e[i-1]&&(a=!0)}}return o.length&&(s?r.zone=o.join(""):u?n.push(o.join("")):n.push(i(o))),r.address=n.join(""),r}(e);if(r.error)return{host:e,isIPV6:!1};{let e=r.address,t=r.address;return r.zone&&(e+="%"+r.zone,t+="%25"+r.zone),{host:e,escapedHost:t,isIPV6:!0}}}function a(e,t){let r="",n=!0;const o=e.length;for(let i=0;i{"use strict";r.d(t,{o4:()=>D});const n="3.7.7",o=n,i="function"==typeof Buffer,s="function"==typeof TextDecoder?new TextDecoder:void 0,a="function"==typeof TextEncoder?new TextEncoder:void 0,u=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),c=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(u),l=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,f=String.fromCharCode.bind(String),h="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),p=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),d=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),m=e=>{let t,r,n,o,i="";const s=e.length%3;for(let a=0;a255||(n=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|o,i+=u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}return s?i.slice(0,s-3)+"===".substring(s):i},g="function"==typeof btoa?e=>btoa(e):i?e=>Buffer.from(e,"binary").toString("base64"):m,y=i?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;rt?p(y(e)):y(e),b=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?f(192|t>>>6)+f(128|63&t):f(224|t>>>12&15)+f(128|t>>>6&63)+f(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return f(240|t>>>18&7)+f(128|t>>>12&63)+f(128|t>>>6&63)+f(128|63&t)},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,w=e=>e.replace(_,b),x=i?e=>Buffer.from(e,"utf8").toString("base64"):a?e=>y(a.encode(e)):e=>g(w(e)),E=(e,t=!1)=>t?p(x(e)):x(e),S=e=>E(e,!0),A=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,$=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return f(55296+(t>>>10))+f(56320+(1023&t));case 3:return f((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return f((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},k=e=>e.replace(A,$),O=e=>{if(e=e.replace(/\s+/g,""),!l.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,o="";for(let i=0;i>16&255):64===n?f(t>>16&255,t>>8&255):f(t>>16&255,t>>8&255,255&t);return o},P="function"==typeof atob?e=>atob(d(e)):i?e=>Buffer.from(e,"base64").toString("binary"):O,j=i?e=>h(Buffer.from(e,"base64")):e=>h(P(e).split("").map((e=>e.charCodeAt(0)))),C=e=>j(N(e)),T=i?e=>Buffer.from(e,"base64").toString("utf8"):s?e=>s.decode(j(e)):e=>k(P(e)),N=e=>d(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),I=e=>T(N(e)),R=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),M=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,R(t));e("fromBase64",(function(){return I(this)})),e("toBase64",(function(e){return E(this,e)})),e("toBase64URI",(function(){return E(this,!0)})),e("toBase64URL",(function(){return E(this,!0)})),e("toUint8Array",(function(){return C(this)}))},L=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,R(t));e("toBase64",(function(e){return v(this,e)})),e("toBase64URI",(function(){return v(this,!0)})),e("toBase64URL",(function(){return v(this,!0)}))},D={version:n,VERSION:o,atob:P,atobPolyfill:O,btoa:g,btoaPolyfill:m,fromBase64:I,toBase64:E,encode:E,encodeURI:S,encodeURL:S,utob:w,btou:k,decode:I,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:v,toUint8Array:C,extendString:M,extendUint8Array:L,extendBuiltins:()=>{M(),L()}}},25691:(e,t,r)=>{"use strict";var n,o;r.d(t,{N:()=>ze}),function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).$RefParser=e()}((function(){return function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,(function(e){return o(t[s][1][e]||e)}),l,l.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s0?u:a;i.sort(c),i.run(c,"parse",e).then((function(t){!t.plugin.allowEmpty&&function(e){return void 0===e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length||r.isBuffer(e)&&0===e.length}(t.result)?s(n.syntax('Error parsing "%s" as %s. \nParsed value is empty',e.url,t.plugin.name)):o(t)}),(function(t){t?(t=t instanceof Error?t:new Error(t),s(n.syntax(t,"Error parsing %s",e.url))):s(n.syntax("Unable to parse %s",e.url))}))}))}(u,s)})).then((function(e){return a.value=e.result,e.result}))}catch(e){return Promise.reject(e)}}}).call(this,{isBuffer:e("../node_modules/is-buffer/index.js")})},{"../node_modules/is-buffer/index.js":32,"./util/plugins":17,"./util/url":18,ono:64}],7:[function(e,t,r){(function(e){var r=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;t.exports={order:400,allowEmpty:!0,canParse:function(t){return e.isBuffer(t.data)&&r.test(t.url)},parse:function(t){return e.isBuffer(t.data)?t.data:new e(t.data)}}}).call(this,e("buffer").Buffer)},{buffer:23}],8:[function(e,t,r){(function(e){t.exports={order:100,allowEmpty:!0,canParse:".json",parse:function(t){return new Promise((function(r,n){var o=t.data;e.isBuffer(o)&&(o=o.toString()),"string"==typeof o?0===o.trim().length?r(void 0):r(JSON.parse(o)):r(o)}))}}}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":32}],9:[function(e,t,r){(function(e){var r=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;t.exports={order:300,allowEmpty:!0,encoding:"utf8",canParse:function(t){return("string"==typeof t.data||e.isBuffer(t.data))&&r.test(t.url)},parse:function(t){if("string"==typeof t.data)return t.data;if(e.isBuffer(t.data))return t.data.toString(this.encoding);throw new Error("data is not text")}}}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":32}],10:[function(e,t,r){(function(r){var n=e("../util/yaml");t.exports={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],parse:function(e){return new Promise((function(t,o){var i=e.data;r.isBuffer(i)&&(i=i.toString()),t("string"==typeof i?n.parse(i):i)}))}}}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":32,"../util/yaml":19}],11:[function(e,t,r){t.exports=l;var n=e("./ref"),o=e("./util/url"),i=e("ono"),s=/\//g,a=/~/g,u=/~1/g,c=/~0/g;function l(e,t,r){this.$ref=e,this.path=t,this.originalPath=r||t,this.value=void 0,this.circular=!1,this.indirections=0}function f(e,t){if(n.isAllowed$Ref(e.value,t)){var r=o.resolve(e.path,e.value.$ref);if(r!==e.path){var i=e.$ref.$refs._resolve(r,t);return e.indirections+=i.indirections+1,n.isExtended$Ref(e.value)?(e.value=n.dereference(e.value,i.value),!1):(e.$ref=i.$ref,e.path=i.path,e.value=i.value,!0)}e.circular=!0}}function h(e,t,r){if(!e.value||"object"!=typeof e.value)throw i.syntax('Error assigning $ref pointer "%s". \nCannot set "%s" of a non-object.',e.path,t);return"-"===t&&Array.isArray(e.value)?e.value.push(r):e.value[t]=r,r}l.prototype.resolve=function(e,t){var r=l.parse(this.path);this.value=e;for(var n=0;n0},o.isExternal$Ref=function(e){return o.is$Ref(e)&&"#"!==e.$ref[0]},o.isAllowed$Ref=function(e,t){if(o.is$Ref(e)){if("#/"===e.$ref.substr(0,2)||"#"===e.$ref)return!0;if("#"!==e.$ref[0]&&(!t||t.resolve.external))return!0}},o.isExtended$Ref=function(e){return o.is$Ref(e)&&Object.keys(e).length>1},o.dereference=function(e,t){if(t&&"object"==typeof t&&o.isExtended$Ref(e)){var r={};return Object.keys(e).forEach((function(t){"$ref"!==t&&(r[t]=e[t])})),Object.keys(t).forEach((function(e){e in r||(r[e]=t[e])})),r}return t}},{"./pointer":11}],13:[function(e,t,r){var n=e("ono"),o=e("./ref"),i=e("./util/url");function s(){this.circular=!1,this._$refs={},this._root$Ref=null}function a(e,t){var r=Object.keys(e);return(t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t)).length>0&&t[0]&&(r=r.filter((function(r){return-1!==t.indexOf(e[r].pathType)}))),r.map((function(t){return{encoded:t,decoded:"file"===e[t].pathType?i.toFileSystemPath(t,!0):t}}))}t.exports=s,s.prototype.paths=function(e){return a(this._$refs,arguments).map((function(e){return e.decoded}))},s.prototype.values=function(e){var t=this._$refs;return a(t,arguments).reduce((function(e,r){return e[r.decoded]=t[r.encoded].value,e}),{})},s.prototype.toJSON=s.prototype.values,s.prototype.exists=function(e,t){try{return this._resolve(e,t),!0}catch(e){return!1}},s.prototype.get=function(e,t){return this._resolve(e,t).value},s.prototype.set=function(e,t){var r=i.resolve(this._root$Ref.path,e),o=i.stripHash(r),s=this._$refs[o];if(!s)throw n('Error resolving $ref pointer "%s". \n"%s" not found.',e,o);s.set(r,t)},s.prototype._add=function(e){var t=i.stripHash(e),r=new o;return r.path=t,r.$refs=this,this._$refs[t]=r,this._root$Ref=this._root$Ref||r,r},s.prototype._resolve=function(e,t){var r=i.resolve(this._root$Ref.path,e),o=i.stripHash(r),s=this._$refs[o];if(!s)throw n('Error resolving $ref pointer "%s". \n"%s" not found.',e,o);return s.resolve(r,t,e)},s.prototype._get$Ref=function(e){e=i.resolve(this._root$Ref.path,e);var t=i.stripHash(e);return this._$refs[t]}},{"./ref":12,"./util/url":18,ono:64}],14:[function(e,t,r){var n=e("./ref"),o=e("./pointer"),i=e("./parse"),s=e("./util/url");function a(e,t,r,i){var s=[];return e&&"object"==typeof e&&(n.isExternal$Ref(e)?s.push(u(e,t,r,i)):Object.keys(e).forEach((function(c){var l=o.join(t,c),f=e[c];n.isExternal$Ref(f)?s.push(u(f,l,r,i)):s=s.concat(a(f,l,r,i))}))),s}function u(e,t,r,n){var o=s.resolve(t,e.$ref),u=s.stripHash(o);return(e=r._$refs[u])?Promise.resolve(e.value):i(o,r,n).then((function(e){var t=a(e,u+"#",r,n);return Promise.all(t)}))}t.exports=function(e,t){if(!t.resolve.external)return Promise.resolve();try{var r=a(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(e){return Promise.reject(e)}}},{"./parse":6,"./pointer":11,"./ref":12,"./util/url":18}],15:[function(e,t,r){var n=e("fs"),o=e("ono"),i=e("../util/url");t.exports={order:100,canRead:function(e){return i.isFileSystemPath(e.url)},read:function(e){return new Promise((function(t,r){var s;try{s=i.toFileSystemPath(e.url)}catch(t){r(o.uri(t,"Malformed URI: %s",e.url))}try{n.readFile(s,(function(e,n){e?r(o(e,'Error opening file "%s"',s)):t(n)}))}catch(e){r(o(e,'Error opening file "%s"',s))}}))}}},{"../util/url":18,fs:21,ono:64}],16:[function(e,t,r){(function(r,n){var o=e("http"),i=e("https"),s=e("ono"),a=e("../util/url");function u(e,t,r){return new Promise((function(c,l){e=a.parse(e),(r=r||[]).push(e.href),function(e,t){return new Promise((function(r,s){var a=("https:"===e.protocol?i:o).get({hostname:e.hostname,port:e.port,path:e.path,auth:e.auth,protocol:e.protocol,headers:t.headers||{},withCredentials:t.withCredentials});"function"==typeof a.setTimeout&&a.setTimeout(t.timeout),a.on("timeout",(function(){a.abort()})),a.on("error",s),a.once("response",(function(e){e.body=new n(0),e.on("data",(function(t){e.body=n.concat([e.body,new n(t)])})),e.on("error",s),e.on("end",(function(){r(e)}))}))}))}(e,t).then((function(o){if(o.statusCode>=400)throw s({status:o.statusCode},"HTTP ERROR %d",o.statusCode);if(o.statusCode>=300)if(r.length>t.redirects)l(s({status:o.statusCode},"Error downloading %s. \nToo many redirects: \n %s",r[0],r.join(" \n ")));else{if(!o.headers.location)throw s({status:o.statusCode},"HTTP %d redirect with no location header",o.statusCode);u(a.resolve(e,o.headers.location),t,r).then(c,l)}else c(o.body||new n(0))})).catch((function(t){l(s(t,"Error downloading",e.href))}))}))}t.exports={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:!1,canRead:function(e){return a.isHttp(e.url)},read:function(e){var t=a.parse(e.url);return r.browser&&!t.protocol&&(t.protocol=a.parse(location.href).protocol),u(t,this)}}}).call(this,e("_process"),e("buffer").Buffer)},{"../util/url":18,_process:66,buffer:23,http:80,https:29,ono:64}],17:[function(e,t,r){function n(e,t,r,n){var o=e[t];if("function"==typeof o)return o.apply(e,[r,n]);if(!n){if(o instanceof RegExp)return o.test(r.url);if("string"==typeof o)return o===r.extension;if(Array.isArray(o))return-1!==o.indexOf(r.extension)}return o}r.all=function(e){return Object.keys(e).filter((function(t){return"object"==typeof e[t]})).map((function(t){return e[t].name=t,e[t]}))},r.filter=function(e,t,r){return e.filter((function(e){return!!n(e,t,r)}))},r.sort=function(e){return e.forEach((function(e){e.order=e.order||Number.MAX_SAFE_INTEGER})),e.sort((function(e,t){return e.order-t.order}))},r.run=function(e,t,r){var o,i,s=0;return new Promise((function(a,u){function c(){if(!(o=e[s++]))return u(i);try{var a=n(o,t,r,l);a&&"function"==typeof a.then?a.then(f,h):void 0!==a&&f(a)}catch(e){h(e)}}function l(e,t){e?h(e):f(t)}function f(e){a({plugin:o,result:e})}function h(e){i=e,c()}c()}))}},{}],18:[function(e,t,r){(function(n){var o=/^win/.test(n.platform),i=/\//g,s=/^(\w{2,}):\/\//i,a=t.exports,u=[/\?/g,"%3F",/\#/g,"%23"],c=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];r.parse=e("url").parse,r.resolve=e("url").resolve,r.cwd=function(){return n.browser?location.href:n.cwd()+"/"},r.getProtocol=function(e){var t=s.exec(e);if(t)return t[1].toLowerCase()},r.getExtension=function(e){var t=e.lastIndexOf(".");return t>=0?e.substr(t).toLowerCase():""},r.getHash=function(e){var t=e.indexOf("#");return t>=0?e.substr(t):"#"},r.stripHash=function(e){var t=e.indexOf("#");return t>=0&&(e=e.substr(0,t)),e},r.isHttp=function(e){var t=a.getProtocol(e);return"http"===t||"https"===t||void 0===t&&n.browser},r.isFileSystemPath=function(e){if(n.browser)return!1;var t=a.getProtocol(e);return void 0===t||"file"===t},r.fromFileSystemPath=function(e){o&&(e=e.replace(/\\/g,"/")),e=encodeURI(e);for(var t=0;t0?n-4:n,f=0;f>16&255,a[c++]=t>>8&255,a[c++]=255&t;return 2===s&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,a[c++]=255&t),1===s&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t),a},r.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],s=0,a=r-o;sa?a:s+16383));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],o[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,r){for(var n,o=[],i=t;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,g=String.fromCharCode;function y(e){throw new RangeError(d[e])}function v(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+v((e=e.replace(p,".")).split("."),t).join(".")}function _(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+g(e)})).join("")}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,r){var n=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;n+=l)e=m(e/35);return m(n+36*e/(e+38))}function S(e){var t,r,n,o,i,s,a,u,f,h,p,d=[],g=e.length,v=0,b=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&y("not-basic"),d.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=g&&y("invalid-input"),((u=(p=e.charCodeAt(o++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:l)>=l||u>m((c-v)/s))&&y("overflow"),v+=u*s,!(u<(f=a<=_?1:a>=_+26?26:a-_));a+=l)s>m(c/(h=l-f))&&y("overflow"),s*=h;_=E(v-i,t=d.length+1,0==i),m(v/t)>c-b&&y("overflow"),b+=m(v/t),v%=t,d.splice(v++,0,b)}return w(d)}function A(e){var t,r,n,o,i,s,a,u,f,h,p,d,v,b,w,S=[];for(d=(e=_(e)).length,t=128,r=0,i=72,s=0;s=t&&pm((c-r)/(v=n+1))&&y("overflow"),r+=(a-t)*v,t=a,s=0;sc&&y("overflow"),p==t){for(u=r,f=l;!(u<(h=f<=i?1:f>=i+26?26:f-i));f+=l)w=u-h,b=l-h,S.push(g(x(h+w%b,0))),u=m(w/b);S.push(g(x(u,0))),i=E(r,v,n==o),r=0,++n}++r,++t}return S.join("")}if(a={version:"1.4.1",ucs2:{decode:_,encode:w},decode:S,encode:A,toASCII:function(e){return b(e,(function(e){return h.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return b(e,(function(e){return f.test(e)?S(e.slice(4).toLowerCase()):e}))}},o&&i)if(t.exports==o)i.exports=a;else for(u in a)a.hasOwnProperty(u)&&(o[u]=a[u]);else n.punycode=a}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(e,t,r){var n=e("base64-js"),o=e("ieee754");r.Buffer=a,r.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function s(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=a.prototype,t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=s(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(o)return n?-1:D(e).length;t=(""+t).toLowerCase(),o=!0}}function d(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,o){var i,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=r;ia&&(r=a-u),i=r;i>=0;i--){for(var f=!0,h=0;ho&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var r="",n=0;nt&&(e+=" ... "),""},a.prototype.compare=function(e,t,r,n,o){if(B(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(i,s),c=this.slice(n,o),l=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;function k(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;on)&&(r=n);for(var o="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,n,o,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function R(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,8),o.write(e,t,r,n,52,8),r+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e],o=1,i=0;++i>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},a.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),o.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),o.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),o.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),o.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);T(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>>=0,!n){var o=Math.pow(2,8*r-1);T(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e&&(e&=255);if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function U(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function z(e){return e!=e}},{"base64-js":20,ieee754:30}],24:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],25:[function(e,t,r){(function(e,r){var n=r.process&&e.nextTick||r.setImmediate||function(e){setTimeout(e,0)};t.exports=function(e,t){return e?void t.then((function(t){n((function(){e(null,t)}))}),(function(t){n((function(){e(t)}))})):t}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:66}],26:[function(e,t,r){(function(e){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":32}],27:[function(e,t,r){var o=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},s=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=o(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var u,c=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),u=0===l.x}catch(n){u=!1}function f(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function h(e,t,r,n){var i,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]):(s=e._events=o(null),e._eventsCount=0),a){if("function"==typeof a?a=s[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(i=f(e))&&i>0&&a.length>i){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else a=s[t]=r,++e._eventsCount;return e}function p(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(r=s[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,o=y(e,n),i=0;i=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(var r=t,n=r+1,o=e.length;n=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return m(this,e,!0)},a.prototype.rawListeners=function(e){return m(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],28:[function(e,t,r){t.exports=function(e){var t=Array.prototype.slice.call(arguments,1);return t.length&&(e=e.replace(/(%?)(%([jds]))/g,(function(e,r,n,o){var i=t.shift();switch(o){case"s":i=""+i;break;case"d":i=Number(i);break;case"j":i=JSON.stringify(i)}return r?(t.unshift(i),e):i}))),t.length&&(e+=" "+t.join(" ")),""+e.replace(/%{2,2}/g,"%")}},{}],29:[function(e,t,r){var n=e("http"),o=e("url"),i=t.exports;for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);function a(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=a(e),n.request.call(this,e,t)},i.get=function(e,t){return e=a(e),n.get.call(this,e,t)}},{http:80,url:87}],30:[function(e,t,r){r.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,u=(1<>1,l=-7,f=r?o-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=c}return(p?-1:1)*s*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var s,a,u,c=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*m}},{}],31:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],32:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],33:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],34:[function(e,t,r){var n=e("./lib/js-yaml.js");t.exports=n},{"./lib/js-yaml.js":35}],35:[function(e,t,r){var n=e("./js-yaml/loader"),o=e("./js-yaml/dumper");function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=n.load,t.exports.loadAll=n.loadAll,t.exports.safeLoad=n.safeLoad,t.exports.safeLoadAll=n.safeLoadAll,t.exports.dump=o.dump,t.exports.safeDump=o.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=i("scan"),t.exports.parse=i("parse"),t.exports.compose=i("compose"),t.exports.addConstructor=i("addConstructor")},{"./js-yaml/dumper":37,"./js-yaml/exception":38,"./js-yaml/loader":39,"./js-yaml/schema":41,"./js-yaml/schema/core":42,"./js-yaml/schema/default_full":43,"./js-yaml/schema/default_safe":44,"./js-yaml/schema/failsafe":45,"./js-yaml/schema/json":46,"./js-yaml/type":47}],36:[function(e,t,r){function n(e){return null==e}t.exports.isNothing=n,t.exports.isObject=function(e){return"object"==typeof e&&null!==e},t.exports.toArray=function(e){return Array.isArray(e)?e:n(e)?[]:[e]},t.exports.repeat=function(e,t){var r,n="";for(r=0;rn&&" "!==e[l+1],l=i);else if(!g(s))return 5;f=f&&y(s)}u=u||c&&i-l-1>n&&" "!==e[l+1]}return a||u?r>9&&v(e)?5:u?4:3:f&&!o(e)?1:2}function _(e,t,r,n){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==l.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,r),s=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),a=n||e.flowLevel>-1&&r>=e.flowLevel;switch(b(t,a,e.indent,s,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r"+w(t,e.indent)+x(p(function(e,t){for(var r,n,o,i=/(\n+)([^\n]*)/g,s=(r=-1!==(r=e.indexOf("\n"))?r:e.length,i.lastIndex=r,E(e.slice(0,r),t)),a="\n"===e[0]||" "===e[0];o=i.exec(e);){var u=o[1],c=o[2];n=" "===c[0],s+=u+(a||n||""===c?"":"\n")+E(c,t),a=n}return s}(t,s),i));case 5:return'"'+function(e){for(var t,r,n,o="",i=0;i=55296&&t<=56319&&(r=e.charCodeAt(i+1))>=56320&&r<=57343?(o+=f(1024*(t-55296)+r-56320+65536),i++):o+=!(n=c[t])&&g(t)?e[i]:n||f(t);return o}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function w(e,t){var r=v(e)?String(t):"",n="\n"===e[e.length-1];return r+(!n||"\n"!==e[e.length-2]&&"\n"!==e?n?"":"-":"+")+"\n"}function x(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function E(e,t){if(""===e||" "===e[0])return e;for(var r,n,o=/ [^ ]/g,i=0,s=0,a=0,u="";r=o.exec(e);)(a=r.index)-i>t&&(n=s>i?s:a,u+="\n"+e.slice(i,n),i=n+1),s=a;return u+="\n",e.length-i>t&&s>i?u+=e.slice(i,s)+"\n"+e.slice(s+1):u+=e.slice(i),u.slice(1)}function S(e,t,r){var n,i,s,c,l,f;for(s=0,c=(i=r?e.explicitTypes:e.implicitTypes).length;s tag resolver accepts not "'+f+'" style');n=l.represent[f](t,f)}e.dump=n}return!0}return!1}function A(e,t,r,n,i,s){e.tag=null,e.dump=r,S(e,r,!1)||S(e,r,!0);var u=a.call(e.dump);n&&(n=e.flowLevel<0||e.flowLevel>t);var c,l,f="[object Object]"===u||"[object Array]"===u;if(f&&(l=-1!==(c=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&t>0)&&(i=!1),l&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(f&&l&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===u)n&&0!==Object.keys(e.dump).length?(function(e,t,r,n){var i,s,a,u,c,l,f="",h=e.tag,p=Object.keys(r);if(!0===e.sortKeys)p.sort();else if("function"==typeof e.sortKeys)p.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(i=0,s=p.length;i1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=d(e,t)),A(e,t+1,u,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",f+=l+=e.dump));e.tag=h,e.dump=f||"{}"}(e,t,e.dump,i),l&&(e.dump="&ref_"+c+e.dump)):(function(e,t,r){var n,o,i,s,a,u="",c=e.tag,l=Object.keys(r);for(n=0,o=l.length;n1024&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),A(e,t,s,!1,!1)&&(u+=a+=e.dump));e.tag=c,e.dump="{"+u+"}"}(e,t,e.dump),l&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===u){var h=e.noArrayIndent?t-1:t;n&&0!==e.dump.length?(function(e,t,r,n){var o,i,s="",a=e.tag;for(o=0,i=r.length;o "+e.dump)}return!0}function $(e,t){var r,n,o=[],i=[];for(k(e,o,i),r=0,n=i.length;r>10),56320+(e-65536&1023))}for(var E=new Array(256),S=new Array(256),A=0;A<256;A++)E[A]=w(A)?1:0,S[A]=w(A);function $(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function k(e,t){return new o(t,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function O(e,t){throw k(e,t)}function P(e,t){e.onWarning&&e.onWarning.call(null,k(e,t))}var j={YAML:function(e,t,r){var n,o,i;null!==e.version&&O(e,"duplication of %YAML directive"),1!==r.length&&O(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&O(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),i=parseInt(n[2],10),1!==o&&O(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&P(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,o;2!==r.length&&O(e,"TAG directive accepts exactly two arguments"),n=r[0],o=r[1],h.test(n)||O(e,"ill-formed tag handle (first argument) of the TAG directive"),u.call(e.tagMap,n)&&O(e,'there is a previously declared suffix for "'+n+'" tag handle'),p.test(o)||O(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=o}};function C(e,t,r,n){var o,i,s,a;if(t1&&(e.result+=n.repeat("\n",t-1))}function D(e,t){var r,n,o=e.tag,i=e.anchor,s=[],a=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),n=e.input.charCodeAt(e.position);0!==n&&45===n&&g(e.input.charCodeAt(e.position+1));)if(a=!0,e.position++,R(e,!0,-1)&&e.lineIndent<=t)s.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,B(e,t,3,!1,!0),s.push(e.result),R(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)O(e,"bad indentation of a sequence entry");else if(e.lineIndentt?A=1:e.lineIndent===t?A=0:e.lineIndentt?A=1:e.lineIndent===t?A=0:e.lineIndentt)&&(B(e,t,4,!0,o)&&(y?p=e.result:d=e.result),y||(N(e,l,f,h,p,d,i,s),h=p=d=null),R(e,!0,-1),a=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==a)O(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===i?O(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?O(e,"repeat of an indentation width identifier"):(l=t+i-1,c=!0)}if(m(s)){do{s=e.input.charCodeAt(++e.position)}while(m(s));if(35===s)do{s=e.input.charCodeAt(++e.position)}while(!d(s)&&0!==s)}for(;0!==s;){for(I(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!c||e.lineIndentl&&(l=e.lineIndent),d(s))f++;else{if(e.lineIndent0){for(o=s,i=0;o>0;o--)(s=v(a=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+s:O(e,"expected hexadecimal character");e.result+=x(i),e.position++}else O(e,"unknown escape sequence");r=n=e.position}else d(a)?(C(e,r,n,!0),L(e,R(e,!1,t)),r=n=e.position):e.position===e.lineStart&&M(e)?O(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}O(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?k=!0:function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!g(n)&&!y(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(r)||O(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],R(e,!0,-1),!0}(e)?(k=!0,null===e.tag&&null===e.anchor||O(e,"alias node should not have any properties")):function(e,t,r){var n,o,i,s,a,u,c,l,f=e.kind,h=e.result;if(g(l=e.input.charCodeAt(e.position))||y(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(g(n=e.input.charCodeAt(e.position+1))||r&&y(n)))return!1;for(e.kind="scalar",e.result="",o=i=e.position,s=!1;0!==l;){if(58===l){if(g(n=e.input.charCodeAt(e.position+1))||r&&y(n))break}else if(35===l){if(g(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&M(e)||r&&y(l))break;if(d(l)){if(a=e.line,u=e.lineStart,c=e.lineIndent,R(e,!1,-1),e.lineIndent>=t){s=!0,l=e.input.charCodeAt(e.position);continue}e.position=i,e.line=a,e.lineStart=u,e.lineIndent=c;break}}s&&(C(e,o,i,!1),L(e,e.line-a),o=i=e.position,s=!1),m(l)||(i=e.position+1),l=e.input.charCodeAt(++e.position)}return C(e,o,i,!1),!!e.result||(e.kind=f,e.result=h,!1)}(e,p,1===r)&&(k=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===A&&(k=c&&D(e,w))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(l=0,f=e.implicitTypes.length;l tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result)?(e.result=h.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):O(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):O(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||k}function z(e){var t,r,n,o,i=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(o=e.input.charCodeAt(e.position))&&(R(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(s=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!g(o);)o=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&O(e,"directive name must not be less than one character in length");0!==o;){for(;m(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!d(o));break}if(d(o))break;for(t=e.position;0!==o&&!g(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==o&&I(e),u.call(j,r)?j[r](e,r,n):P(e,'unknown document directive "'+r+'"')}R(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,R(e,!0,-1)):s&&O(e,"directives end mark is expected"),B(e,e.lineIndent-1,4,!1,!0),R(e,!0,-1),e.checkLineBreaks&&l.test(e.input.slice(i,e.position))&&P(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&M(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,R(e,!0,-1)):e.position0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(o-1));)if(o-=1,this.position-o>t/2-1){r=" ... ",o+=5;break}for(i="",s=this.position;st/2-1){i=" ... ",s-=5;break}return a=this.buffer.slice(o,s),n.repeat(" ",e)+r+a+i+"\n"+n.repeat(" ",e+this.position-o+r.length)+"^"},o.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(r+=":\n"+t),r},t.exports=o},{"./common":36}],41:[function(e,t,r){var n=e("./common"),o=e("./exception"),i=e("./type");function s(e,t,r){var n=[];return e.include.forEach((function(e){r=s(e,t,r)})),e[t].forEach((function(e){r.forEach((function(t,r){t.tag===e.tag&&t.kind===e.kind&&n.push(r)})),r.push(e)})),r.filter((function(e,t){return-1===n.indexOf(t)}))}function a(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=s(this,"implicit",[]),this.compiledExplicit=s(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{}};function n(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,o=e.replace(/[\r\n=]/g,""),s=o.length,a=i,u=0,c=[];for(t=0;t>16&255),c.push(u>>8&255),c.push(255&u)),u=u<<6|a.indexOf(o.charAt(t));return 0==(r=s%4*6)?(c.push(u>>16&255),c.push(u>>8&255),c.push(255&u)):18===r?(c.push(u>>10&255),c.push(u>>2&255)):12===r&&c.push(u>>4&255),n?n.from?n.from(c):new n(c):c},predicate:function(e){return n&&n.isBuffer(e)},represent:function(e){var t,r,n="",o=0,s=e.length,a=i;for(t=0;t>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]),o=(o<<8)+e[t];return 0==(r=s%3)?(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]):2===r?(n+=a[o>>10&63],n+=a[o>>4&63],n+=a[o<<2&63],n+=a[64]):1===r&&(n+=a[o>>2&63],n+=a[o<<4&63],n+=a[64],n+=a[64]),n}})},{"../type":47}],49:[function(e,t,r){var n=e("../type");t.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":47}],50:[function(e,t,r){var n=e("../common"),o=e("../type"),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=/^[-+]?[0-9]+e/;t.exports=new o("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!i.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r,n,o;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,o=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){o.unshift(parseFloat(e,10))})),t=0,n=1,o.forEach((function(e){t+=e*n,n*=60})),r*t):r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return r=e.toString(10),s.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"})},{"../common":36,"../type":47}],51:[function(e,t,r){var n=e("../common"),o=e("../type");function i(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function s(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}t.exports=new o("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r=e.length,n=0,o=!1;if(!r)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===r)return!0;if("b"===(t=e[++n])){for(n++;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":36,"../type":47}],52:[function(e,t,r){var o;try{o=e("esprima")}catch(n){"undefined"!=typeof window&&(o=window.esprima)}var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",r=o.parse(t,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&("ArrowFunctionExpression"===r.body[0].expression.type||"FunctionExpression"===r.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,r="("+e+")",n=o.parse(r,{range:!0}),i=[];if("Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"ArrowFunctionExpression"!==n.body[0].expression.type&&"FunctionExpression"!==n.body[0].expression.type)throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach((function(e){i.push(e.name)})),t=n.body[0].expression.body.range,"BlockStatement"===n.body[0].expression.body.type?new Function(i,r.slice(t[0]+1,t[1]-1)):new Function(i,"return "+r.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},{"../../type":47}],53:[function(e,t,r){var n=e("../../type");t.exports=new n("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,r=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1}return!0},construct:function(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(r&&(n=r[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},{"../../type":47}],54:[function(e,t,r){var n=e("../../type");t.exports=new n("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},{"../../type":47}],55:[function(e,t,r){var n=e("../type");t.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":47}],56:[function(e,t,r){var n=e("../type");t.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},{"../type":47}],57:[function(e,t,r){var n=e("../type");t.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":47}],58:[function(e,t,r){var n=e("../type"),o=Object.prototype.hasOwnProperty,i=Object.prototype.toString;t.exports=new n("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,s,a,u=[],c=e;for(t=0,r=c.length;t0&&(d=t.exports.formatter.apply(null,a)),r&&r.message&&(d+=(d?" \n":"")+r.message);var m=new e(d);return function(e,t){(function(e,t){!function(e){if(!p)return!1;var t=Object.getOwnPropertyDescriptor(e,"stack");return!!t&&"function"==typeof t.get}(e)?e.stack=t?f(e.stack,t.stack):h(e.stack):t?function(e,t){var r=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return f(r.get.apply(e),t.stack)},enumerable:!1,configurable:!0})}(e,t):function(e){var t=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return h(t.get.apply(e))},enumerable:!1,configurable:!0})}(e)})(e,t),u(e,t)}(m,r),function(e){e.toJSON=c,e.inspect=l}(m),u(m,n),m}}function u(e,t){if(t&&"object"==typeof t)for(var r=Object.keys(t),n=0;n=0))try{e[o]=t[o]}catch(e){}}}function c(){var e={},t=Object.keys(this);t=t.concat(s);for(var r=0;r=0)return t.splice(r,1),t.join("\n");return e}}t.exports=a(Error),t.exports.error=a(Error),t.exports.eval=a(EvalError),t.exports.range=a(RangeError),t.exports.reference=a(ReferenceError),t.exports.syntax=a(SyntaxError),t.exports.type=a(TypeError),t.exports.uri=a(URIError),t.exports.formatter=n;var p=!(!Object.getOwnPropertyDescriptor||!Object.defineProperty||"undefined"!=typeof navigator&&/Android/.test(navigator.userAgent))},{"format-util":28}],65:[function(e,t,r){(function(e){!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,o){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,o)}));default:for(i=new Array(a-1),s=0;s1)for(var r=1;r0&&c>u&&(c=u);for(var l=0;l=0?(f=m.substr(0,g),h=m.substr(g+1)):(f=m,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),n(s,p)?o(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],68:[function(e,t,r){var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(s(e),(function(s){var a=encodeURIComponent(n(s))+r;return o(e[s])?i(e[s],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[s]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):$(e,s)):w(e,s,t,!1))):n||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(A,e):A(e))}function A(e){p("emit readable"),e.emit("readable"),j(e)}function $(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;return ei.length?i.length:e;if(s===i.length?o+=i:o+=i.slice(0,e),0==(e-=s)){s===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(s));break}++n}return t.length-=n,o}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,o=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,s),0==(e-=s)){s===i.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(s));break}++o}return t.length-=o,r}(e,t),n}(e,t.buffer,t.decoder),r);var r}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):S(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&T(this),null;var n,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&T(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var u=t&&!1===t.end||e===r.stdout||e===r.stderr?v:c;function c(){p("onend"),e.end()}i.endEmitted?o.nextTick(u):n.once("end",u),e.on("unpipe",(function t(r,o){p("onunpipe"),r===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,p("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",t),n.removeListener("end",c),n.removeListener("end",v),n.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",l);var f=!1,h=!1;function d(t){p("ondata"),h=!1,!1!==e.write(t)||h||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==I(i.pipes,e))&&!f&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,h=!0),n.pause())}function m(t){p("onerror",t),v(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),v()}function y(){p("onfinish"),e.removeListener("close",g),v()}function v(){p("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",y),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1?i:s.nextTick;b.WritableState=v;var l=e("core-util-is");l.inherits=e("inherits");var f,h={deprecate:e("util-deprecate")},p=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,m=o.Uint8Array||function(){},g=e("./internal/streams/destroy");function y(){}function v(t,r){u=u||e("./_stream_duplex"),t=t||{};var n=r instanceof u;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var o=t.highWaterMark,i=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(i||0===i)?i:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(s.nextTick(o,n),s.nextTick($,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),$(e,t))}(e,r,n,t,o);else{var i=S(r);i||r.corked||r.bufferProcessing||!r.bufferedRequest||E(e,r),n?c(x,e,r,i,o):x(e,r,i,o)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(t){if(u=u||e("./_stream_duplex"),!(f.call(b,this)||this instanceof u))return new b(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),p.call(this)}function _(e,t,r,n,o,i){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r)),t}(t,n,o);n!==s&&(r=!0,o="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,$(e,t),r&&(t.finished?s.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":70,"./internal/streams/destroy":76,"./internal/streams/stream":77,_process:66,"core-util-is":26,inherits:31,"process-nextick-args":65,"safe-buffer":79,timers:85,"util-deprecate":89}],75:[function(e,t,r){var n=e("safe-buffer").Buffer,o=e("util");function i(e,t,r){e.copy(t,r)}t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t=n.allocUnsafe(e>>>0),r=this.head,o=0;r;)i(r.data,t,o),o+=r.data.length,r=r.next;return t},e}(),o&&o.inspect&&o.inspect.custom&&(t.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":79,util:21}],76:[function(e,t,r){var n=e("process-nextick-args");function o(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(o,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":65}],77:[function(e,t,r){t.exports=e("events").EventEmitter},{events:27}],78:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":70,"./lib/_stream_passthrough.js":71,"./lib/_stream_readable.js":72,"./lib/_stream_transform.js":73,"./lib/_stream_writable.js":74}],79:[function(e,t,r){var n=e("buffer"),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=s),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:23}],80:[function(e,t,r){(function(t){var n=e("./lib/request"),o=e("./lib/response"),i=e("xtend"),s=e("builtin-status-codes"),a=e("url"),u=r;u.request=function(e,r){e="string"==typeof e?a.parse(e):i(e);var o=-1===t.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||o,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":82,"./lib/response":83,"builtin-status-codes":24,url:87,xtend:90}],81:[function(e,t,r){(function(e){r.fetch=a(e.fetch)&&a(e.ReadableStream),r.writableStream=a(e.WritableStream),r.abortController=a(e.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(u){}var t;function n(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(u){t=null}}else t=null;return t}function o(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var i=void 0!==e.ArrayBuffer,s=i&&a(e.ArrayBuffer.prototype.slice);function a(e){return"function"==typeof e}r.arraybuffer=r.fetch||i&&o("arraybuffer"),r.msstream=!r.fetch&&s&&o("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&i&&o("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&a(n().overrideMimeType),r.vbArray=a(e.VBArray),t=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],82:[function(e,t,r){(function(r,n,o){var i=e("./capability"),s=e("inherits"),a=e("./response"),u=e("readable-stream"),c=e("to-arraybuffer"),l=a.IncomingMessage,f=a.readyStates,h=t.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new o(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":i.vbArray&&e?"text:vbarray":"text"}(t,n),r._fetchTimer=null,r.on("finish",(function(){r._onFinish()}))};s(h,u.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,s=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=i.arraybuffer?c(o.concat(e._body)):i.blobConstructor?new n.Blob(e._body.map((function(e){return c(e)})),{type:(s["content-type"]||{}).value||""}):o.concat(e._body).toString());var u=[];if(Object.keys(s).forEach((function(e){var t=s[e].name,r=s[e].value;Array.isArray(r)?r.forEach((function(e){u.push([t,e])})):u.push([t,r])})),"fetch"===e._mode){var l=null;if(i.abortController){var h=new AbortController;l=h.signal,e._fetchAbortController=h,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){n.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var p=e._xhr=new n.XMLHttpRequest;try{p.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in p&&(p.responseType=e._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(p.timeout=t.requestTimeout,p.ontimeout=function(){e.emit("requestTimeout")}),u.forEach((function(e){p.setRequestHeader(e[0],e[1])})),e._response=null,p.onreadystatechange=function(){switch(p.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(p.onprogress=function(){e._onXHRProgress()}),p.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{p.send(a)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},h.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":81,"./response":83,_process:66,buffer:23,inherits:31,"readable-stream":78,"to-arraybuffer":86}],83:[function(e,t,r){(function(t,n,o){var i=e("./capability"),s=e("inherits"),a=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,s,u){var c=this;if(a.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===s){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),i.writableStream){var l=new WritableStream({write:function(e){return new Promise((function(t,r){c._destroyed?r():c.push(new o(e))?t():c._resumeFetch=t}))},close:function(){n.clearTimeout(u),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void r.body.pipeTo(l).catch((function(e){n.clearTimeout(u),c._destroyed||c.emit("error",e)}))}catch(e){}}var f=r.body.getReader();!function e(){f.read().then((function(t){if(!c._destroyed){if(t.done)return n.clearTimeout(u),void c.push(null);c.push(new o(t.value)),e()}})).catch((function(e){n.clearTimeout(u),c._destroyed||c.emit("error",e)}))}()}else if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!i.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var p=h.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}};s(c,a.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new o(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var i=r.substr(e._pos);if("x-user-defined"===e._charset){for(var s=new o(i.length),a=0;ae._pos&&(e.push(new o(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":81,_process:66,buffer:23,inherits:31,"readable-stream":78}],84:[function(e,t,r){var n=e("safe-buffer").Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(o>0&&(e.lastNeed=o-1),o):--n=0?(o>0&&(e.lastNeed=o-2),o):--n=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":79}],85:[function(e,t,r){(function(t,n){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,s=Array.prototype.slice,a={},u=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=u++,n=!(arguments.length<2)&&s.call(arguments,1);return a[t]=!0,o((function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":66,timers:85}],86:[function(e,t,r){var n=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,o=0;o",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=e("querystring");function b(e,t,r){if(e&&o.isObject(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),a=-1!==i&&i127?N+="x":N+=T[I];if(!N.match(p)){var M=j.slice(0,k),L=j.slice(k+1),D=T.match(d);D&&(M.push(D[1]),L.unshift(D[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var U=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+U,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[x])for(k=0,C=l.length;k0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=E.slice(-1)[0],$=(r.host||e.host||E.length>1)&&("."===A||".."===A)||""===A,k=0,O=E.length;O>=0;O--)"."===(A=E[O])?E.splice(O,1):".."===A?(E.splice(O,1),k++):k&&(E.splice(O,1),k--);if(!w&&!x)for(;k--;k)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),$&&"/"!==E.join("/").substr(-1)&&E.push("");var P,j=""===E[0]||E[0]&&"/"===E[0].charAt(0);return S&&(r.hostname=r.host=j?"":E.length?E.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),(w=w||r.host&&E.length)&&!j&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":88,punycode:22,querystring:69}],88:[function(e,t,r){t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],89:[function(e,t,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],90:[function(e,t,r){t.exports=function(){for(var e={},t=0;te.length)))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return t.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!t.binary_ops[String.fromCharCode(e)]||t.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return t.isIdentifierStart(e)||t.isDecimalDigit(e)}throwError(e){const t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,r){if(t.hooks[e]){const n={context:this,node:r};return t.hooks.run(e,n),n.node}return r}searchHook(e){if(t.hooks[e]){const r={context:this};return t.hooks[e].find((function(e){return e.call(r.context,r),r.node})),r.node}}gobbleSpaces(){let e=this.code;for(;e===t.SPACE_CODE||e===t.TAB_CODE||e===t.LF_CODE||e===t.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const e=this.gobbleExpressions(),r=1===e.length?e[0]:{type:t.COMPOUND,body:e};return this.runHook("after-all",r)}gobbleExpressions(e){let r,n,o=[];for(;this.index0;){if(t.binary_ops.hasOwnProperty(e)&&(!t.isIdentifierStart(this.code)||this.index+e.lengthi.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;o.length>2&&u(o[o.length-2]);)a=o.pop(),r=o.pop().value,s=o.pop(),e={type:t.BINARY_EXP,operator:r,left:s,right:a},o.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+c),o.push(i,e)}for(u=o.length-1,e=o[u];u>1;)e={type:t.BINARY_EXP,operator:o[u-1].value,left:o[u-2],right:e},u-=2;return e}gobbleToken(){let e,r,n,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(e=this.code,t.isDecimalDigit(e)||e===t.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===t.SQUOTE_CODE||e===t.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(e===t.OBRACK_CODE)o=this.gobbleArray();else{for(r=this.expr.substr(this.index,t.max_unop_len),n=r.length;n>0;){if(t.unary_ops.hasOwnProperty(r)&&(!t.isIdentifierStart(this.code)||this.index+r.length=r.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(i===t.COMMA_CODE){if(this.index++,o++,o!==r.length)if(e===t.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===t.CBRACK_CODE)for(let e=r.length;e{if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)}))}}(t),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),t.max_unop_len=t.getMaxKeyLen(t.unary_ops),t.max_binop_len=t.getMaxKeyLen(t.binary_ops);const n=e=>new t(e).parse(),o=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(t).filter((e=>!o.includes(e)&&void 0===n[e])).forEach((e=>{n[e]=t[e]})),n.Jsep=t;var i={name:"ternary",init(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;const r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}}))}};n.plugins.register(i);var s={name:"regex",init(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){const r=++this.index;let n=!1;for(;this.index=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57))break;i+=this.char}try{o=new RegExp(n,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:o,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}};const a={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|="]),updateOperators:[43,45],assignmentPrecedence:.9,init(e){const t=[e.IDENTIFIER,e.MEMBER_EXP];function r(e){a.assignmentOperators.has(e.operator)?(e.type="AssignmentExpression",r(e.left),r(e.right)):e.operator||Object.values(e).forEach((e=>{e&&"object"==typeof e&&r(e)}))}a.assignmentOperators.forEach((t=>e.addBinaryOp(t,a.assignmentPrecedence,!0))),e.hooks.add("gobble-token",(function(e){const r=this.code;a.updateOperators.some((e=>e===r&&e===this.expr.charCodeAt(this.index+1)))&&(this.index+=2,e.node={type:"UpdateExpression",operator:43===r?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},e.node.argument&&t.includes(e.node.argument.type)||this.throwError(`Unexpected ${e.node.operator}`))})),e.hooks.add("after-token",(function(e){if(e.node){const r=this.code;a.updateOperators.some((e=>e===r&&e===this.expr.charCodeAt(this.index+1)))&&(t.includes(e.node.type)||this.throwError(`Unexpected ${e.node.operator}`),this.index+=2,e.node={type:"UpdateExpression",operator:43===r?"++":"--",argument:e.node,prefix:!1})}})),e.hooks.add("after-expression",(function(e){e.node&&r(e.node)}))}};n.plugins.register(s,a),n.addUnaryOp("typeof"),n.addLiteral("null",null),n.addLiteral("undefined",void 0);const u={evalAst(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":return u.evalBinaryExpression(e,t);case"Compound":return u.evalCompound(e,t);case"ConditionalExpression":return u.evalConditionalExpression(e,t);case"Identifier":return u.evalIdentifier(e,t);case"Literal":return u.evalLiteral(e,t);case"MemberExpression":return u.evalMemberExpression(e,t);case"UnaryExpression":return u.evalUnaryExpression(e,t);case"ArrayExpression":return u.evalArrayExpression(e,t);case"CallExpression":return u.evalCallExpression(e,t);case"AssignmentExpression":return u.evalAssignmentExpression(e,t);default:throw SyntaxError("Unexpected expression",e)}},evalBinaryExpression:(e,t)=>({"||":(e,t)=>e||t(),"&&":(e,t)=>e&&t(),"|":(e,t)=>e|t(),"^":(e,t)=>e^t(),"&":(e,t)=>e&t(),"==":(e,t)=>e==t(),"!=":(e,t)=>e!=t(),"===":(e,t)=>e===t(),"!==":(e,t)=>e!==t(),"<":(e,t)=>e":(e,t)=>e>t(),"<=":(e,t)=>e<=t(),">=":(e,t)=>e>=t(),"<<":(e,t)=>e<>":(e,t)=>e>>t(),">>>":(e,t)=>e>>>t(),"+":(e,t)=>e+t(),"-":(e,t)=>e-t(),"*":(e,t)=>e*t(),"/":(e,t)=>e/t(),"%":(e,t)=>e%t()}[e.operator](u.evalAst(e.left,t),(()=>u.evalAst(e.right,t)))),evalCompound(e,t){let r;for(let n=0;nu.evalAst(e.test,t)?u.evalAst(e.consequent,t):u.evalAst(e.alternate,t),evalIdentifier(e,t){if(e.name in t)return t[e.name];throw ReferenceError(`${e.name} is not defined`)},evalLiteral:e=>e.value,evalMemberExpression(e,t){if("Identifier"===e.property.type&&"constructor"===e.property.name||"Identifier"===e.object.type&&"constructor"===e.object.name)throw new Error("'constructor' property is disabled");const r=e.computed?u.evalAst(e.property):e.property.name,n=u.evalAst(e.object,t),o=n[r];if("function"==typeof o){if(n===Function&&"bind"===r)throw new Error("Function.prototype.bind is disabled");if(n===Function&&("call"===r||"apply"===r))throw new Error("Function.prototype.call and Function.prototype.apply are disabled");return o===Function?o:o.bind(n)}return o},evalUnaryExpression:(e,t)=>({"-":e=>-u.evalAst(e,t),"!":e=>!u.evalAst(e,t),"~":e=>~u.evalAst(e,t),"+":e=>+u.evalAst(e,t),typeof:e=>typeof u.evalAst(e,t)}[e.operator](e.argument)),evalArrayExpression:(e,t)=>e.elements.map((e=>u.evalAst(e,t))),evalCallExpression(e,t){const r=e.arguments.map((e=>u.evalAst(e,t))),n=u.evalAst(e.callee,t);if(n===Function)throw new Error("Function constructor is disabled");return n(...r)},evalAssignmentExpression(e,t){if("Identifier"!==e.left.type)throw SyntaxError("Invalid left-hand side in assignment");const r=e.left.name;if("__proto__"===r)throw new Error("Assignment to __proto__ is disabled");const n=u.evalAst(e.right,t);return t[r]=n,t[r]}};function c(e,t){return(e=e.slice()).push(t),e}function l(e,t){return(t=t.slice()).unshift(e),t}class f extends Error{constructor(e){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=e,this.name="NewError"}}function h(e,t,r,n,o){if(!(this instanceof h))try{return new h(e,t,r,n,o)}catch(e){if(!e.avoidNew)throw e;return e.value}"string"==typeof e&&(o=n,n=r,r=t,t=e,e=null);const i=e&&"object"==typeof e;if(e=e||{},this.json=e.json||r,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=!Object.hasOwn(e,"wrap")||e.wrap,this.sandbox=e.sandbox||{},this.eval=void 0===e.eval?"safe":e.eval,this.ignoreEvalErrors=void 0!==e.ignoreEvalErrors&&e.ignoreEvalErrors,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||n||null,this.otherTypeCallback=e.otherTypeCallback||o||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==e.autostart){const n={path:i?e.path:t};i?"json"in e&&(n.json=e.json):n.json=r;const o=this.evaluate(n);if(!o||"object"!=typeof o)throw new f(o);return o}}h.prototype.evaluate=function(e,t,r,n){let o=this.parent,i=this.parentProperty,{flatten:s,wrap:a}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,t=t||this.json,(e=e||this.path)&&"object"==typeof e&&!Array.isArray(e)){if(!e.path&&""!==e.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=e),s=Object.hasOwn(e,"flatten")?e.flatten:s,this.currResultType=Object.hasOwn(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=Object.hasOwn(e,"sandbox")?e.sandbox:this.currSandbox,a=Object.hasOwn(e,"wrap")?e.wrap:a,this.currEval=Object.hasOwn(e,"eval")?e.eval:this.currEval,r=Object.hasOwn(e,"callback")?e.callback:r,this.currOtherTypeCallback=Object.hasOwn(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,o=Object.hasOwn(e,"parent")?e.parent:o,i=Object.hasOwn(e,"parentProperty")?e.parentProperty:i,e=e.path}if(o=o||null,i=i||null,Array.isArray(e)&&(e=h.toPathString(e)),!e&&""!==e||!t)return;const u=h.toPathArray(e);"$"===u[0]&&u.length>1&&u.shift(),this._hasParentSelector=null;const c=this._trace(u,t,["$"],o,i,r).filter((function(e){return e&&!e.isParentSelector}));return c.length?a||1!==c.length||c[0].hasArrExpr?c.reduce(((e,t)=>{const r=this._getPreferredOutput(t);return s&&Array.isArray(r)?e=e.concat(r):e.push(r),e}),[]):this._getPreferredOutput(c[0]):a?[]:void 0},h.prototype._getPreferredOutput=function(e){const t=this.currResultType;switch(t){case"all":{const t=Array.isArray(e.path)?e.path:h.toPathArray(e.path);return e.pointer=h.toPointer(t),e.path="string"==typeof e.path?e.path:h.toPathString(e.path),e}case"value":case"parent":case"parentProperty":return e[t];case"path":return h.toPathString(e[t]);case"pointer":return h.toPointer(e.path);default:throw new TypeError("Unknown result type")}},h.prototype._handleCallback=function(e,t,r){if(t){const n=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:h.toPathString(e.path),t(n,r,e)}},h.prototype._trace=function(e,t,r,n,o,i,s,a){let u;if(!e.length)return u={path:r,value:t,parent:n,parentProperty:o,hasArrExpr:s},this._handleCallback(u,i,"value"),u;const f=e[0],h=e.slice(1),p=[];function d(e){Array.isArray(e)?e.forEach((e=>{p.push(e)})):p.push(e)}if(("string"!=typeof f||a)&&t&&Object.hasOwn(t,f))d(this._trace(h,t[f],c(r,f),t,f,i,s));else if("*"===f)this._walk(t,(e=>{d(this._trace(h,t[e],c(r,e),t,e,i,!0,!0))}));else if(".."===f)d(this._trace(h,t,r,n,o,i,s)),this._walk(t,(n=>{"object"==typeof t[n]&&d(this._trace(e.slice(),t[n],c(r,n),t,n,i,!0))}));else{if("^"===f)return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:h,isParentSelector:!0};if("~"===f)return u={path:c(r,f),value:o,parent:n,parentProperty:null},this._handleCallback(u,i,"property"),u;if("$"===f)d(this._trace(h,t,r,null,null,i,s));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(f))d(this._slice(f,h,t,r,n,o,i));else if(0===f.indexOf("?(")){if(!1===this.currEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const e=f.replace(/^\?\((.*?)\)$/u,"$1"),s=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(e);s?this._walk(t,(e=>{const a=[s[2]],u=s[1]?t[e][s[1]]:t[e];this._trace(a,u,r,n,o,i,!0).length>0&&d(this._trace(h,t[e],c(r,e),t,e,i,!0))})):this._walk(t,(s=>{this._eval(e,t[s],s,r,n,o)&&d(this._trace(h,t[s],c(r,s),t,s,i,!0))}))}else if("("===f[0]){if(!1===this.currEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");d(this._trace(l(this._eval(f,t,r.at(-1),r.slice(0,-1),n,o),h),t,r,n,o,i,s))}else if("@"===f[0]){let e=!1;const s=f.slice(1,-2);switch(s){case"scalar":t&&["object","function"].includes(typeof t)||(e=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===s&&(e=!0);break;case"integer":!Number.isFinite(t)||t%1||(e=!0);break;case"number":Number.isFinite(t)&&(e=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(e=!0);break;case"object":t&&typeof t===s&&(e=!0);break;case"array":Array.isArray(t)&&(e=!0);break;case"other":e=this.currOtherTypeCallback(t,r,n,o);break;case"null":null===t&&(e=!0);break;default:throw new TypeError("Unknown value type "+s)}if(e)return u={path:r,value:t,parent:n,parentProperty:o},this._handleCallback(u,i,"value"),u}else if("`"===f[0]&&t&&Object.hasOwn(t,f.slice(1))){const e=f.slice(1);d(this._trace(h,t[e],c(r,e),t,e,i,s,!0))}else if(f.includes(",")){const e=f.split(",");for(const s of e)d(this._trace(l(s,h),t,r,n,o,i,!0))}else!a&&t&&Object.hasOwn(t,f)&&d(this._trace(h,t[f],c(r,f),t,f,i,s,!0))}if(this._hasParentSelector)for(let c=0;c{t(e)}))},h.prototype._slice=function(e,t,r,n,o,i,s){if(!Array.isArray(r))return;const a=r.length,u=e.split(":"),c=u[2]&&Number.parseInt(u[2])||1;let f=u[0]&&Number.parseInt(u[0])||0,h=u[1]&&Number.parseInt(u[1])||a;f=f<0?Math.max(0,f+a):Math.min(a,f),h=h<0?Math.max(0,h+a):Math.min(a,h);const p=[];for(let d=f;d{p.push(e)}));return p},h.prototype._eval=function(e,t,r,n,o,i){this.currSandbox._$_parentProperty=i,this.currSandbox._$_parent=o,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const s=e.includes("@path");s&&(this.currSandbox._$_path=h.toPathString(n.concat([r])));const a=this.currEval+"Script:"+e;if(!h.cache[a]){let t=e.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(s&&(t=t.replaceAll("@path","_$_path")),"safe"===this.currEval||!0===this.currEval||void 0===this.currEval)h.cache[a]=new this.safeVm.Script(t);else if("native"===this.currEval)h.cache[a]=new this.vm.Script(t);else if("function"==typeof this.currEval&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const e=this.currEval;h.cache[a]=new e(t)}else{if("function"!=typeof this.currEval)throw new TypeError(`Unknown "eval" property "${this.currEval}"`);h.cache[a]={runInNewContext:e=>this.currEval(t,e)}}}try{return h.cache[a].runInNewContext(this.currSandbox)}catch(t){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+t.message+": "+e)}},h.cache={},h.toPathString=function(e){const t=e,r=t.length;let n="$";for(let o=1;o"function"==typeof e[t]));const o=r.map((t=>e[t]));t=n.reduce(((t,r)=>{let n=e[r].toString();return/function/u.test(n)||(n="function "+n),"var "+r+"="+n+";"+t}),"")+t,/(['"])use strict\1/u.test(t)||r.includes("arguments")||(t="var arguments = undefined;"+t),t=t.replace(/;\s*$/u,"");const i=t.lastIndexOf(";"),s=i>-1?t.slice(0,i+1)+" return "+t.slice(i+1):" return "+t;return new Function(...r,s)(...o)}}},e.JSONPath=h},"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((n="undefined"!=typeof globalThis?globalThis:n||self).JSONPath={});var i=Object.create,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,f=(e,t)=>function(){return t||(0,e[u(e)[0]])((t={exports:{}}).exports,t),t.exports},h=(e,t,r)=>(r=null!=e?i(c(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of u(t))l.call(e,o)||o===r||s(e,o,{get:()=>t[o],enumerable:!(n=a(t,o))||n.enumerable});return e})(!t&&e&&e.__esModule?r:s(r,"default",{value:e,enumerable:!0}),e)),p=f({"node_modules/ret/lib/types.js"(e,t){t.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}}}),d=f({"node_modules/ret/lib/sets.js"(e){var t=p(),r=()=>[{type:t.RANGE,from:48,to:57}],n=()=>[{type:t.CHAR,value:95},{type:t.RANGE,from:97,to:122},{type:t.RANGE,from:65,to:90}].concat(r()),o=()=>[{type:t.CHAR,value:9},{type:t.CHAR,value:10},{type:t.CHAR,value:11},{type:t.CHAR,value:12},{type:t.CHAR,value:13},{type:t.CHAR,value:32},{type:t.CHAR,value:160},{type:t.CHAR,value:5760},{type:t.RANGE,from:8192,to:8202},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233},{type:t.CHAR,value:8239},{type:t.CHAR,value:8287},{type:t.CHAR,value:12288},{type:t.CHAR,value:65279}];e.words=()=>({type:t.SET,set:n(),not:!1}),e.notWords=()=>({type:t.SET,set:n(),not:!0}),e.ints=()=>({type:t.SET,set:r(),not:!1}),e.notInts=()=>({type:t.SET,set:r(),not:!0}),e.whitespace=()=>({type:t.SET,set:o(),not:!1}),e.notWhitespace=()=>({type:t.SET,set:o(),not:!0}),e.anyChar=()=>({type:t.SET,set:[{type:t.CHAR,value:10},{type:t.CHAR,value:13},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233}],not:!0})}}),m=f({"node_modules/ret/lib/util.js"(e){var t=p(),r=d(),n={0:0,t:9,n:10,v:11,f:12,r:13};e.strToChars=function(e){return e=e.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(e,t,r,o,i,s,a,u){if(r)return e;var c=t?8:o?parseInt(o,16):i?parseInt(i,16):s?parseInt(s,8):a?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(a):n[u],l=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(l)&&(l="\\"+l),l}))},e.tokenizeClass=(n,o)=>{for(var i,s,a=[],u=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(i=u.exec(n));)if(i[1])a.push(r.words());else if(i[2])a.push(r.ints());else if(i[3])a.push(r.whitespace());else if(i[4])a.push(r.notWords());else if(i[5])a.push(r.notInts());else if(i[6])a.push(r.notWhitespace());else if(i[7])a.push({type:t.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else{if(!(s=i[12]))return[a,u.lastIndex];a.push({type:t.CHAR,value:s.charCodeAt(0)})}e.error(o,"Unterminated character class")},e.error=(e,t)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+t)}}}),g=f({"node_modules/ret/lib/positions.js"(e){var t=p();e.wordBoundary=()=>({type:t.POSITION,value:"b"}),e.nonWordBoundary=()=>({type:t.POSITION,value:"B"}),e.begin=()=>({type:t.POSITION,value:"^"}),e.end=()=>({type:t.POSITION,value:"$"})}}),y=f({"node_modules/ret/lib/index.js"(e,t){var r=m(),n=p(),o=d(),i=g();t.exports=e=>{var t,s,a=0,u={type:n.ROOT,stack:[]},c=u,l=u.stack,f=[],h=t=>{r.error(e,"Nothing to repeat at column "+(t-1))},p=r.strToChars(e);for(t=p.length;ae.high)}touches(e){return!(this.high+1e.high)}add(t){return new e(Math.min(this.low,t.low),Math.max(this.high,t.high))}subtract(t){return t.low<=this.low&&t.high>=this.high?[]:t.low>this.low&&t.highe+t.length),0)}add(t,n){var o=e=>{for(var t=0;t{for(var t=0;t{for(var t=0;t{for(var r=t.low;r<=t.high;)e.push(r),r++;return e}),[])}subranges(){return this.ranges.map((e=>({low:e.low,high:e.high,length:1+e.high-e.low})))}}}}),b=f({"node_modules/randexp/lib/randexp.js"(e,t){var r=y(),n=v(),o=r.types;t.exports=class e{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else{if("string"!=typeof e)throw new Error("Expected a regexp or string");this.ignoreCase=t&&-1!==t.indexOf("i"),this.multiline=t&&-1!==t.indexOf("m")}this.tokens=r(e)}_setDefaults(t){this.max=null!=t.max?t.max:null!=e.prototype.max?e.prototype.max:100,this.defaultRange=t.defaultRange?t.defaultRange:this.defaultRange.clone(),t.randInt&&(this.randInt=t.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var r,n,i,s,a;switch(e.type){case o.ROOT:case o.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&void 0===e.groupNumber&&(e.groupNumber=t.push(null)-1),n="",s=0,a=(r=e.options?this._randSelect(e.options):e.stack).length;sn.length)return null;for(let o=0;o=1)||e>r.length)return null;const i=r[e-1];let s=r[e];for(;s&&s>i&&"\n"===n[s-1];)--s;return n.slice(i,s)}(e.line,r);if(!i)return null;let{col:s}=e;if(i.length>n)if(s<=n-10)i=i.substr(0,n-1)+"\u2026";else{const e=Math.round(n/2);i.length>s+e&&(i=i.substr(0,s+e-1)+"\u2026"),s-=i.length-n,i="\u2026"+i.substr(1-n)}let a=1,u="";t&&(t.line===e.line&&s+(t.col-e.col)<=n+1?a=t.col-e.col:(a=Math.min(i.length+1,n)-s,u="\u2026"));return`${i}\n${s>1?" ".repeat(s-1):""}${"^".repeat(a)}${u}`}var a=class e{static copy(t){return new e(t.start,t.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return"number"!=typeof this.start||!this.end||this.end<=this.start}setOrigRange(e,t){const{start:r,end:n}=this;if(0===e.length||n<=e[0])return this.origStart=r,this.origEnd=n,t;let o=t;for(;or);)++o;this.origStart=r+o;const i=o;for(;o=n);)++o;return this.origEnd=n+o,i}},u=class e{static addStringTerminator(t,r,n){if("\n"===n[n.length-1])return n;const o=e.endOfWhiteSpace(t,r);return o>=t.length||"\n"===t[o]?n+"\n":n}static atDocumentBoundary(e,r,n){const o=e[r];if(!o)return!0;const i=e[r-1];if(i&&"\n"!==i)return!1;if(n){if(o!==n)return!1}else if(o!==t.DIRECTIVES_END&&o!==t.DOCUMENT_END)return!1;const s=e[r+1],a=e[r+2];if(s!==o||a!==o)return!1;const u=e[r+3];return!u||"\n"===u||"\t"===u||" "===u}static endOfIdentifier(e,t){let r=e[t];const n="<"===r,o=n?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;r&&-1===o.indexOf(r);)r=e[t+=1];return n&&">"===r&&(t+=1),t}static endOfIndent(e,t){let r=e[t];for(;" "===r;)r=e[t+=1];return t}static endOfLine(e,t){let r=e[t];for(;r&&"\n"!==r;)r=e[t+=1];return t}static endOfWhiteSpace(e,t){let r=e[t];for(;"\t"===r||" "===r;)r=e[t+=1];return t}static startOfLine(e,t){let r=e[t-1];if("\n"===r)return t;for(;r&&"\n"!==r;)r=e[t-=1];return t+1}static endOfBlockIndent(t,r,n){const o=e.endOfIndent(t,n);if(o>n+r)return o;{const r=e.endOfWhiteSpace(t,o),n=t[r];if(!n||"\n"===n)return r}return null}static atBlank(e,t,r){const n=e[t];return"\n"===n||"\t"===n||" "===n||r&&!n}static nextNodeIsIndented(e,t,r){return!(!e||t<0)&&(t>0||r&&"-"===e)}static normalizeOffset(t,r){const n=t[r];return n?"\n"!==n&&"\n"===t[r-1]?r-1:e.endOfWhiteSpace(t,r):r}static foldNewline(t,r,n){let o=0,i=!1,s="",a=t[r+1];for(;" "===a||"\t"===a||"\n"===a;){switch(a){case"\n":o=0,r+=1,s+="\n";break;case"\t":o<=n&&(i=!0),r=e.endOfWhiteSpace(t,r+2)-1;break;case" ":o+=1,r+=1}a=t[r+1]}return s||(s=" "),a&&o<=n&&(i=!0),{fold:s,offset:r,error:i}}constructor(e,t,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=t||[],this.type=e,this.value=null}getPropValue(e,t,r){if(!this.context)return null;const{src:n}=this.context,o=this.props[e];return o&&n[o.start]===t?n.slice(o.start+(r?1:0),o.end):null}get anchor(){for(let e=0;e0?e.join("\n"):null}commentHasRequiredWhitespace(t){const{src:r}=this.context;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;const{end:n}=this.valueRange;return t!==n||e.atBlank(r,n-1)}get hasComment(){if(this.context){const{src:e}=this.context;for(let r=0;rr.setOrigRange(e,t))),t}toString(){const{context:{src:t},range:r,value:n}=this;if(null!=n)return n;const o=t.slice(r.start,r.end);return e.addStringTerminator(t,r.end,o)}},c=class extends Error{constructor(e,t,r){if(!(r&&t instanceof u))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;const e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new a(this.offset,this.offset+1);const t=e&&i(this.offset,e);if(t){const e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){const{line:t,col:r}=this.linePos.start;this.message+=` at line ${t}, column ${r}`;const n=e&&s(this.linePos,e);n&&(this.message+=`:\n\n${n}\n`)}delete this.source}},l=class extends c{constructor(e,t){super("YAMLSemanticError",e,t)}};e.Char=t,e.Node=u,e.PlainValue=class e extends u{static endOfLine(e,t,r){let n=e[t],o=t;for(;n&&"\n"!==n&&(!r||"["!==n&&"]"!==n&&"{"!==n&&"}"!==n&&","!==n);){const t=e[o+1];if(":"===n&&(!t||"\n"===t||"\t"===t||" "===t||r&&","===t))break;if((" "===n||"\t"===n)&&"#"===t)break;o+=1,n=t}return o}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{src:r}=this.context;let n=r[t-1];for(;en?r.slice(n,s+1):e)}else o+=e}const i=r[e];switch(i){case"\t":return{errors:[new l(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":return{errors:[new l(this,`Plain value cannot start with reserved character ${i}`)],str:o};default:return o}}parseBlockValue(t){const{indent:r,inFlow:n,src:o}=this.context;let i=t,s=t;for(let a=o[i];"\n"===a&&!u.atDocumentBoundary(o,i+1);a=o[i]){const t=u.endOfBlockIndent(o,r,i+1);if(null===t||"#"===o[t])break;"\n"===o[t]?i=t:(s=e.endOfLine(o,t,n),i=s)}return this.valueRange.isEmpty()&&(this.valueRange.start=t),this.valueRange.end=s,s}parse(t,r){this.context=t;const{inFlow:n,src:o}=t;let i=r;const s=o[i];return s&&"#"!==s&&"\n"!==s&&(i=e.endOfLine(o,r,n)),this.valueRange=new a(r,i),i=u.endOfWhiteSpace(o,i),i=this.parseComment(i),this.hasComment&&!this.valueRange.isEmpty()||(i=this.parseBlockValue(i)),i}},e.Range=a,e.Type=r,e.YAMLError=c,e.YAMLReferenceError=class extends c{constructor(e,t){super("YAMLReferenceError",e,t)}},e.YAMLSemanticError=l,e.YAMLSyntaxError=class extends c{constructor(e,t){super("YAMLSyntaxError",e,t)}},e.YAMLWarning=class extends c{constructor(e,t){super("YAMLWarning",e,t)}},e._defineProperty=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.defaultTagPrefix="tag:yaml.org,2002:",e.defaultTags={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}}}),w=f({"node_modules/yaml/dist/resolveSeq-d03cb037.js"(e){var t=_();function r(e,t,r){return r?-1===r.indexOf("\n")?`${e} #${r}`:`${e}\n`+r.replace(/^/gm,`${t||""}#`):e}var n=class{};function o(e,t,r){if(Array.isArray(e))return e.map(((e,t)=>o(e,String(t),r)));if(e&&"function"==typeof e.toJSON){const n=r&&r.anchors&&r.anchors.get(e);n&&(r.onCreate=e=>{n.res=e,delete r.onCreate});const o=e.toJSON(t,r);return n&&r.onCreate&&r.onCreate(o),o}return r&&r.keep||"bigint"!=typeof e?e:Number(e)}var i=class extends n{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:o(this.value,e,t)}toString(){return String(this.value)}};function s(e,t,r){let n=r;for(let o=t.length-1;o>=0;--o){const e=t[o];if(Number.isInteger(e)&&e>=0){const t=[];t[e]=n,n=t}else{const t={};Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0}),n=t}}return e.createNode(n,!1)}var a=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done,u=class e extends n{constructor(e){super(),t._defineProperty(this,"items",[]),this.schema=e}addIn(t,r){if(a(t))this.add(r);else{const[n,...o]=t,i=this.get(n,!0);if(i instanceof e)i.addIn(o,r);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`);this.set(n,s(this.schema,o,r))}}}deleteIn([t,...r]){if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(n instanceof e)return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn([t,...r],n){const o=this.get(t,!0);return 0===r.length?!n&&o instanceof i?o.value:o:o instanceof e?o.getIn(r,n):void 0}hasAllNullValues(){return this.items.every((e=>{if(!e||"PAIR"!==e.type)return!1;const t=e.value;return null==t||t instanceof i&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}hasIn([t,...r]){if(0===r.length)return this.has(t);const n=this.get(t,!0);return n instanceof e&&n.hasIn(r)}setIn([t,...r],n){if(0===r.length)this.set(t,n);else{const o=this.get(t,!0);if(o instanceof e)o.setIn(r,n);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`);this.set(t,s(this.schema,r,n))}}}toJSON(){return null}toString(n,{blockItem:o,flowChars:i,isMap:s,itemIndent:a},u,c){const{indent:l,indentStep:f,stringify:h}=n,p=this.type===t.Type.FLOW_MAP||this.type===t.Type.FLOW_SEQ||n.inFlow;p&&(a+=f);const d=s&&this.hasAllNullValues();n=Object.assign({},n,{allNullValues:d,indent:a,inFlow:p,type:null});let m=!1,g=!1;const y=this.items.reduce(((e,t,o)=>{let i;t&&(!m&&t.spaceBefore&&e.push({type:"comment",str:""}),t.commentBefore&&t.commentBefore.match(/^.*$/gm).forEach((t=>{e.push({type:"comment",str:`#${t}`})})),t.comment&&(i=t.comment),p&&(!m&&t.spaceBefore||t.commentBefore||t.comment||t.key&&(t.key.commentBefore||t.key.comment)||t.value&&(t.value.commentBefore||t.value.comment))&&(g=!0)),m=!1;let s=h(t,n,(()=>i=null),(()=>m=!0));return p&&!g&&s.includes("\n")&&(g=!0),p&&oe.str));if(g||n.reduce(((e,t)=>e+t.length+2),2)>e.maxFlowStringSingleLineLength){v=t;for(const e of n)v+=e?`\n${f}${l}${e}`:"\n";v+=`\n${l}${r}`}else v=`${t} ${n.join(" ")} ${r}`}else{const e=y.map(o);v=e.shift();for(const t of e)v+=t?`\n${l}${t}`:"\n"}return this.comment?(v+="\n"+this.comment.replace(/^/gm,`${l}#`),u&&u()):m&&c&&c(),v}};function c(e){let t=e instanceof i?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}t._defineProperty(u,"maxFlowStringSingleLineLength",60);var l=class extends u{add(e){this.items.push(e)}delete(e){const t=c(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const r=c(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&n instanceof i?n.value:n}has(e){const t=c(e);return"number"==typeof t&&t"comment"===e.type?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,r):JSON.stringify(this)}},f=class e extends n{constructor(t,r=null){super(),this.key=t,this.value=r,this.type=e.Type.PAIR}get commentBefore(){return this.key instanceof n?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new i(null)),!(this.key instanceof n)){throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.")}this.key.commentBefore=e}addToJSMap(e,t){const r=o(this.key,"",e);if(t instanceof Map){const n=o(this.value,r,e);t.set(r,n)}else if(t instanceof Set)t.add(r);else{const i=((e,t,r)=>null===t?"":"object"!=typeof t?String(t):e instanceof n&&r&&r.doc?e.toString({anchors:Object.create(null),doc:r.doc,indent:"",indentStep:r.indentStep,inFlow:!0,inStringifyKey:!0,stringify:r.stringify}):JSON.stringify(t))(this.key,r,e),s=o(this.value,i,e);i in t?Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[i]=s}return t}toJSON(e,t){const r=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,r)}toString(e,o,s){if(!e||!e.doc)return JSON.stringify(this);const{indent:a,indentSeq:c,simpleKeys:f}=e.doc.options;let{key:h,value:p}=this,d=h instanceof n&&h.comment;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(h instanceof u){throw new Error("With simple keys, collection cannot be used as a key value")}}let m=!f&&(!h||d||(h instanceof n?h instanceof u||h.type===t.Type.BLOCK_FOLDED||h.type===t.Type.BLOCK_LITERAL:"object"==typeof h));const{doc:g,indent:y,indentStep:v,stringify:b}=e;e=Object.assign({},e,{implicitKey:!m,indent:y+v});let _=!1,w=b(h,e,(()=>d=null),(()=>_=!0));if(w=r(w,e.indent,d),!m&&w.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(e.allNullValues&&!f)return this.comment?(w=r(w,e.indent,this.comment),o&&o()):_&&!d&&s&&s(),e.inFlow&&!m?w:`? ${w}`;w=m?`? ${w}\n${y}:`:`${w}:`,this.comment&&(w=r(w,e.indent,this.comment),o&&o());let x="",E=null;if(p instanceof n){if(p.spaceBefore&&(x="\n"),p.commentBefore){x+=`\n${p.commentBefore.replace(/^/gm,`${e.indent}#`)}`}E=p.comment}else p&&"object"==typeof p&&(p=g.schema.createNode(p,!0));e.implicitKey=!1,!m&&!this.comment&&p instanceof i&&(e.indentAtStart=w.length+1),_=!1,!c&&a>=2&&!e.inFlow&&!m&&p instanceof l&&p.type!==t.Type.FLOW_SEQ&&!p.tag&&!g.anchors.getName(p)&&(e.indent=e.indent.substr(2));const S=b(p,e,(()=>E=null),(()=>_=!0));let A=" ";if(x||this.comment)A=`${x}\n${e.indent}`;else if(!m&&p instanceof u){("["===S[0]||"{"===S[0])&&!S.includes("\n")||(A=`\n${e.indent}`)}else"\n"===S[0]&&(A="");return _&&!E&&s&&s(),r(w+A+S,e.indent,E)}};t._defineProperty(f,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var h=(e,t)=>{if(e instanceof p){const r=t.get(e.source);return r.count*r.aliasCount}if(e instanceof u){let r=0;for(const n of e.items){const e=h(n,t);e>r&&(r=e)}return r}if(e instanceof f){const r=h(e.key,t),n=h(e.value,t);return Math.max(r,n)}return 1},p=class e extends n{static stringify({range:e,source:t},{anchors:r,doc:n,implicitKey:o,inStringifyKey:i}){let s=Object.keys(r).find((e=>r[e]===t));if(!s&&i&&(s=n.anchors.getName(t)||n.anchors.newName()),s)return`*${s}${o?" ":""}`;const a=n.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${a} [${e}]`)}constructor(e){super(),this.source=e,this.type=t.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,r){if(!r)return o(this.source,e,r);const{anchors:n,maxAliasCount:i}=r,s=n.get(this.source);if(!s||void 0===s.res){const e="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(i>=0&&(s.count+=1,0===s.aliasCount&&(s.aliasCount=h(this.source,n)),s.count*s.aliasCount>i)){const e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return s.res}toString(t){return e.stringify(this,t)}};function d(e,t){const r=t instanceof i?t.value:t;for(const n of e)if(n instanceof f){if(n.key===t||n.key===r)return n;if(n.key&&n.key.value===r)return n}}t._defineProperty(p,"default",!0);var m=class extends u{add(e,t){e?e instanceof f||(e=new f(e.key||e,e.value)):e=new f(e);const r=d(this.items,e.key),n=this.schema&&this.schema.sortMapEntries;if(r){if(!t)throw new Error(`Key ${e.key} already set`);r.value=e.value}else if(n){const t=this.items.findIndex((t=>n(e,t)<0));-1===t?this.items.push(e):this.items.splice(t,0,e)}else this.items.push(e)}delete(e){const t=d(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=d(this.items,e),n=r&&r.value;return!t&&n instanceof i?n.value:n}has(e){return!!d(this.items,e)}set(e,t){this.add(new f(e,t),!0)}toJSON(e,t,r){const n=r?new r:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(n);for(const o of this.items)o.addToJSMap(t,n);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const n of this.items)if(!(n instanceof f))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,r)}},g=class extends f{constructor(e){if(e instanceof f){let t=e.value;t instanceof l||(t=new l,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new i("<<"),new l);this.type=f.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:r}of this.value.items){if(!(r instanceof m))throw new Error("Merge sources must be maps");const n=r.toJSON(null,e,Map);for(const[e,r]of n)t instanceof Map?t.has(e)||t.set(e,r):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}return t}toString(e,t){const r=this.value;if(r.items.length>1)return super.toString(e,t);this.value=r.items[0];const n=super.toString(e,t);return this.value=r,n}},y={defaultType:t.Type.BLOCK_LITERAL,lineWidth:76},v={defaultType:t.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function b(e,t,r){for(const{format:n,test:o,resolve:s}of t)if(o){const t=e.match(o);if(t){let e=s.apply(null,t);return e instanceof i||(e=new i(e)),n&&(e.format=n),e}}return r&&(e=r(e)),new i(e)}var w="flow",x="block",E="quoted",S=(e,t)=>{let r=e[t+1];for(;" "===r||"\t"===r;){do{r=e[t+=1]}while(r&&"\n"!==r);r=e[t+1]}return t};function A(e,t,r,{indentAtStart:n,lineWidth:o=80,minContentWidth:i=20,onFold:s,onOverflow:a}){if(!o||o<0)return e;const u=Math.max(1+i,1+o-t.length);if(e.length<=u)return e;const c=[],l={};let f,h,p=o-t.length;"number"==typeof n&&(n>o-Math.max(2,i)?c.push(0):p=o-n);let d=!1,m=-1,g=-1,y=-1;r===x&&(m=S(e,m),-1!==m&&(p=m+u));for(let b;b=e[m+=1];){if(r===E&&"\\"===b){switch(g=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}y=m}if("\n"===b)r===x&&(m=S(e,m)),p=m+u,f=void 0;else{if(" "===b&&h&&" "!==h&&"\n"!==h&&"\t"!==h){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(f=m)}if(m>=p)if(f)c.push(f),p=f+u,f=void 0;else if(r===E){for(;" "===h||"\t"===h;)h=b,b=e[m+=1],d=!0;const t=m>y+1?m-2:g-1;if(l[t])return e;c.push(t),l[t]=!0,p=t+u,f=void 0}else d=!0}h=b}if(d&&a&&a(),0===c.length)return e;s&&s();let v=e.slice(0,c[0]);for(let b=0;be?Object.assign({indentAtStart:e},v.fold):v.fold,k=e=>/^(%|---|\.\.\.)/m.test(e);function O(e,t){const{implicitKey:r}=t,{jsonEncoding:n,minMultiLineLength:o}=v.doubleQuoted,i=JSON.stringify(e);if(n)return i;const s=t.indent||(k(e)?" ":"");let a="",u=0;for(let c=0,l=i[c];l;l=i[++c])if(" "===l&&"\\"===i[c+1]&&"n"===i[c+2]&&(a+=i.slice(u,c)+"\\ ",c+=1,u=c,l="\\"),"\\"===l)switch(i[c+1]){case"u":{a+=i.slice(u,c);const e=i.substr(c+2,4);switch(e){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===e.substr(0,2)?a+="\\x"+e.substr(2):a+=i.substr(c,6)}c+=5,u=c+1}break;case"n":if(r||'"'===i[c+2]||i.lengthn)return!0;if(s=i+1,o-s<=n)return!1}return!0}(n,v.fold.lineWidth,a.length));let l=c?"|":">";if(!n)return l+"\n";let f="",h="";if(n=n.replace(/[\n\t ]*$/,(e=>{const t=e.indexOf("\n");return-1===t?l+="-":n!==e&&t===e.length-1||(l+="+",s&&s()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(e=>{-1!==e.indexOf(" ")&&(l+=u);const t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,`$&${a}`)),f&&(f=f.replace(/\n+/g,`$&${a}`)),e&&(l+=" #"+e.replace(/ ?[\r\n]+/g," "),i&&i()),!n)return`${l}${u}\n${a}${h}`;if(c)return n=n.replace(/\n+/g,`$&${a}`),`${l}\n${a}${f}${n}${h}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);const p=A(`${f}${n}${h}`,a,x,v.fold);return`${l}\n${a}${p}`}function C(e,r){let n,o,i;switch(r.type){case t.Type.FLOW_MAP:n="}",o="flow map";break;case t.Type.FLOW_SEQ:n="]",o="flow sequence";break;default:return void e.push(new t.YAMLSemanticError(r,"Not a flow collection!?"))}for(let s=r.items.length-1;s>=0;--s){const e=r.items[s];if(!e||e.type!==t.Type.COMMENT){i=e;break}}if(i&&i.char!==n){const s=`Expected ${o} to end with ${n}`;let a;"number"==typeof i.offset?(a=new t.YAMLSemanticError(r,s),a.offset=i.offset+1):(a=new t.YAMLSemanticError(i,s),i.range&&i.range.end&&(a.offset=i.range.end-i.range.start)),e.push(a)}}function T(e,r){const n=r.context.src[r.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){const n="Comments must be separated from other tokens by white space characters";e.push(new t.YAMLSemanticError(r,n))}}function N(e,r){const n=String(r),o=n.substr(0,8)+"..."+n.substr(-8);return new t.YAMLSemanticError(e,`The "${o}" key is too long`)}function I(e,t){for(const{afterKey:r,before:n,comment:o}of t){let t=e.items[n];t?(r&&t.value&&(t=t.value),void 0===o?!r&&t.commentBefore||(t.spaceBefore=!0):t.commentBefore?t.commentBefore+="\n"+o:t.commentBefore=o):void 0!==o&&(e.comment?e.comment+="\n"+o:e.comment=o)}}function R(e,t){const r=t.strValue;return r?"string"==typeof r?r:(r.errors.forEach((r=>{r.source||(r.source=t),e.errors.push(r)})),r.str):""}function M(e,r){const{tag:n,type:o}=r;let i=!1;if(n){const{handle:o,suffix:a,verbatim:u}=n;if(u){if("!"!==u&&"!!"!==u)return u;const n=`Verbatim tags aren't resolved, so ${u} is invalid.`;e.errors.push(new t.YAMLSemanticError(r,n))}else if("!"!==o||a)try{return function(e,r){const{handle:n,suffix:o}=r.tag;let i=e.tagPrefixes.find((e=>e.handle===n));if(!i){const o=e.getDefaults().tagPrefixes;if(o&&(i=o.find((e=>e.handle===n))),!i)throw new t.YAMLSemanticError(r,`The ${n} tag handle is non-default and was not declared.`)}if(!o)throw new t.YAMLSemanticError(r,`The ${n} tag has no suffix.`);if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===o[0])return e.warnings.push(new t.YAMLWarning(r,"YAML 1.0 ^ tag expansion is not supported")),o;if(/[:/]/.test(o)){const e=o.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${o}`}}return i.prefix+decodeURIComponent(o)}(e,r)}catch(s){e.errors.push(s)}else i=!0}switch(o){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:case t.Type.QUOTE_DOUBLE:case t.Type.QUOTE_SINGLE:return t.defaultTags.STR;case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;case t.Type.PLAIN:return i?t.defaultTags.STR:null;default:return null}}function L(e,t,r){const{tags:n}=e.schema,o=[];for(const a of n)if(a.tag===r){if(!a.test){const r=a.resolve(e,t);return r instanceof u?r:new i(r)}o.push(a)}const s=R(e,t);return"string"==typeof s&&o.length>0?b(s,o,n.scalarFallback):null}function D(e,r,n){try{const t=L(e,r,n);if(t)return n&&r.tag&&(t.tag=n),t}catch(o){return o.source||(o.source=r),e.errors.push(o),null}try{const o=function({type:e}){switch(e){case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;default:return t.defaultTags.STR}}(r);if(!o)throw new Error(`The tag ${n} is unavailable`);const i=`The tag ${n} is unavailable, falling back to ${o}`;e.warnings.push(new t.YAMLWarning(r,i));const s=L(e,r,o);return s.tag=n,s}catch(o){const n=new t.YAMLReferenceError(r,o.message);return n.stack=o.stack,e.errors.push(n),null}}function U(e,r){const n={before:[],after:[]};let o=!1,i=!1;const s=(e=>{if(!e)return!1;const{type:r}=e;return r===t.Type.MAP_KEY||r===t.Type.MAP_VALUE||r===t.Type.SEQ_ITEM})(r.context.parent)?r.context.parent.props.concat(r.props):r.props;for(const{start:a,end:u}of s)switch(r.context.src[a]){case t.Char.COMMENT:{if(!r.commentHasRequiredWhitespace(a)){const n="Comments must be separated from other tokens by white space characters";e.push(new t.YAMLSemanticError(r,n))}const{header:o,valueRange:i}=r;(i&&(a>i.start||o&&a>o.start)?n.after:n.before).push(r.context.src.slice(a+1,u));break}case t.Char.ANCHOR:if(o){const n="A node can have at most one anchor";e.push(new t.YAMLSemanticError(r,n))}o=!0;break;case t.Char.TAG:if(i){const n="A node can have at most one tag";e.push(new t.YAMLSemanticError(r,n))}i=!0}return{comments:n,hasAnchor:o,hasTag:i}}function F(e,r){if(!r)return null;r.error&&e.errors.push(r.error);const{comments:n,hasAnchor:o,hasTag:i}=U(e.errors,r);if(o){const{anchors:t}=e,n=r.anchor,o=t.getNode(n);o&&(t.map[t.newName(n)]=o),t.map[n]=r}if(r.type===t.Type.ALIAS&&(o||i)){const n="An alias node must not specify any properties";e.errors.push(new t.YAMLSemanticError(r,n))}const s=function(e,r){const{anchors:n,errors:o,schema:i}=e;if(r.type===t.Type.ALIAS){const e=r.rawValue,i=n.getNode(e);if(!i){const n=`Aliased anchor not found: ${e}`;return o.push(new t.YAMLReferenceError(r,n)),null}const s=new p(i);return n._cstAliases.push(s),s}const s=M(e,r);if(s)return D(e,r,s);if(r.type!==t.Type.PLAIN){const e=`Failed to resolve ${r.type} node here`;return o.push(new t.YAMLSyntaxError(r,e)),null}try{return b(R(e,r),i.tags,i.tags.scalarFallback)}catch(a){return a.source||(a.source=r),o.push(a),null}}(e,r);if(s){s.range=[r.range.start,r.range.end],e.options.keepCstNodes&&(s.cstNode=r),e.options.keepNodeTypes&&(s.type=r.type);const t=n.before.join("\n");t&&(s.commentBefore=s.commentBefore?`${s.commentBefore}\n${t}`:t);const o=n.after.join("\n");o&&(s.comment=s.comment?`${s.comment}\n${o}`:o)}return r.resolved=s}function B(e,r){if(!(({context:{lineStart:e,node:r,src:n},props:o})=>{if(0===o.length)return!1;const{start:i}=o[0];if(r&&i>r.valueRange.start)return!1;if(n[i]!==t.Char.COMMENT)return!1;for(let t=e;t0){n=new t.PlainValue(t.Type.PLAIN,[]),n.context={parent:u,src:u.context.src};const e=u.range.start+1;if(n.range={start:e,end:e},n.valueRange={start:e,end:e},"number"==typeof u.range.origStart){const e=u.range.origStart+1;n.range.origStart=n.range.origEnd=e,n.valueRange.origStart=n.valueRange.origEnd=e}}const a=new f(i,F(e,n));B(u,a),o.push(a),i&&"number"==typeof s&&u.range.start>s+1024&&e.errors.push(N(r,i)),i=void 0,s=null}break;default:void 0!==i&&o.push(new f(i)),i=F(e,u),s=u.range.start,u.error&&e.errors.push(u.error);e:for(let n=a+1;;++n){const o=r.items[n];switch(o&&o.type){case t.Type.BLANK_LINE:case t.Type.COMMENT:continue e;case t.Type.MAP_VALUE:break e;default:{const r="Implicit map keys need to be followed by map values";e.errors.push(new t.YAMLSemanticError(u,r));break e}}}if(u.valueRangeContainsNewline){const r="Implicit map keys need to be on a single line";e.errors.push(new t.YAMLSemanticError(u,r))}}}void 0!==i&&o.push(new f(i));return{comments:n,items:o}}(e,r),i=new m;i.items=o,I(i,n);let s=!1;for(let a=0;a{if(e instanceof p){const{type:r}=e.source;return r!==t.Type.MAP&&r!==t.Type.FLOW_MAP&&(i="Merge nodes aliases can only point to maps")}return i="Merge nodes can only have Alias nodes as values"})),i&&e.errors.push(new t.YAMLSemanticError(r,i))}else for(let i=a+1;ia+1024&&e.errors.push(N(r,i));const{src:o}=c.context;for(let r=a;re instanceof f&&e.key instanceof u))){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new t.YAMLWarning(r,n))}return r.resolved=i,i},e.resolveString=R,e.strOptions=v,e.stringifyNumber=function({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let o=JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(o)){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let r=t-(o.length-e-1);for(;r-- >0;)o+="0"}return o},e.stringifyString=function(e,r,n,o){const{defaultType:i}=v,{implicitKey:s,inFlow:a}=r;let{type:u,value:c}=e;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));const l=i=>{switch(i){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return j(e,r,n,o);case t.Type.QUOTE_DOUBLE:return O(c,r);case t.Type.QUOTE_SINGLE:return P(c,r);case t.Type.PLAIN:return function(e,r,n,o){const{comment:i,type:s,value:a}=e,{actualString:u,implicitKey:c,indent:l,inFlow:f}=r;if(c&&/[\n[\]{},]/.test(a)||f&&/[[\]{},]/.test(a))return O(a,r);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return c||f||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?P(a,r):O(a,r):j(e,r,n,o);if(!c&&!f&&s!==t.Type.PLAIN&&-1!==a.indexOf("\n"))return j(e,r,n,o);if(""===l&&k(a))return r.forceBlockIndent=!0,j(e,r,n,o);const h=a.replace(/\n+/g,`$&\n${l}`);if(u){const{tags:e}=r.doc.schema;if("string"!=typeof b(h,e,e.scalarFallback).value)return O(a,r)}const p=c?h:A(h,l,w,$(r));return!i||f||-1===p.indexOf("\n")&&-1===i.indexOf("\n")?p:(n&&n(),function(e,t,r){return r?`#${r.replace(/[\s\S]^/gm,`$&${t}#`)}\n${t}${e}`:e}(p,l,i))}(e,r,n,o);default:return null}};u!==t.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?u=t.Type.QUOTE_DOUBLE:!s&&!a||u!==t.Type.BLOCK_FOLDED&&u!==t.Type.BLOCK_LITERAL||(u=t.Type.QUOTE_DOUBLE);let f=l(u);if(null===f&&(f=l(i),null===f))throw new Error(`Unsupported default string type ${i}`);return f},e.toJSON=o}}),x=f({"node_modules/yaml/dist/warnings-1000a372.js"(e){var t=_(),r=w(),n={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,n)=>{const o=r.resolveString(e,n);if("function"==typeof Buffer)return Buffer.from(o,"base64");if("function"==typeof atob){const e=atob(o.replace(/[\n\r]/g,"")),t=new Uint8Array(e.length);for(let r=0;r{let u;if("function"==typeof Buffer)u=o instanceof Buffer?o.toString("base64"):Buffer.from(o.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t1){const e="Each pair must have its own sequence indicator";throw new t.YAMLSemanticError(n,e)}const o=e.items[0]||new r.Pair;e.commentBefore&&(o.commentBefore=o.commentBefore?`${e.commentBefore}\n${o.commentBefore}`:e.commentBefore),e.comment&&(o.comment=o.comment?`${e.comment}\n${o.comment}`:e.comment),e=o}o.items[i]=e instanceof r.Pair?e:new r.Pair(e)}}return o}function i(e,t,n){const o=new r.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";for(const r of t){let t,i;if(Array.isArray(r)){if(2!==r.length)throw new TypeError(`Expected [key, value] tuple: ${r}`);t=r[0],i=r[1]}else if(r&&r instanceof Object){const e=Object.keys(r);if(1!==e.length)throw new TypeError(`Expected { key: value } tuple: ${r}`);t=e[0],i=r[t]}else t=r;const s=e.createPair(t,i,n);o.items.push(s)}return o}var s={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o,createNode:i},a=class e extends r.YAMLSeq{constructor(){super(),t._defineProperty(this,"add",r.YAMLMap.prototype.add.bind(this)),t._defineProperty(this,"delete",r.YAMLMap.prototype.delete.bind(this)),t._defineProperty(this,"get",r.YAMLMap.prototype.get.bind(this)),t._defineProperty(this,"has",r.YAMLMap.prototype.has.bind(this)),t._defineProperty(this,"set",r.YAMLMap.prototype.set.bind(this)),this.tag=e.tag}toJSON(e,t){const n=new Map;t&&t.onCreate&&t.onCreate(n);for(const o of this.items){let e,i;if(o instanceof r.Pair?(e=r.toJSON(o.key,"",t),i=r.toJSON(o.value,e,t)):e=r.toJSON(o,"",t),n.has(e))throw new Error("Ordered maps must not include duplicate keys");n.set(e,i)}return n}};t._defineProperty(a,"tag","tag:yaml.org,2002:omap");var u={identify:e=>e instanceof Map,nodeClass:a,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,n){const i=o(e,n),s=[];for(const{key:o}of i.items)if(o instanceof r.Scalar){if(s.includes(o.value)){const e="Ordered maps must not include duplicate keys";throw new t.YAMLSemanticError(n,e)}s.push(o.value)}return Object.assign(new a,i)},createNode:function(e,t,r){const n=i(e,t,r),o=new a;return o.items=n.items,o}},c=class e extends r.YAMLMap{constructor(){super(),this.tag=e.tag}add(e){const t=e instanceof r.Pair?e:new r.Pair(e);r.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=r.findPair(this.items,e);return!t&&n instanceof r.Pair?n.key instanceof r.Scalar?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=r.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new r.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,r);throw new Error("Set items must all have null values")}};t._defineProperty(c,"tag","tag:yaml.org,2002:set");var l={identify:e=>e instanceof Set,nodeClass:c,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,n){const o=r.resolveMap(e,n);if(!o.hasAllNullValues())throw new t.YAMLSemanticError(n,"Set items must all have null values");return Object.assign(new c,o)},createNode:function(e,t,r){const n=new c;for(const o of t)n.items.push(e.createPair(o,null,r));return n}},f=(e,t)=>{const r=t.split(":").reduce(((e,t)=>60*e+Number(t)),0);return"-"===e?-r:r},h=({value:e})=>{if(isNaN(e)||!isFinite(e))return r.stringifyNumber(e);let t="";e<0&&(t="-",e=Math.abs(e));const n=[e%60];return e<60?n.unshift(0):(e=Math.round((e-n[0])/60),n.unshift(e%60),e>=60&&(e=Math.round((e-n[0])/60),n.unshift(e))),t+n.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")},p={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,r)=>f(t,r.replace(/_/g,"")),stringify:h},d={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(e,t,r)=>f(t,r.replace(/_/g,"")),stringify:h},m={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(e,t,r,n,o,i,s,a,u)=>{a&&(a=(a+"00").substr(1,3));let c=Date.UTC(t,r-1,n,o||0,i||0,s||0,a||0);if(u&&"Z"!==u){let e=f(u[0],u.slice(1));Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function g(e){const t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function y(e,t){if(g(!1)){const r="undefined"!=typeof process&&process.emitWarning;r?r(e,t):console.warn(t?`${t}: ${e}`:e)}}var v={};e.binary=n,e.floatTime=d,e.intTime=p,e.omap=u,e.pairs=s,e.set=l,e.timestamp=m,e.warn=y,e.warnFileDeprecation=function(e){if(g(!0)){y(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/")}' will be removed in a future release.`,"DeprecationWarning")}},e.warnOptionDeprecation=function(e,t){if(!v[e]&&g(!0)){v[e]=!0;let r=`The option '${e}' will be removed in a future release`;r+=t?`, use '${t}' instead.`:".",y(r,"DeprecationWarning")}}}}),E=f({"node_modules/yaml/dist/Schema-88e323a7.js"(e){var t=_(),r=w(),n=x();var o={createNode:function(e,t,n){const o=new r.YAMLMap(e);if(t instanceof Map)for(const[r,i]of t)o.items.push(e.createPair(r,i,n));else if(t&&"object"==typeof t)for(const r of Object.keys(t))o.items.push(e.createPair(r,t[r],n));return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o},default:!0,nodeClass:r.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:r.resolveMap};var i={createNode:function(e,t,n){const o=new r.YAMLSeq(e);if(t&&t[Symbol.iterator])for(const r of t){const t=e.createNode(r,n.wrapScalars,null,n);o.items.push(t)}return o},default:!0,nodeClass:r.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:r.resolveSeq},s={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:r.resolveString,stringify:(e,t,n,o)=>(t=Object.assign({actualString:!0},t),r.stringifyString(e,t,n,o)),options:r.strOptions},a=[o,i,s],u=e=>"bigint"==typeof e||Number.isInteger(e),c=(e,t,n)=>r.intOptions.asBigInt?BigInt(e):parseInt(t,n);function l(e,t,n){const{value:o}=e;return u(o)&&o>=0?n+o.toString(t):r.stringifyNumber(e)}var f={identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new r.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:r.nullOptions,stringify:()=>r.nullOptions.nullStr},h={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>"t"===e[0]||"T"===e[0],options:r.boolOptions,stringify:({value:e})=>e?r.boolOptions.trueStr:r.boolOptions.falseStr},p={identify:e=>u(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>c(e,t,8),options:r.intOptions,stringify:e=>l(e,8,"0o")},d={identify:u,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>c(e,e,10),options:r.intOptions,stringify:r.stringifyNumber},m={identify:e=>u(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>c(e,t,16),options:r.intOptions,stringify:e=>l(e,16,"0x")},g={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:r.stringifyNumber},y={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify:({value:e})=>Number(e).toExponential()},v={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,n){const o=t||n,i=new r.Scalar(parseFloat(e));return o&&"0"===o[o.length-1]&&(i.minFractionDigits=o.length),i},stringify:r.stringifyNumber},b=a.concat([f,h,p,d,m,g,y,v]),E=e=>"bigint"==typeof e||Number.isInteger(e),S=({value:e})=>JSON.stringify(e),A=[o,i,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:r.resolveString,stringify:S},{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new r.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:S},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:S},{identify:E,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>r.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>E(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:S}];A.scalarFallback=e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};var $=({value:e})=>e?r.boolOptions.trueStr:r.boolOptions.falseStr,k=e=>"bigint"==typeof e||Number.isInteger(e);function O(e,t,n){let o=t.replace(/_/g,"");if(r.intOptions.asBigInt){switch(n){case 2:o=`0b${o}`;break;case 8:o=`0o${o}`;break;case 16:o=`0x${o}`}const t=BigInt(o);return"-"===e?BigInt(-1)*t:t}const i=parseInt(o,n);return"-"===e?-1*i:i}function P(e,t,n){const{value:o}=e;if(k(o)){const e=o.toString(t);return o<0?"-"+n+e.substr(1):n+e}return r.stringifyNumber(e)}var j=a.concat([{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new r.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:r.nullOptions,stringify:()=>r.nullOptions.nullStr},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:r.boolOptions,stringify:$},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:r.boolOptions,stringify:$},{identify:k,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,r)=>O(t,r,2),stringify:e=>P(e,2,"0b")},{identify:k,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,r)=>O(t,r,8),stringify:e=>P(e,8,"0")},{identify:k,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,r)=>O(t,r,10),stringify:r.stringifyNumber},{identify:k,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,r)=>O(t,r,16),stringify:e=>P(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:r.stringifyNumber},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify:({value:e})=>Number(e).toExponential()},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){const n=new r.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:r.stringifyNumber}],n.binary,n.omap,n.pairs,n.set,n.intTime,n.floatTime,n.timestamp),C={core:b,failsafe:a,json:A,yaml11:j},T={binary:n.binary,bool:h,float:v,floatExp:y,floatNaN:g,floatTime:n.floatTime,int:d,intHex:m,intOct:p,intTime:n.intTime,map:o,null:f,omap:n.omap,pairs:n.pairs,seq:i,set:n.set,timestamp:n.timestamp};function N(e,t,n){if(e instanceof r.Node)return e;const{defaultPrefix:s,onTagObj:a,prevObjects:u,schema:c,wrapScalars:l}=n;t&&t.startsWith("!!")&&(t=s+t.slice(2));let f=function(e,t,r){if(t){const e=r.filter((e=>e.tag===t)),n=e.find((e=>!e.format))||e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find((t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format))}(e,t,c.tags);if(!f){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return l?new r.Scalar(e):e;f=e instanceof Map?o:e[Symbol.iterator]?i:o}a&&(a(f),delete n.onTagObj);const h={value:void 0,node:void 0};if(e&&"object"==typeof e&&u){const t=u.get(e);if(t){const e=new r.Alias(t);return n.aliasNodes.push(e),e}h.value=e,u.set(e,h)}return h.node=f.createNode?f.createNode(n.schema,e,n):l?new r.Scalar(e):e,t&&h.node instanceof r.Node&&(h.node.tag=t),h.node}var I=(e,t)=>e.keyt.key?1:0,R=class e{constructor({customTags:e,merge:t,schema:r,sortMapEntries:o,tags:i}){this.merge=!!t,this.name=r,this.sortMapEntries=!0===o?I:o||null,!e&&i&&n.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,r,n){let o=e[n.replace(/\W/g,"")];if(!o){const t=Object.keys(e).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${t}`)}if(Array.isArray(r))for(const i of r)o=o.concat(i);else"function"==typeof r&&(o=r(o.slice()));for(let i=0;iJSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${r}`)}o[i]=r}}return o}(C,T,e||i,r)}createNode(t,r,n,o){const i={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:r};return N(t,n,o?Object.assign(o,i):i)}createPair(e,t,n){n||(n={wrapScalars:!0});const o=this.createNode(e,n.wrapScalars,null,n),i=this.createNode(t,n.wrapScalars,null,n);return new r.Pair(o,i)}};t._defineProperty(R,"defaultPrefix",t.defaultTagPrefix),t._defineProperty(R,"defaultTags",t.defaultTags),e.Schema=R}}),S=f({"node_modules/yaml/dist/types.js"(e){var t=w(),r=E();_(),x(),e.Alias=t.Alias,e.Collection=t.Collection,e.Merge=t.Merge,e.Node=t.Node,e.Pair=t.Pair,e.Scalar=t.Scalar,e.YAMLMap=t.YAMLMap,e.YAMLSeq=t.YAMLSeq,e.binaryOptions=t.binaryOptions,e.boolOptions=t.boolOptions,e.intOptions=t.intOptions,e.nullOptions=t.nullOptions,e.strOptions=t.strOptions,e.Schema=r.Schema}}),A={},$=()=>A,k=class{constructor(){this.data={}}unregister(e){e?delete this.data[e]:this.data={}}register(e,t){this.data[e]=t}registerMany(e){Object.keys(e).forEach((t=>{this.data[t]=e[t]}))}get(e){return this.data[e]}list(){return this.data}},O={},P=O;O.defaultInvalidTypeProduct=void 0,O.defaultRandExpMax=10,O.maxRegexRetry=100,O.pruneProperties=[],O.ignoreProperties=[],O.ignoreMissingRefs=!1,O.failOnInvalidTypes=!0,O.failOnInvalidFormat=!0,O.alwaysFakeOptionals=!1,O.optionalsProbability=null,O.fixedProbabilities=!1,O.useExamplesValue=!1,O.useDefaultValue=!1,O.requiredOnly=!1,O.omitNulls=!1,O.minItems=0,O.maxItems=null,O.minLength=0,O.maxLength=null,O.resolveJsonPath=!1,O.reuseProperties=!1,O.fillProperties=!0,O.sortProperties=!1,O.replaceEmptyByRandomValue=!1,O.random=Math.random,O.minDateTime=new Date("1889-12-31T00:00:00.000Z"),O.maxDateTime=new Date("1970-01-01T00:00:01.000Z"),O.renderTitle=!0,O.renderDescription=!0,O.renderComment=!1;var j=new class extends k{constructor(){super(),this.data={...P},this._defaults=P}get defaults(){return{...this._defaults}}};function C(e,t){return"string"==typeof e?void 0!==t?j.register(e,t):j.get(e):j.registerMany(e)}C.getDefaults=()=>j.defaults;var T=C,N=["integer","number","string","boolean"],I=N.concat(["null"]),R={ALLOWED_TYPES:N,SCALAR_TYPES:I,ALL_TYPES:["array","object"].concat(I),MIN_NUMBER:-100,MAX_NUMBER:100,MIN_INTEGER:-1e8,MAX_INTEGER:1e8,MOST_NEAR_DATETIME:2524608e6},M=h(b(),1);function L(e,t){return T("random")()*(t-e)+e}function D(e,t,r,n,o=!1){return r=void 0===r?R.MIN_NUMBER:r,n=void 0===n?R.MAX_NUMBER:n,(t=void 0===t?n:t)<(e=void 0===e?r:e)&&(t+=e),o?L(e,t):function(e,t){return e=void 0===e?R.MIN_INTEGER:e,t=void 0===t?R.MAX_INTEGER:t,Math.floor(T("random")()*(t-e+1))+e}(e,t)}var U={pick:function(e){return e[Math.floor(T("random")()*e.length)]},date:function(e){if(e)return function(e){switch(e){case"seconds":return 60*D(0,60);case"minutes":return 612*D(15,50);case"hours":return 36123*D(12,72);case"days":return 86412345*D(7,30);case"weeks":return 604812345*D(4,52);case"months":return 2592012345*D(2,13);case"years":return 31104012345*D(1,20)}}(e);let t=T("minDateTime"),r=T("maxDateTime");"string"==typeof t&&(t=new Date(t)),"string"==typeof r&&(r=new Date(r));const n=(new Date).getTime();return"number"==typeof t&&(t=new Date(n+t)),"number"==typeof r&&(r=new Date(n+r)),new Date(L(t.getTime(),r.getTime()))},shuffle:function(e){let t,r,n=e.length;const o=e.slice();for(;n>0;)r=Math.floor(T("random")()*n),n-=1,t=o[n],o[n]=o[r],o[r]=t;return o},number:D,randexp:function(e){return M.default.prototype.max=T("defaultRandExpMax"),M.default.prototype.randInt=(e,t)=>e+Math.floor(T("random")()*(t-e+1)),new M.default(e).gen()}},F=/^(0|[1-9][0-9]*)$/;function B(e){return"string"==typeof e&&F.test(e)}function z(e){if(e.includes(" "))return new Date(e).toISOString().substr(0,10);let[t,r,n]=e.split("T")[0].split("-");return r=`0${Math.max(1,Math.min(12,r))}`.slice(-2),n=`0${Math.max(1,Math.min(31,n))}`.slice(-2),`${t}-${r}-${n}`}function q(e,t){return Object.keys(t).forEach((r=>{"object"!=typeof t[r]||null===t[r]?e[r]=t[r]:Array.isArray(t[r])?(e[r]=e[r]||[],t[r].forEach(((n,o)=>{"array"===e.type&&"array"===t.type?e[r][o]=q(e[r][o]||{},n):Array.isArray(e[r])&&-1===e[r].indexOf(n)&&e[r].push(n)}))):"object"!=typeof e[r]||null===e[r]||Array.isArray(e[r])?e[r]=q({},t[r]):e[r]=q(e[r],t[r])})),e}function V(e,t=new Map){if(!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){const r=[];return t.set(e,r),r.push(...e.map((e=>V(e,t)))),r}const r={};return t.set(e,r),Object.keys(e).reduce(((r,n)=>(r[n]=V(e[n],t),r)),r)}function H(){return U.pick([!1,!0,null,-1,NaN,Math.PI,1/0,void 0,[],{},Math.random(),Math.random().toString(36).substr(2)])}function W(e,t){const r=void 0!==t.minimum,n=void 0!==t.maximum;return(r||n)&&(!r||e>=t.minimum)&&(!n||e<=t.maximum)}function K(e){return"[object Object]"===Object.prototype.toString.call(e)&&!Object.keys(e).length}function Y(e,t){t=t.items||t;const r=T("alwaysFakeOptionals"),n=Array.isArray(t.required)&&t.required.includes(e)||r,o="function"==typeof t.thunk||t.additionalProperties&&"function"==typeof t.additionalProperties.thunk;return!n&&!o}var G={hasProperties:function(e,...t){return t.filter((t=>void 0!==e[t])).length>0},getLocalRef:function(e,t,r){if(t=decodeURIComponent(t),r&&r[t])return V(r[t]);const n=t.replace("#/","/").split("/");let o=e.$ref&&r&&r[e.$ref]||e;for(o||n[0]||(n[0]=e.$ref.split("#/")[0]),r&&t.includes("#/")&&r[n[0]]&&(o=r[n.shift()]),n[0]||n.shift();o&&n.length>0;){const e=n.shift();if(!o[e])throw new Error(`Prop not found: ${e} (${t})`);o=o[e]}return o},omitProps:function(e,t){return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,r)=>(Array.isArray(e[r])?t[r]=e[r].slice():t[r]=e[r]instanceof Object?q({},e[r]):e[r],t)),{})},typecast:function(e,t,r){const n={};switch(e||t.type){case"integer":case"number":if(void 0!==t.minimum&&(n.minimum=t.minimum),void 0!==t.maximum&&(n.maximum=t.maximum),t.enum){let e=Math.max(n.minimum||0,0),r=Math.min(n.maximum||1/0,1/0);t.exclusiveMinimum&&e===t.minimum&&(e+=t.multipleOf||1),t.exclusiveMaximum&&r===t.maximum&&(r-=t.multipleOf||1),(e||r!==1/0)&&(t.enum=t.enum.filter((t=>t>=e&&t<=r)))}break;case"string":n.minLength=T("minLength")||0,n.maxLength=T("maxLength")||Number.MAX_SAFE_INTEGER,void 0!==t.minLength&&(n.minLength=Math.max(n.minLength,t.minLength)),void 0!==t.maxLength&&(n.maxLength=Math.min(n.maxLength,t.maxLength))}let o=r(n);if(null==o)return null;switch(e||t.type){case"number":o=B(o)?parseFloat(o):o;break;case"integer":o=B(o)?parseInt(o,10):o;break;case"boolean":o=!!o;break;case"string":{if(function(e){return["number","boolean"].includes(typeof e)}(o))return o;o=String(o);const e=Math.max(n.minLength||0,0),r=Math.min(n.maxLength||1/0,1/0);let i,s=0;for(;o.lengthr){o=o.substr(0,r);const n=t.pattern?new RegExp(t.pattern):null;if(n&&!n.test(o)){let t=o;const r=T("maxRegexRetry"),i=Math.max(o.length-r,e);for(;t.length>i&&!n.test(t);)t=t.slice(0,-1),n.test(t)&&(o=t)}}switch(t.format){case"date-time":case"datetime":o=new Date(function(e){if(e.includes(" "))return new Date(e).toISOString().substr(0,10);const[t,r]=e.split("T");let[n,o,i]=t.split("-"),[s,a,u]=r.substr(0,8).split(":");return o=`0${Math.max(1,Math.min(12,o))}`.slice(-2),i=`0${Math.max(1,Math.min(31,i))}`.slice(-2),s=`0${Math.max(1,Math.min(23,s))}`.slice(-2),a=`0${Math.max(1,Math.min(59,a))}`.slice(-2),u=`0${Math.max(1,Math.min(59,u))}`.slice(-2),`${n}-${o}-${i}T${s}:${a}:${u}.000Z`}(o)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":o=new Date(z(o)).toISOString().substr(0,10);break;case"time":o=new Date(`1969-01-01 ${o}`).toISOString().substr(11)}break}}return o},merge:q,clone:V,short:function(e){const t=JSON.stringify(e),r=JSON.stringify(e,null,2);return t.length>400?`${r.substr(0,400)}...`:r},hasValue:function(e,t){return e.enum?e.enum.includes(t):e.const?e.const===t:void 0},notValue:function(e,t){const r=q({},t);if(void 0!==e.minimum&&(r.maximum=e.minimum,r.exclusiveMaximum=!0),void 0!==e.maximum&&(r.minimum=e.maximum>r.maximum?0:e.maximum,r.exclusiveMinimum=!0),void 0!==e.minLength&&(r.maxLength=e.minLength),void 0!==e.maxLength&&(r.minLength=e.maxLength>r.maxLength?0:e.maxLength),e.type)r.type=U.pick(R.SCALAR_TYPES.filter((t=>(Array.isArray(e.type)?e.type:[e.type]).every((e=>"number"===t||"integer"===t?"number"!==e&&"integer"!==e:t!==e)))));else if(e.enum){let t;do{t=H()}while(-1!==e.enum.indexOf(t));r.enum=[t]}return e.required&&r.properties&&e.required.forEach((e=>{delete r.properties[e]})),r},anyValue:H,validate:function(e,t){return!t.every((t=>W(e,t)))},validateValueForSchema:W,validateValueForOneOf:function(e,t){return 1===t.reduce(((t,r)=>t+(W(e,r)?1:0)),0)},isKey:function(e){return["enum","const","default","examples","required","definitions","items","properties"].includes(e)},template:function e(t,r){return Array.isArray(t)?t.map((t=>e(t,r))):("string"==typeof t&&(t=t.replace(/#\{([\w.-]+)\}/g,((e,t)=>r[t]))),t)},shouldClean:Y,clean:function e(t,r,n=!1){return t&&"object"==typeof t?Array.isArray(t)?t.map((t=>e(t,r?.items,!0))).filter((e=>void 0!==e)):(Object.keys(t).forEach((n=>{if(K(t[n]))Y(n,r)&&delete t[n];else{let o=r;r&&r.properties&&r.properties[n]&&(o=r.properties[n]);const i=e(t[n],o);K(i)||(t[n]=i)}void 0===t[n]&&delete t[n]})),Object.keys(t).length||!n?t:void 0):t},isEmpty:K,clampDate:z};var J=class{constructor(){this.registry={},this.support={}}reset(e){e?(delete this.registry[e],delete this.support[e]):(this.registry={},this.support={})}extend(e,t){var r;this.registry[e]=t(this.registry[e]),this.support[e]||(this.support[e]=(r=()=>this.registry[e],(e,t,n,o)=>{let i=e,s=[];"object"==typeof e&&(i=Object.keys(e)[0],Array.isArray(e[i])?s=e[i]:s.push(e[i]));const a=i.split(".");let u=r();for(;a.length>1;)u=u[a.shift()];return"function"==typeof(e="object"==typeof u?u[a[0]]:u)&&(e=e.apply(u,s.map((e=>G.template(e,o))))),"[object Object]"===Object.prototype.toString.call(e)&&Object.keys(e).forEach((t=>{if("function"==typeof e[t])throw new Error(`Cannot resolve value for '${n}: ${i}', given: ${e}`)})),e}))}define(e,t){this.support[e]=t}get(e){if(void 0===this.registry[e])throw new ReferenceError(`'${e}' dependency doesn't exist.`);return this.registry[e]}wrap(e){if(!("generate"in e)){const t=Object.keys(e),r={};let n=t.length;for(;n--;){const o=t[n].replace(/^x-/,""),i=this.support[o];if("function"==typeof i){Object.defineProperty(e,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(o,s)=>i.call(r,e[t[n]],e,t[n],o,s.slice())});break}}}return e}},Q=new k;var Z=function(e,t){if(void 0===e)return Q.list();if("string"==typeof e)if("function"==typeof t)Q.register(e,t);else{if(null!==t&&!1!==t)return Q.get(e);Q.unregister(e)}else Q.registerMany(e)},X=class extends Error{constructor(e,t){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=e,this.path=t}},ee={array:["additionalItems","items","maxItems","minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties","dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern","format"]};ee.number=ee.integer;var te=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"];function re(e,t,r){return Object.keys(e).filter((e=>{const n=te.indexOf(t)>-1;return!(!(r.indexOf(e)>-1)||n)})).length>0}var ne=function(e,t){const r=Object.keys(ee);for(let n=0;n.5};var ie=function(){return null};var se=function(e,t,r,n){const o=[];if(!e.items&&!e.additionalItems){if(G.hasProperties(e,"minItems","maxItems","uniqueItems")&&(0!==e.minItems||0!==e.maxItems))throw new X(`missing items for ${G.short(e)}`,t);return o}if(Array.isArray(e.items))return e.items.map(((e,o)=>{const i=t.concat(["items",o]);return n(e,i,r)}));let i=e.minItems,s=e.maxItems;const a=T("minItems"),u=T("maxItems");a&&(i=void 0===i?a:Math.min(a,i)),u&&(s=void 0===s?u:Math.min(u,s),s&&s>u&&(s=u),i&&i>u&&(i=s));const c=!0===T("alwaysFakeOptionals")?1:T("optionalsProbability"),l=T("alwaysFakeOptionals")||T("fixedProbabilities")||!1;let f=U.number(i,s,0,5);null!==c&&(f=Math.max(l?Math.round((s||f)*c):Math.abs(U.number(i,s)*c),i||0));const h="object"==typeof e.additionalItems?e.additionalItems:{};for(let p=o.length;p0){const i=U.number(0,f-1);o[i]=n(e.contains,t.concat(["items",i]),r)}return e.uniqueItems?function(e,t,r,n,o,i){const s=[],a=[];function u(e){const t=JSON.stringify(e.value);return-1===a.indexOf(t)&&(a.push(t),s.push(e),!0)}t.forEach(u);let c=100;for(;s.length!==t.length&&(u(i(r.items||n,e,o))||(c-=1),c););return s}(t.concat(["items"]),o,e,h,r,n):o};var ae=function(e){let t=void 0===e.minimum||e.minimum===-Number.MAX_VALUE?R.MIN_INTEGER:e.minimum,r=void 0===e.maximum||e.maximum===Number.MAX_VALUE?R.MAX_INTEGER:e.maximum;const n=e.multipleOf,o=n&&String(n).match(/e-(\d)|\.(\d+)$/);if(o){const e=(Math.random()*U.number(0,10)+1)*n,i=o[1]||o[2].length,s=parseFloat(e.toFixed(i)),a=U.number(t,r-1);return String(s).includes(".")?a+s:(a+s).toExponential()}if(n&&(r=Math.floor(r/n)*n,t=Math.ceil(t/n)*n),e.exclusiveMinimum&&t===e.minimum&&(t+=n||1),e.exclusiveMaximum&&r===e.maximum&&(r-=n||1),t>r)return NaN;if(n){let e=U.number(Math.floor(t/n),Math.floor(r/n))*n;for(;e(-1===a.indexOf(t)&&e.push(t),e)),[]),h=a.concat(f),p=u&&!0===e.additionalProperties?fe:e.additionalProperties;if(!u&&0===c.length&&0===l.length&&G.hasProperties(e,"minProperties","maxProperties","dependencies","required"))return null;if(!0===T("requiredOnly"))return a.forEach((e=>{i[e]&&(o[e]=i[e])})),n(o,t.concat(["properties"]),r,e);const d=!0===T("alwaysFakeOptionals")?1:T("optionalsProbability"),m=T("alwaysFakeOptionals")||T("fixedProbabilities")||!1,g=T("ignoreProperties")||[],y=T("reuseProperties"),v=T("fillProperties"),b=e.maxProperties||h.length+(u?U.number(1,5):0);let _=Math.max(e.minProperties||0,a.length),w=Math.max(0,h.length-_);1!==h.length||a.length||(_=Math.max(U.number(v?1:0,b),_)),null!==d&&(w=!0===m?Math.round(_-a.length+d*(h.length-_)):U.number(_-a.length,d*(h.length-_)));const x=U.shuffle(f).slice(0,w),E=f.filter((e=>-1!==x.indexOf(e))),S=null!==d||a.length===b?b:U.number(0,b),A=a.concat(U.shuffle(E).slice(0,S)).slice(0,b),$=[],k=[];if(e.dependencies&&(Object.keys(e.dependencies).forEach((t=>{const r=e.dependencies[t];if(-1!==A.indexOf(t))if(Array.isArray(r))r.forEach((e=>{-1===A.indexOf(e)&&A.push(e)}));else if(Array.isArray(r.oneOf||r.anyOf)){const e=r.oneOf||r.anyOf;k.push({prop:t,values:e})}else $.push(r)})),$.length))return delete e.dependencies,n({allOf:$.concat(e)},t.concat(["properties"]),r,e);const O=[],P=[];A.forEach((e=>{if(i[e]&&["{}","true"].includes(JSON.stringify(i[e].not)))return;for(let r=0;r{e.match(new RegExp(r))&&(t=!0,o[e]?G.merge(o[e],s[r]):o[U.randexp(e)]=s[r])})),!t){const t=s[e]||p;t&&!1!==p?o[s[e]?U.randexp(e):e]=i[e]||t:P.push(e)}}));let j=Object.keys(o).length+(v?0:O.length);const C=e=>U.randexp("_?[_a-f\\d]{1,3}"+(e?"\\$?":""));function N(e){let t;do{if(!e.length)break;t=e.shift()}while(o[t]);return t}let I=_;if(u&&!a.length&&(I=Math.max(null===d||p?U.number(v?1:0,b):0,_)),!E.length&&!w&&u&&!0===m&&v){const e=U.number(0,b);for(let t=0;t=I);){if(u)if(y&&c.length-j>I){let e,t=0;do{if(t+=1,t>1e3)break;e=N(a)||U.pick(c)}while(void 0!==o[e]);void 0===o[e]&&(o[e]=i[e],j+=1)}else if(l.length&&!p){const e=U.pick(l),t=U.randexp(e);o[t]||(o[t]=s[e],j+=1)}else{const e=N(a)||le(1)+C();o[e]||(o[e]=p||fe,j+=1)}for(let e=0;j<_&&eT("sortProperties")?t.localeCompare(r):e.indexOf(t)-e.indexOf(r))).reduce(((e,t)=>(e[t]=o[t],e)),{})}const M=n(R,t.concat(["properties"]),r,e);return k.forEach((o=>{for(const i of o.values)if(G.hasValue(i.properties[o.prop],M.value[o.prop])){Object.keys(i.properties).forEach((s=>{s!==o.prop&&G.merge(M.value,n(i.properties,t.concat(["properties"]),r,e).value)}));break}})),M};function pe(){const e=U.number(1,5);return le(e).join(" ")}var de=function(e=0,t=140){const r=Math.max(0,e),n=U.number(r,t);let o=pe();for(;o.lengthn&&(o=o.substr(0,n)),o};var me=function(){return[0,0,0,0].map((()=>U.number(0,255))).join(".")};var ge=function(){return U.date().toISOString()};var ye=function(){return ge().slice(0,10)};var ve=function(){return ge().slice(11)},be="[a-zA-Z][a-zA-Z0-9+-.]*",_e=`https?://{hostname}(?:${be})+`,we={email:"[a-zA-Z\\d][a-zA-Z\\d-]{1,13}[a-zA-Z\\d]@{hostname}",hostname:"[a-zA-Z]{1,33}\\.[a-z]{2,4}",ipv6:"[a-f\\d]{4}(:[a-f\\d]{4}){7}",uri:_e,slug:"[a-zA-Z\\d_-]+","uri-reference":`${_e}(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?`,"uri-template":_e.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${be.replace("]*","/]*")}|~[01]))+`,uuid:"^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",duration:"^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$"};we.iri=we["uri-reference"],we["iri-reference"]=we["uri-reference"],we["idn-email"]=we.email,we["idn-hostname"]=we.hostname;var xe=new RegExp(`\\{(${Object.keys(we).join("|")})\\}`);var Ee=function(e){return U.randexp(we[e]).replace(xe,((e,t)=>U.randexp(we[t])))};var Se=function(e){return G.typecast("string",e,(t=>e.format?function(e,t){const r=Z(e.format);if("function"==typeof r)return r(e);switch(e.format){case"date-time":case"datetime":return ge();case"date":return ye();case"time":return ve();case"ipv4":return me();case"regex":return".+?";case"email":case"hostname":case"ipv6":case"uri":case"uri-reference":case"iri":case"iri-reference":case"idn-email":case"idn-hostname":case"json-pointer":case"slug":case"uri-template":case"uuid":case"duration":return Ee(e.format);default:if(void 0===r){if(T("failOnInvalidFormat"))throw new Error(`unknown registry key ${G.short(e.format)}`);return t()}throw new Error(`unsupported format '${e.format}'`)}}(e,(()=>de(t.minLength,t.maxLength))):e.pattern?U.randexp(e.pattern):de(t.minLength,t.maxLength)))},Ae={boolean:oe,null:ie,array:se,integer:ue,number:ae,object:he,string:Se};function $e({$comment:e,title:t,description:r}){return Object.entries({comment:e,title:t,description:r}).filter((([,e])=>e)).reduce(((e,[t,r])=>(e[t]=r,e)),{})}var ke=function e(t,r,o,i){if((t=o(t,null,r))&&(t.oneOf||t.anyOf||t.allOf)&&(t=o(t,null,r)),!t)throw new Error(`Cannot traverse at '${r.join(".")}', given '${JSON.stringify(i)}'`);const s={...$e(t),schemaPath:r};if("properties"!==r[r.length-1]){if(T("useExamplesValue")&&Array.isArray(t.examples)){const e=t.examples.concat("default"in t?[t.default]:[]);return{value:G.typecast(null,t,(()=>U.pick(e))),context:s}}if(T("useExamplesValue")&&void 0!==t.example)return{value:G.typecast(null,t,(()=>t.example)),context:s};if(T("useDefaultValue")&&"default"in t&&(""!==t.default||!T("replaceEmptyByRandomValue")))return{value:t.default,context:s};if("template"in t)return{value:G.template(t.template,i),context:s};if("const"in t)return{value:t.const,context:s}}if(t.not&&"object"==typeof t.not&&(t=G.notValue(t.not,G.omitProps(t,["not"]))).type&&"object"===t.type){const{value:n,context:a}=e(t,r.concat(["not"]),o,i);return{value:G.clean(n,t,!1),context:{...s,items:a}}}if("function"==typeof t.thunk){const{value:n,context:a}=e(t.thunk(i),r,o);return{value:n,context:{...s,items:a}}}if(t.jsonPath)return{value:t,context:s};let a=t.type;if(Array.isArray(a)?a=U.pick(a):void 0===a&&(a=ne(t,r)||a,a&&(t.type=a)),"function"==typeof t.generate){const e=G.typecast(null,t,(()=>t.generate(i,r))),n=null===e?"null":typeof e;if(n===a||"number"===n&&"integer"===a||Array.isArray(e)&&"array"===a)return{value:e,context:s}}if("string"==typeof t.pattern)return{value:G.typecast("string",t,(()=>U.randexp(t.pattern))),context:s};if(Array.isArray(t.enum))return{value:G.typecast(null,t,(()=>U.pick(t.enum))),context:s};if("string"==typeof a){if(!Ae[a]){if(T("failOnInvalidTypes"))throw new X(`unknown primitive ${G.short(a)}`,r.concat(["type"]));{const n=T("defaultInvalidTypeProduct");return"string"==typeof n&&Ae[n]?{value:Ae[n](t,r,o,e),context:s}:{value:n,context:s}}}try{const n=Ae[a](t,r,o,e);return"array"===a?{value:n.map((({value:e})=>e)),context:{...s,items:n.map(Array.isArray(t.items)?({context:e})=>e:({context:e})=>({...e,schemaPath:e.schemaPath.slice(0,-1)}))}}:"object"===a?null!==n?{value:n.value,context:{...s,items:n.context}}:{value:{},context:s}:{value:n,context:s}}catch(n){if(void 0===n.path)throw new X(n.stack,r);throw n}}let u={},c={...s};Array.isArray(t)&&(u=[]);const l=T("pruneProperties")||[];return Object.keys(t).forEach((n=>{if(!l.includes(n)&&null!==t[n])if("object"==typeof t[n]&&"definitions"!==n){const{value:i,context:s}=e(t[n],r.concat([n]),o,u);u[n]=G.clean(i,t[n],!1),c[n]=s,null===u[n]&&T("omitNulls")&&(delete u[n],delete c[n])}else u[n]=t[n]})),{value:u,context:c}},Oe=({refs:e,schema:t,container:r,synchronous:n,refDepthMax:o,refDepthMin:i})=>{const s={},a={};let u,c,l=0;return s.resolveSchema=(f,h,p)=>{if(null==f)return null;if("function"==typeof f.generate)return f;if("string"==typeof(f.$id||f.id)&&(delete f.id,delete f.$id,delete f.$schema),"string"==typeof f.$ref){const r=Math.max(i,o)-1;if("#"===f.$ref||a[f.$ref]<0||u===f.$ref&&++l>r)return"#"!==f.$ref&&c&&c.length===p.length?G.getLocalRef(t,f.$ref,n&&e):(delete f.$ref,f);let s,h;if(void 0===a[f.$ref]&&(a[f.$ref]=U.number(i,o)-1),c=p,u=f.$ref,s=-1===f.$ref.indexOf("#/")?e[f.$ref]||null:G.getLocalRef(t,f.$ref,n&&e)||null,void 0!==s){if(!s&&!0!==T("ignoreMissingRefs"))throw new Error(`Reference not found: ${f.$ref}`);a[f.$ref]-=1,G.merge(f,s||{}),h=n&&s&&s.$ref}return h||delete f.$ref,f}if(Array.isArray(f.allOf)){const e=f.allOf;delete f.allOf,e.forEach((e=>{const t=s.resolveSchema(e,null,p);G.merge(f,"function"==typeof t.thunk?t.thunk(f):t),Array.isArray(f.allOf)&&s.resolveSchema(f,h,p)}))}if(Array.isArray(f.oneOf||f.anyOf)&&"dependencies"!==p[p.length-2]){const e=f.oneOf||f.anyOf;return f.enum&&f.oneOf&&(f.enum=f.enum.filter((t=>G.validate(t,e)))),{thunk(t){const r=G.omitProps(f,["anyOf","oneOf"]),n=U.pick(e);return G.merge(r,n),e.forEach((e=>{e.required&&e!==n&&e.required.forEach((e=>{if(n.required&&n.required.includes(e))return;const o=r.required&&r.required.includes(e);r.properties&&!o&&delete r.properties[e],t&&t.properties&&delete t.properties[e]}))})),r}}}if(Object.keys(f).forEach((e=>{!Array.isArray(f[e])&&"object"!=typeof f[e]||G.isKey(e)||(f[e]=s.resolveSchema(f[e],e,p.concat(e)))})),p){const e=p[p.length-1];if("properties"===e||"items"===e)return f}return r.wrap(f)},s};function Pe(e,t,r,n){if(!e||"object"!=typeof e)return e;if(r||(r={}),t||(t=e),Array.isArray(e))return e.map((e=>Pe(e,t,r,n)));if(e.jsonPath){const{JSONPath:o}=$(),i="object"!=typeof e.jsonPath?{path:e.jsonPath}:e.jsonPath;i.group=e.group||i.group||n,i.cycle=e.cycle||i.cycle||!1,i.reverse=e.reverse||i.reverse||!1,i.count=e.count||i.count||1;const s=`${i.group}__${i.path}`;return r[s]||(i.count>1?r[s]=o(i.path,t).slice(0,i.count):r[s]=o(i.path,t)),i.cycle||i.reverse?function(e,t){if(!Array.isArray(e))return e;const r=t?e.pop():e.shift();return t?e.unshift(r):e.push(r),r}(r[s],i.reverse):function(e){return Array.isArray(e)?U.pick(e):e}(r[s])}return Object.keys(e).forEach((n=>{e[n]=Pe(e[n],t,r,n)})),e}var je=function(e,t,r,o){if("[object Object]"!==Object.prototype.toString.call(t))throw new Error("Invalid input, expecting object but given "+typeof t);const i=T("refDepthMin")||0,s=T("refDepthMax")||3;try{const{resolveSchema:n}=Oe({refs:e,schema:t,container:r,synchronous:o,refDepthMin:i,refDepthMax:s}),a=ke(G.clone(t),[],n);return T("resolveJsonPath")?{value:Pe(a.value),context:a.context}:a}catch(n){throw n.path?new Error(`${n.message} in /${n.path.join("/")}`):n}};var Ce=function(e){return e.value},Te=h(S(),1),Ne=(Te.default.binaryOptions,Te.default.boolOptions,Te.default.intOptions,Te.default.nullOptions,Te.default.strOptions,Te.default.Schema,Te.default.Alias,Te.default.Collection,Te.default.Merge,Te.default.Node,Te.default.Pair,Te.default.Scalar,Te.default.YAMLMap),Ie=Te.default.YAMLSeq;function Re(e,t,r,n=r){const{title:o,description:i,comment:s}=function(e,t){return t.reduce(((e,t)=>t in e?e[t]:{}),e)}(e,t),a=[];T("renderTitle")&&o&&a.push(` ${o}`,""),T("renderDescription")&&i&&a.push(` ${i}`),T("renderComment")&&s&&a.push(` ${s}`),r.commentBefore=a.join("\n"),n instanceof Ne?n.items.forEach((r=>{Re(e,[...t,"items",r.key.value],r.key,r.value)})):n instanceof Ie&&n.items.forEach(((r,n)=>{Re(e,[...t,"items",n],r)}))}var Me=function({value:e,context:t}){const r=Me.createNode(e);Re(t,[],r);const n=new Me.Document;return n.contents=r,n.toString()},Le=new J;function De(){Le.define("autoIncrement",(function(e,t){if(!this.offset){const r=t.minimum||1,n=r+R.MAX_NUMBER,o=e.initialOffset||t.initialOffset;this.offset=o||U.number(r,n)}return e?this.offset++:t})),Le.define("sequentialDate",(function(e,t){if(this.now||(this.now=U.date()),e){if(t=this.now.toISOString(),-1===["seconds","minutes","hours","days","weeks","months","years"].indexOf(e=!0===e?"days":e))throw new Error(`Unsupported increment by ${G.short(e)}`);this.now.setTime(this.now.getTime()+U.date(e))}return t}))}function Ue(e,t){let r={};function n(e){if(!e||"object"!=typeof e)return;if(Array.isArray(e))return e.forEach(n);const t=e.$id||e.id;"string"!=typeof t||r[t]||(r[t]=e),Object.keys(e).forEach((t=>{n(e[t])}))}return Array.isArray(e)?e.forEach((e=>{r[e.$id||e.id]=e})):r=e||{},n(e),n(t),r}var Fe=(e,t,r)=>(console.debug("[json-schema-faker] calling JSONSchemaFaker() is deprecated, call either .generate() or .resolve()"),r&&console.debug("[json-schema-faker] local references are only supported by calling .resolve()"),Fe.generate(e,t));Fe.generateWithContext=(e,t)=>{const r=Ue(t,e);return je(r,e,Le,!0)},Fe.generate=(e,t)=>Ce(Fe.generateWithContext(e,t)),Fe.generateYAML=(e,t)=>Me(Fe.generateWithContext(e,t)),Fe.resolveWithContext=(e,t,r)=>{"string"==typeof t&&(r=t,t={}),r=`${(r=r||("undefined"!=typeof process&&"function"==typeof process.cwd?process.cwd():"")).replace(/\/+$/,"")}/`;const o=Ue(t,e),i={order:1,canRead(e){const t=e.url.replace("/:",":");return o[t]||o[t.split("/").pop()]},read(e,t){try{t(null,this.canRead(e))}catch(n){t(n)}}},{$RefParser:s}=$();return s.bundle(r,e,{resolve:{file:{order:100},http:{order:200},fixedRefs:i},dereference:{circular:"ignore"}}).then((e=>je(o,e,Le))).catch((e=>{throw new Error(`Error while resolving schema (${e.message})`)}))},Fe.resolve=(e,t,r)=>Fe.resolveWithContext(e,t,r).then(Ce),Fe.resolveYAML=(e,t,r)=>Fe.resolveWithContext(e,t,r).then(Me),De(),Fe.format=Z,Fe.option=T,Fe.random=U,Fe.extend=(e,t)=>(Le.extend(e,t),Fe),Fe.define=(e,t)=>(Le.define(e,t),Fe),Fe.reset=e=>(Le.reset(e),De(),Fe),Fe.locate=e=>Le.get(e),Fe.VERSION="0.5.7";var Be,ze={...Fe};"undefined"!=typeof $RefParser&&"undefined"!=typeof JSONPath&&(Be={...JSONPath,$RefParser:$RefParser},Object.assign(A,Be))},37817:(e,t,r)=>{"use strict";r.d(t,{xJ:()=>y});var n=r(37172);function o(e,t){const r=e[t];return"whitespace"===(null==r?void 0:r.type)?{inc:1,whitespaceToken:r}:{inc:0}}function i(e,t){const r=o(e,t),n=e[t+r.inc];return++r.inc,{whitespaceToken:r.whitespaceToken,consumedTokens:r.inc,token:n}}function s(e,t){return e[t+o(e,t).inc]}function a(e){return{includeValueTokens:!1,...e}}function u(e,t=e){return{start:e.offset,end:t.offset+t.raw.length}}function c(e){return"string"===e.type?{kind:"string",token:e,range:u(e)}:"number"===e.type?{kind:"number",token:e,range:u(e)}:{kind:"literal",token:e,range:u(e)}}function l(e,t,r,n){const o=e[t];if(!o)throw new Error(`Failed to parse JSON as token pos ${t}`);if(o.type!==r)throw new Error(`Failed to parse JSON at pos ${o.offset}, expected ${r} got ${o.type}`);if(n&&o.value!==n)throw new Error(`Failed to parse JSON at pos ${o.offset} of type ${r}, expected punctuation ${n} got ${o.value}`)}function f(e,t){let r=t;const n=o(e,r);r+=n.inc,l(e,r,"punctuator",":");const i=e[r++],s=o(e,r);return r+=s.inc,{node:{kind:"object-property-colon",range:u(e[t],e[r-1]),whitespaceBefore:n.whitespaceToken,punctuatorToken:i,whitespaceAfter:s.whitespaceToken},consumedTokens:r-t}}function h(e,t,r){const n=e[t];if("string"===(a=n).type||"number"===a.type||"literal"===a.type)return{consumedTokens:1,node:c(n)};if("punctuator"===n.type&&"{"===n.value)return function(e,t,r){var n;const a=[];let c,p=t;for(;p{const r=e;return r.offset=t,t+=e.raw.length,r}))}(n(e));let s=0;const u=o(i,s);s+=u.inc;const{consumedTokens:c,node:l}=h(i,s,r),f=r.options.includeValueTokens?i.slice(s,s+c):[];s+=c;const p=o(i,s);return s+=p.inc,{root:l,whitespaceBefore:u.whitespaceToken,valueTokens:f,whitespaceAfter:p.whitespaceToken}}(e);return{json:t||JSON.parse(e),jsonString:e,jsonDoc:r}}function d(e){const t=e,r=e,n=e;if(t.path&&Array.isArray(t.path))return t.path;if("string"==typeof r.dotPath)return function(e){if(!e.startsWith(".")&&!e.startsWith("["))throw new SyntaxError(`parsePath(): Invalid dot-path, must begin with "." or "[": ${e}`);if("."===e)return[];const t=()=>{throw new Error(`parsePath(): Invalid dot-path: ${e}`)},r=[],n=(e,t)=>-1===e&&-1===t?-1:-1===e?t:-1===t||efunction(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}(e)))}(n.pointerPath);throw new TypeError("parsePath(): Missing path argument")}function m(e,t){t=Math.min(Math.max(t,0),e.length);const{count:r,lastPos:n}=function(e,t,r){let n=0,o=0,i=0;for(;i=t)break;i=s+1,i`${e}`));if(!r){if(0===i.length)return{start:{offset:0,line:1,column:1},end:{offset:9,line:1,column:10}};throw new Error("No such path in undefined")}const s=e=>`${(e=>"."+i.slice(0,e).join("."))(e)} [query: ${i.join(".")}]`,a=i.reduce(((e,t,r)=>"object"===(null==e?void 0:e.kind)?(()=>{const n=e.children.find((e=>e.keyToken.value===t));if(!n)throw new Error(`No such property ${t} in ${s(r)}`);return o&&r===i.length-1?n:n.valueNode})():"array"===(null==e?void 0:e.kind)?(()=>{const n=Number(t);if(isNaN(n))throw new Error(`Invalid non-numeric array index "${t}" in array at ${s(r)}`);if(n<0||n>=e.children.length)throw new RangeError(`Index ${n} out-of-bounds in array of size ${e.children.length} at ${s(r)}`);return e.children[Number(t)].valueNode})():(()=>{throw new Error(`No such property ${t} in ${s(r)}`)})()),r.root),u="object-property"===a.kind?{start:a.keyToken.offset,end:a.keyToken.offset+a.keyToken.raw.length}:a.range;return{start:m(n,u.start),end:m(n,u.end)}}function y(e,t){return g("string"==typeof e?p(e):function(e,t=4){const r=p(JSON.stringify(null!=e?e:null,null,t));return void 0===e&&(r.json=void 0,r.jsonString="undefined",r.jsonDoc=void 0),r}(e),t)}},99571:(e,t,r)=>{"use strict";r.d(t,{N9:()=>L,oR:()=>P});var n=r(63696),o=r(34164);const i=e=>"number"==typeof e&&!isNaN(e),s=e=>"string"==typeof e,a=e=>"function"==typeof e,u=e=>s(e)||a(e)?e:null,c=e=>(0,n.isValidElement)(e)||s(e)||a(e)||i(e);function l(e){let{enter:t,exit:r,appendPosition:o=!1,collapse:i=!0,collapseDuration:s=300}=e;return function(e){let{children:a,position:u,preventExitTransition:c,done:l,nodeRef:f,isIn:h,playToast:p}=e;const d=o?`${t}--${u}`:t,m=o?`${r}--${u}`:r,g=(0,n.useRef)(0);return(0,n.useLayoutEffect)((()=>{const e=f.current,t=d.split(" "),r=n=>{n.target===f.current&&(p(),e.removeEventListener("animationend",r),e.removeEventListener("animationcancel",r),0===g.current&&"animationcancel"!==n.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)}),[]),(0,n.useEffect)((()=>{const e=f.current,t=()=>{e.removeEventListener("animationend",t),i?function(e,t,r){void 0===r&&(r=300);const{scrollHeight:n,style:o}=e;requestAnimationFrame((()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame((()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)}))}))}(e,l,s):l()};h||(c?t():(g.current=1,e.className+=` ${m}`,e.addEventListener("animationend",t)))}),[h]),n.createElement(n.Fragment,null,a)}}function f(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const h=new Map;let p=[];const d=new Set,m=e=>d.forEach((t=>t(e))),g=()=>h.size>0;function y(e,t){var r;if(t)return!(null==(r=h.get(t))||!r.isToastActive(e));let n=!1;return h.forEach((t=>{t.isToastActive(e)&&(n=!0)})),n}function v(e,t){c(e)&&(g()||p.push({content:e,options:t}),h.forEach((r=>{r.buildToast(e,t)})))}function b(e,t){h.forEach((r=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===r.id&&r.toggle(e,null==t?void 0:t.id):r.toggle(e,null==t?void 0:t.id)}))}function _(e){const{subscribe:t,getSnapshot:r,setProps:o}=(0,n.useRef)(function(e){const t=e.containerId||1;return{subscribe(r){const o=function(e,t,r){let o=1,l=0,h=[],p=[],d=[],m=t;const g=new Map,y=new Set,v=()=>{d=Array.from(g.values()),y.forEach((e=>e()))},b=e=>{p=null==e?[]:p.filter((t=>t!==e)),v()},_=e=>{const{toastId:t,onOpen:o,updateId:i,children:s}=e.props,u=null==i;e.staleId&&g.delete(e.staleId),g.set(t,e),p=[...p,e.props.toastId].filter((t=>t!==e.staleId)),v(),r(f(e,u?"added":"updated")),u&&a(o)&&o((0,n.isValidElement)(s)&&s.props)};return{id:e,props:m,observe:e=>(y.add(e),()=>y.delete(e)),toggle:(e,t)=>{g.forEach((r=>{null!=t&&t!==r.props.toastId||a(r.toggle)&&r.toggle(e)}))},removeToast:b,toasts:g,clearQueue:()=>{l-=h.length,h=[]},buildToast:(t,p)=>{if((t=>{let{containerId:r,toastId:n,updateId:o}=t;const i=r?r!==e:1!==e,s=g.has(n)&&null==o;return i||s})(p))return;const{toastId:d,updateId:y,data:w,staleId:x,delay:E}=p,S=()=>{b(d)},A=null==y;A&&l++;const $={...m,style:m.toastStyle,key:o++,...Object.fromEntries(Object.entries(p).filter((e=>{let[t,r]=e;return null!=r}))),toastId:d,updateId:y,data:w,closeToast:S,isIn:!1,className:u(p.className||m.toastClassName),bodyClassName:u(p.bodyClassName||m.bodyClassName),progressClassName:u(p.progressClassName||m.progressClassName),autoClose:!p.isLoading&&(k=p.autoClose,O=m.autoClose,!1===k||i(k)&&k>0?k:O),deleteToast(){const e=g.get(d),{onClose:t,children:o}=e.props;a(t)&&t((0,n.isValidElement)(o)&&o.props),r(f(e,"removed")),g.delete(d),l--,l<0&&(l=0),h.length>0?_(h.shift()):v()}};var k,O;$.closeButton=m.closeButton,!1===p.closeButton||c(p.closeButton)?$.closeButton=p.closeButton:!0===p.closeButton&&($.closeButton=!c(m.closeButton)||m.closeButton);let P=t;(0,n.isValidElement)(t)&&!s(t.type)?P=(0,n.cloneElement)(t,{closeToast:S,toastProps:$,data:w}):a(t)&&(P=t({closeToast:S,toastProps:$,data:w}));const j={content:P,props:$,staleId:x};m.limit&&m.limit>0&&l>m.limit&&A?h.push(j):i(E)?setTimeout((()=>{_(j)}),E):_(j)},setProps(e){m=e},setToggle:(e,t)=>{g.get(e).toggle=t},isToastActive:e=>p.some((t=>t===e)),getSnapshot:()=>d}}(t,e,m);h.set(t,o);const l=o.observe(r);return p.forEach((e=>v(e.content,e.options))),p=[],()=>{l(),h.delete(t)}},setProps(e){var r;null==(r=h.get(t))||r.setProps(e)},getSnapshot(){var e;return null==(e=h.get(t))?void 0:e.getSnapshot()}}}(e)).current;o(e);const l=(0,n.useSyncExternalStore)(t,r,r);return{getToastToRender:function(t){if(!l)return[];const r=new Map;return e.newestOnTop&&l.reverse(),l.forEach((e=>{const{position:t}=e.props;r.has(t)||r.set(t,[]),r.get(t).push(e)})),Array.from(r,(e=>t(e[0],e[1])))},isToastActive:y,count:null==l?void 0:l.length}}function w(e){const[t,r]=(0,n.useState)(!1),[o,i]=(0,n.useState)(!1),s=(0,n.useRef)(null),a=(0,n.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:u,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:p}=e;var d,m;function g(){r(!0)}function y(){r(!1)}function v(r){const n=s.current;a.canDrag&&n&&(a.didMove=!0,t&&y(),a.delta="x"===e.draggableDirection?r.clientX-a.start:r.clientY-a.start,a.start!==r.clientX&&(a.canCloseOnClick=!1),n.style.transform=`translate3d(${"x"===e.draggableDirection?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,n.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function b(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",b);const t=s.current;if(a.canDrag&&a.didMove&&t){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}null==(m=h.get((d={id:e.toastId,containerId:e.containerId,fn:r}).containerId||1))||m.setToggle(d.id,d.fn),(0,n.useEffect)((()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||y(),window.addEventListener("focus",g),window.addEventListener("blur",y),()=>{window.removeEventListener("focus",g),window.removeEventListener("blur",y)}}),[e.pauseOnFocusLoss]);const _={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){a.didMove=!1,document.addEventListener("pointermove",v),document.addEventListener("pointerup",b);const r=s.current;a.canCloseOnClick=!0,a.canDrag=!0,r.style.transition="none","x"===e.draggableDirection?(a.start=t.clientX,a.removalDistance=r.offsetWidth*(e.draggablePercent/100)):(a.start=t.clientY,a.removalDistance=r.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){const{top:r,bottom:n,left:o,right:i}=s.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=o&&t.clientX<=i&&t.clientY>=r&&t.clientY<=n?y():g()}};return u&&c&&(_.onMouseEnter=y,e.stacked||(_.onMouseLeave=g)),p&&(_.onClick=e=>{f&&f(e),a.canCloseOnClick&&l()}),{playToast:g,pauseToast:y,isRunning:t,preventExitTransition:o,toastRef:s,eventHandlers:_}}function x(e){let{delay:t,isRunning:r,closeToast:i,type:s="default",hide:u,className:c,style:l,controlledProgress:f,progress:h,rtl:p,isIn:d,theme:m}=e;const g=u||f&&0===h,y={...l,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused"};f&&(y.transform=`scaleX(${h})`);const v=(0,o.A)("Toastify__progress-bar",f?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${m}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":p}),b=a(c)?c({rtl:p,type:s,defaultClassName:v}):(0,o.A)(v,c),_={[f&&h>=1?"onTransitionEnd":"onAnimationEnd"]:f&&h<1?null:()=>{d&&i()}};return n.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":g},n.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${m} Toastify__progress-bar--${s}`}),n.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:b,style:y,..._}))}let E=1;const S=()=>""+E++;function A(e){return e&&(s(e.toastId)||i(e.toastId))?e.toastId:S()}function $(e,t){return v(e,t),t.toastId}function k(e,t){return{...t,type:t&&t.type||e,toastId:A(t)}}function O(e){return(t,r)=>$(t,k(e,r))}function P(e,t){return $(e,k("default",t))}P.loading=(e,t)=>$(e,k("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),P.promise=function(e,t,r){let n,{pending:o,error:i,success:u}=t;o&&(n=s(o)?P.loading(o,r):P.loading(o.render,{...r,...o}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(e,t,o)=>{if(null==t)return void P.dismiss(n);const i={type:e,...c,...r,data:o},a=s(t)?{render:t}:t;return n?P.update(n,{...i,...a}):P(a.render,{...i,...a}),o},f=a(e)?e():e;return f.then((e=>l("success",u,e))).catch((e=>l("error",i,e))),f},P.success=O("success"),P.info=O("info"),P.error=O("error"),P.warning=O("warning"),P.warn=P.warning,P.dark=(e,t)=>$(e,k("default",{theme:"dark",...t})),P.dismiss=function(e){!function(e){var t;if(g()){if(null==e||s(t=e)||i(t))h.forEach((t=>{t.removeToast(e)}));else if(e&&("containerId"in e||"id"in e)){const t=h.get(e.containerId);t?t.removeToast(e.id):h.forEach((t=>{t.removeToast(e.id)}))}}else p=p.filter((t=>null!=e&&t.options.toastId!==e))}(e)},P.clearWaitingQueue=function(e){void 0===e&&(e={}),h.forEach((t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()}))},P.isActive=y,P.update=function(e,t){void 0===t&&(t={});const r=((e,t)=>{var r;let{containerId:n}=t;return null==(r=h.get(n||1))?void 0:r.toasts.get(e)})(e,t);if(r){const{props:n,content:o}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:S()};i.toastId!==e&&(i.staleId=e);const s=i.render||o;delete i.render,$(s,i)}},P.done=e=>{P.update(e,{progress:1})},P.onChange=function(e){return d.add(e),()=>{d.delete(e)}},P.play=e=>b(!0,e),P.pause=e=>b(!1,e);const j="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,C=e=>{let{theme:t,type:r,isLoading:o,...i}=e;return n.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${r})`,...i})},T={info:function(e){return n.createElement(C,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return n.createElement(C,{...e},n.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return n.createElement(C,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return n.createElement(C,{...e},n.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return n.createElement("div",{className:"Toastify__spinner"})}},N=e=>{const{isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:s,playToast:u}=w(e),{closeButton:c,children:l,autoClose:f,onClick:h,type:p,hideProgressBar:d,closeToast:m,transition:g,position:y,className:v,style:b,bodyClassName:_,bodyStyle:E,progressClassName:S,progressStyle:A,updateId:$,role:k,progress:O,rtl:P,toastId:j,deleteToast:C,isIn:N,isLoading:I,closeOnClick:R,theme:M}=e,L=(0,o.A)("Toastify__toast",`Toastify__toast-theme--${M}`,`Toastify__toast--${p}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":R}),D=a(v)?v({rtl:P,position:y,type:p,defaultClassName:L}):(0,o.A)(L,v),U=function(e){let{theme:t,type:r,isLoading:o,icon:i}=e,s=null;const u={theme:t,type:r};return!1===i||(a(i)?s=i({...u,isLoading:o}):(0,n.isValidElement)(i)?s=(0,n.cloneElement)(i,u):o?s=T.spinner():(e=>e in T)(r)&&(s=T[r](u))),s}(e),F=!!O||!f,B={closeToast:m,type:p,theme:M};let z=null;return!1===c||(z=a(c)?c(B):(0,n.isValidElement)(c)?(0,n.cloneElement)(c,B):function(e){let{closeToast:t,theme:r,ariaLabel:o="close"}=e;return n.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":o},n.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},n.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(B)),n.createElement(g,{isIn:N,done:C,position:y,preventExitTransition:r,nodeRef:i,playToast:u},n.createElement("div",{id:j,onClick:h,"data-in":N,className:D,...s,style:b,ref:i},n.createElement("div",{...N&&{role:k},className:a(_)?_({type:p}):(0,o.A)("Toastify__toast-body",_),style:E},null!=U&&n.createElement("div",{className:(0,o.A)("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!I})},U),n.createElement("div",null,l)),z,n.createElement(x,{...$&&!F?{key:`pb-${$}`}:{},rtl:P,theme:M,delay:f,isRunning:t,isIn:N,closeToast:m,hide:d,type:p,style:A,className:S,controlledProgress:F,progress:O||0})))},I=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},R=l(I("bounce",!0)),M=(l(I("slide",!0)),l(I("zoom")),l(I("flip")),{position:"top-right",transition:R,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"});function L(e){let t={...M,...e};const r=e.stacked,[i,s]=(0,n.useState)(!0),c=(0,n.useRef)(null),{getToastToRender:l,isToastActive:f,count:h}=_(t),{className:p,style:d,rtl:m,containerId:g}=t;function y(e){const t=(0,o.A)("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":m});return a(p)?p({position:e,rtl:m,defaultClassName:t}):(0,o.A)(t,u(p))}function v(){r&&(s(!0),P.play())}return j((()=>{if(r){var e;const r=c.current.querySelectorAll('[data-in="true"]'),n=12,o=null==(e=t.position)?void 0:e.includes("top");let s=0,a=0;Array.from(r).reverse().forEach(((e,t)=>{const r=e;r.classList.add("Toastify__toast--stacked"),t>0&&(r.dataset.collapsed=`${i}`),r.dataset.pos||(r.dataset.pos=o?"top":"bot");const u=s*(i?.2:1)+(i?0:n*t);r.style.setProperty("--y",`${o?u:-1*u}px`),r.style.setProperty("--g",`${n}`),r.style.setProperty("--s",""+(1-(i?a:0))),s+=r.offsetHeight,a+=.025}))}}),[i,h,r]),n.createElement("div",{ref:c,className:"Toastify",id:g,onMouseEnter:()=>{r&&(s(!1),P.pause())},onMouseLeave:v},l(((e,t)=>{const o=t.length?{...d}:{...d,pointerEvents:"none"};return n.createElement("div",{className:y(e),style:o,key:`container-${e}`},t.map((e=>{let{content:t,props:o}=e;return n.createElement(N,{...o,stacked:r,collapseAll:v,isIn:f(o.toastId,o.containerId),style:o.style,key:`toast-${o.key}`},t)})))})))}},63837:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},72079:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-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":true,"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":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"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":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"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":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"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":true}')}}]); \ No newline at end of file diff --git a/assets/js/7082.22a17154.js.LICENSE.txt b/assets/js/7126.93b83561.js.LICENSE.txt similarity index 100% rename from assets/js/7082.22a17154.js.LICENSE.txt rename to assets/js/7126.93b83561.js.LICENSE.txt diff --git a/assets/js/720066b1.f47372ce.js b/assets/js/720066b1.4d798ac7.js similarity index 89% rename from assets/js/720066b1.f47372ce.js rename to assets/js/720066b1.4d798ac7.js index 775f57f3..f3a8ee53 100644 --- a/assets/js/720066b1.f47372ce.js +++ b/assets/js/720066b1.4d798ac7.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5687,9175],{91759:(e,s,o)=>{o.r(s),o.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>t,toc:()=>b});const t=JSON.parse('{"id":"demo-viewer/boolean","title":"\u2705 Boolean","description":"boolean type showcase","source":"@site/docs/demo-viewer/boolean.mdx","sourceDirName":"demo-viewer","slug":"/demo-viewer/boolean","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/boolean.mdx","tags":[],"version":"current","frontMatter":{"description":"boolean type showcase","title":"\u2705 Boolean"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\udd84 Unique items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems"},"next":{"title":"\ud83d\udee0\ufe0f Customizations","permalink":"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations"}}');var a=o(62540),n=o(28453),i=o(21432),r=o(9175),l=o(21344),c=o.n(l),d=o(11470),u=o(19365);const m={description:"boolean type showcase",title:"\u2705 Boolean"},h="Boolean",p={},b=[];function f(e){const s={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"boolean",children:"Boolean"})}),"\n",(0,a.jsxs)(d.default,{children:[(0,a.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(c(),{schema:r})}),(0,a.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(i.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(f,{...e})}):f(e)}},9175:e=>{e.exports={type:"boolean"}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5687,9175],{60567:(e,s,o)=>{o.r(s),o.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>t,toc:()=>b});const t=JSON.parse('{"id":"demo-viewer/boolean","title":"\u2705 Boolean","description":"boolean type showcase","source":"@site/docs/demo-viewer/boolean.mdx","sourceDirName":"demo-viewer","slug":"/demo-viewer/boolean","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/boolean.mdx","tags":[],"version":"current","frontMatter":{"description":"boolean type showcase","title":"\u2705 Boolean"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\udd84 Unique items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems"},"next":{"title":"\ud83d\udee0\ufe0f Customizations","permalink":"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations"}}');var a=o(62540),n=o(28453),i=o(58069),r=o(9175),l=o(88307),c=o.n(l),d=o(65537),u=o(79329);const m={description:"boolean type showcase",title:"\u2705 Boolean"},h="Boolean",p={},b=[];function f(e){const s={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"boolean",children:"Boolean"})}),"\n",(0,a.jsxs)(d.default,{children:[(0,a.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(c(),{schema:r})}),(0,a.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(i.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(f,{...e})}):f(e)}},9175:e=>{e.exports={type:"boolean"}}}]); \ No newline at end of file diff --git a/assets/js/72a427b3.9ee7abaa.js b/assets/js/72a427b3.491e9c53.js similarity index 97% rename from assets/js/72a427b3.9ee7abaa.js rename to assets/js/72a427b3.491e9c53.js index 639f67a7..528eb75b 100644 --- a/assets/js/72a427b3.9ee7abaa.js +++ b/assets/js/72a427b3.491e9c53.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5643],{93976:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>o,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"contributing","title":"\ud83e\udde9 Contributing","description":"How to contribute in docusaurus-json-schema-plugin ?","source":"@site/docs/contributing.mdx","sourceDirName":".","slug":"/contributing","permalink":"/docusaurus-json-schema-plugin/docs/contributing","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/contributing.mdx","tags":[],"version":"current","frontMatter":{"title":"\ud83e\udde9 Contributing","description":"How to contribute in docusaurus-json-schema-plugin ?"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf1f Single type","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType"},"next":{"title":"\ud83d\udcd6 API Reference","permalink":"/docusaurus-json-schema-plugin/docs/api"}}');var n=t(62540),u=t(28453);const o={title:"\ud83e\udde9 Contributing",description:"How to contribute in docusaurus-json-schema-plugin ?"},r=void 0,c={},a=[{value:"Guide",id:"guide",level:2},{value:"For questions / features requests / ...",id:"for-questions--features-requests--",level:2}];function d(e){const s={a:"a",h2:"h2",p:"p",...(0,u.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.p,{children:"Since project is completly open source, any kind of contribution is welcome and highly appreciated."}),"\n",(0,n.jsx)(s.h2,{id:"guide",children:"Guide"}),"\n",(0,n.jsxs)(s.p,{children:["Check out the contribution guide on ",(0,n.jsx)(s.a,{href:"https://github.com/jy95/docusaurus-json-schema-plugin/blob/main/CONTRIBUTING.md",children:"GitHub"})]}),"\n",(0,n.jsx)(s.h2,{id:"for-questions--features-requests--",children:"For questions / features requests / ..."}),"\n",(0,n.jsxs)(s.p,{children:["Check out the discussions space on ",(0,n.jsx)(s.a,{href:"https://github.com/jy95/docusaurus-json-schema-plugin/discussions",children:"Github"})]})]})}function l(e={}){const{wrapper:s}={...(0,u.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5643],{91776:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>o,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"contributing","title":"\ud83e\udde9 Contributing","description":"How to contribute in docusaurus-json-schema-plugin ?","source":"@site/docs/contributing.mdx","sourceDirName":".","slug":"/contributing","permalink":"/docusaurus-json-schema-plugin/docs/contributing","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/contributing.mdx","tags":[],"version":"current","frontMatter":{"title":"\ud83e\udde9 Contributing","description":"How to contribute in docusaurus-json-schema-plugin ?"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf1f Single type","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType"},"next":{"title":"\ud83d\udcd6 API Reference","permalink":"/docusaurus-json-schema-plugin/docs/api"}}');var n=t(62540),u=t(28453);const o={title:"\ud83e\udde9 Contributing",description:"How to contribute in docusaurus-json-schema-plugin ?"},r=void 0,c={},a=[{value:"Guide",id:"guide",level:2},{value:"For questions / features requests / ...",id:"for-questions--features-requests--",level:2}];function d(e){const s={a:"a",h2:"h2",p:"p",...(0,u.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.p,{children:"Since project is completly open source, any kind of contribution is welcome and highly appreciated."}),"\n",(0,n.jsx)(s.h2,{id:"guide",children:"Guide"}),"\n",(0,n.jsxs)(s.p,{children:["Check out the contribution guide on ",(0,n.jsx)(s.a,{href:"https://github.com/jy95/docusaurus-json-schema-plugin/blob/main/CONTRIBUTING.md",children:"GitHub"})]}),"\n",(0,n.jsx)(s.h2,{id:"for-questions--features-requests--",children:"For questions / features requests / ..."}),"\n",(0,n.jsxs)(s.p,{children:["Check out the discussions space on ",(0,n.jsx)(s.a,{href:"https://github.com/jy95/docusaurus-json-schema-plugin/discussions",children:"Github"})]})]})}function l(e={}){const{wrapper:s}={...(0,u.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file diff --git a/assets/js/73e48de0.e200c308.js b/assets/js/73e48de0.8335d3dc.js similarity index 93% rename from assets/js/73e48de0.e200c308.js rename to assets/js/73e48de0.8335d3dc.js index c2ed0972..8a066f54 100644 --- a/assets/js/73e48de0.e200c308.js +++ b/assets/js/73e48de0.8335d3dc.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4275,4893],{51007:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>u,default:()=>w,frontMatter:()=>h,metadata:()=>a,toc:()=>f});const a=JSON.parse('{"id":"demo-viewer/schema_composition/allOf","title":"\ud83e\udd1d allOf","description":"schema composition with allOf showcase","source":"@site/docs/demo-viewer/schema_composition/allOf.mdx","sourceDirName":"demo-viewer/schema_composition","slug":"/demo-viewer/schema_composition/allOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_composition/allOf.mdx","tags":[],"version":"current","frontMatter":{"description":"schema composition with allOf showcase","title":"\ud83e\udd1d allOf"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddf1 Schema Composition","permalink":"/docusaurus-json-schema-plugin/docs/category/-schema-composition"},"next":{"title":"\ud83c\udf10 anyOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf"}}');var o=t(62540),i=t(28453),l=t(21432),c=t(4275),n=t(21344),r=t.n(n),m=t(11470),d=t(19365);const h={description:"schema composition with allOf showcase",title:"\ud83e\udd1d allOf"},u="allOf",p={},f=[];function O(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"allof",children:"allOf"})}),"\n",(0,o.jsxs)(m.default,{children:[(0,o.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(r(),{schema:c})}),(0,o.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(l.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(O,{...e})}):O(e)}},4275:e=>{e.exports=JSON.parse('{"allOf":[{"type":"string"},{"maxLength":5}]}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4275,4893],{85742:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>u,default:()=>w,frontMatter:()=>h,metadata:()=>a,toc:()=>f});const a=JSON.parse('{"id":"demo-viewer/schema_composition/allOf","title":"\ud83e\udd1d allOf","description":"schema composition with allOf showcase","source":"@site/docs/demo-viewer/schema_composition/allOf.mdx","sourceDirName":"demo-viewer/schema_composition","slug":"/demo-viewer/schema_composition/allOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_composition/allOf.mdx","tags":[],"version":"current","frontMatter":{"description":"schema composition with allOf showcase","title":"\ud83e\udd1d allOf"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddf1 Schema Composition","permalink":"/docusaurus-json-schema-plugin/docs/category/-schema-composition"},"next":{"title":"\ud83c\udf10 anyOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf"}}');var o=t(62540),i=t(28453),l=t(58069),c=t(4275),n=t(88307),r=t.n(n),m=t(65537),d=t(79329);const h={description:"schema composition with allOf showcase",title:"\ud83e\udd1d allOf"},u="allOf",p={},f=[];function O(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"allof",children:"allOf"})}),"\n",(0,o.jsxs)(m.default,{children:[(0,o.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(r(),{schema:c})}),(0,o.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(l.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(O,{...e})}):O(e)}},4275:e=>{e.exports=JSON.parse('{"allOf":[{"type":"string"},{"maxLength":5}]}')}}]); \ No newline at end of file diff --git a/assets/js/756e0924.b92c5f06.js b/assets/js/756e0924.3c6dfb08.js similarity index 93% rename from assets/js/756e0924.b92c5f06.js rename to assets/js/756e0924.3c6dfb08.js index c24f27e9..c9f0f4d8 100644 --- a/assets/js/756e0924.b92c5f06.js +++ b/assets/js/756e0924.3c6dfb08.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2498,9823],{67825:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>o,toc:()=>f});const o=JSON.parse('{"id":"demo-viewer/custom/unsolved_refs","title":"\u26a0\ufe0f Custom Unresolved Refs Component","description":"To overwrite the default handling of unresolved $refs (recursive schemas, partial schemas, ...)","source":"@site/docs/demo-viewer/custom/unsolved_refs.mdx","sourceDirName":"demo-viewer/custom","slug":"/demo-viewer/custom/unsolved_refs","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/custom/unsolved_refs.mdx","tags":[],"version":"current","frontMatter":{"description":"To overwrite the default handling of unresolved $refs (recursive schemas, partial schemas, ...)","title":"\u26a0\ufe0f Custom Unresolved Refs Component"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccb Custom description Component","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description"},"next":{"title":"\ud83c\udfa8 Custom value Component","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values"}}');var r=t(62540),n=t(28453),a=t(21432),i=t(52498),c=t(21344),d=t.n(c),l=t(11470),u=t(19365);const m={description:"To overwrite the default handling of unresolved $refs (recursive schemas, partial schemas, ...)",title:"\u26a0\ufe0f Custom Unresolved Refs Component"},h="Custom Unresolved Refs Component",p={},f=[];function v(e){const s={code:"code",h1:"h1",header:"header",pre:"pre",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"custom-unresolved-refs-component",children:"Custom Unresolved Refs Component"})}),"\n",(0,r.jsxs)(l.default,{children:[(0,r.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:i,viewerOptions:{UnresolvedRefsComponent:({schema:e})=>`${e.$ref||e.$dynamicRef||e.$recursiveRef||""} was not resolved`}})}),(0,r.jsx)(u.default,{value:"viewerOptions",label:"viewerOptions",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-js",children:'{\n UnresolvedRefsComponent: ({schema}) => (\n `${schema.$ref || schema.$dynamicRef || schema.$recursiveRef || ""} was not resolved`\n )\n}\n'})})}),(0,r.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(a.default,{language:"json-schema",children:JSON.stringify(i,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(v,{...e})}):v(e)}},52498:e=>{e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://example.com/tree","$dynamicAnchor":"node","type":"object","properties":{"data":true,"children":{"type":"array","items":{"$dynamicRef":"#node"}}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2498,9823],{82153:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>o,toc:()=>f});const o=JSON.parse('{"id":"demo-viewer/custom/unsolved_refs","title":"\u26a0\ufe0f Custom Unresolved Refs Component","description":"To overwrite the default handling of unresolved $refs (recursive schemas, partial schemas, ...)","source":"@site/docs/demo-viewer/custom/unsolved_refs.mdx","sourceDirName":"demo-viewer/custom","slug":"/demo-viewer/custom/unsolved_refs","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/custom/unsolved_refs.mdx","tags":[],"version":"current","frontMatter":{"description":"To overwrite the default handling of unresolved $refs (recursive schemas, partial schemas, ...)","title":"\u26a0\ufe0f Custom Unresolved Refs Component"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccb Custom description Component","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description"},"next":{"title":"\ud83c\udfa8 Custom value Component","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values"}}');var r=t(62540),n=t(28453),a=t(58069),i=t(52498),c=t(88307),d=t.n(c),l=t(65537),u=t(79329);const m={description:"To overwrite the default handling of unresolved $refs (recursive schemas, partial schemas, ...)",title:"\u26a0\ufe0f Custom Unresolved Refs Component"},h="Custom Unresolved Refs Component",p={},f=[];function v(e){const s={code:"code",h1:"h1",header:"header",pre:"pre",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"custom-unresolved-refs-component",children:"Custom Unresolved Refs Component"})}),"\n",(0,r.jsxs)(l.default,{children:[(0,r.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:i,viewerOptions:{UnresolvedRefsComponent:({schema:e})=>`${e.$ref||e.$dynamicRef||e.$recursiveRef||""} was not resolved`}})}),(0,r.jsx)(u.default,{value:"viewerOptions",label:"viewerOptions",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-js",children:'{\n UnresolvedRefsComponent: ({schema}) => (\n `${schema.$ref || schema.$dynamicRef || schema.$recursiveRef || ""} was not resolved`\n )\n}\n'})})}),(0,r.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(a.default,{language:"json-schema",children:JSON.stringify(i,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(v,{...e})}):v(e)}},52498:e=>{e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://example.com/tree","$dynamicAnchor":"node","type":"object","properties":{"data":true,"children":{"type":"array","items":{"$dynamicRef":"#node"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/84361440.0ca7c38e.js b/assets/js/84361440.af0e0eb2.js similarity index 94% rename from assets/js/84361440.0ca7c38e.js rename to assets/js/84361440.af0e0eb2.js index 257f80ec..7bccda61 100644 --- a/assets/js/84361440.0ca7c38e.js +++ b/assets/js/84361440.af0e0eb2.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[19,4651],{97503:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a.default.createElement(l.default,{fallback:a.default.createElement(o.LoadingLabel,null)},(()=>a.default.createElement(a.default.Fragment,null,a.default.createElement(r.default,{fallback:e=>a.default.createElement(d,{...e})},a.default.createElement(f,{...e})))))};const a=n(i(63696)),s=n(i(39781)),l=n(i(78478)),r=n(i(67489)),o=i(206);function d(e){let{error:t,tryAgain:i}=e;return a.default.createElement("div",null,a.default.createElement("p",null,a.default.createElement(o.ErrorOccurredLabel,{error:t})),a.default.createElement("button",{onClick:i},"Try Again!"))}function h(e,t){let i=e;return"boolean"==typeof i||void 0===i.$id?`https://docusaurus.io/json-viewer/schema_${t}.json`:i.$id}function f(e){const{schema:t,diagnosticsOptions:i,...n}=e;return a.default.createElement(s.default,{height:"90vh",language:"json",editorWillMount:e=>{const n=(Array.isArray(t)?t:[t]).map(((e,i)=>({uri:h(t,i),fileMatch:["*"],schema:e})));e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:n,...i})},...n})}},77206:(e,t,i)=>{i.r(t),i.d(t,{default:()=>d});i(63696);var n=i(41957),a=i(95293),s=i(78478),l=i(4651),r=i(62540);function o(){return(0,r.jsx)(s.default,{fallback:(0,r.jsx)("div",{children:"Loading..."}),children:()=>{const{colorMode:e}=(0,a.G)(),t=i(21344).default,n=i(97503).default;return(0,r.jsxs)("div",{style:{display:"flex",flexWrap:"wrap"},children:[(0,r.jsx)("div",{style:{boxSizing:"border-box",width:"50%"},children:(0,r.jsx)(t,{schema:l})}),(0,r.jsx)("div",{style:{boxSizing:"border-box",width:"50%"},children:(0,r.jsx)(n,{schema:l,theme:"dark"===e?"vs-dark":"vs"})})]})}})}function d(){return(0,r.jsx)(n.A,{title:"Box File JSON Schema",description:"Description will go into a meta tag in ",children:(0,r.jsx)(o,{})})}},4651:e=>{e.exports=JSON.parse('{"title":"File","type":"object","x-box-resource-id":"file","x-box-variant":"standard","description":"A standard representation of a file, as returned from any\\nfile API endpoints by default","allOf":[{"$ref":"#/definitions/File--Mini"},{"properties":{"description":{"type":"string","nullable":false,"description":"The optional description of this file","maxLength":256,"example":"Contract for Q1 renewal"},"size":{"type":"integer","nullable":false,"description":"The file size in bytes. Be careful parsing this integer as it can\\nget very large and cause an integer overflow.","example":629644},"path_collection":{"allOf":[{"title":"Path collection","description":"A list of parent folders for an item.","type":"object","properties":{"total_count":{"description":"The number of folders in this list.","example":1,"type":"integer","format":"int64","nullable":false},"entries":{"type":"array","description":"The parent folders for this item","nullable":false,"items":{"$ref":"#/definitions/Folder--Mini"}}}},{"description":"The tree of folders that this file is contained in,\\nstarting at the root."},{"nullable":false}]},"created_at":{"type":"string","format":"date-time","nullable":false,"description":"The date and time when the file was created on Box.","example":"2012-12-12T10:53:43-08:00"},"modified_at":{"type":"string","format":"date-time","nullable":false,"description":"The date and time when the file was last updated on Box.","example":"2012-12-12T10:53:43-08:00"},"trashed_at":{"type":"string","format":"date-time","nullable":true,"description":"The time at which this file was put in the trash.","example":"2012-12-12T10:53:43-08:00"},"purged_at":{"type":"string","format":"date-time","nullable":true,"description":"The time at which this file is expected to be purged\\nfrom the trash.","example":"2012-12-12T10:53:43-08:00"},"content_created_at":{"type":"string","format":"date-time","nullable":true,"description":"The date and time at which this file was originally\\ncreated, which might be before it was uploaded to Box.","example":"2012-12-12T10:53:43-08:00"},"content_modified_at":{"type":"string","format":"date-time","nullable":true,"description":"The date and time at which this file was last updated,\\nwhich might be before it was uploaded to Box.","example":"2012-12-12T10:53:43-08:00"},"created_by":{"allOf":[{"$ref":"#/definitions/User--Mini"},{"description":"The user who created this file"}]},"modified_by":{"allOf":[{"$ref":"#/definitions/User--Mini"},{"description":"The user who last modified this file"},{"nullable":false}]},"owned_by":{"allOf":[{"$ref":"#/definitions/User--Mini"},{"description":"The user who owns this file"},{"nullable":false}]},"shared_link":{"allOf":[{"title":"Shared link","description":"Shared links provide direct, read-only access to files or folder on Box.\\n\\nShared links with open access level allow anyone with the URL\\nto access the item, while shared links with company or collaborators access\\nlevels can only be accessed by appropriately authenticated Box users.","type":"object","properties":{"url":{"type":"string","format":"url","description":"The URL that can be used to access the item on Box.\\n\\nThis URL will display the item in Box\'s preview UI where the file\\ncan be downloaded if allowed.\\n\\nThis URL will continue to work even when a custom `vanity_url`\\nhas been set for this shared link.","example":"https://www.box.com/s/vspke7y05sb214wjokpk","nullable":false},"download_url":{"type":"string","format":"url","x-box-premium-feature":true,"description":"A URL that can be used to download the file. This URL can be used in\\na browser to download the file. This URL includes the file\\nextension so that the file will be saved with the right file type.\\n\\nThis property will be `null` for folders.","example":"https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg","nullable":true},"vanity_url":{"type":"string","format":"url","description":"The \\"Custom URL\\" that can also be used to preview the item on Box. Custom\\nURLs can only be created or modified in the Box Web application.","example":"https://acme.app.box.com/v/my_url/","nullable":true},"vanity_name":{"type":"string","description":"The custom name of a shared link, as used in the `vanity_url` field.","example":"my_url","nullable":true},"access":{"type":"string","description":"The access level for this shared link.\\n\\n* `open` - provides access to this item to anyone with this link\\n* `company` - only provides access to this item to people the same company\\n* `collaborators` - only provides access to this item to people who are\\n collaborators on this item\\n\\nIf this field is omitted when creating the shared link, the access level\\nwill be set to the default access level specified by the enterprise admin.","enum":["open","company","collaborators"],"example":"open","nullable":false},"effective_access":{"type":"string","description":"The effective access level for the shared link. This can be a more\\nrestrictive access level than the value in the `access` field when the\\nenterprise settings restrict the allowed access levels.","enum":["open","company","collaborators"],"example":"company","nullable":false},"effective_permission":{"type":"string","description":"The effective permissions for this shared link.","enum":["can_download","can_preview"],"example":"can_download","nullable":false},"unshared_at":{"type":"string","format":"date-time","description":"The date and time when this link will be unshared. This field can only be\\nset by users with paid accounts.","example":"2018-04-13T13:53:23-07:00","nullable":true},"is_password_enabled":{"type":"boolean","description":"Defines if the shared link requires a password to access the item.","example":true,"nullable":false},"permissions":{"type":"object","description":"Defines if this link allows a user to preview and download an item.","properties":{"can_download":{"type":"boolean","example":true,"nullable":false,"description":"Defines if the shared link allows for the item to be downloaded. For\\nshared links on folders, this also applies to any items in the folder.\\n\\nThis value can be set to `true` when the effective access level is\\nset to `open` or `company`, not `collaborators`."},"can_preview":{"type":"boolean","example":true,"nullable":false,"description":"Defines if the shared link allows for the item to be previewed.\\n\\nThis value is always `true`. For shared links on folders this also\\napplies to any items in the folder."}}},"download_count":{"type":"integer","example":3,"description":"The number of times this item has been downloaded.","nullable":false},"preview_count":{"type":"integer","example":3,"description":"The number of times this item has been previewed.","nullable":false}}},{"description":"The shared link for this file. This will be\\n`null` if no shared link has been created for this\\nfile."},{"nullable":true}]},"parent":{"allOf":[{"$ref":"#/definitions/Folder--Mini"},{"description":"The folder that this file is located within."}],"nullable":true},"item_status":{"type":"string","description":"Defines if this item has been deleted or not.\\n\\n* `active` when the item has is not in the trash\\n* `trashed` when the item has been moved to the trash but not deleted\\n* `deleted` when the item has been permanently deleted.","enum":["active","trashed","deleted"],"nullable":false,"example":"active"}}}],"definitions":{"File--Mini":{"title":"File (Mini)","type":"object","x-box-resource-id":"file--mini","x-box-variant":"mini","description":"A mini representation of a file, used when\\nnested under another resource.","allOf":[{"$ref":"#/definitions/File--Base"},{"properties":{"sequence_id":{"allOf":[{"type":"string","example":"3","nullable":false,"description":"A numeric identifier that represents the most recent user event\\nthat has been applied to this item.\\n\\nThis can be used in combination with the `GET /events`-endpoint\\nto filter out user events that would have occurred before this\\nidentifier was read.\\n\\nAn example would be where a Box Drive-like application\\nwould fetch an item via the API, and then listen to incoming\\nuser events for changes to the item. The application would\\nignore any user events where the `sequence_id` in the event\\nis smaller than or equal to the `sequence_id` in the originally\\nfetched resource."},{"nullable":false}]},"name":{"type":"string","description":"The name of the file","example":"Contract.pdf"},"sha1":{"type":"string","format":"digest","nullable":false,"example":"85136C79CBF9FE36BB9D05D0639C70C265C18D37","description":"The SHA1 hash of the file. This can be used to compare the contents\\nof a file on Box with a local file."},"file_version":{"allOf":[{"$ref":"#/definitions/FileVersion--Mini"},{"description":"The information about the current version of the file."}]}}}]},"File--Base":{"title":"File (Base)","type":"object","x-box-resource-id":"file--base","x-box-sanitized":true,"x-box-tag":"files","x-box-variants":["base","mini","standard","full"],"x-box-variant":"base","description":"The bare basic representation of a file, the minimal\\namount of fields returned when using the `fields` query\\nparameter.","properties":{"id":{"type":"string","nullable":false,"description":"The unique identifier that represent a file.\\n\\nThe ID for any file can be determined\\nby visiting a file in the web application\\nand copying the ID from the URL. For example,\\nfor the URL `https://*.app.box.com/files/123`\\nthe `file_id` is `123`.","example":"12345"},"etag":{"type":"string","example":"1","nullable":true,"description":"The HTTP `etag` of this file. This can be used within some API\\nendpoints in the `If-Match` and `If-None-Match` headers to only\\nperform changes on the file if (no) changes have happened."},"type":{"type":"string","description":"`file`","example":"file","enum":["file"],"nullable":false}}},"FileVersion--Mini":{"title":"File version (Mini)","type":"object","x-box-resource-id":"file_version--mini","x-box-variant":"mini","description":"A mini representation of a file version, used when\\nnested within another resource.","allOf":[{"$ref":"#/definitions/FileVersion--Base"},{"properties":{"sha1":{"type":"string","description":"The SHA1 hash of this version of the file.","example":"134b65991ed521fcfe4724b7d814ab8ded5185dc"}}}]},"FileVersion--Base":{"title":"File version (Base)","type":"object","x-box-resource-id":"file_version--base","x-box-sanitized":true,"x-box-variants":["base","mini","standard"],"x-box-variant":"base","description":"The bare basic representation of a file version, the minimal\\namount of fields returned when using the `fields` query\\nparameter.","properties":{"id":{"type":"string","nullable":false,"description":"The unique identifier that represent a file version.","example":"12345"},"type":{"type":"string","description":"`file_version`","example":"file_version","enum":["file_version"],"nullable":false}}},"Folder--Mini":{"title":"Folder (Mini)","type":"object","x-box-resource-id":"folder--mini","x-box-variant":"mini","description":"A mini representation of a file version, used when\\nnested under another resource.","allOf":[{"$ref":"#/definitions/Folder--Base"},{"properties":{"sequence_id":{"allOf":[{"$ref":"#/definitions/allOf_0"},{"nullable":false}]},"name":{"type":"string","description":"The name of the folder.","example":"Contracts","nullable":false}}}]},"Folder--Base":{"title":"Folder (Base)","type":"object","x-box-resource-id":"folder--base","x-box-sanitized":true,"x-box-tag":"folders","x-box-variants":["base","mini","standard","full"],"x-box-variant":"base","description":"The bare basic representation of a folder, the minimal\\namount of fields returned when using the `fields` query\\nparameter.","properties":{"id":{"type":"string","nullable":false,"description":"The unique identifier that represent a folder.\\n\\nThe ID for any folder can be determined\\nby visiting a folder in the web application\\nand copying the ID from the URL. For example,\\nfor the URL `https://*.app.box.com/folders/123`\\nthe `folder_id` is `123`.","example":"12345"},"etag":{"type":"string","nullable":true,"example":"1","description":"The HTTP `etag` of this folder. This can be used within some API\\nendpoints in the `If-Match` and `If-None-Match` headers to only\\nperform changes on the folder if (no) changes have happened."},"type":{"type":"string","description":"`folder`","example":"folder","enum":["folder"],"nullable":false}}},"allOf_0":{"type":"string","example":"3","nullable":false,"description":"A numeric identifier that represents the most recent user event\\nthat has been applied to this item.\\n\\nThis can be used in combination with the `GET /events`-endpoint\\nto filter out user events that would have occurred before this\\nidentifier was read.\\n\\nAn example would be where a Box Drive-like application\\nwould fetch an item via the API, and then listen to incoming\\nuser events for changes to the item. The application would\\nignore any user events where the `sequence_id` in the event\\nis smaller than or equal to the `sequence_id` in the originally\\nfetched resource."},"User--Mini":{"title":"User (Mini)","type":"object","x-box-resource-id":"user--mini","x-box-variant":"mini","description":"A mini representation of a user, as can be returned when nested within other\\nresources.","allOf":[{"$ref":"#/definitions/User--Base"},{"properties":{"name":{"type":"string","description":"The display name of this user","example":"Aaron Levie","maxLength":50,"nullable":false},"login":{"type":"string","format":"email","description":"The primary email address of this user","example":"ceo@example.com","nullable":false}}}]},"User--Base":{"title":"User (Base)","type":"object","x-box-resource-id":"user--base","x-box-tag":"users","x-box-variants":["base","mini","standard","full"],"x-box-variant":"base","description":"A mini representation of a user, used when\\nnested within another resource.","properties":{"id":{"type":"string","description":"The unique identifier for this user","example":"11446498"},"type":{"type":"string","description":"`user`","example":"user","nullable":false,"enum":["user"]}}}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[19,4651],{79504:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a.default.createElement(l.default,{fallback:a.default.createElement(o.LoadingLabel,null)},(()=>a.default.createElement(a.default.Fragment,null,a.default.createElement(r.default,{fallback:e=>a.default.createElement(d,{...e})},a.default.createElement(f,{...e})))))};const a=n(i(63696)),s=n(i(39781)),l=n(i(35363)),r=n(i(4023)),o=i(76563);function d(e){let{error:t,tryAgain:i}=e;return a.default.createElement("div",null,a.default.createElement("p",null,a.default.createElement(o.ErrorOccurredLabel,{error:t})),a.default.createElement("button",{onClick:i},"Try Again!"))}function h(e,t){let i=e;return"boolean"==typeof i||void 0===i.$id?`https://docusaurus.io/json-viewer/schema_${t}.json`:i.$id}function f(e){const{schema:t,diagnosticsOptions:i,...n}=e;return a.default.createElement(s.default,{height:"90vh",language:"json",editorWillMount:e=>{const n=(Array.isArray(t)?t:[t]).map(((e,i)=>({uri:h(t,i),fileMatch:["*"],schema:e})));e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:n,...i})},...n})}},69727:(e,t,i)=>{i.r(t),i.d(t,{default:()=>d});i(63696);var n=i(27912),a=i(8532),s=i(35363),l=i(4651),r=i(62540);function o(){return(0,r.jsx)(s.default,{fallback:(0,r.jsx)("div",{children:"Loading..."}),children:()=>{const{colorMode:e}=(0,a.G)(),t=i(88307).default,n=i(79504).default;return(0,r.jsxs)("div",{style:{display:"flex",flexWrap:"wrap"},children:[(0,r.jsx)("div",{style:{boxSizing:"border-box",width:"50%"},children:(0,r.jsx)(t,{schema:l})}),(0,r.jsx)("div",{style:{boxSizing:"border-box",width:"50%"},children:(0,r.jsx)(n,{schema:l,theme:"dark"===e?"vs-dark":"vs"})})]})}})}function d(){return(0,r.jsx)(n.A,{title:"Box File JSON Schema",description:"Description will go into a meta tag in ",children:(0,r.jsx)(o,{})})}},4651:e=>{e.exports=JSON.parse('{"title":"File","type":"object","x-box-resource-id":"file","x-box-variant":"standard","description":"A standard representation of a file, as returned from any\\nfile API endpoints by default","allOf":[{"$ref":"#/definitions/File--Mini"},{"properties":{"description":{"type":"string","nullable":false,"description":"The optional description of this file","maxLength":256,"example":"Contract for Q1 renewal"},"size":{"type":"integer","nullable":false,"description":"The file size in bytes. Be careful parsing this integer as it can\\nget very large and cause an integer overflow.","example":629644},"path_collection":{"allOf":[{"title":"Path collection","description":"A list of parent folders for an item.","type":"object","properties":{"total_count":{"description":"The number of folders in this list.","example":1,"type":"integer","format":"int64","nullable":false},"entries":{"type":"array","description":"The parent folders for this item","nullable":false,"items":{"$ref":"#/definitions/Folder--Mini"}}}},{"description":"The tree of folders that this file is contained in,\\nstarting at the root."},{"nullable":false}]},"created_at":{"type":"string","format":"date-time","nullable":false,"description":"The date and time when the file was created on Box.","example":"2012-12-12T10:53:43-08:00"},"modified_at":{"type":"string","format":"date-time","nullable":false,"description":"The date and time when the file was last updated on Box.","example":"2012-12-12T10:53:43-08:00"},"trashed_at":{"type":"string","format":"date-time","nullable":true,"description":"The time at which this file was put in the trash.","example":"2012-12-12T10:53:43-08:00"},"purged_at":{"type":"string","format":"date-time","nullable":true,"description":"The time at which this file is expected to be purged\\nfrom the trash.","example":"2012-12-12T10:53:43-08:00"},"content_created_at":{"type":"string","format":"date-time","nullable":true,"description":"The date and time at which this file was originally\\ncreated, which might be before it was uploaded to Box.","example":"2012-12-12T10:53:43-08:00"},"content_modified_at":{"type":"string","format":"date-time","nullable":true,"description":"The date and time at which this file was last updated,\\nwhich might be before it was uploaded to Box.","example":"2012-12-12T10:53:43-08:00"},"created_by":{"allOf":[{"$ref":"#/definitions/User--Mini"},{"description":"The user who created this file"}]},"modified_by":{"allOf":[{"$ref":"#/definitions/User--Mini"},{"description":"The user who last modified this file"},{"nullable":false}]},"owned_by":{"allOf":[{"$ref":"#/definitions/User--Mini"},{"description":"The user who owns this file"},{"nullable":false}]},"shared_link":{"allOf":[{"title":"Shared link","description":"Shared links provide direct, read-only access to files or folder on Box.\\n\\nShared links with open access level allow anyone with the URL\\nto access the item, while shared links with company or collaborators access\\nlevels can only be accessed by appropriately authenticated Box users.","type":"object","properties":{"url":{"type":"string","format":"url","description":"The URL that can be used to access the item on Box.\\n\\nThis URL will display the item in Box\'s preview UI where the file\\ncan be downloaded if allowed.\\n\\nThis URL will continue to work even when a custom `vanity_url`\\nhas been set for this shared link.","example":"https://www.box.com/s/vspke7y05sb214wjokpk","nullable":false},"download_url":{"type":"string","format":"url","x-box-premium-feature":true,"description":"A URL that can be used to download the file. This URL can be used in\\na browser to download the file. This URL includes the file\\nextension so that the file will be saved with the right file type.\\n\\nThis property will be `null` for folders.","example":"https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg","nullable":true},"vanity_url":{"type":"string","format":"url","description":"The \\"Custom URL\\" that can also be used to preview the item on Box. Custom\\nURLs can only be created or modified in the Box Web application.","example":"https://acme.app.box.com/v/my_url/","nullable":true},"vanity_name":{"type":"string","description":"The custom name of a shared link, as used in the `vanity_url` field.","example":"my_url","nullable":true},"access":{"type":"string","description":"The access level for this shared link.\\n\\n* `open` - provides access to this item to anyone with this link\\n* `company` - only provides access to this item to people the same company\\n* `collaborators` - only provides access to this item to people who are\\n collaborators on this item\\n\\nIf this field is omitted when creating the shared link, the access level\\nwill be set to the default access level specified by the enterprise admin.","enum":["open","company","collaborators"],"example":"open","nullable":false},"effective_access":{"type":"string","description":"The effective access level for the shared link. This can be a more\\nrestrictive access level than the value in the `access` field when the\\nenterprise settings restrict the allowed access levels.","enum":["open","company","collaborators"],"example":"company","nullable":false},"effective_permission":{"type":"string","description":"The effective permissions for this shared link.","enum":["can_download","can_preview"],"example":"can_download","nullable":false},"unshared_at":{"type":"string","format":"date-time","description":"The date and time when this link will be unshared. This field can only be\\nset by users with paid accounts.","example":"2018-04-13T13:53:23-07:00","nullable":true},"is_password_enabled":{"type":"boolean","description":"Defines if the shared link requires a password to access the item.","example":true,"nullable":false},"permissions":{"type":"object","description":"Defines if this link allows a user to preview and download an item.","properties":{"can_download":{"type":"boolean","example":true,"nullable":false,"description":"Defines if the shared link allows for the item to be downloaded. For\\nshared links on folders, this also applies to any items in the folder.\\n\\nThis value can be set to `true` when the effective access level is\\nset to `open` or `company`, not `collaborators`."},"can_preview":{"type":"boolean","example":true,"nullable":false,"description":"Defines if the shared link allows for the item to be previewed.\\n\\nThis value is always `true`. For shared links on folders this also\\napplies to any items in the folder."}}},"download_count":{"type":"integer","example":3,"description":"The number of times this item has been downloaded.","nullable":false},"preview_count":{"type":"integer","example":3,"description":"The number of times this item has been previewed.","nullable":false}}},{"description":"The shared link for this file. This will be\\n`null` if no shared link has been created for this\\nfile."},{"nullable":true}]},"parent":{"allOf":[{"$ref":"#/definitions/Folder--Mini"},{"description":"The folder that this file is located within."}],"nullable":true},"item_status":{"type":"string","description":"Defines if this item has been deleted or not.\\n\\n* `active` when the item has is not in the trash\\n* `trashed` when the item has been moved to the trash but not deleted\\n* `deleted` when the item has been permanently deleted.","enum":["active","trashed","deleted"],"nullable":false,"example":"active"}}}],"definitions":{"File--Mini":{"title":"File (Mini)","type":"object","x-box-resource-id":"file--mini","x-box-variant":"mini","description":"A mini representation of a file, used when\\nnested under another resource.","allOf":[{"$ref":"#/definitions/File--Base"},{"properties":{"sequence_id":{"allOf":[{"type":"string","example":"3","nullable":false,"description":"A numeric identifier that represents the most recent user event\\nthat has been applied to this item.\\n\\nThis can be used in combination with the `GET /events`-endpoint\\nto filter out user events that would have occurred before this\\nidentifier was read.\\n\\nAn example would be where a Box Drive-like application\\nwould fetch an item via the API, and then listen to incoming\\nuser events for changes to the item. The application would\\nignore any user events where the `sequence_id` in the event\\nis smaller than or equal to the `sequence_id` in the originally\\nfetched resource."},{"nullable":false}]},"name":{"type":"string","description":"The name of the file","example":"Contract.pdf"},"sha1":{"type":"string","format":"digest","nullable":false,"example":"85136C79CBF9FE36BB9D05D0639C70C265C18D37","description":"The SHA1 hash of the file. This can be used to compare the contents\\nof a file on Box with a local file."},"file_version":{"allOf":[{"$ref":"#/definitions/FileVersion--Mini"},{"description":"The information about the current version of the file."}]}}}]},"File--Base":{"title":"File (Base)","type":"object","x-box-resource-id":"file--base","x-box-sanitized":true,"x-box-tag":"files","x-box-variants":["base","mini","standard","full"],"x-box-variant":"base","description":"The bare basic representation of a file, the minimal\\namount of fields returned when using the `fields` query\\nparameter.","properties":{"id":{"type":"string","nullable":false,"description":"The unique identifier that represent a file.\\n\\nThe ID for any file can be determined\\nby visiting a file in the web application\\nand copying the ID from the URL. For example,\\nfor the URL `https://*.app.box.com/files/123`\\nthe `file_id` is `123`.","example":"12345"},"etag":{"type":"string","example":"1","nullable":true,"description":"The HTTP `etag` of this file. This can be used within some API\\nendpoints in the `If-Match` and `If-None-Match` headers to only\\nperform changes on the file if (no) changes have happened."},"type":{"type":"string","description":"`file`","example":"file","enum":["file"],"nullable":false}}},"FileVersion--Mini":{"title":"File version (Mini)","type":"object","x-box-resource-id":"file_version--mini","x-box-variant":"mini","description":"A mini representation of a file version, used when\\nnested within another resource.","allOf":[{"$ref":"#/definitions/FileVersion--Base"},{"properties":{"sha1":{"type":"string","description":"The SHA1 hash of this version of the file.","example":"134b65991ed521fcfe4724b7d814ab8ded5185dc"}}}]},"FileVersion--Base":{"title":"File version (Base)","type":"object","x-box-resource-id":"file_version--base","x-box-sanitized":true,"x-box-variants":["base","mini","standard"],"x-box-variant":"base","description":"The bare basic representation of a file version, the minimal\\namount of fields returned when using the `fields` query\\nparameter.","properties":{"id":{"type":"string","nullable":false,"description":"The unique identifier that represent a file version.","example":"12345"},"type":{"type":"string","description":"`file_version`","example":"file_version","enum":["file_version"],"nullable":false}}},"Folder--Mini":{"title":"Folder (Mini)","type":"object","x-box-resource-id":"folder--mini","x-box-variant":"mini","description":"A mini representation of a file version, used when\\nnested under another resource.","allOf":[{"$ref":"#/definitions/Folder--Base"},{"properties":{"sequence_id":{"allOf":[{"$ref":"#/definitions/allOf_0"},{"nullable":false}]},"name":{"type":"string","description":"The name of the folder.","example":"Contracts","nullable":false}}}]},"Folder--Base":{"title":"Folder (Base)","type":"object","x-box-resource-id":"folder--base","x-box-sanitized":true,"x-box-tag":"folders","x-box-variants":["base","mini","standard","full"],"x-box-variant":"base","description":"The bare basic representation of a folder, the minimal\\namount of fields returned when using the `fields` query\\nparameter.","properties":{"id":{"type":"string","nullable":false,"description":"The unique identifier that represent a folder.\\n\\nThe ID for any folder can be determined\\nby visiting a folder in the web application\\nand copying the ID from the URL. For example,\\nfor the URL `https://*.app.box.com/folders/123`\\nthe `folder_id` is `123`.","example":"12345"},"etag":{"type":"string","nullable":true,"example":"1","description":"The HTTP `etag` of this folder. This can be used within some API\\nendpoints in the `If-Match` and `If-None-Match` headers to only\\nperform changes on the folder if (no) changes have happened."},"type":{"type":"string","description":"`folder`","example":"folder","enum":["folder"],"nullable":false}}},"allOf_0":{"type":"string","example":"3","nullable":false,"description":"A numeric identifier that represents the most recent user event\\nthat has been applied to this item.\\n\\nThis can be used in combination with the `GET /events`-endpoint\\nto filter out user events that would have occurred before this\\nidentifier was read.\\n\\nAn example would be where a Box Drive-like application\\nwould fetch an item via the API, and then listen to incoming\\nuser events for changes to the item. The application would\\nignore any user events where the `sequence_id` in the event\\nis smaller than or equal to the `sequence_id` in the originally\\nfetched resource."},"User--Mini":{"title":"User (Mini)","type":"object","x-box-resource-id":"user--mini","x-box-variant":"mini","description":"A mini representation of a user, as can be returned when nested within other\\nresources.","allOf":[{"$ref":"#/definitions/User--Base"},{"properties":{"name":{"type":"string","description":"The display name of this user","example":"Aaron Levie","maxLength":50,"nullable":false},"login":{"type":"string","format":"email","description":"The primary email address of this user","example":"ceo@example.com","nullable":false}}}]},"User--Base":{"title":"User (Base)","type":"object","x-box-resource-id":"user--base","x-box-tag":"users","x-box-variants":["base","mini","standard","full"],"x-box-variant":"base","description":"A mini representation of a user, used when\\nnested within another resource.","properties":{"id":{"type":"string","description":"The unique identifier for this user","example":"11446498"},"type":{"type":"string","description":"`user`","example":"user","nullable":false,"enum":["user"]}}}}}')}}]); \ No newline at end of file diff --git a/assets/js/890ab00c.06a8344d.js b/assets/js/890ab00c.06a8344d.js new file mode 100644 index 00000000..bbe7d4ae --- /dev/null +++ b/assets/js/890ab00c.06a8344d.js @@ -0,0 +1 @@ +(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[6474,9558],{37840:(e,s,a)=>{"use strict";a.r(s),a.d(s,{assets:()=>j,contentTitle:()=>x,default:()=>g,frontMatter:()=>u,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/refs/remoteFile","title":"\ud83c\udf10 $ref (as remote file)","description":"References remote file $ref showcase","source":"@site/docs/demo-viewer/refs/remoteFile.mdx","sourceDirName":"demo-viewer/refs","slug":"/demo-viewer/refs/remoteFile","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/refs/remoteFile.mdx","tags":[],"version":"current","frontMatter":{"description":"References remote file $ref showcase","title":"\ud83c\udf10 $ref (as remote file)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udca1 $ref (inline)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref"},"next":{"title":"\ud83e\uddf1 Schema Composition","permalink":"/docusaurus-json-schema-plugin/docs/category/-schema-composition"}}');var t=a(62540),m=a(28453),o=a(58069),c=a(16474),r=a(88307),i=a.n(r),l=a(61506),p=a(1890),h=a(65537),d=a(79329);const u={description:"References remote file $ref showcase",title:"\ud83c\udf10 $ref (as remote file)"},x="$ref (as local file)",j={},f=[];function y(e){const s={h1:"h1",header:"header",...(0,m.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"ref-as-local-file",children:"$ref (as local file)"})}),"\n",(0,t.jsxs)(h.default,{children:[(0,t.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(i(),{schema:c,resolverOptions:(0,l.A)({remote:!0})})}),(0,t.jsx)(d.default,{value:"resolverOptions",label:"resolverOptions",children:(0,t.jsx)(o.default,{language:"js",children:`${(0,p.A)((0,l.A)({remote:!0}))}`})}),(0,t.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(o.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function g(e={}){const{wrapper:s}={...(0,m.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(y,{...e})}):y(e)}},61506:(e,s,a)=>{"use strict";function n(e){return void 0===e&&(e=""),{resolve:s=>new Promise(((n,t)=>{const m=function(e,s){void 0===s&&(s="");const a=e.toString().split("/");let n=s;for(let t=0;tn(e.default))).catch((e=>t(e)))}))}}function t(e){return void 0===e&&(e="http"),{resolve:e=>new Promise(((s,a)=>{fetch(e.toString(),{headers:{Accept:"application/json"}}).then((e=>e.json())).then((e=>s(e))).catch((e=>a(e)))}))}}function m(e){const{basePath:s,jsonPointer:a,remote:m}=e;let o={};return s&&(o.resolvers={file:n(s)}),m&&(void 0===o.resolvers&&(o.resolvers={}),o.resolvers.http=t("http"),o.resolvers.https=t("https")),a&&(o.jsonPointer=a),o}a.d(s,{A:()=>m})},1890:(e,s,a)=>{"use strict";function n(e,s){void 0===s&&(s=2);return`{\n${Object.keys(e).map((a=>{const t=e[a];if("function"==typeof t){const e=t.toString().match(/function\s+([\w$]+)\s*\(([^)]*)\)/),n=e?e[1]:"anonymous",m=e?e[2].split(",").map((e=>e.trim())).join(", "):"";return`${" ".repeat(s)}${a}: function ${n}(${m}) { /* function body */ },`}return"object"!=typeof t||Array.isArray(t)||null===t?`${" ".repeat(s)}${a}: ${JSON.stringify(t)},`:`${" ".repeat(s)}${a}: ${n(t,s+2)},`})).join("\n")}\n${" ".repeat(s-2)}}`}a.d(s,{A:()=>n})},59620:(e,s,a)=>{var n={"./img/favicon.ico":[32532,9,2532],"./img/gear-tools.svg":[85711,9,5711],"./img/logo.svg":[86005,9,6005],"./img/opensource-icon.svg":[32155,9,2155],"./img/project_icon.svg":[32953,9,2953],"./img/undraw_code_review.svg":[63596,9,3596],"./schemas/examples/array/additionalItems1":[77240,3,7240],"./schemas/examples/array/additionalItems1.json":[77240,3,7240],"./schemas/examples/array/additionalItems2":[24629,3,4629],"./schemas/examples/array/additionalItems2.json":[24629,3,4629],"./schemas/examples/array/contains":[49567,3,9567],"./schemas/examples/array/contains.json":[49567,3,9567],"./schemas/examples/array/items":[4082,3,4082],"./schemas/examples/array/items.json":[4082,3,4082],"./schemas/examples/array/length":[18210,3,8210],"./schemas/examples/array/length.json":[18210,3,8210],"./schemas/examples/array/minContainsAndMaxContains":[53839,3,3839],"./schemas/examples/array/minContainsAndMaxContains.json":[53839,3,3839],"./schemas/examples/array/simple":[56864,3,6864],"./schemas/examples/array/simple.json":[56864,3,6864],"./schemas/examples/array/tuples":[62441,3,2441],"./schemas/examples/array/tuples.json":[62441,3,2441],"./schemas/examples/array/unevaluatedItems1":[9933,3,9933],"./schemas/examples/array/unevaluatedItems1.json":[9933,3,9933],"./schemas/examples/array/unevaluatedItems2":[54416,3,4416],"./schemas/examples/array/unevaluatedItems2.json":[54416,3,4416],"./schemas/examples/array/uniqueItems":[97095,3,7095],"./schemas/examples/array/uniqueItems.json":[97095,3,7095],"./schemas/examples/boolean/simple":[9175,3,9175],"./schemas/examples/boolean/simple.json":[9175,3,9175],"./schemas/examples/custom/description":[37662,3,7662],"./schemas/examples/custom/description.json":[37662,3,7662],"./schemas/examples/custom/unresolved_refs":[52498,3,2498],"./schemas/examples/custom/unresolved_refs.json":[52498,3,2498],"./schemas/examples/custom/values":[66546,3,6546],"./schemas/examples/custom/values.json":[66546,3,6546],"./schemas/examples/generic_keywords/annotations":[63563,3,3563],"./schemas/examples/generic_keywords/annotations.json":[63563,3,3563],"./schemas/examples/generic_keywords/const":[14130,3,4130],"./schemas/examples/generic_keywords/const.json":[14130,3,4130],"./schemas/examples/generic_keywords/enum":[4534,3,4534],"./schemas/examples/generic_keywords/enum.json":[4534,3,4534],"./schemas/examples/null/simple":[5040,3,5040],"./schemas/examples/null/simple.json":[5040,3,5040],"./schemas/examples/numeric/integer":[2910,3,2910],"./schemas/examples/numeric/integer.json":[2910,3,2910],"./schemas/examples/numeric/multipleOf":[94369,3,4369],"./schemas/examples/numeric/multipleOf.json":[94369,3,4369],"./schemas/examples/numeric/number":[99621,3,9621],"./schemas/examples/numeric/number.json":[99621,3,9621],"./schemas/examples/numeric/ranges":[9086,3,9086],"./schemas/examples/numeric/ranges.json":[9086,3,9086],"./schemas/examples/object/additionalProperties":[16368,3,6368],"./schemas/examples/object/additionalProperties.json":[16368,3,6368],"./schemas/examples/object/additionalProperties2":[47434,3,7434],"./schemas/examples/object/additionalProperties2.json":[47434,3,7434],"./schemas/examples/object/additionalPropertiesWithPatternProperties":[55951,3,5951],"./schemas/examples/object/additionalPropertiesWithPatternProperties.json":[55951,3,5951],"./schemas/examples/object/patternProperties":[17555,3,7555],"./schemas/examples/object/patternProperties.json":[17555,3,7555],"./schemas/examples/object/properties":[37669,3,7669],"./schemas/examples/object/properties.json":[37669,3,7669],"./schemas/examples/object/propertyNames":[55607,3,5607],"./schemas/examples/object/propertyNames.json":[55607,3,5607],"./schemas/examples/object/required":[68369,3,8369],"./schemas/examples/object/required.json":[68369,3,8369],"./schemas/examples/object/simpleObject":[93289,3,3289],"./schemas/examples/object/simpleObject.json":[93289,3,3289],"./schemas/examples/object/size":[75113,3,5113],"./schemas/examples/object/size.json":[75113,3,5113],"./schemas/examples/object/unevaluatedProperties":[34437,3,4437],"./schemas/examples/object/unevaluatedProperties.json":[34437,3,4437],"./schemas/examples/object/unevaluatedProperties1":[44360,3,4360],"./schemas/examples/object/unevaluatedProperties1.json":[44360,3,4360],"./schemas/examples/object/unevaluatedProperties2":[30277,3,277],"./schemas/examples/object/unevaluatedProperties2.json":[30277,3,277],"./schemas/examples/refs/localFile":[8180,3,8180],"./schemas/examples/refs/localFile.json":[8180,3,8180],"./schemas/examples/refs/refOnRoot":[63601,3,3601],"./schemas/examples/refs/refOnRoot.json":[63601,3,3601],"./schemas/examples/refs/remoteRef":[16474,3,6474],"./schemas/examples/refs/remoteRef.json":[16474,3,6474],"./schemas/examples/schema_composition/allOf":[4275,3,4275],"./schemas/examples/schema_composition/allOf.json":[4275,3,4275],"./schemas/examples/schema_composition/anyOf":[83974,3,3974],"./schemas/examples/schema_composition/anyOf.json":[83974,3,3974],"./schemas/examples/schema_composition/not":[15648,3,5648],"./schemas/examples/schema_composition/not.json":[15648,3,5648],"./schemas/examples/schema_composition/oneOf":[33536,3,3536],"./schemas/examples/schema_composition/oneOf.json":[33536,3,3536],"./schemas/examples/schema_conditionally/dependencies_dependentRequired":[12304,3,2304],"./schemas/examples/schema_conditionally/dependencies_dependentRequired.json":[12304,3,2304],"./schemas/examples/schema_conditionally/dependencies_dependentSchemas":[42783,3,2783],"./schemas/examples/schema_conditionally/dependencies_dependentSchemas.json":[42783,3,2783],"./schemas/examples/schema_conditionally/dependentRequired":[1250,3,1250],"./schemas/examples/schema_conditionally/dependentRequired.json":[1250,3,1250],"./schemas/examples/schema_conditionally/dependentRequired_bidirectional":[62186,3,2186],"./schemas/examples/schema_conditionally/dependentRequired_bidirectional.json":[62186,3,2186],"./schemas/examples/schema_conditionally/dependentSchemas":[80561,3,561],"./schemas/examples/schema_conditionally/dependentSchemas.json":[80561,3,561],"./schemas/examples/schema_conditionally/if-then-else":[2881,3,2881],"./schemas/examples/schema_conditionally/if-then-else.json":[2881,3,2881],"./schemas/examples/schema_conditionally/if-then-else_multiple":[89534,3,9534],"./schemas/examples/schema_conditionally/if-then-else_multiple.json":[89534,3,9534],"./schemas/examples/string/basic":[94820,3,4820],"./schemas/examples/string/basic.json":[94820,3,4820],"./schemas/examples/string/contentEncoding":[12570,3,2570],"./schemas/examples/string/contentEncoding.json":[12570,3,2570],"./schemas/examples/string/contentEncodingWithContentMediaType":[80513,3,513],"./schemas/examples/string/contentEncodingWithContentMediaType.json":[80513,3,513],"./schemas/examples/string/contentMediaType":[95741,3,5741],"./schemas/examples/string/contentMediaType.json":[95741,3,5741],"./schemas/examples/string/contentSchema":[1616,3,1616],"./schemas/examples/string/contentSchema.json":[1616,3,1616],"./schemas/examples/string/format":[9569,3,9569],"./schemas/examples/string/format.json":[9569,3,9569],"./schemas/examples/string/length":[92334,3,2334],"./schemas/examples/string/length.json":[92334,3,2334],"./schemas/examples/string/pattern":[75188,3,5188],"./schemas/examples/string/pattern.json":[75188,3,5188],"./schemas/examples/type/multipleType":[65465,3,5465],"./schemas/examples/type/multipleType.json":[65465,3,5465],"./schemas/examples/type/singleType":[41201,3,1201],"./schemas/examples/type/singleType.json":[41201,3,1201],"./schemas/realWorld/boxFileSchema":[4651,3,4651],"./schemas/realWorld/boxFileSchema.json":[4651,3,4651],"./schemas/realWorld/githubIssueSchema":[91530,3,1530],"./schemas/realWorld/githubIssueSchema.json":[91530,3,1530]};function t(e){if(!a.o(n,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=n[e],t=s[0];return a.e(s[2]).then((()=>a.t(t,16|s[1])))}t.keys=()=>Object.keys(n),t.id=59620,e.exports=t},16474:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"externalProp":{"$ref":"https://raw.githubusercontent.com/jy95/docusaurus-json-schema-plugin/main/testsite/static/schemas/examples/array/tuples.json"}}}')}}]); \ No newline at end of file diff --git a/assets/js/890ab00c.f1127092.js b/assets/js/890ab00c.f1127092.js deleted file mode 100644 index 8acbf2c1..00000000 --- a/assets/js/890ab00c.f1127092.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[6474,9558],{36722:(e,s,a)=>{"use strict";a.r(s),a.d(s,{assets:()=>j,contentTitle:()=>x,default:()=>g,frontMatter:()=>u,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/refs/remoteFile","title":"\ud83c\udf10 $ref (as remote file)","description":"References remote file $ref showcase","source":"@site/docs/demo-viewer/refs/remoteFile.mdx","sourceDirName":"demo-viewer/refs","slug":"/demo-viewer/refs/remoteFile","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/refs/remoteFile.mdx","tags":[],"version":"current","frontMatter":{"description":"References remote file $ref showcase","title":"\ud83c\udf10 $ref (as remote file)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udca1 $ref (inline)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref"},"next":{"title":"\ud83e\uddf1 Schema Composition","permalink":"/docusaurus-json-schema-plugin/docs/category/-schema-composition"}}');var t=a(62540),m=a(28453),o=a(21432),c=a(16474),r=a(21344),i=a.n(r),l=a(96988),p=a(29585),h=a(11470),d=a(19365);const u={description:"References remote file $ref showcase",title:"\ud83c\udf10 $ref (as remote file)"},x="$ref (as local file)",j={},f=[];function y(e){const s={h1:"h1",header:"header",...(0,m.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"ref-as-local-file",children:"$ref (as local file)"})}),"\n",(0,t.jsxs)(h.default,{children:[(0,t.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(i(),{schema:c,resolverOptions:(0,l.A)({remote:!0})})}),(0,t.jsx)(d.default,{value:"resolverOptions",label:"resolverOptions",children:(0,t.jsx)(o.default,{language:"js",children:`${(0,p.A)((0,l.A)({remote:!0}))}`})}),(0,t.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(o.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function g(e={}){const{wrapper:s}={...(0,m.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(y,{...e})}):y(e)}},96988:(e,s,a)=>{"use strict";function n(e){return void 0===e&&(e=""),{resolve:s=>new Promise(((n,t)=>{const m=function(e,s){void 0===s&&(s="");const a=e.toString().split("/");let n=s;for(let t=0;tn(e.default))).catch((e=>t(e)))}))}}function t(e){return void 0===e&&(e="http"),{resolve:e=>new Promise(((s,a)=>{fetch(e.toString(),{headers:{Accept:"application/json"}}).then((e=>e.json())).then((e=>s(e))).catch((e=>a(e)))}))}}function m(e){const{basePath:s,jsonPointer:a,remote:m}=e;let o={};return s&&(o.resolvers={file:n(s)}),m&&(void 0===o.resolvers&&(o.resolvers={}),o.resolvers.http=t("http"),o.resolvers.https=t("https")),a&&(o.jsonPointer=a),o}a.d(s,{A:()=>m})},29585:(e,s,a)=>{"use strict";function n(e,s){void 0===s&&(s=2);return`{\n${Object.keys(e).map((a=>{const t=e[a];if("function"==typeof t){const e=t.toString().match(/function\s+([\w$]+)\s*\(([^)]*)\)/),n=e?e[1]:"anonymous",m=e?e[2].split(",").map((e=>e.trim())).join(", "):"";return`${" ".repeat(s)}${a}: function ${n}(${m}) { /* function body */ },`}return"object"!=typeof t||Array.isArray(t)||null===t?`${" ".repeat(s)}${a}: ${JSON.stringify(t)},`:`${" ".repeat(s)}${a}: ${n(t,s+2)},`})).join("\n")}\n${" ".repeat(s-2)}}`}a.d(s,{A:()=>n})},59620:(e,s,a)=>{var n={"./img/favicon.ico":[32532,9,2532],"./img/gear-tools.svg":[19229,9,9229],"./img/logo.svg":[18187,9,8187],"./img/opensource-icon.svg":[16949,9,6949],"./img/project_icon.svg":[30635,9,635],"./img/undraw_code_review.svg":[82022,9,2022],"./schemas/examples/array/additionalItems1":[77240,3,7240],"./schemas/examples/array/additionalItems1.json":[77240,3,7240],"./schemas/examples/array/additionalItems2":[24629,3,4629],"./schemas/examples/array/additionalItems2.json":[24629,3,4629],"./schemas/examples/array/contains":[49567,3,9567],"./schemas/examples/array/contains.json":[49567,3,9567],"./schemas/examples/array/items":[4082,3,4082],"./schemas/examples/array/items.json":[4082,3,4082],"./schemas/examples/array/length":[18210,3,8210],"./schemas/examples/array/length.json":[18210,3,8210],"./schemas/examples/array/minContainsAndMaxContains":[53839,3,3839],"./schemas/examples/array/minContainsAndMaxContains.json":[53839,3,3839],"./schemas/examples/array/simple":[56864,3,6864],"./schemas/examples/array/simple.json":[56864,3,6864],"./schemas/examples/array/tuples":[62441,3,2441],"./schemas/examples/array/tuples.json":[62441,3,2441],"./schemas/examples/array/unevaluatedItems1":[9933,3,9933],"./schemas/examples/array/unevaluatedItems1.json":[9933,3,9933],"./schemas/examples/array/unevaluatedItems2":[54416,3,4416],"./schemas/examples/array/unevaluatedItems2.json":[54416,3,4416],"./schemas/examples/array/uniqueItems":[97095,3,7095],"./schemas/examples/array/uniqueItems.json":[97095,3,7095],"./schemas/examples/boolean/simple":[9175,3,9175],"./schemas/examples/boolean/simple.json":[9175,3,9175],"./schemas/examples/custom/description":[37662,3,7662],"./schemas/examples/custom/description.json":[37662,3,7662],"./schemas/examples/custom/unresolved_refs":[52498,3,2498],"./schemas/examples/custom/unresolved_refs.json":[52498,3,2498],"./schemas/examples/custom/values":[66546,3,6546],"./schemas/examples/custom/values.json":[66546,3,6546],"./schemas/examples/generic_keywords/annotations":[63563,3,3563],"./schemas/examples/generic_keywords/annotations.json":[63563,3,3563],"./schemas/examples/generic_keywords/const":[14130,3,4130],"./schemas/examples/generic_keywords/const.json":[14130,3,4130],"./schemas/examples/generic_keywords/enum":[4534,3,4534],"./schemas/examples/generic_keywords/enum.json":[4534,3,4534],"./schemas/examples/null/simple":[5040,3,5040],"./schemas/examples/null/simple.json":[5040,3,5040],"./schemas/examples/numeric/integer":[2910,3,2910],"./schemas/examples/numeric/integer.json":[2910,3,2910],"./schemas/examples/numeric/multipleOf":[94369,3,4369],"./schemas/examples/numeric/multipleOf.json":[94369,3,4369],"./schemas/examples/numeric/number":[99621,3,9621],"./schemas/examples/numeric/number.json":[99621,3,9621],"./schemas/examples/numeric/ranges":[9086,3,9086],"./schemas/examples/numeric/ranges.json":[9086,3,9086],"./schemas/examples/object/additionalProperties":[16368,3,6368],"./schemas/examples/object/additionalProperties.json":[16368,3,6368],"./schemas/examples/object/additionalProperties2":[47434,3,7434],"./schemas/examples/object/additionalProperties2.json":[47434,3,7434],"./schemas/examples/object/additionalPropertiesWithPatternProperties":[55951,3,5951],"./schemas/examples/object/additionalPropertiesWithPatternProperties.json":[55951,3,5951],"./schemas/examples/object/patternProperties":[17555,3,7555],"./schemas/examples/object/patternProperties.json":[17555,3,7555],"./schemas/examples/object/properties":[37669,3,7669],"./schemas/examples/object/properties.json":[37669,3,7669],"./schemas/examples/object/propertyNames":[55607,3,5607],"./schemas/examples/object/propertyNames.json":[55607,3,5607],"./schemas/examples/object/required":[68369,3,8369],"./schemas/examples/object/required.json":[68369,3,8369],"./schemas/examples/object/simpleObject":[93289,3,3289],"./schemas/examples/object/simpleObject.json":[93289,3,3289],"./schemas/examples/object/size":[75113,3,5113],"./schemas/examples/object/size.json":[75113,3,5113],"./schemas/examples/object/unevaluatedProperties":[34437,3,4437],"./schemas/examples/object/unevaluatedProperties.json":[34437,3,4437],"./schemas/examples/object/unevaluatedProperties1":[44360,3,4360],"./schemas/examples/object/unevaluatedProperties1.json":[44360,3,4360],"./schemas/examples/object/unevaluatedProperties2":[30277,3,277],"./schemas/examples/object/unevaluatedProperties2.json":[30277,3,277],"./schemas/examples/refs/localFile":[8180,3,8180],"./schemas/examples/refs/localFile.json":[8180,3,8180],"./schemas/examples/refs/refOnRoot":[63601,3,3601],"./schemas/examples/refs/refOnRoot.json":[63601,3,3601],"./schemas/examples/refs/remoteRef":[16474,3,6474],"./schemas/examples/refs/remoteRef.json":[16474,3,6474],"./schemas/examples/schema_composition/allOf":[4275,3,4275],"./schemas/examples/schema_composition/allOf.json":[4275,3,4275],"./schemas/examples/schema_composition/anyOf":[83974,3,3974],"./schemas/examples/schema_composition/anyOf.json":[83974,3,3974],"./schemas/examples/schema_composition/not":[15648,3,5648],"./schemas/examples/schema_composition/not.json":[15648,3,5648],"./schemas/examples/schema_composition/oneOf":[33536,3,3536],"./schemas/examples/schema_composition/oneOf.json":[33536,3,3536],"./schemas/examples/schema_conditionally/dependencies_dependentRequired":[12304,3,2304],"./schemas/examples/schema_conditionally/dependencies_dependentRequired.json":[12304,3,2304],"./schemas/examples/schema_conditionally/dependencies_dependentSchemas":[42783,3,2783],"./schemas/examples/schema_conditionally/dependencies_dependentSchemas.json":[42783,3,2783],"./schemas/examples/schema_conditionally/dependentRequired":[1250,3,1250],"./schemas/examples/schema_conditionally/dependentRequired.json":[1250,3,1250],"./schemas/examples/schema_conditionally/dependentRequired_bidirectional":[62186,3,2186],"./schemas/examples/schema_conditionally/dependentRequired_bidirectional.json":[62186,3,2186],"./schemas/examples/schema_conditionally/dependentSchemas":[80561,3,561],"./schemas/examples/schema_conditionally/dependentSchemas.json":[80561,3,561],"./schemas/examples/schema_conditionally/if-then-else":[2881,3,2881],"./schemas/examples/schema_conditionally/if-then-else.json":[2881,3,2881],"./schemas/examples/schema_conditionally/if-then-else_multiple":[89534,3,9534],"./schemas/examples/schema_conditionally/if-then-else_multiple.json":[89534,3,9534],"./schemas/examples/string/basic":[94820,3,4820],"./schemas/examples/string/basic.json":[94820,3,4820],"./schemas/examples/string/contentEncoding":[12570,3,2570],"./schemas/examples/string/contentEncoding.json":[12570,3,2570],"./schemas/examples/string/contentEncodingWithContentMediaType":[80513,3,513],"./schemas/examples/string/contentEncodingWithContentMediaType.json":[80513,3,513],"./schemas/examples/string/contentMediaType":[95741,3,5741],"./schemas/examples/string/contentMediaType.json":[95741,3,5741],"./schemas/examples/string/contentSchema":[1616,3,1616],"./schemas/examples/string/contentSchema.json":[1616,3,1616],"./schemas/examples/string/format":[9569,3,9569],"./schemas/examples/string/format.json":[9569,3,9569],"./schemas/examples/string/length":[92334,3,2334],"./schemas/examples/string/length.json":[92334,3,2334],"./schemas/examples/string/pattern":[75188,3,5188],"./schemas/examples/string/pattern.json":[75188,3,5188],"./schemas/examples/type/multipleType":[65465,3,5465],"./schemas/examples/type/multipleType.json":[65465,3,5465],"./schemas/examples/type/singleType":[41201,3,1201],"./schemas/examples/type/singleType.json":[41201,3,1201],"./schemas/realWorld/boxFileSchema":[4651,3,4651],"./schemas/realWorld/boxFileSchema.json":[4651,3,4651],"./schemas/realWorld/githubIssueSchema":[91530,3,1530],"./schemas/realWorld/githubIssueSchema.json":[91530,3,1530]};function t(e){if(!a.o(n,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=n[e],t=s[0];return a.e(s[2]).then((()=>a.t(t,16|s[1])))}t.keys=()=>Object.keys(n),t.id=59620,e.exports=t},16474:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"externalProp":{"$ref":"https://raw.githubusercontent.com/jy95/docusaurus-json-schema-plugin/main/testsite/static/schemas/examples/array/tuples.json"}}}')}}]); \ No newline at end of file diff --git a/assets/js/8e80fdd7.b7eab5d2.js b/assets/js/8e80fdd7.b7eab5d2.js new file mode 100644 index 00000000..46a109a9 --- /dev/null +++ b/assets/js/8e80fdd7.b7eab5d2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[415,2910],{91879:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"demo-viewer/numeric/integer","title":"1\ufe0f\u20e3 Integer","description":"basic integer showcase","source":"@site/docs/demo-viewer/numeric/integer.mdx","sourceDirName":"demo-viewer/numeric","slug":"/demo-viewer/numeric/integer","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/numeric/integer.mdx","tags":[],"version":"current","frontMatter":{"description":"basic integer showcase","title":"1\ufe0f\u20e3 Integer"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd22 Numeric","permalink":"/docusaurus-json-schema-plugin/docs/category/-numeric"},"next":{"title":"\u2716\ufe0f Multiple Of","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf"}}');var i=r(62540),n=r(28453),c=r(58069),a=r(2910),u=r(88307),o=r.n(u),l=r(65537),d=r(79329);const m={description:"basic integer showcase",title:"1\ufe0f\u20e3 Integer"},h="Integer",g={},p=[];function f(e){const t={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"integer",children:"Integer"})}),"\n",(0,i.jsxs)(l.default,{children:[(0,i.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(o(),{schema:a})}),(0,i.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(c.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function j(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(f,{...e})}):f(e)}},2910:e=>{e.exports={type:"integer"}}}]); \ No newline at end of file diff --git a/assets/js/8e80fdd7.f8f9e441.js b/assets/js/8e80fdd7.f8f9e441.js deleted file mode 100644 index 993b3a90..00000000 --- a/assets/js/8e80fdd7.f8f9e441.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[415,2910],{4618:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"demo-viewer/numeric/integer","title":"1\ufe0f\u20e3 Integer","description":"basic integer showcase","source":"@site/docs/demo-viewer/numeric/integer.mdx","sourceDirName":"demo-viewer/numeric","slug":"/demo-viewer/numeric/integer","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/numeric/integer.mdx","tags":[],"version":"current","frontMatter":{"description":"basic integer showcase","title":"1\ufe0f\u20e3 Integer"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd22 Numeric","permalink":"/docusaurus-json-schema-plugin/docs/category/-numeric"},"next":{"title":"\u2716\ufe0f Multiple Of","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf"}}');var i=r(62540),n=r(28453),c=r(21432),a=r(2910),u=r(21344),o=r.n(u),l=r(11470),d=r(19365);const m={description:"basic integer showcase",title:"1\ufe0f\u20e3 Integer"},h="Integer",g={},p=[];function f(e){const t={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"integer",children:"Integer"})}),"\n",(0,i.jsxs)(l.default,{children:[(0,i.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(o(),{schema:a})}),(0,i.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(c.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function j(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(f,{...e})}):f(e)}},2910:e=>{e.exports={type:"integer"}}}]); \ No newline at end of file diff --git a/assets/js/8f884ddd.80374dab.js b/assets/js/8f884ddd.4bd8bfb9.js similarity index 92% rename from assets/js/8f884ddd.80374dab.js rename to assets/js/8f884ddd.4bd8bfb9.js index 2683bb5a..6bf90d37 100644 --- a/assets/js/8f884ddd.80374dab.js +++ b/assets/js/8f884ddd.4bd8bfb9.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2304,9233],{80583:(e,n,d)=>{d.r(n),d.d(n,{assets:()=>m,contentTitle:()=>h,default:()=>j,frontMatter:()=>u,metadata:()=>i,toc:()=>y});const i=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependencies_dependentRequired","title":"\ud83e\udd1e dependencies (dependentRequired)","description":"schema conditionally with dependencies (dependentRequired) showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependencies_dependentRequired","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependencies (dependentRequired) showcase","title":"\ud83e\udd1e dependencies (dependentRequired)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udea6 Schema Conditionally","permalink":"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally"},"next":{"title":"\ud83c\udf33 dependencies (dependentSchemas)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas"}}');var s=d(62540),t=d(28453),c=d(21432),r=d(12304),a=d(21344),o=d.n(a),l=d(11470),p=d(19365);const u={description:"schema conditionally with dependencies (dependentRequired) showcase",title:"\ud83e\udd1e dependencies (dependentRequired)"},h="dependencies (dependentRequired)",m={},y=[];function w(e){const n={h1:"h1",header:"header",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"dependencies-dependentrequired",children:"dependencies (dependentRequired)"})}),"\n",(0,s.jsxs)(l.default,{children:[(0,s.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(o(),{schema:r})}),(0,s.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(c.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function j(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(w,{...e})}):w(e)}},12304:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"},"billing_address":{"type":"string"}},"required":["name"],"dependencies":{"credit_card":["billing_address"]}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2304,9233],{22782:(e,n,d)=>{d.r(n),d.d(n,{assets:()=>m,contentTitle:()=>h,default:()=>j,frontMatter:()=>u,metadata:()=>i,toc:()=>y});const i=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependencies_dependentRequired","title":"\ud83e\udd1e dependencies (dependentRequired)","description":"schema conditionally with dependencies (dependentRequired) showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependencies_dependentRequired","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependencies (dependentRequired) showcase","title":"\ud83e\udd1e dependencies (dependentRequired)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udea6 Schema Conditionally","permalink":"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally"},"next":{"title":"\ud83c\udf33 dependencies (dependentSchemas)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas"}}');var s=d(62540),t=d(28453),c=d(58069),r=d(12304),a=d(88307),o=d.n(a),l=d(65537),p=d(79329);const u={description:"schema conditionally with dependencies (dependentRequired) showcase",title:"\ud83e\udd1e dependencies (dependentRequired)"},h="dependencies (dependentRequired)",m={},y=[];function w(e){const n={h1:"h1",header:"header",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"dependencies-dependentrequired",children:"dependencies (dependentRequired)"})}),"\n",(0,s.jsxs)(l.default,{children:[(0,s.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(o(),{schema:r})}),(0,s.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(c.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function j(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(w,{...e})}):w(e)}},12304:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"},"billing_address":{"type":"string"}},"required":["name"],"dependencies":{"credit_card":["billing_address"]}}')}}]); \ No newline at end of file diff --git a/assets/js/8f9be69b.8774b9cb.js b/assets/js/8f9be69b.8774b9cb.js new file mode 100644 index 00000000..fc048b64 --- /dev/null +++ b/assets/js/8f9be69b.8774b9cb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7808,9621],{5323:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>b,contentTitle:()=>h,default:()=>j,frontMatter:()=>l,metadata:()=>n,toc:()=>p});const n=JSON.parse('{"id":"demo-viewer/numeric/number","title":"\ud83d\udd22 Number","description":"basic number showcase","source":"@site/docs/demo-viewer/numeric/number.mdx","sourceDirName":"demo-viewer/numeric","slug":"/demo-viewer/numeric/number","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/numeric/number.mdx","tags":[],"version":"current","frontMatter":{"description":"basic number showcase","title":"\ud83d\udd22 Number"},"sidebar":"tutorialSidebar","previous":{"title":"\u2716\ufe0f Multiple Of","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf"},"next":{"title":"\ud83c\udf21\ufe0f Ranges","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges"}}');var t=s(62540),i=s(28453),u=s(58069),a=s(99621),c=s(88307),m=s.n(c),o=s(65537),d=s(79329);const l={description:"basic number showcase",title:"\ud83d\udd22 Number"},h="Number",b={},p=[];function f(e){const r={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"number",children:"Number"})}),"\n",(0,t.jsxs)(o.default,{children:[(0,t.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(m(),{schema:a})}),(0,t.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(u.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function j(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(f,{...e})}):f(e)}},99621:e=>{e.exports={type:"number"}}}]); \ No newline at end of file diff --git a/assets/js/8f9be69b.d2dd102b.js b/assets/js/8f9be69b.d2dd102b.js deleted file mode 100644 index 28680190..00000000 --- a/assets/js/8f9be69b.d2dd102b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7808,9621],{19353:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>b,contentTitle:()=>h,default:()=>j,frontMatter:()=>l,metadata:()=>n,toc:()=>p});const n=JSON.parse('{"id":"demo-viewer/numeric/number","title":"\ud83d\udd22 Number","description":"basic number showcase","source":"@site/docs/demo-viewer/numeric/number.mdx","sourceDirName":"demo-viewer/numeric","slug":"/demo-viewer/numeric/number","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/numeric/number.mdx","tags":[],"version":"current","frontMatter":{"description":"basic number showcase","title":"\ud83d\udd22 Number"},"sidebar":"tutorialSidebar","previous":{"title":"\u2716\ufe0f Multiple Of","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf"},"next":{"title":"\ud83c\udf21\ufe0f Ranges","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges"}}');var t=s(62540),i=s(28453),u=s(21432),a=s(99621),c=s(21344),m=s.n(c),o=s(11470),d=s(19365);const l={description:"basic number showcase",title:"\ud83d\udd22 Number"},h="Number",b={},p=[];function f(e){const r={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"number",children:"Number"})}),"\n",(0,t.jsxs)(o.default,{children:[(0,t.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,t.jsx)(m(),{schema:a})}),(0,t.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,t.jsx)(u.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function j(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(f,{...e})}):f(e)}},99621:e=>{e.exports={type:"number"}}}]); \ No newline at end of file diff --git a/assets/js/9028850b.3a6c8c6c.js b/assets/js/9028850b.3a6c8c6c.js new file mode 100644 index 00000000..d7e4501e --- /dev/null +++ b/assets/js/9028850b.3a6c8c6c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1309,2441],{48611:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>h,contentTitle:()=>m,default:()=>v,frontMatter:()=>p,metadata:()=>r,toc:()=>f});const r=JSON.parse('{"id":"demo-viewer/array/tuples","title":"\ud83d\udccb Tuples","description":"array with prefixItems / items (false) showcase","source":"@site/docs/demo-viewer/array/tuples.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/tuples","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/tuples.mdx","tags":[],"version":"current","frontMatter":{"description":"array with prefixItems / items (false) showcase","title":"\ud83d\udccb Tuples"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udfe6 Simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple"},"next":{"title":"\ud83e\udd14 UnevaluatedItems (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1"}}');var a=t(62540),i=t(28453),n=t(58069),l=t(62441),u=t(88307),d=t.n(u),o=t(65537),c=t(79329);const p={description:"array with prefixItems / items (false) showcase",title:"\ud83d\udccb Tuples"},m="Tuples",h={},f=[];function y(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"tuples",children:"Tuples"})}),"\n",(0,a.jsxs)(o.default,{children:[(0,a.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:l})}),(0,a.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(n.default,{language:"json-schema",children:JSON.stringify(l,null,2)})})]})]})}function v(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(y,{...e})}):y(e)}},62441:e=>{e.exports=JSON.parse('{"type":"array","description":"Represent a street address such as [\'1600\',\'Pennsylvania\',\'Avenue\',\'NW\']","items":false,"prefixItems":[{"type":"number","description":"The address number"},{"type":"string","description":"The name of the street"},{"enum":["Street","Avenue","Boulevard"],"description":"The type of street"},{"enum":["NW","NE","SW","SE"],"description":"The city quadrant of the address"}]}')}}]); \ No newline at end of file diff --git a/assets/js/9028850b.b07f37ed.js b/assets/js/9028850b.b07f37ed.js deleted file mode 100644 index f11731db..00000000 --- a/assets/js/9028850b.b07f37ed.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1309,2441],{505:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>h,contentTitle:()=>m,default:()=>v,frontMatter:()=>p,metadata:()=>r,toc:()=>f});const r=JSON.parse('{"id":"demo-viewer/array/tuples","title":"\ud83d\udccb Tuples","description":"array with prefixItems / items (false) showcase","source":"@site/docs/demo-viewer/array/tuples.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/tuples","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/tuples.mdx","tags":[],"version":"current","frontMatter":{"description":"array with prefixItems / items (false) showcase","title":"\ud83d\udccb Tuples"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udfe6 Simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple"},"next":{"title":"\ud83e\udd14 UnevaluatedItems (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1"}}');var a=t(62540),i=t(28453),n=t(21432),l=t(62441),u=t(21344),d=t.n(u),o=t(11470),c=t(19365);const p={description:"array with prefixItems / items (false) showcase",title:"\ud83d\udccb Tuples"},m="Tuples",h={},f=[];function y(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"tuples",children:"Tuples"})}),"\n",(0,a.jsxs)(o.default,{children:[(0,a.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:l})}),(0,a.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(n.default,{language:"json-schema",children:JSON.stringify(l,null,2)})})]})]})}function v(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(y,{...e})}):y(e)}},62441:e=>{e.exports=JSON.parse('{"type":"array","description":"Represent a street address such as [\'1600\',\'Pennsylvania\',\'Avenue\',\'NW\']","items":false,"prefixItems":[{"type":"number","description":"The address number"},{"type":"string","description":"The name of the street"},{"enum":["Street","Avenue","Boulevard"],"description":"The type of street"},{"enum":["NW","NE","SW","SE"],"description":"The city quadrant of the address"}]}')}}]); \ No newline at end of file diff --git a/assets/js/5274.2f36e9f9.js b/assets/js/9295.254bd121.js similarity index 99% rename from assets/js/5274.2f36e9f9.js rename to assets/js/9295.254bd121.js index abeb9975..acdeabd8 100644 --- a/assets/js/5274.2f36e9f9.js +++ b/assets/js/9295.254bd121.js @@ -1,2 +1,2 @@ -/*! For license information please see 5274.2f36e9f9.js.LICENSE.txt */ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5274],{85868:(e,t,i)=>{i.r(t),i.d(t,{CancellationTokenSource:()=>ere,Emitter:()=>tre,KeyCode:()=>ire,KeyMod:()=>nre,MarkerSeverity:()=>lre,MarkerTag:()=>hre,Position:()=>sre,Range:()=>ore,Selection:()=>rre,SelectionDirection:()=>are,Token:()=>cre,Uri:()=>dre,default:()=>kre,editor:()=>ure,languages:()=>gre});var n={};i.r(n),i.d(n,{CancellationTokenSource:()=>ere,Emitter:()=>tre,KeyCode:()=>ire,KeyMod:()=>nre,MarkerSeverity:()=>lre,MarkerTag:()=>hre,Position:()=>sre,Range:()=>ore,Selection:()=>rre,SelectionDirection:()=>are,Token:()=>cre,Uri:()=>dre,editor:()=>ure,languages:()=>gre});var s={};i.r(s),i.d(s,{CancellationTokenSource:()=>ere,Emitter:()=>tre,KeyCode:()=>ire,KeyMod:()=>nre,MarkerSeverity:()=>lre,MarkerTag:()=>hre,Position:()=>sre,Range:()=>ore,Selection:()=>rre,SelectionDirection:()=>are,Token:()=>cre,Uri:()=>dre,default:()=>kre,editor:()=>ure,languages:()=>gre});const o=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(m.isErrorNoTelemetry(e))throw new m(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function r(e){d(e)||o.onUnexpectedError(e)}function a(e){d(e)||o.onUnexpectedExternalError(e)}function l(e){if(e instanceof Error){const{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack,noTelemetry:m.isErrorNoTelemetry(e)}}return e}const h="Canceled";function d(e){return e instanceof c||e instanceof Error&&e.name===h&&e.message===h}class c extends Error{constructor(){super(h),this.name=this.message}}function u(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function g(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class p extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class m extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof m)return e;const t=new m;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}function _(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}var v;!function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const i=Object.freeze([]);function*n(e){yield e}e.empty=function(){return i},e.single=n,e.wrap=function(e){return t(e)?e:n(e)},e.from=function(e){return e||i},e.reverse=function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const s of e)n=t(n,s);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);ts}]}}(v||(v={}));let b=null;function C(e){return null==b||b.trackDisposable(e),e}function w(e){null==b||b.markAsDisposed(e)}function y(e,t){null==b||b.setParent(e,t)}function S(e){return null==b||b.markAsSingleton(e),e}function L(e){return"function"==typeof e.dispose&&0===e.dispose.length}function k(e){if(v.is(e)){const i=[];for(const n of e)if(n)try{n.dispose()}catch(t){i.push(t)}if(1===i.length)throw i[0];if(i.length>1)throw new AggregateError(i,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function D(...e){const t=x((()=>k(e)));return function(e,t){if(b)for(const i of e)b.setParent(i,t)}(e,t),t}function x(e){const t=C({dispose:_((()=>{w(t),e()}))});return t}class N{constructor(){this._toDispose=new Set,this._isDisposed=!1,C(this)}dispose(){this._isDisposed||(w(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{k(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return y(e,this),this._isDisposed?N.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),y(e,null))}}N.DISABLE_DISPOSED_WARNING=!1;class E{constructor(){this._store=new N,C(this),y(this._store,this)}dispose(){w(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}E.None=Object.freeze({dispose(){}});class I{constructor(){this._isDisposed=!1,C(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),e&&y(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,w(this),null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}}class M{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0==--this._counter&&this._disposable.dispose(),this}}class T{constructor(e){this.object=e}dispose(){}}class R{constructor(){this._store=new Map,this._isDisposed=!1,C(this)}dispose(){w(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{k(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){var n;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||null===(n=this._store.get(e))||void 0===n||n.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;null===(t=this._store.get(e))||void 0===t||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}class A{constructor(e){this.element=e,this.next=A.Undefined,this.prev=A.Undefined}}A.Undefined=new A(void 0);class O{constructor(){this._first=A.Undefined,this._last=A.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===A.Undefined}clear(){let e=this._first;for(;e!==A.Undefined;){const t=e.next;e.prev=A.Undefined,e.next=A.Undefined,e=t}this._first=A.Undefined,this._last=A.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new A(e);if(this._first===A.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==A.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==A.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==A.Undefined&&e.next!==A.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===A.Undefined&&e.next===A.Undefined?(this._first=A.Undefined,this._last=A.Undefined):e.next===A.Undefined?(this._last=this._last.prev,this._last.next=A.Undefined):e.prev===A.Undefined&&(this._first=this._first.next,this._first.prev=A.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==A.Undefined;)yield e.element,e=e.next}}const P=globalThis.performance&&"function"==typeof globalThis.performance.now;class F{static create(e){return new F(e)}constructor(e){this._now=P&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}var B;!function(e){function t(e){false}function i(e){return(t,i=null,n)=>{let s,o=!1;return s=e((e=>{if(!o)return s?s.dispose():o=!0,t.call(i,e)}),null,n),o&&s.dispose(),s}}function n(e,t,i){return o(((i,n=null,s)=>e((e=>i.call(n,t(e))),null,s)),i)}function s(e,t,i){return o(((i,n=null,s)=>e((e=>t(e)&&i.call(n,e)),null,s)),i)}function o(e,i){let n;const s={onWillAddFirstListener(){n=e(o.fire,o)},onDidRemoveLastListener(){null==n||n.dispose()}};i||t();const o=new U(s);return null==i||i.add(o),o.event}function r(e,i,n=100,s=!1,o=!1,r,a){let l,h,d,c,u=0;const g={leakWarningThreshold:r,onWillAddFirstListener(){l=e((e=>{u++,h=i(h,e),s&&!d&&(p.fire(h),h=void 0),c=()=>{const e=h;h=void 0,d=void 0,(!s||u>1)&&p.fire(e),u=0},"number"==typeof n?(clearTimeout(d),d=setTimeout(c,n)):void 0===d&&(d=0,queueMicrotask(c))}))},onWillRemoveListener(){o&&u>0&&(null==c||c())},onDidRemoveLastListener(){c=void 0,l.dispose()}};a||t();const p=new U(g);return null==a||a.add(p),p.event}e.None=()=>E.None,e.defer=function(e,t){return r(e,(()=>{}),0,void 0,!0,void 0,t)},e.once=i,e.map=n,e.forEach=function(e,t,i){return o(((i,n=null,s)=>e((e=>{t(e),i.call(n,e)}),null,s)),i)},e.filter=s,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>function(e,t){t instanceof Array?t.push(e):t&&t.add(e);return e}(D(...e.map((e=>e((e=>t.call(i,e)))))),n)},e.reduce=function(e,t,i,s){let o=i;return n(e,(e=>(o=t(o,e),o)),s)},e.debounce=r,e.accumulate=function(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,!0,void 0,n)},e.latch=function(e,t=(e,t)=>e===t,i){let n,o=!0;return s(e,(e=>{const i=o||!t(e,n);return o=!1,n=e,i}),i)},e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[],n){let s=i.slice(),o=e((e=>{s?s.push(e):a.fire(e)}));n&&n.add(o);const r=()=>{null==s||s.forEach((e=>a.fire(e))),s=null},a=new U({onWillAddFirstListener(){o||(o=e((e=>a.fire(e))),n&&n.add(o))},onDidAddFirstListener(){s&&(t?setTimeout(r):r())},onDidRemoveLastListener(){o&&o.dispose(),o=null}});return n&&n.add(a),a.event},e.chain=function(e,t){return(i,n,s)=>{const o=t(new l);return e((function(e){const t=o.evaluate(e);t!==a&&i.call(n,t)}),void 0,s)}};const a=Symbol("HaltChainable");class l{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:a)),this}reduce(e,t){let i=t;return this.steps.push((t=>(i=e(i,t),i))),this}latch(e=(e,t)=>e===t){let t,i=!0;return this.steps.push((n=>{const s=i||!e(n,t);return i=!1,t=n,s?n:a})),this}evaluate(e){for(const t of this.steps)if((e=t(e))===a)break;return e}}e.fromNodeEventEmitter=function(e,t,i=e=>e){const n=(...e)=>s.fire(i(...e)),s=new U({onWillAddFirstListener:()=>e.on(t,n),onDidRemoveLastListener:()=>e.removeListener(t,n)});return s.event},e.fromDOMEventEmitter=function(e,t,i=e=>e){const n=(...e)=>s.fire(i(...e)),s=new U({onWillAddFirstListener:()=>e.addEventListener(t,n),onDidRemoveLastListener:()=>e.removeEventListener(t,n)});return s.event},e.toPromise=function(e){return new Promise((t=>i(e)(t)))},e.fromPromise=function(e){const t=new U;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},e.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))},e.runAndSubscribeWithStore=function(e,t){let i=null;function n(e){null==i||i.dispose(),i=new N,t(e,i)}n(void 0);const s=e((e=>n(e)));return x((()=>{s.dispose(),null==i||i.dispose()}))};class h{constructor(e,i){this._observable=e,this._counter=0,this._hasChanged=!1;const n={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};i||t(),this.emitter=new U(n),i&&i.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new h(e,t).emitter.event},e.fromObservableLight=function(e){return t=>{let i=0,n=!1;const s={beginUpdate(){i++},endUpdate(){i--,0===i&&(e.reportChanges(),n&&(n=!1,t()))},handlePossibleChange(){},handleChange(){n=!0}};return e.addObserver(s),e.reportChanges(),{dispose(){e.removeObserver(s)}}}}}(B||(B={}));class W{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${W._idPool++}`,W.all.add(this)}start(e){this._stopWatch=new F,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}W.all=new Set,W._idPool=0;class V{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;null===(e=this._stacks)||void 0===e||e.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}}class H{static create(){var e;return new H(null!==(e=(new Error).stack)&&void 0!==e?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}}class z{constructor(e){this.value=e}}class U{constructor(e){var t,i,n,s,o;this._size=0,this._options=e,this._leakageMon=(null===(t=this._options)||void 0===t?void 0:t.leakWarningThreshold)?new V(null!==(n=null===(i=this._options)||void 0===i?void 0:i.leakWarningThreshold)&&void 0!==n?n:-1):void 0,this._perfMon=(null===(s=this._options)||void 0===s?void 0:s._profName)?new W(this._options._profName):void 0,this._deliveryQueue=null===(o=this._options)||void 0===o?void 0:o.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,(null===(e=this._deliveryQueue)||void 0===e?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),null===(i=null===(t=this._options)||void 0===t?void 0:t.onDidRemoveLastListener)||void 0===i||i.call(t),null===(n=this._leakageMon)||void 0===n||n.dispose())}get event(){var e;return null!==(e=this._event)&&void 0!==e||(this._event=(e,t,i)=>{var n,s,o,r,a;if(this._leakageMon&&this._size>3*this._leakageMon.threshold)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),E.None;if(this._disposed)return E.None;t&&(e=e.bind(t));const l=new z(e);let h;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(l.stack=H.create(),h=this._leakageMon.check(l.stack,this._size+1)),this._listeners?this._listeners instanceof z?(null!==(a=this._deliveryQueue)&&void 0!==a||(this._deliveryQueue=new K),this._listeners=[this._listeners,l]):this._listeners.push(l):(null===(s=null===(n=this._options)||void 0===n?void 0:n.onWillAddFirstListener)||void 0===s||s.call(n,this),this._listeners=l,null===(r=null===(o=this._options)||void 0===o?void 0:o.onDidAddFirstListener)||void 0===r||r.call(o,this)),this._size++;const d=x((()=>{null==h||h(),this._removeListener(l)}));return i instanceof N?i.add(d):Array.isArray(i)&&i.push(d),d}),this._event}_removeListener(e){var t,i,n,s;if(null===(i=null===(t=this._options)||void 0===t?void 0:t.onWillRemoveListener)||void 0===i||i.call(t,this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,null===(s=null===(n=this._options)||void 0===n?void 0:n.onDidRemoveLastListener)||void 0===s||s.call(n,this),void(this._size=0);const o=this._listeners,r=o.indexOf(e);if(-1===r)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,o[r]=void 0;const a=this._deliveryQueue.current===this;if(2*this._size<=o.length){let e=0;for(let t=0;t0}}class K{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class j extends U{constructor(e){super(e),this._isPaused=0,this._eventQueue=new O,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class q extends j{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class $ extends U{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=null==e?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class G{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new U({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};this.events.push(t),this.hasListeners&&this.hook(t);return x(_((()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)})))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((e=>this.emitter.fire(e)))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}class Z{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class Y{constructor(){this.listening=!1,this.inputEvent=B.None,this.inputEventListener=E.None,this.emitter=new U({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}class X{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}X.INSTANCE=new X;class Q extends E{constructor(){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;null===(t=this._mediaQueryList)||void 0===t||t.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class J extends E{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new Q);this._register(e.onDidChange((()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)})))}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}function ee(e,t){"string"==typeof e&&(e=window.matchMedia(e)),e.addEventListener("change",t)}const te=new class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=S(new J)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};const ie=navigator.userAgent,ne=ie.indexOf("Firefox")>=0,se=ie.indexOf("AppleWebKit")>=0,oe=ie.indexOf("Chrome")>=0,re=!oe&&ie.indexOf("Safari")>=0,ae=!oe&&!re&&se,le=(ie.indexOf("Electron/"),ie.indexOf("Android")>=0);let he=!1;if(window.matchMedia){const e=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=window.matchMedia("(display-mode: fullscreen)");he=e.matches,ee(e,(({matches:e})=>{he&&t.matches||(he=e)}))}let de="undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function ce(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],s=t[n];let o=e;return"string"==typeof s?o=s:"number"!=typeof s&&"boolean"!=typeof s&&null!=s||(o=String(s)),o})),de&&(i="\uff3b"+i.replace(/[aouei]/g,"$&$&")+"\uff3d"),i}function ue(e,t,...i){return ce(t,i)}var ge;const pe="en";let me,fe,_e=!1,ve=!1,be=!1,Ce=!1,we=!1,ye=!1,Se=!1,Le=!1,ke=!1,De=!1,xe=pe,Ne=null,Ee=null;const Ie="object"==typeof self?self:"object"==typeof i.g?i.g:{};let Me;void 0!==Ie.vscode&&void 0!==Ie.vscode.process?Me=Ie.vscode.process:"undefined"!=typeof process&&(Me=process);const Te="string"==typeof(null===(ge=null==Me?void 0:Me.versions)||void 0===ge?void 0:ge.electron),Re=Te&&"renderer"===(null==Me?void 0:Me.type);if("object"!=typeof navigator||Re)if("object"==typeof Me){_e="win32"===Me.platform,ve="darwin"===Me.platform,be="linux"===Me.platform,Ce=be&&!!Me.env.SNAP&&!!Me.env.SNAP_REVISION,Se=Te,ke=!!Me.env.CI||!!Me.env.BUILD_ARTIFACTSTAGINGDIRECTORY,me=pe,xe=pe;const e=Me.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];me=t.locale,Ne=t.osLocale,xe=i||pe,Ee=t._translationsConfigFile}catch(Dre){}we=!0}else console.error("Unable to resolve platform.");else{fe=navigator.userAgent,_e=fe.indexOf("Windows")>=0,ve=fe.indexOf("Macintosh")>=0,Le=(fe.indexOf("Macintosh")>=0||fe.indexOf("iPad")>=0||fe.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,be=fe.indexOf("Linux")>=0,De=(null==fe?void 0:fe.indexOf("Mobi"))>=0,ye=!0;me=void ue(0,"_")||pe,xe=me,Ne=navigator.language}let Ae=0;ve?Ae=1:_e?Ae=3:be&&(Ae=2);const Oe=_e,Pe=ve,Fe=be,Be=we,We=ye,Ve=ye&&"function"==typeof Ie.importScripts,He=Le,ze=De,Ue=fe,Ke=xe,je="function"==typeof Ie.postMessage&&!Ie.importScripts,qe=(()=>{if(je){const e=[];Ie.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),Ie.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),$e=ve||Le?2:_e?1:3;let Ge=!0,Ze=!1;function Ye(){if(!Ze){Ze=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);Ge=513===t[0]}return Ge}const Xe=!!(Ue&&Ue.indexOf("Chrome")>=0),Qe=!!(Ue&&Ue.indexOf("Firefox")>=0),Je=!!(!Xe&&Ue&&Ue.indexOf("Safari")>=0),et=!!(Ue&&Ue.indexOf("Edg/")>=0),tt=(Ue&&Ue.indexOf("Android"),Be||document.queryCommandSupported&&document.queryCommandSupported("copy")||navigator&&navigator.clipboard&&navigator.clipboard.writeText,Be||navigator&&navigator.clipboard&&navigator.clipboard.readText,Be||he||navigator.keyboard,"ontouchstart"in window||navigator.maxTouchPoints,window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0));class it{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const nt=new it,st=new it,ot=new it,rt=new Array(230),at={},lt=[],ht=Object.create(null),dt=Object.create(null),ct=[],ut=[];for(let xre=0;xre<=193;xre++)ct[xre]=-1;for(let xre=0;xre<=132;xre++)ut[xre]=-1;var gt;function pt(e,t){return(e|(65535&t)<<16>>>0)>>>0}function mt(e,t){if("number"==typeof e){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new vt(0!==n?[ft(i,t),ft(n,t)]:[ft(i,t)])}{const i=[];for(let n=0;n=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return nt.keyCodeToStr(e)}}(gt||(gt={}));class _t{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return e instanceof _t&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class vt{constructor(e){if(0===e.length)throw u("chords");this.chords=e}}class bt{constructor(e,t,i,n,s,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=o}}class Ct{}const wt=Pe?256:2048,yt=Pe?2048:256;class St{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=function(e){if(e.charCode){const t=String.fromCharCode(e.charCode).toUpperCase();return gt.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(ne)switch(t){case 59:return 85;case 60:if(Fe)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Pe)return 57}else if(se){if(Pe&&93===t)return 57;if(!Pe&&92===t)return 57}return rt[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=wt),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=yt),t|=e,t}_computeKeyCodeChord(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new _t(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let Lt=!1,kt=null;function Dt(e){if(!e.parent||e.parent===e)return null;try{const t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return Lt=!0,null}catch(Dre){return Lt=!0,null}return e.parent}class xt{static getSameOriginWindowChain(){if(!kt){kt=[];let e,t=window;do{e=Dt(t),e?kt.push({window:t,iframeElement:t.frameElement||null}):kt.push({window:t,iframeElement:null}),t=e}while(t)}return kt.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;const s=this.getSameOriginWindowChain();for(const o of s){if(i+=o.window.scrollY,n+=o.window.scrollX,o.window===t)break;if(!o.iframeElement)break;const e=o.iframeElement.getBoundingClientRect();i+=e.top,n+=e.left}return{top:i,left:n}}}class Nt{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=e.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const t=xt.getPositionOfChildWindowRelativeToAncestorWindow(window,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class Et{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){const t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?this.deltaY=ne&&!Pe?-e.deltaY/3:-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)this.deltaX=re&&Oe?-t.wheelDeltaX/120:t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?this.deltaX=ne&&!Pe?-e.deltaX/3:-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;null===(e=this.browserEvent)||void 0===e||e.preventDefault()}stopPropagation(){var e;null===(e=this.browserEvent)||void 0===e||e.stopPropagation()}}const{entries:It,setPrototypeOf:Mt,isFrozen:Tt,getPrototypeOf:Rt,getOwnPropertyDescriptor:At}=Object;let{freeze:Ot,seal:Pt,create:Ft}=Object,{apply:Bt,construct:Wt}="undefined"!=typeof Reflect&&Reflect;Bt||(Bt=function(e,t,i){return e.apply(t,i)}),Ot||(Ot=function(e){return e}),Pt||(Pt=function(e){return e}),Wt||(Wt=function(e,t){return new e(...t)});const Vt=Qt(Array.prototype.forEach),Ht=Qt(Array.prototype.pop),zt=Qt(Array.prototype.push),Ut=Qt(String.prototype.toLowerCase),Kt=Qt(String.prototype.toString),jt=Qt(String.prototype.match),qt=Qt(String.prototype.replace),$t=Qt(String.prototype.indexOf),Gt=Qt(String.prototype.trim),Zt=Qt(RegExp.prototype.test),Yt=(Xt=TypeError,function(){for(var e=arguments.length,t=new Array(e),i=0;i1?i-1:0),s=1;s/gm),mi=Pt(/\${[\w\W]*}/gm),fi=Pt(/^data-[\-\w.\u00B7-\uFFFF]/),_i=Pt(/^aria-[\-\w]+$/),vi=Pt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bi=Pt(/^(?:\w+script|data):/i),Ci=Pt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wi=Pt(/^html$/i);var yi=Object.freeze({__proto__:null,MUSTACHE_EXPR:gi,ERB_EXPR:pi,TMPLIT_EXPR:mi,DATA_ATTR:fi,ARIA_ATTR:_i,IS_ALLOWED_URI:vi,IS_SCRIPT_OR_DATA:bi,ATTR_WHITESPACE:Ci,DOCTYPE_NAME:wi});const Si=()=>"undefined"==typeof window?null:window;var Li=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Si();const i=t=>e(t);if(i.version="3.0.5",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;const n=t.document,s=n.currentScript;let{document:o}=t;const{DocumentFragment:r,HTMLTemplateElement:a,Node:l,Element:h,NodeFilter:d,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:g,trustedTypes:p}=t,m=h.prototype,f=ti(m,"cloneNode"),_=ti(m,"nextSibling"),v=ti(m,"childNodes"),b=ti(m,"parentNode");if("function"==typeof a){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let C,w="";const{implementation:y,createNodeIterator:S,createDocumentFragment:L,getElementsByTagName:k}=o,{importNode:D}=n;let x={};i.isSupported="function"==typeof It&&"function"==typeof b&&y&&void 0!==y.createHTMLDocument;const{MUSTACHE_EXPR:N,ERB_EXPR:E,TMPLIT_EXPR:I,DATA_ATTR:M,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:A}=yi;let{IS_ALLOWED_URI:O}=yi,P=null;const F=Jt({},[...ii,...ni,...si,...ri,...li]);let B=null;const W=Jt({},[...hi,...di,...ci,...ui]);let V=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,z=null,U=!0,K=!0,j=!1,q=!0,$=!1,G=!1,Z=!1,Y=!1,X=!1,Q=!1,J=!1,ee=!0,te=!1,ie=!0,ne=!1,se={},oe=null;const re=Jt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ae=null;const le=Jt({},["audio","video","img","source","image","track"]);let he=null;const de=Jt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ce="http://www.w3.org/1998/Math/MathML",ue="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let pe=ge,me=!1,fe=null;const _e=Jt({},[ce,ue,ge],Kt);let ve;const be=["application/xhtml+xml","text/html"];let Ce,we=null;const ye=o.createElement("form"),Se=function(e){return e instanceof RegExp||e instanceof Function},Le=function(e){if(!we||we!==e){if(e&&"object"==typeof e||(e={}),e=ei(e),ve=ve=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ce="application/xhtml+xml"===ve?Kt:Ut,P="ALLOWED_TAGS"in e?Jt({},e.ALLOWED_TAGS,Ce):F,B="ALLOWED_ATTR"in e?Jt({},e.ALLOWED_ATTR,Ce):W,fe="ALLOWED_NAMESPACES"in e?Jt({},e.ALLOWED_NAMESPACES,Kt):_e,he="ADD_URI_SAFE_ATTR"in e?Jt(ei(de),e.ADD_URI_SAFE_ATTR,Ce):de,ae="ADD_DATA_URI_TAGS"in e?Jt(ei(le),e.ADD_DATA_URI_TAGS,Ce):le,oe="FORBID_CONTENTS"in e?Jt({},e.FORBID_CONTENTS,Ce):re,H="FORBID_TAGS"in e?Jt({},e.FORBID_TAGS,Ce):{},z="FORBID_ATTR"in e?Jt({},e.FORBID_ATTR,Ce):{},se="USE_PROFILES"in e&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,j=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,$=e.SAFE_FOR_TEMPLATES||!1,G=e.WHOLE_DOCUMENT||!1,X=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ne=e.IN_PLACE||!1,O=e.ALLOWED_URI_REGEXP||vi,pe=e.NAMESPACE||ge,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),$&&(K=!1),Q&&(X=!0),se&&(P=Jt({},[...li]),B=[],!0===se.html&&(Jt(P,ii),Jt(B,hi)),!0===se.svg&&(Jt(P,ni),Jt(B,di),Jt(B,ui)),!0===se.svgFilters&&(Jt(P,si),Jt(B,di),Jt(B,ui)),!0===se.mathMl&&(Jt(P,ri),Jt(B,ci),Jt(B,ui))),e.ADD_TAGS&&(P===F&&(P=ei(P)),Jt(P,e.ADD_TAGS,Ce)),e.ADD_ATTR&&(B===W&&(B=ei(B)),Jt(B,e.ADD_ATTR,Ce)),e.ADD_URI_SAFE_ATTR&&Jt(he,e.ADD_URI_SAFE_ATTR,Ce),e.FORBID_CONTENTS&&(oe===re&&(oe=ei(oe)),Jt(oe,e.FORBID_CONTENTS,Ce)),ie&&(P["#text"]=!0),G&&Jt(P,["html","head","body"]),P.table&&(Jt(P,["tbody"]),delete H.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,w=C.createHTML("")}else void 0===C&&(C=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:e=>e,createScriptURL:e=>e})}catch(o){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}(p,s)),null!==C&&"string"==typeof w&&(w=C.createHTML(""));Ot&&Ot(e),we=e}},ke=Jt({},["mi","mo","mn","ms","mtext"]),De=Jt({},["foreignobject","desc","title","annotation-xml"]),xe=Jt({},["title","style","font","a","script"]),Ne=Jt({},ni);Jt(Ne,si),Jt(Ne,oi);const Ee=Jt({},ri);Jt(Ee,ai);const Ie=function(e){zt(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Me=function(e,t){try{zt(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(n){zt(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!B[e])if(X||Q)try{Ie(t)}catch(n){}else try{t.setAttribute(e,"")}catch(n){}},Te=function(e){let t,i;if(Y)e=""+e;else{const t=jt(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===ve&&pe===ge&&(e=''+e+"");const n=C?C.createHTML(e):e;if(pe===ge)try{t=(new g).parseFromString(n,ve)}catch(r){}if(!t||!t.documentElement){t=y.createDocument(pe,"template",null);try{t.documentElement.innerHTML=me?w:n}catch(r){}}const s=t.body||t.documentElement;return e&&i&&s.insertBefore(o.createTextNode(i),s.childNodes[0]||null),pe===ge?k.call(t,G?"html":"body")[0]:G?t.documentElement:s},Re=function(e){return S.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},Ae=function(e){return"object"==typeof l?e instanceof l:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Oe=function(e,t,n){x[e]&&Vt(x[e],(e=>{e.call(i,t,n,we)}))},Pe=function(e){let t;if(Oe("beforeSanitizeElements",e,null),(n=e)instanceof u&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof c)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return Ie(e),!0;var n;const s=Ce(e.nodeName);if(Oe("uponSanitizeElement",e,{tagName:s,allowedTags:P}),e.hasChildNodes()&&!Ae(e.firstElementChild)&&(!Ae(e.content)||!Ae(e.content.firstElementChild))&&Zt(/<[/\w]/g,e.innerHTML)&&Zt(/<[/\w]/g,e.textContent))return Ie(e),!0;if(!P[s]||H[s]){if(!H[s]&&Be(s)){if(V.tagNameCheck instanceof RegExp&&Zt(V.tagNameCheck,s))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(s))return!1}if(ie&&!oe[s]){const t=b(e)||e.parentNode,i=v(e)||e.childNodes;if(i&&t){for(let n=i.length-1;n>=0;--n)t.insertBefore(f(i[n],!0),_(e))}}return Ie(e),!0}return e instanceof h&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});const i=Ut(e.tagName),n=Ut(t.tagName);return!!fe[e.namespaceURI]&&(e.namespaceURI===ue?t.namespaceURI===ge?"svg"===i:t.namespaceURI===ce?"svg"===i&&("annotation-xml"===n||ke[n]):Boolean(Ne[i]):e.namespaceURI===ce?t.namespaceURI===ge?"math"===i:t.namespaceURI===ue?"math"===i&&De[n]:Boolean(Ee[i]):e.namespaceURI===ge?!(t.namespaceURI===ue&&!De[n])&&!(t.namespaceURI===ce&&!ke[n])&&!Ee[i]&&(xe[i]||!Ne[i]):!("application/xhtml+xml"!==ve||!fe[e.namespaceURI]))}(e)?(Ie(e),!0):"noscript"!==s&&"noembed"!==s&&"noframes"!==s||!Zt(/<\/no(script|embed|frames)/i,e.innerHTML)?($&&3===e.nodeType&&(t=e.textContent,t=qt(t,N," "),t=qt(t,E," "),t=qt(t,I," "),e.textContent!==t&&(zt(i.removed,{element:e.cloneNode()}),e.textContent=t)),Oe("afterSanitizeElements",e,null),!1):(Ie(e),!0)},Fe=function(e,t,i){if(ee&&("id"===t||"name"===t)&&(i in o||i in ye))return!1;if(K&&!z[t]&&Zt(M,t));else if(U&&Zt(T,t));else if(!B[t]||z[t]){if(!(Be(e)&&(V.tagNameCheck instanceof RegExp&&Zt(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&Zt(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&Zt(V.tagNameCheck,i)||V.tagNameCheck instanceof Function&&V.tagNameCheck(i))))return!1}else if(he[t]);else if(Zt(O,qt(i,A,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==$t(i,"data:")||!ae[e]){if(j&&!Zt(R,qt(i,A,"")));else if(i)return!1}else;return!0},Be=function(e){return e.indexOf("-")>0},We=function(e){let t,n,s,o;Oe("beforeSanitizeAttributes",e,null);const{attributes:r}=e;if(!r)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B};for(o=r.length;o--;){t=r[o];const{name:h,namespaceURI:d}=t;if(n="value"===h?t.value:Gt(t.value),s=Ce(h),a.attrName=s,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,Oe("uponSanitizeAttribute",e,a),n=a.attrValue,a.forceKeepAttr)continue;if(Me(h,e),!a.keepAttr)continue;if(!q&&Zt(/\/>/i,n)){Me(h,e);continue}$&&(n=qt(n,N," "),n=qt(n,E," "),n=qt(n,I," "));const c=Ce(e.nodeName);if(Fe(c,s,n)){if(!te||"id"!==s&&"name"!==s||(Me(h,e),n="user-content-"+n),C&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(d);else switch(p.getAttributeType(c,s)){case"TrustedHTML":n=C.createHTML(n);break;case"TrustedScriptURL":n=C.createScriptURL(n)}try{d?e.setAttributeNS(d,h,n):e.setAttribute(h,n),Ht(i.removed)}catch(l){}}}Oe("afterSanitizeAttributes",e,null)},Ve=function e(t){let i;const n=Re(t);for(Oe("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)Oe("uponSanitizeShadowNode",i,null),Pe(i)||(i.content instanceof r&&e(i.content),We(i));Oe("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e){let t,s,o,a,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(me=!e,me&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ae(e)){if("function"!=typeof e.toString)throw Yt("toString is not a function");if("string"!=typeof(e=e.toString()))throw Yt("dirty is not a string, aborting")}if(!i.isSupported)return e;if(Z||Le(h),i.removed=[],"string"==typeof e&&(ne=!1),ne){if(e.nodeName){const t=Ce(e.nodeName);if(!P[t]||H[t])throw Yt("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)t=Te("\x3c!----\x3e"),s=t.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?t=s:t.appendChild(s);else{if(!X&&!$&&!G&&-1===e.indexOf("<"))return C&&J?C.createHTML(e):e;if(t=Te(e),!t)return X?null:J?w:""}t&&Y&&Ie(t.firstChild);const d=Re(ne?e:t);for(;o=d.nextNode();)Pe(o)||(o.content instanceof r&&Ve(o.content),We(o));if(ne)return e;if(X){if(Q)for(a=L.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(B.shadowroot||B.shadowrootmode)&&(a=D.call(n,a,!0)),a}let c=G?t.outerHTML:t.innerHTML;return G&&P["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&Zt(wi,t.ownerDocument.doctype.name)&&(c="\n"+c),$&&(c=qt(c,N," "),c=qt(c,E," "),c=qt(c,I," ")),C&&J?C.createHTML(c):c},i.setConfig=function(e){Le(e),Z=!0},i.clearConfig=function(){we=null,Z=!1},i.isValidAttribute=function(e,t,i){we||Le({});const n=Ce(e),s=Ce(t);return Fe(n,s,i)},i.addHook=function(e,t){"function"==typeof t&&(x[e]=x[e]||[],zt(x[e],t))},i.removeHook=function(e){if(x[e])return Ht(x[e])},i.removeHooks=function(e){x[e]&&(x[e]=[])},i.removeAllHooks=function(){x={}},i}();Li.version,Li.isSupported;const ki=Li.sanitize,Di=(Li.setConfig,Li.clearConfig,Li.isValidAttribute,Li.addHook),xi=Li.removeHook;Li.removeHooks,Li.removeAllHooks;let Ni;if(void 0!==Ie.vscode&&void 0!==Ie.vscode.process){const e=Ie.vscode.process;Ni={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else Ni="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return Oe?"win32":Pe?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const Ei=Ni.cwd,Ii=Ni.env,Mi=Ni.platform,Ti=46,Ri=47,Ai=92,Oi=58;class Pi extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const s=-1!==e.indexOf(".")?"property":"argument";let o=`The "${e}" ${s} ${n} of type ${t}`;o+=". Received type "+typeof i,super(o),this.code="ERR_INVALID_ARG_TYPE"}}function Fi(e,t){if("string"!=typeof e)throw new Pi(t,"string",e)}const Bi="win32"===Mi;function Wi(e){return e===Ri||e===Ai}function Vi(e){return e===Ri}function Hi(e){return e>=65&&e<=90||e>=97&&e<=122}function zi(e,t,i,n){let s="",o=0,r=-1,a=0,l=0;for(let h=0;h<=e.length;++h){if(h2){const e=s.lastIndexOf(i);-1===e?(s="",o=0):(s=s.slice(0,e),o=s.length-1-s.lastIndexOf(i)),r=h,a=0;continue}if(0!==s.length){s="",o=0,r=h,a=0;continue}}t&&(s+=s.length>0?`${i}..`:"..",o=2)}else s.length>0?s+=`${i}${e.slice(r+1,h)}`:s=e.slice(r+1,h),o=h-r-1;r=h,a=0}else l===Ti&&-1!==a?++a:a=-1}return s}function Ui(e,t){!function(e,t){if(null===e||"object"!=typeof e)throw new Pi(t,"Object",e)}(t,"pathObject");const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const Ki={resolve(...e){let t="",i="",n=!1;for(let s=e.length-1;s>=-1;s--){let o;if(s>=0){if(o=e[s],Fi(o,"path"),0===o.length)continue}else 0===t.length?o=Ei():(o=Ii[`=${t}`]||Ei(),(void 0===o||o.slice(0,2).toLowerCase()!==t.toLowerCase()&&o.charCodeAt(2)===Ai)&&(o=`${t}\\`));const r=o.length;let a=0,l="",h=!1;const d=o.charCodeAt(0);if(1===r)Wi(d)&&(a=1,h=!0);else if(Wi(d))if(h=!0,Wi(o.charCodeAt(1))){let e=2,t=e;for(;e2&&Wi(o.charCodeAt(2))&&(h=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(i=`${o.slice(a)}\\${i}`,n=h,h&&t.length>0)break}return i=zi(i,!n,"\\",Wi),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){Fi(e,"path");const t=e.length;if(0===t)return".";let i,n=0,s=!1;const o=e.charCodeAt(0);if(1===t)return Vi(o)?"\\":e;if(Wi(o))if(s=!0,Wi(e.charCodeAt(1))){let s=2,o=s;for(;s2&&Wi(e.charCodeAt(2))&&(s=!0,n=3));let r=n0&&Wi(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?s?`\\${r}`:r:s?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){Fi(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return Wi(i)||t>2&&Hi(i)&&e.charCodeAt(1)===Oi&&Wi(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let o=0;o0&&(void 0===t?t=i=n:t+=`\\${n}`)}if(void 0===t)return".";let n=!0,s=0;if("string"==typeof i&&Wi(i.charCodeAt(0))){++s;const e=i.length;e>1&&Wi(i.charCodeAt(1))&&(++s,e>2&&(Wi(i.charCodeAt(2))?++s:n=!1))}if(n){for(;s=2&&(t=`\\${t.slice(s)}`)}return Ki.normalize(t)},relative(e,t){if(Fi(e,"from"),Fi(t,"to"),e===t)return"";const i=Ki.resolve(e),n=Ki.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let s=0;for(;ss&&e.charCodeAt(o-1)===Ai;)o--;const r=o-s;let a=0;for(;aa&&t.charCodeAt(l-1)===Ai;)l--;const h=l-a,d=rd){if(t.charCodeAt(a+u)===Ai)return n.slice(a+u+1);if(2===u)return n.slice(a+u)}r>d&&(e.charCodeAt(s+u)===Ai?c=u:2===u&&(c=3)),-1===c&&(c=0)}let g="";for(u=s+c+1;u<=o;++u)u!==o&&e.charCodeAt(u)!==Ai||(g+=0===g.length?"..":"\\..");return a+=c,g.length>0?`${g}${n.slice(a,l)}`:(n.charCodeAt(a)===Ai&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=Ki.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===Ai){if(t.charCodeAt(1)===Ai){const e=t.charCodeAt(2);if(63!==e&&e!==Ti)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Hi(t.charCodeAt(0))&&t.charCodeAt(1)===Oi&&t.charCodeAt(2)===Ai)return`\\\\?\\${t}`;return e},dirname(e){Fi(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const s=e.charCodeAt(0);if(1===t)return Wi(s)?e:".";if(Wi(s)){if(i=n=1,Wi(e.charCodeAt(1))){let s=2,o=s;for(;s2&&Wi(e.charCodeAt(2))?3:2,n=i);let o=-1,r=!0;for(let a=t-1;a>=n;--a)if(Wi(e.charCodeAt(a))){if(!r){o=a;break}}else r=!1;if(-1===o){if(-1===i)return".";o=i}return e.slice(0,o)},basename(e,t){void 0!==t&&Fi(t,"ext"),Fi(e,"path");let i,n=0,s=-1,o=!0;if(e.length>=2&&Hi(e.charCodeAt(0))&&e.charCodeAt(1)===Oi&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(Wi(l)){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(s=i):(r=-1,s=a))}return n===s?s=a:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(Wi(e.charCodeAt(i))){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){Fi(e,"path");let t=0,i=-1,n=0,s=-1,o=!0,r=0;e.length>=2&&e.charCodeAt(1)===Oi&&Hi(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(Wi(t)){if(!o){n=a+1;break}}else-1===s&&(o=!1,s=a+1),t===Ti?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===s||0===r||1===r&&i===s-1&&i===n+1?"":e.slice(i,s)},format:Ui.bind(null,"\\"),parse(e){Fi(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,s=e.charCodeAt(0);if(1===i)return Wi(s)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(Wi(s)){if(n=1,Wi(e.charCodeAt(1))){let t=2,s=t;for(;t0&&(t.root=e.slice(0,n));let o=-1,r=n,a=-1,l=!0,h=e.length-1,d=0;for(;h>=n;--h)if(s=e.charCodeAt(h),Wi(s)){if(!l){r=h+1;break}}else-1===a&&(l=!1,a=h+1),s===Ti?-1===o?o=h:1!==d&&(d=1):-1!==o&&(d=-1);return-1!==a&&(-1===o||0===d||1===d&&o===a-1&&o===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,o),t.base=e.slice(r,a),t.ext=e.slice(o,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},ji=(()=>{if(Bi){const e=/\\/g;return()=>{const t=Ei().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>Ei()})(),qi={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const s=n>=0?e[n]:ji();Fi(s,"path"),0!==s.length&&(t=`${s}/${t}`,i=s.charCodeAt(0)===Ri)}return t=zi(t,!i,"/",Vi),i?`/${t}`:t.length>0?t:"."},normalize(e){if(Fi(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===Ri,i=e.charCodeAt(e.length-1)===Ri;return 0===(e=zi(e,!t,"/",Vi)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(Fi(e,"path"),e.length>0&&e.charCodeAt(0)===Ri),join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":qi.normalize(t)},relative(e,t){if(Fi(e,"from"),Fi(t,"to"),e===t)return"";if((e=qi.resolve(e))===(t=qi.resolve(t)))return"";const i=e.length,n=i-1,s=t.length-1,o=no){if(t.charCodeAt(1+a)===Ri)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>o&&(e.charCodeAt(1+a)===Ri?r=a:0===a&&(r=0));let l="";for(a=1+r+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==Ri||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+r)}`},toNamespacedPath:e=>e,dirname(e){if(Fi(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===Ri;let i=-1,n=!0;for(let s=e.length-1;s>=1;--s)if(e.charCodeAt(s)===Ri){if(!n){i=s;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&Fi(t,"ext"),Fi(e,"path");let i,n=0,s=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===Ri){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(s=i):(r=-1,s=a))}return n===s?s=a:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===Ri){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){Fi(e,"path");let t=-1,i=0,n=-1,s=!0,o=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==Ri)-1===n&&(s=!1,n=r+1),a===Ti?-1===t?t=r:1!==o&&(o=1):-1!==t&&(o=-1);else if(!s){i=r+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)},format:Ui.bind(null,"/"),parse(e){Fi(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===Ri;let n;i?(t.root="/",n=1):n=0;let s=-1,o=0,r=-1,a=!0,l=e.length-1,h=0;for(;l>=n;--l){const t=e.charCodeAt(l);if(t!==Ri)-1===r&&(a=!1,r=l+1),t===Ti?-1===s?s=l:1!==h&&(h=1):-1!==s&&(h=-1);else if(!a){o=l+1;break}}if(-1!==r){const n=0===o&&i?1:o;-1===s||0===h||1===h&&s===r-1&&s===o+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,s),t.base=e.slice(n,r),t.ext=e.slice(s,r))}return o>0?t.dir=e.slice(0,o-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};qi.win32=Ki.win32=Ki,qi.posix=Ki.posix=qi;const $i=Bi?Ki.normalize:qi.normalize,Gi=Bi?Ki.resolve:qi.resolve,Zi=Bi?Ki.relative:qi.relative,Yi=Bi?Ki.dirname:qi.dirname,Xi=Bi?Ki.basename:qi.basename,Qi=Bi?Ki.extname:qi.extname,Ji=Bi?Ki.sep:qi.sep,en=/^\w[\w\d+.-]*$/,tn=/^\//,nn=/^\/\//;const sn="",on="/",rn=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class an{static isUri(e){return e instanceof an||!!e&&("string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString)}constructor(e,t,i,n,s,o=!1){"object"==typeof e?(this.scheme=e.scheme||sn,this.authority=e.authority||sn,this.path=e.path||sn,this.query=e.query||sn,this.fragment=e.fragment||sn):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||sn,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==on&&(t=on+t):t=on}return t}(this.scheme,i||sn),this.query=n||sn,this.fragment=s||sn,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!en.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!tn.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(nn.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,o))}get fsPath(){return gn(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=sn),void 0===i?i=this.authority:null===i&&(i=sn),void 0===n?n=this.path:null===n&&(n=sn),void 0===s?s=this.query:null===s&&(s=sn),void 0===o?o=this.fragment:null===o&&(o=sn),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment?this:new hn(t,i,n,s,o)}static parse(e,t=!1){const i=rn.exec(e);return i?new hn(i[2]||sn,_n(i[4]||sn),_n(i[5]||sn),_n(i[7]||sn),_n(i[9]||sn),t):new hn(sn,sn,sn,sn,sn)}static file(e){let t=sn;if(Oe&&(e=e.replace(/\\/g,on)),e[0]===on&&e[1]===on){const i=e.indexOf(on,2);-1===i?(t=e.substring(2),e=on):(t=e.substring(2,i),e=e.substring(i)||on)}return new hn("file",t,e,sn,sn)}static from(e,t){return new hn(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=Oe&&"file"===e.scheme?an.file(Ki.join(gn(e,!0),...t)).path:qi.join(e.path,...t),e.with({path:i})}toString(e=!1){return pn(this,e)}toJSON(){return this}static revive(e){var t,i;if(e){if(e instanceof an)return e;{const n=new hn(e);return n._formatted=null!==(t=e.external)&&void 0!==t?t:null,n._fsPath=e._sep===ln&&null!==(i=e.fsPath)&&void 0!==i?i:null,n}}return e}}const ln=Oe?1:void 0;class hn extends an{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=gn(this,!1)),this._fsPath}toString(e=!1){return e?pn(this,!0):(this._formatted||(this._formatted=pn(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=ln),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const dn={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 cn(e,t,i){let n,s=-1;for(let o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));const t=dn[r];void 0!==t?(-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),n+=t):-1===s&&(s=o)}}return-1!==s&&(n+=encodeURIComponent(e.substring(s))),void 0!==n?n:e}function un(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,Oe&&(i=i.replace(/\//g,"\\")),i}function pn(e,t){const i=t?un:cn;let n="",{scheme:s,authority:o,path:r,query:a,fragment:l}=e;if(s&&(n+=s,n+=":"),(o||"file"===s)&&(n+=on,n+=on),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}o=o.toLowerCase(),e=o.lastIndexOf(":"),-1===e?n+=i(o,!1,!0):(n+=i(o.substr(0,e),!1,!0),n+=o.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:cn(l,!1,!1)),n}function mn(e){try{return decodeURIComponent(e)}catch(ge){return e.length>3?e.substr(0,3)+mn(e.substr(3)):e}}const fn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _n(e){return e.match(fn)?e.replace(fn,(e=>mn(e))):e}var vn;!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm"}(vn||(vn={}));const bn=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${vn.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return r(a),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const n=this._ports[t],s=this._connectionTokens[t];let o=`path=${encodeURIComponent(e.path)}`;return"string"==typeof s&&(o+=`&tkn=${encodeURIComponent(s)}`),an.from({scheme:We?this._preferredWebSchema:vn.vscodeRemoteResource,authority:`${i}:${n}`,path:this._remoteResourcesPath,query:o})}};class Cn{uriToBrowserUri(e){return e.scheme===vn.vscodeRemote?bn.rewrite(e):e.scheme===vn.file&&(Be||Ve&&Ie.origin===`${vn.vscodeFileResource}://${Cn.FALLBACK_AUTHORITY}`)?e.with({scheme:vn.vscodeFileResource,authority:e.authority||Cn.FALLBACK_AUTHORITY,query:null,fragment:null}):e}}Cn.FALLBACK_AUTHORITY="vscode-app";const wn=new Cn;var yn;!function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";e.getHeadersFromQuery=function(e){let n;"string"==typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:an.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const s=null==n?void 0:n.get(i);if(s)return t.get(s)},e.addSearchParam=function(e,t,n){if(!globalThis.crossOriginIsolated)return;const s=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,s):e[i]=s}}(yn||(yn={}));const{registerWindow:Sn,getWindows:Ln,onDidCreateWindow:kn}=function(){const e=[],t=new U;return{onDidCreateWindow:t.event,registerWindow(i){e.push(i);const n=new N;return n.add(x((()=>{const t=e.indexOf(i);-1!==t&&e.splice(t,1)}))),t.fire({window:i,disposableStore:n}),n},getWindows:()=>e}}();function Dn(e){for(;e.firstChild;)e.firstChild.remove()}function xn(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class Nn{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function En(e,t,i,n){return new Nn(e,t,i,n)}function In(e){return function(t){return e(new Nt(t))}}const Mn=function(e,t,i,n){let s=i;return"click"===t||"mousedown"===t?s=In(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(s=function(e){return function(t){return e(new St(t))}}(i)),En(e,t,s,n)},Tn=function(e,t,i){return function(e,t,i){return En(e,He&&tt?os.POINTER_DOWN:os.MOUSE_DOWN,t,i)}(e,In(t),i)};let Rn,An;class On{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(Dre){r(Dre)}}static sort(e,t){return t.priority-e.priority}}function Pn(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)}function Fn(e){var t;const i=e.ownerDocument,n=null===(t=i.defaultView)||void 0===t?void 0:t.window;if(e!==i.body)return new Wn(e.clientWidth,e.clientHeight);if(He&&(null==n?void 0:n.visualViewport))return new Wn(n.visualViewport.width,n.visualViewport.height);if((null==n?void 0:n.innerWidth)&&n.innerHeight)return new Wn(n.innerWidth,n.innerHeight);if(i.body&&i.body.clientWidth&&i.body.clientHeight)return new Wn(i.body.clientWidth,i.body.clientHeight);if(i.documentElement&&i.documentElement.clientWidth&&i.documentElement.clientHeight)return new Wn(i.documentElement.clientWidth,i.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}!function(){let e=[],t=null,i=!1,n=!1;const s=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;){t.sort(On.sort);t.shift().execute()}n=!1};An=(t,n=0)=>{const o=new On(t,n);return e.push(o),i||(i=!0,requestAnimationFrame(s)),o},Rn=(e,i)=>{if(n){const n=new On(e,i);return t.push(n),n}return An(e,i)}}();class Bn{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=Pn(e),s=n?n.getPropertyValue(t):"0";return Bn.convertToPixels(e,s)}static getBorderLeftWidth(e){return Bn.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Bn.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Bn.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Bn.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Bn.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Bn.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Bn.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Bn.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Bn.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Bn.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Bn.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Bn.getDimension(e,"margin-bottom","marginBottom")}}class Wn{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Wn(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof Wn?e:new Wn(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}}function Vn(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==e.ownerDocument.body&&e!==e.ownerDocument.documentElement;){i-=e.scrollTop;const s=Gn(e)?null:Pn(e);s&&(n-="rtl"!==s.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=Bn.getBorderLeftWidth(e),i+=Bn.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function Hn(e){var t,i,n,s;const o=e.getBoundingClientRect();return{left:o.left+(null!==(i=null===(t=e.ownerDocument.defaultView)||void 0===t?void 0:t.scrollX)&&void 0!==i?i:0),top:o.top+(null!==(s=null===(n=e.ownerDocument.defaultView)||void 0===n?void 0:n.scrollY)&&void 0!==s?s:0),width:o.width,height:o.height}}function zn(e){const t=Bn.getMarginLeft(e)+Bn.getMarginRight(e);return e.offsetWidth+t}function Un(e){const t=Bn.getBorderLeftWidth(e)+Bn.getBorderRightWidth(e),i=Bn.getPaddingLeft(e)+Bn.getPaddingRight(e);return e.offsetWidth-t-i}function Kn(e){const t=Bn.getBorderTopWidth(e)+Bn.getBorderBottomWidth(e),i=Bn.getPaddingTop(e)+Bn.getPaddingBottom(e);return e.offsetHeight-t-i}function jn(e){const t=Bn.getMarginTop(e)+Bn.getMarginBottom(e);return e.offsetHeight+t}function qn(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function $n(e,t,i){return!!function(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}(e,t,i)}function Gn(e){return e&&!!e.host&&!!e.mode}function Zn(e){return!!Yn(e)}function Yn(e){for(var t;e.parentNode;){if(e===(null===(t=e.ownerDocument)||void 0===t?void 0:t.body))return null;e=e.parentNode}return Gn(e)?e:null}function Xn(){let e=Qn().activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Qn(){var e;return null!==(e=[document,...Ln().map((e=>e.document))].find((e=>e.hasFocus())))&&void 0!==e?e:document}function Jn(e=document.getElementsByTagName("head")[0],t){const i=document.createElement("style");return i.type="text/css",i.media="screen",null==t||t(i),e.appendChild(i),i}Wn.None=new Wn(0,0);let es=null;function ts(){return es||(es=Jn()),es}function is(e,t,i=ts()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function ns(e,t=ts()){if(!t)return;const i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let s=0;s=0;s--)t.sheet.deleteRule(n[s])}function ss(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const os={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:se?"webkitAnimationStart":"animationstart",ANIMATION_END:se?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:se?"webkitAnimationIteration":"animationiteration"};function rs(e){const t=e;return!(!t||"function"!=typeof t.preventDefault||"function"!=typeof t.stopPropagation)}const as=(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e);class ls extends E{static hasFocusWithin(e){if(ss(e)){const t=Yn(e);return qn(t?t.activeElement:e.ownerDocument.activeElement,e)}return qn(window.document.activeElement,window.document)}constructor(e){super(),this._onDidFocus=this._register(new U),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new U),this.onDidBlur=this._onDidBlur.event;let t=ls.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},s=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{ls.hasFocusWithin(e)!==t&&(t?s():n())},this._register(En(e,os.FOCUS,n,!0)),this._register(En(e,os.BLUR,s,!0)),e instanceof HTMLElement&&(this._register(En(e,os.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(En(e,os.FOCUS_OUT,(()=>this._refreshStateHandler()))))}}function hs(e){return new ls(e)}function ds(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function cs(e,t){return e.insertBefore(t,e.firstChild),t}function us(e,...t){e.innerText="",ds(e,...t)}const gs=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var ps;function ms(e,t,i,...n){const s=gs.exec(t);if(!s)throw new Error("Bad use of emmet");const o=s[1]||"div";let r;return r=e!==ps.HTML?document.createElementNS(e,o):document.createElement(o),s[3]&&(r.id=s[3]),s[4]&&(r.className=s[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function fs(e,t,...i){return ms(ps.HTML,e,t,...i)}function _s(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function vs(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function bs(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function Cs(e){window.open(e,"_blank","noopener")}function ws(e){return e?`url('${wn.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function ys(e){return`'${e.replace(/'/g,"%27")}'`}function Ss(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=Ss(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(ps||(ps={})),fs.SVG=function(e,t,...i){return ms(ps.SVG,e,t,...i)},bn.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");const Ls=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class ks extends U{constructor(){super(),this._subscriptions=new N,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(En(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new St(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),this._subscriptions.add(En(window,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),this._subscriptions.add(En(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(En(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(En(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(En(window,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return ks.instance||(ks.instance=new ks),ks.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class Ds extends E{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(En(this.element,os.DRAG_ENTER,(e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter(e)}))),this._register(En(this.element,os.DRAG_OVER,(e=>{var t,i;e.preventDefault(),null===(i=(t=this.callbacks).onDragOver)||void 0===i||i.call(t,e,e.timeStamp-this.dragStartTime)}))),this._register(En(this.element,os.DRAG_LEAVE,(e=>{this.counter--,0===this.counter&&(this.dragStartTime=0,this.callbacks.onDragLeave(e))}))),this._register(En(this.element,os.DRAG_END,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(e)}))),this._register(En(this.element,os.DROP,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(e)})))}}const xs=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function Ns(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const s=xs.exec(e);if(!s||!s.groups)throw new Error("Bad use of h");const o=s.groups.tag||"div",r=document.createElement(o);s.groups.id&&(r.id=s.groups.id);const a=[];if(s.groups.class)for(const h of s.groups.class.split("."))""!==h&&a.push(h);if(void 0!==i.className)for(const h of i.className.split("."))""!==h&&a.push(h);a.length>0&&(r.className=a.join(" "));const l={};if(s.groups.name&&(l[s.groups.name]=r),n)for(const h of n)h instanceof HTMLElement?r.appendChild(h):"string"==typeof h?r.append(h):"root"in h&&(Object.assign(l,h),r.appendChild(h.root));for(const[h,d]of Object.entries(i))if("className"!==h)if("style"===h)for(const[e,t]of Object.entries(d))r.style.setProperty(Es(e),"number"==typeof t?t+"px":""+t);else"tabIndex"===h?r.tabIndex=d:r.setAttribute(Es(h),d.toString());return l.root=r,l}function Es(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}let Is,Ms,Ts,Rs,As;function Os(e){Is&&(Ms.textContent!==e?(Dn(Ts),Fs(Ms,e)):(Dn(Ms),Fs(Ts,e)))}function Ps(e){Is&&(Rs.textContent!==e?(Dn(As),Fs(Rs,e)):(Dn(Rs),Fs(As,e)))}function Fs(e,t){Dn(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}var Bs,Ws,Vs;class Hs{constructor(e,t){this.uri=e,this.value=t}}class zs{constructor(e,t){if(this[Bs]="ResourceMap",e instanceof zs)this.map=new Map(e.map),this.toKey=null!=t?t:zs.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=null!=t?t:zs.defaultToKey;for(const[t,i]of e)this.set(t,i)}else this.map=new Map,this.toKey=null!=e?e:zs.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new Hs(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[i,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(Bs=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}zs.defaultToKey=e=>e.toString();class Us{constructor(){this[Ws]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(Ws=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class Ks extends Us{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}class js{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class qs{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}class $s{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);const t=this.fn(e);return this._map.set(e,t),t}}class Gs{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Zs(e){return!e||"string"!=typeof e||0===e.trim().length}const Ys=/{(\d+)}/g;function Xs(e,...t){return 0===t.length?e:e.replace(Ys,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function Qs(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function Js(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function eo(e,t=" "){return io(to(e,t),t)}function to(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function io(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let s=n,o=-1;for(;o=e.lastIndexOf(t,s-1),-1!==o&&o+i===s;){if(0===o)return"";s=o}return e.substring(0,s)}function no(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=Js(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function so(e){return e.split(/\r\n|\r|\n/)}function oo(e){for(let t=0,i=e.length;t=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function lo(e,t){return et?1:0}function ho(e,t,i=0,n=e.length,s=0,o=t.length){for(;io)return 1}const r=n-i,a=o-s;return ra?1:0}function co(e,t){return uo(e,t,0,e.length,0,t.length)}function uo(e,t,i=0,n=e.length,s=0,o=t.length){for(;i=128||a>=128)return ho(e.toLowerCase(),t.toLowerCase(),i,n,s,o);po(r)&&(r-=32),po(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=o-s;return ra?1:0}function go(e){return e>=48&&e<=57}function po(e){return e>=97&&e<=122}function mo(e){return e>=65&&e<=90}function fo(e,t){return e.length===t.length&&0===uo(e,t)}function _o(e,t){const i=t.length;return!(t.length>e.length)&&0===uo(e,t,0,i)}function vo(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n1){const n=e.charCodeAt(t-2);if(Co(n))return yo(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=So(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class ko{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new Lo(e,t)}nextGraphemeLength(){const e=Vo.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,s=e.getGraphemeBreakType(t.nextCodePoint());if(Wo(n,s)){t.setOffset(i);break}n=s}return t.offset-i}prevGraphemeLength(){const e=Vo.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,s=e.getGraphemeBreakType(t.prevCodePoint());if(Wo(s,n)){t.setOffset(i);break}n=s}return i-t.offset}eol(){return this._iterator.eol()}}function Do(e,t){return new ko(e,t).nextGraphemeLength()}function xo(e,t){return new ko(e,t).prevGraphemeLength()}let No;function Eo(e){return No||(No=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),No.test(e)}const Io=/^[\t\n\r\x20-\x7E]*$/;function Mo(e){return Io.test(e)}const To=/[\u2028\u2029]/;function Ro(e){return To.test(e)}function Ao(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Oo(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const Po=String.fromCharCode(65279);function Fo(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function Bo(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function Wo(e,t){return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}class Vo{static getInstance(){return Vo._INSTANCE||(Vo._INSTANCE=new Vo),Vo._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function Ho(e,t){if(0===e)return 0;const i=function(e,t){const i=new Lo(t,e);let n=i.prevCodePoint();for(;zo(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!Oo(n))return;let s=i.offset;if(s>0){8205===i.prevCodePoint()&&(s=i.offset)}return s}(e,t);if(void 0!==i)return i;const n=new Lo(t,e);return n.prevCodePoint(),n.offset}function zo(e){return 127995<=e&&e<=127999}Vo._INSTANCE=null;class Uo{static getInstance(e){return Vs.cache.get(Array.from(e))}static getLocales(){return Vs._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}Vs=Uo,Uo.ambiguousCharacterData=new Gs((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))),Uo.cache=new class{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}}((e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in n));0===o.length&&(o=["_default"]);for(const a of o){s=i(s,t(n[a]))}const r=function(e,t){const i=new Map(e);for(const[n,s]of t)i.set(n,s);return i}(t(n._common),s);return new Vs(r)})),Uo._locales=new Gs((()=>Object.keys(Vs.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))));class Ko{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(Ko.getRawData())),this._data}static isInvisibleCharacter(e){return Ko.getData().has(e)}static get codePoints(){return Ko.getData()}}function jo(...e){return function(t,i){for(let n=0,s=e.length;n0?[{start:0,end:t.length}]:[]:null}function Go(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function Zo(e,t){return Yo(e.toLowerCase(),t.toLowerCase(),0,0)}function Yo(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let s=null;return(s=Yo(e,t,i+1,n+1))?sr({start:n,end:n+1},s):null}return Yo(e,t,i,n+1)}function Xo(e){return 97<=e&&e<=122}function Qo(e){return 65<=e&&e<=90}function Jo(e){return 48<=e&&e<=57}function er(e){return 32===e||9===e||10===e||13===e}const tr=new Set;function ir(e){return er(e)||tr.has(e)}function nr(e){return Xo(e)||Qo(e)||Jo(e)}function sr(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function or(e,t){for(let i=t;i0&&!nr(e.charCodeAt(i-1)))return i}return e.length}function rr(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let s=null,o=n+1;for(s=rr(e,t,i+1,n+1);!s&&(o=or(t,o))60)return null;const i=function(e){let t=0,i=0,n=0,s=0,o=0;for(let r=0;r.2&&t<.8&&n>.6&&s<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,s=0;for(e=e.toLowerCase();s0&&ir(e.charCodeAt(i-1)))return i;return e.length}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>tr.add(e.charCodeAt(0))));const dr=jo(qo,ar,Go),cr=jo(qo,ar,Zo),ur=new Ks(1e4);function gr(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=ur.get(e);n||(n=new RegExp(e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*"),"i"),ur.set(e,n));const s=n.exec(t);return s?[{start:s.index,end:s.index+s[0].length}]:i?cr(e,t):dr(e,t)}function pr(e,t){const i=Tr(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?fr(i):null}function mr(e,t,i,n,s,o){const r=Math.min(13,e.length);for(;i1;n--){const s=e[n]+i,o=t[t.length-1];o&&o.end===s?o.end=s+1:t.push({start:s,end:s+1})}return t}const _r=128;function vr(){const e=[],t=[];for(let i=0;i<=_r;i++)t[i]=0;for(let i=0;i<=_r;i++)e.push(t.slice(0));return e}function br(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const Cr=br(2*_r),wr=br(2*_r),yr=vr(),Sr=vr(),Lr=vr(),kr=!1;function Dr(e,t,i,n,s){function o(e,t,i=" "){for(;e.lengtho(e,3))).join("|")}\n`;for(let a=0;a<=i;a++)r+=0===a?" |":`${t[a-1]}|`,r+=e[a].slice(0,s+1).map((e=>o(e.toString(),3))).join("|")+"\n";return r}function xr(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!Oo(i)}}function Nr(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function Er(e,t,i){return t[e]!==i[e]}var Ir;!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(Ir||(Ir={}));class Mr{constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}function Tr(e,t,i,n,s,o,r=Mr.default){const a=e.length>_r?_r:e.length,l=n.length>_r?_r:n.length;if(i>=a||o>=l||a-i>l-o)return;if(!function(e,t,i,n,s,o,r=!1){for(;t=i&&a>=n;)s[r]===o[a]&&(wr[r]=a,r--),a--}(a,l,i,o,t,s);let h=1,d=1,c=i,u=o;const g=[!1];for(h=1,c=i;cr,v=_?Sr[h][d-1]+(yr[h][d-1]>0?-5:0):0,b=u>r+1&&yr[h][d-1]>0,C=b?Sr[h][d-2]+(yr[h][d-2]>0?-5:0):0;if(b&&(!_||C>=v)&&(!m||C>=f))Sr[h][d]=C,Lr[h][d]=3,yr[h][d]=0;else if(_&&(!m||v>=f))Sr[h][d]=v,Lr[h][d]=2,yr[h][d]=0;else{if(!m)throw new Error("not possible");Sr[h][d]=f,Lr[h][d]=1,yr[h][d]=yr[h-1][d-1]+1}}}if(kr&&function(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(Dr(Sr,e,e.length,i,i.length)),console.log(Dr(Lr,e,e.length,i,i.length)),console.log(Dr(yr,e,e.length,i,i.length))}(e,i,n,o),!g[0]&&!r.firstMatchCanBeWeak)return;h--,d--;const p=[Sr[h][d],o];let m=0,f=0;for(;h>=1;){let e=d;do{const t=Lr[h][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+h-1]===s[o+d-1]&&!Er(e+o-1,n,s)&&m+1>yr[h][e]&&(e=d),e===d?m++:m=1,f||(f=e),h--,d=e-1,p.push(d)}l===a&&r.boostFullMatch&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function Rr(e,t,i,n,s,o,r,a,l,h,d){if(t[i]!==o[r])return Number.MIN_SAFE_INTEGER;let c=1,u=!1;return r===i-n?c=e[i]===s[r]?7:5:!Er(r,s,o)||0!==r&&Er(r-1,s,o)?!xr(o,r)||0!==r&&xr(o,r-1)?(xr(o,r-1)||Nr(o,r-1))&&(c=5,u=!0):c=5:(c=e[i]===s[r]?7:5,u=!0),c>1&&i===n&&(d[0]=!0),u||(u=Er(r,s,o)||xr(o,r-1)||Nr(o,r-1)),i===n?r>l&&(c-=u?3:5):c+=h?u?2:0:u?0:1,r+1===a&&(c-=u?3:5),c}function Ar(e,t,i,n,s,o,r){return function(e,t,i,n,s,o,r,a){let l=Tr(e,t,i,n,s,o,a);if(l&&!r)return l;if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e))}}}return l}(e,t,i,n,s,o,!0,r)}function Or(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}function Pr(e){return"string"==typeof e}function Fr(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function Br(e){const t=Object.getPrototypeOf(Uint8Array);return"object"==typeof e&&e instanceof t}function Wr(e){return"number"==typeof e&&!isNaN(e)}function Vr(e){return!!e&&"function"==typeof e[Symbol.iterator]}function Hr(e){return!0===e||!1===e}function zr(e){return void 0===e}function Ur(e){return!Kr(e)}function Kr(e){return zr(e)||null===e}function jr(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function qr(e){if(Kr(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function $r(e){return"function"==typeof e}function Gr(e,t){if(Pr(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if($r(t)){try{if(e instanceof t)return}catch(ge){}if(!Kr(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Mr.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};const Zr=Object.create(null);function Yr(e,t){if(Pr(t)){const i=Zr[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return Zr[e]=t,{id:e}}function Xr(){return Zr}const Qr={add:Yr("add",6e4),plus:Yr("plus",6e4),gistNew:Yr("gist-new",6e4),repoCreate:Yr("repo-create",6e4),lightbulb:Yr("lightbulb",60001),lightBulb:Yr("light-bulb",60001),repo:Yr("repo",60002),repoDelete:Yr("repo-delete",60002),gistFork:Yr("gist-fork",60003),repoForked:Yr("repo-forked",60003),gitPullRequest:Yr("git-pull-request",60004),gitPullRequestAbandoned:Yr("git-pull-request-abandoned",60004),recordKeys:Yr("record-keys",60005),keyboard:Yr("keyboard",60005),tag:Yr("tag",60006),tagAdd:Yr("tag-add",60006),tagRemove:Yr("tag-remove",60006),gitPullRequestLabel:Yr("git-pull-request-label",60006),person:Yr("person",60007),personFollow:Yr("person-follow",60007),personOutline:Yr("person-outline",60007),personFilled:Yr("person-filled",60007),gitBranch:Yr("git-branch",60008),gitBranchCreate:Yr("git-branch-create",60008),gitBranchDelete:Yr("git-branch-delete",60008),sourceControl:Yr("source-control",60008),mirror:Yr("mirror",60009),mirrorPublic:Yr("mirror-public",60009),star:Yr("star",60010),starAdd:Yr("star-add",60010),starDelete:Yr("star-delete",60010),starEmpty:Yr("star-empty",60010),comment:Yr("comment",60011),commentAdd:Yr("comment-add",60011),alert:Yr("alert",60012),warning:Yr("warning",60012),search:Yr("search",60013),searchSave:Yr("search-save",60013),logOut:Yr("log-out",60014),signOut:Yr("sign-out",60014),logIn:Yr("log-in",60015),signIn:Yr("sign-in",60015),eye:Yr("eye",60016),eyeUnwatch:Yr("eye-unwatch",60016),eyeWatch:Yr("eye-watch",60016),circleFilled:Yr("circle-filled",60017),primitiveDot:Yr("primitive-dot",60017),closeDirty:Yr("close-dirty",60017),debugBreakpoint:Yr("debug-breakpoint",60017),debugBreakpointDisabled:Yr("debug-breakpoint-disabled",60017),debugHint:Yr("debug-hint",60017),primitiveSquare:Yr("primitive-square",60018),edit:Yr("edit",60019),pencil:Yr("pencil",60019),info:Yr("info",60020),issueOpened:Yr("issue-opened",60020),gistPrivate:Yr("gist-private",60021),gitForkPrivate:Yr("git-fork-private",60021),lock:Yr("lock",60021),mirrorPrivate:Yr("mirror-private",60021),close:Yr("close",60022),removeClose:Yr("remove-close",60022),x:Yr("x",60022),repoSync:Yr("repo-sync",60023),sync:Yr("sync",60023),clone:Yr("clone",60024),desktopDownload:Yr("desktop-download",60024),beaker:Yr("beaker",60025),microscope:Yr("microscope",60025),vm:Yr("vm",60026),deviceDesktop:Yr("device-desktop",60026),file:Yr("file",60027),fileText:Yr("file-text",60027),more:Yr("more",60028),ellipsis:Yr("ellipsis",60028),kebabHorizontal:Yr("kebab-horizontal",60028),mailReply:Yr("mail-reply",60029),reply:Yr("reply",60029),organization:Yr("organization",60030),organizationFilled:Yr("organization-filled",60030),organizationOutline:Yr("organization-outline",60030),newFile:Yr("new-file",60031),fileAdd:Yr("file-add",60031),newFolder:Yr("new-folder",60032),fileDirectoryCreate:Yr("file-directory-create",60032),trash:Yr("trash",60033),trashcan:Yr("trashcan",60033),history:Yr("history",60034),clock:Yr("clock",60034),folder:Yr("folder",60035),fileDirectory:Yr("file-directory",60035),symbolFolder:Yr("symbol-folder",60035),logoGithub:Yr("logo-github",60036),markGithub:Yr("mark-github",60036),github:Yr("github",60036),terminal:Yr("terminal",60037),console:Yr("console",60037),repl:Yr("repl",60037),zap:Yr("zap",60038),symbolEvent:Yr("symbol-event",60038),error:Yr("error",60039),stop:Yr("stop",60039),variable:Yr("variable",60040),symbolVariable:Yr("symbol-variable",60040),array:Yr("array",60042),symbolArray:Yr("symbol-array",60042),symbolModule:Yr("symbol-module",60043),symbolPackage:Yr("symbol-package",60043),symbolNamespace:Yr("symbol-namespace",60043),symbolObject:Yr("symbol-object",60043),symbolMethod:Yr("symbol-method",60044),symbolFunction:Yr("symbol-function",60044),symbolConstructor:Yr("symbol-constructor",60044),symbolBoolean:Yr("symbol-boolean",60047),symbolNull:Yr("symbol-null",60047),symbolNumeric:Yr("symbol-numeric",60048),symbolNumber:Yr("symbol-number",60048),symbolStructure:Yr("symbol-structure",60049),symbolStruct:Yr("symbol-struct",60049),symbolParameter:Yr("symbol-parameter",60050),symbolTypeParameter:Yr("symbol-type-parameter",60050),symbolKey:Yr("symbol-key",60051),symbolText:Yr("symbol-text",60051),symbolReference:Yr("symbol-reference",60052),goToFile:Yr("go-to-file",60052),symbolEnum:Yr("symbol-enum",60053),symbolValue:Yr("symbol-value",60053),symbolRuler:Yr("symbol-ruler",60054),symbolUnit:Yr("symbol-unit",60054),activateBreakpoints:Yr("activate-breakpoints",60055),archive:Yr("archive",60056),arrowBoth:Yr("arrow-both",60057),arrowDown:Yr("arrow-down",60058),arrowLeft:Yr("arrow-left",60059),arrowRight:Yr("arrow-right",60060),arrowSmallDown:Yr("arrow-small-down",60061),arrowSmallLeft:Yr("arrow-small-left",60062),arrowSmallRight:Yr("arrow-small-right",60063),arrowSmallUp:Yr("arrow-small-up",60064),arrowUp:Yr("arrow-up",60065),bell:Yr("bell",60066),bold:Yr("bold",60067),book:Yr("book",60068),bookmark:Yr("bookmark",60069),debugBreakpointConditionalUnverified:Yr("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:Yr("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:Yr("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:Yr("debug-breakpoint-data-unverified",60072),debugBreakpointData:Yr("debug-breakpoint-data",60073),debugBreakpointDataDisabled:Yr("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:Yr("debug-breakpoint-log-unverified",60074),debugBreakpointLog:Yr("debug-breakpoint-log",60075),debugBreakpointLogDisabled:Yr("debug-breakpoint-log-disabled",60075),briefcase:Yr("briefcase",60076),broadcast:Yr("broadcast",60077),browser:Yr("browser",60078),bug:Yr("bug",60079),calendar:Yr("calendar",60080),caseSensitive:Yr("case-sensitive",60081),check:Yr("check",60082),checklist:Yr("checklist",60083),chevronDown:Yr("chevron-down",60084),dropDownButton:Yr("drop-down-button",60084),chevronLeft:Yr("chevron-left",60085),chevronRight:Yr("chevron-right",60086),chevronUp:Yr("chevron-up",60087),chromeClose:Yr("chrome-close",60088),chromeMaximize:Yr("chrome-maximize",60089),chromeMinimize:Yr("chrome-minimize",60090),chromeRestore:Yr("chrome-restore",60091),circle:Yr("circle",60092),circleOutline:Yr("circle-outline",60092),debugBreakpointUnverified:Yr("debug-breakpoint-unverified",60092),circleSlash:Yr("circle-slash",60093),circuitBoard:Yr("circuit-board",60094),clearAll:Yr("clear-all",60095),clippy:Yr("clippy",60096),closeAll:Yr("close-all",60097),cloudDownload:Yr("cloud-download",60098),cloudUpload:Yr("cloud-upload",60099),code:Yr("code",60100),collapseAll:Yr("collapse-all",60101),colorMode:Yr("color-mode",60102),commentDiscussion:Yr("comment-discussion",60103),compareChanges:Yr("compare-changes",60157),creditCard:Yr("credit-card",60105),dash:Yr("dash",60108),dashboard:Yr("dashboard",60109),database:Yr("database",60110),debugContinue:Yr("debug-continue",60111),debugDisconnect:Yr("debug-disconnect",60112),debugPause:Yr("debug-pause",60113),debugRestart:Yr("debug-restart",60114),debugStart:Yr("debug-start",60115),debugStepInto:Yr("debug-step-into",60116),debugStepOut:Yr("debug-step-out",60117),debugStepOver:Yr("debug-step-over",60118),debugStop:Yr("debug-stop",60119),debug:Yr("debug",60120),deviceCameraVideo:Yr("device-camera-video",60121),deviceCamera:Yr("device-camera",60122),deviceMobile:Yr("device-mobile",60123),diffAdded:Yr("diff-added",60124),diffIgnored:Yr("diff-ignored",60125),diffModified:Yr("diff-modified",60126),diffRemoved:Yr("diff-removed",60127),diffRenamed:Yr("diff-renamed",60128),diff:Yr("diff",60129),discard:Yr("discard",60130),editorLayout:Yr("editor-layout",60131),emptyWindow:Yr("empty-window",60132),exclude:Yr("exclude",60133),extensions:Yr("extensions",60134),eyeClosed:Yr("eye-closed",60135),fileBinary:Yr("file-binary",60136),fileCode:Yr("file-code",60137),fileMedia:Yr("file-media",60138),filePdf:Yr("file-pdf",60139),fileSubmodule:Yr("file-submodule",60140),fileSymlinkDirectory:Yr("file-symlink-directory",60141),fileSymlinkFile:Yr("file-symlink-file",60142),fileZip:Yr("file-zip",60143),files:Yr("files",60144),filter:Yr("filter",60145),flame:Yr("flame",60146),foldDown:Yr("fold-down",60147),foldUp:Yr("fold-up",60148),fold:Yr("fold",60149),folderActive:Yr("folder-active",60150),folderOpened:Yr("folder-opened",60151),gear:Yr("gear",60152),gift:Yr("gift",60153),gistSecret:Yr("gist-secret",60154),gist:Yr("gist",60155),gitCommit:Yr("git-commit",60156),gitCompare:Yr("git-compare",60157),gitMerge:Yr("git-merge",60158),githubAction:Yr("github-action",60159),githubAlt:Yr("github-alt",60160),globe:Yr("globe",60161),grabber:Yr("grabber",60162),graph:Yr("graph",60163),gripper:Yr("gripper",60164),heart:Yr("heart",60165),home:Yr("home",60166),horizontalRule:Yr("horizontal-rule",60167),hubot:Yr("hubot",60168),inbox:Yr("inbox",60169),issueClosed:Yr("issue-closed",60324),issueReopened:Yr("issue-reopened",60171),issues:Yr("issues",60172),italic:Yr("italic",60173),jersey:Yr("jersey",60174),json:Yr("json",60175),bracket:Yr("bracket",60175),kebabVertical:Yr("kebab-vertical",60176),key:Yr("key",60177),law:Yr("law",60178),lightbulbAutofix:Yr("lightbulb-autofix",60179),linkExternal:Yr("link-external",60180),link:Yr("link",60181),listOrdered:Yr("list-ordered",60182),listUnordered:Yr("list-unordered",60183),liveShare:Yr("live-share",60184),loading:Yr("loading",60185),location:Yr("location",60186),mailRead:Yr("mail-read",60187),mail:Yr("mail",60188),markdown:Yr("markdown",60189),megaphone:Yr("megaphone",60190),mention:Yr("mention",60191),milestone:Yr("milestone",60192),gitPullRequestMilestone:Yr("git-pull-request-milestone",60192),mortarBoard:Yr("mortar-board",60193),move:Yr("move",60194),multipleWindows:Yr("multiple-windows",60195),mute:Yr("mute",60196),noNewline:Yr("no-newline",60197),note:Yr("note",60198),octoface:Yr("octoface",60199),openPreview:Yr("open-preview",60200),package:Yr("package",60201),paintcan:Yr("paintcan",60202),pin:Yr("pin",60203),play:Yr("play",60204),run:Yr("run",60204),plug:Yr("plug",60205),preserveCase:Yr("preserve-case",60206),preview:Yr("preview",60207),project:Yr("project",60208),pulse:Yr("pulse",60209),question:Yr("question",60210),quote:Yr("quote",60211),radioTower:Yr("radio-tower",60212),reactions:Yr("reactions",60213),references:Yr("references",60214),refresh:Yr("refresh",60215),regex:Yr("regex",60216),remoteExplorer:Yr("remote-explorer",60217),remote:Yr("remote",60218),remove:Yr("remove",60219),replaceAll:Yr("replace-all",60220),replace:Yr("replace",60221),repoClone:Yr("repo-clone",60222),repoForcePush:Yr("repo-force-push",60223),repoPull:Yr("repo-pull",60224),repoPush:Yr("repo-push",60225),report:Yr("report",60226),requestChanges:Yr("request-changes",60227),rocket:Yr("rocket",60228),rootFolderOpened:Yr("root-folder-opened",60229),rootFolder:Yr("root-folder",60230),rss:Yr("rss",60231),ruby:Yr("ruby",60232),saveAll:Yr("save-all",60233),saveAs:Yr("save-as",60234),save:Yr("save",60235),screenFull:Yr("screen-full",60236),screenNormal:Yr("screen-normal",60237),searchStop:Yr("search-stop",60238),server:Yr("server",60240),settingsGear:Yr("settings-gear",60241),settings:Yr("settings",60242),shield:Yr("shield",60243),smiley:Yr("smiley",60244),sortPrecedence:Yr("sort-precedence",60245),splitHorizontal:Yr("split-horizontal",60246),splitVertical:Yr("split-vertical",60247),squirrel:Yr("squirrel",60248),starFull:Yr("star-full",60249),starHalf:Yr("star-half",60250),symbolClass:Yr("symbol-class",60251),symbolColor:Yr("symbol-color",60252),symbolCustomColor:Yr("symbol-customcolor",60252),symbolConstant:Yr("symbol-constant",60253),symbolEnumMember:Yr("symbol-enum-member",60254),symbolField:Yr("symbol-field",60255),symbolFile:Yr("symbol-file",60256),symbolInterface:Yr("symbol-interface",60257),symbolKeyword:Yr("symbol-keyword",60258),symbolMisc:Yr("symbol-misc",60259),symbolOperator:Yr("symbol-operator",60260),symbolProperty:Yr("symbol-property",60261),wrench:Yr("wrench",60261),wrenchSubaction:Yr("wrench-subaction",60261),symbolSnippet:Yr("symbol-snippet",60262),tasklist:Yr("tasklist",60263),telescope:Yr("telescope",60264),textSize:Yr("text-size",60265),threeBars:Yr("three-bars",60266),thumbsdown:Yr("thumbsdown",60267),thumbsup:Yr("thumbsup",60268),tools:Yr("tools",60269),triangleDown:Yr("triangle-down",60270),triangleLeft:Yr("triangle-left",60271),triangleRight:Yr("triangle-right",60272),triangleUp:Yr("triangle-up",60273),twitter:Yr("twitter",60274),unfold:Yr("unfold",60275),unlock:Yr("unlock",60276),unmute:Yr("unmute",60277),unverified:Yr("unverified",60278),verified:Yr("verified",60279),versions:Yr("versions",60280),vmActive:Yr("vm-active",60281),vmOutline:Yr("vm-outline",60282),vmRunning:Yr("vm-running",60283),watch:Yr("watch",60284),whitespace:Yr("whitespace",60285),wholeWord:Yr("whole-word",60286),window:Yr("window",60287),wordWrap:Yr("word-wrap",60288),zoomIn:Yr("zoom-in",60289),zoomOut:Yr("zoom-out",60290),listFilter:Yr("list-filter",60291),listFlat:Yr("list-flat",60292),listSelection:Yr("list-selection",60293),selection:Yr("selection",60293),listTree:Yr("list-tree",60294),debugBreakpointFunctionUnverified:Yr("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:Yr("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:Yr("debug-breakpoint-function-disabled",60296),debugStackframeActive:Yr("debug-stackframe-active",60297),circleSmallFilled:Yr("circle-small-filled",60298),debugStackframeDot:Yr("debug-stackframe-dot",60298),debugStackframe:Yr("debug-stackframe",60299),debugStackframeFocused:Yr("debug-stackframe-focused",60299),debugBreakpointUnsupported:Yr("debug-breakpoint-unsupported",60300),symbolString:Yr("symbol-string",60301),debugReverseContinue:Yr("debug-reverse-continue",60302),debugStepBack:Yr("debug-step-back",60303),debugRestartFrame:Yr("debug-restart-frame",60304),callIncoming:Yr("call-incoming",60306),callOutgoing:Yr("call-outgoing",60307),menu:Yr("menu",60308),expandAll:Yr("expand-all",60309),feedback:Yr("feedback",60310),gitPullRequestReviewer:Yr("git-pull-request-reviewer",60310),groupByRefType:Yr("group-by-ref-type",60311),ungroupByRefType:Yr("ungroup-by-ref-type",60312),account:Yr("account",60313),gitPullRequestAssignee:Yr("git-pull-request-assignee",60313),bellDot:Yr("bell-dot",60314),debugConsole:Yr("debug-console",60315),library:Yr("library",60316),output:Yr("output",60317),runAll:Yr("run-all",60318),syncIgnored:Yr("sync-ignored",60319),pinned:Yr("pinned",60320),githubInverted:Yr("github-inverted",60321),debugAlt:Yr("debug-alt",60305),serverProcess:Yr("server-process",60322),serverEnvironment:Yr("server-environment",60323),pass:Yr("pass",60324),stopCircle:Yr("stop-circle",60325),playCircle:Yr("play-circle",60326),record:Yr("record",60327),debugAltSmall:Yr("debug-alt-small",60328),vmConnect:Yr("vm-connect",60329),cloud:Yr("cloud",60330),merge:Yr("merge",60331),exportIcon:Yr("export",60332),graphLeft:Yr("graph-left",60333),magnet:Yr("magnet",60334),notebook:Yr("notebook",60335),redo:Yr("redo",60336),checkAll:Yr("check-all",60337),pinnedDirty:Yr("pinned-dirty",60338),passFilled:Yr("pass-filled",60339),circleLargeFilled:Yr("circle-large-filled",60340),circleLarge:Yr("circle-large",60341),circleLargeOutline:Yr("circle-large-outline",60341),combine:Yr("combine",60342),gather:Yr("gather",60342),table:Yr("table",60343),variableGroup:Yr("variable-group",60344),typeHierarchy:Yr("type-hierarchy",60345),typeHierarchySub:Yr("type-hierarchy-sub",60346),typeHierarchySuper:Yr("type-hierarchy-super",60347),gitPullRequestCreate:Yr("git-pull-request-create",60348),runAbove:Yr("run-above",60349),runBelow:Yr("run-below",60350),notebookTemplate:Yr("notebook-template",60351),debugRerun:Yr("debug-rerun",60352),workspaceTrusted:Yr("workspace-trusted",60353),workspaceUntrusted:Yr("workspace-untrusted",60354),workspaceUnspecified:Yr("workspace-unspecified",60355),terminalCmd:Yr("terminal-cmd",60356),terminalDebian:Yr("terminal-debian",60357),terminalLinux:Yr("terminal-linux",60358),terminalPowershell:Yr("terminal-powershell",60359),terminalTmux:Yr("terminal-tmux",60360),terminalUbuntu:Yr("terminal-ubuntu",60361),terminalBash:Yr("terminal-bash",60362),arrowSwap:Yr("arrow-swap",60363),copy:Yr("copy",60364),personAdd:Yr("person-add",60365),filterFilled:Yr("filter-filled",60366),wand:Yr("wand",60367),debugLineByLine:Yr("debug-line-by-line",60368),inspect:Yr("inspect",60369),layers:Yr("layers",60370),layersDot:Yr("layers-dot",60371),layersActive:Yr("layers-active",60372),compass:Yr("compass",60373),compassDot:Yr("compass-dot",60374),compassActive:Yr("compass-active",60375),azure:Yr("azure",60376),issueDraft:Yr("issue-draft",60377),gitPullRequestClosed:Yr("git-pull-request-closed",60378),gitPullRequestDraft:Yr("git-pull-request-draft",60379),debugAll:Yr("debug-all",60380),debugCoverage:Yr("debug-coverage",60381),runErrors:Yr("run-errors",60382),folderLibrary:Yr("folder-library",60383),debugContinueSmall:Yr("debug-continue-small",60384),beakerStop:Yr("beaker-stop",60385),graphLine:Yr("graph-line",60386),graphScatter:Yr("graph-scatter",60387),pieChart:Yr("pie-chart",60388),bracketDot:Yr("bracket-dot",60389),bracketError:Yr("bracket-error",60390),lockSmall:Yr("lock-small",60391),azureDevops:Yr("azure-devops",60392),verifiedFilled:Yr("verified-filled",60393),newLine:Yr("newline",60394),layout:Yr("layout",60395),layoutActivitybarLeft:Yr("layout-activitybar-left",60396),layoutActivitybarRight:Yr("layout-activitybar-right",60397),layoutPanelLeft:Yr("layout-panel-left",60398),layoutPanelCenter:Yr("layout-panel-center",60399),layoutPanelJustify:Yr("layout-panel-justify",60400),layoutPanelRight:Yr("layout-panel-right",60401),layoutPanel:Yr("layout-panel",60402),layoutSidebarLeft:Yr("layout-sidebar-left",60403),layoutSidebarRight:Yr("layout-sidebar-right",60404),layoutStatusbar:Yr("layout-statusbar",60405),layoutMenubar:Yr("layout-menubar",60406),layoutCentered:Yr("layout-centered",60407),layoutSidebarRightOff:Yr("layout-sidebar-right-off",60416),layoutPanelOff:Yr("layout-panel-off",60417),layoutSidebarLeftOff:Yr("layout-sidebar-left-off",60418),target:Yr("target",60408),indent:Yr("indent",60409),recordSmall:Yr("record-small",60410),errorSmall:Yr("error-small",60411),arrowCircleDown:Yr("arrow-circle-down",60412),arrowCircleLeft:Yr("arrow-circle-left",60413),arrowCircleRight:Yr("arrow-circle-right",60414),arrowCircleUp:Yr("arrow-circle-up",60415),heartFilled:Yr("heart-filled",60420),map:Yr("map",60421),mapFilled:Yr("map-filled",60422),circleSmall:Yr("circle-small",60423),bellSlash:Yr("bell-slash",60424),bellSlashDot:Yr("bell-slash-dot",60425),commentUnresolved:Yr("comment-unresolved",60426),gitPullRequestGoToChanges:Yr("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:Yr("git-pull-request-new-changes",60428),searchFuzzy:Yr("search-fuzzy",60429),commentDraft:Yr("comment-draft",60430),send:Yr("send",60431),sparkle:Yr("sparkle",60432),insert:Yr("insert",60433),mic:Yr("mic",60434),dialogError:Yr("dialog-error","error"),dialogWarning:Yr("dialog-warning","warning"),dialogInfo:Yr("dialog-info","info"),dialogClose:Yr("dialog-close","close"),treeItemExpanded:Yr("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:Yr("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:Yr("tree-filter-on-type-off","list-selection"),treeFilterClear:Yr("tree-filter-clear","close"),treeItemLoading:Yr("tree-item-loading","loading"),menuSelection:Yr("menu-selection","check"),menuSubmenu:Yr("menu-submenu","chevron-right"),menuBarMore:Yr("menubar-more","more"),scrollbarButtonLeft:Yr("scrollbar-button-left","triangle-left"),scrollbarButtonRight:Yr("scrollbar-button-right","triangle-right"),scrollbarButtonUp:Yr("scrollbar-button-up","triangle-up"),scrollbarButtonDown:Yr("scrollbar-button-down","triangle-down"),toolBarMore:Yr("toolbar-more","more"),quickInputBack:Yr("quick-input-back","arrow-left")};var Jr,ea;!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(Jr||(Jr={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(Qr.error);const[,s,o]=n,r=["codicon","codicon-"+s];return o&&r.push("codicon-modifier-"+o.substring(1)),r}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||Jr.isThemeColor(e.color))};const n=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=n.exec(e);if(!t)return;const[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)}}(ea||(ea={}));const ta=new RegExp(`\\$\\(${ea.iconNameExpression}(?:${ea.iconModifierExpression})?\\)`,"g"),ia=new RegExp(`(\\\\)?${ta.source}`,"g");const na=new RegExp(`\\\\${ta.source}`,"g");const sa=new RegExp(`(\\s)?(\\\\)?${ta.source}(\\s)?`,"g");function oa(e){return-1===e.indexOf("$(")?e:e.replace(sa,((e,t,i,n)=>i?e:t||n||""))}const ra=new RegExp(`\\$\\(${ea.iconNameCharacter}+\\)`,"g");function aa(e){ra.lastIndex=0;let t="";const i=[];let n=0;for(;;){const s=ra.lastIndex,o=ra.exec(e),r=e.substring(s,null==o?void 0:o.index);if(r.length>0){t+=r;for(let e=0;ee.length)return!1;if(i){if(!_o(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===n&&i--,e.charAt(i)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function ga(e){return e>=65&&e<=90||e>=97&&e<=122}function pa(e){return gn(e,!0)}class ma{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:lo(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===vn.file)return ua(pa(e),pa(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(Da(e.authority,t.authority))return ua(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return an.joinPath(e,...t)}basenameOrAuthority(e){return ba(e)||e.authority}basename(e){return qi.basename(e.path)}extname(e){return qi.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===vn.file?t=an.file(Yi(pa(e))).path:(t=qi.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===vn.file?an.file($i(pa(e))).path:qi.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!Da(e.authority,t.authority))return;if(e.scheme===vn.file){const i=Zi(pa(e),pa(t));return Oe?da(i):i}let i=e.path||"/";const n=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,n.length);eca(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=Ji){return xa(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Ji){let i=!1;if(e.scheme===vn.file){const n=pa(e);i=void 0!==n&&n.length===ca(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||xa(e,t)?e:e.with({path:e.path+"/"})}}const fa=new ma((()=>!1)),_a=(new ma((e=>e.scheme!==vn.file||!Fe)),new ma((e=>!0)),fa.isEqual.bind(fa)),va=(fa.isEqualOrParent.bind(fa),fa.getComparisonKey.bind(fa),fa.basenameOrAuthority.bind(fa)),ba=fa.basename.bind(fa),Ca=fa.extname.bind(fa),wa=fa.dirname.bind(fa),ya=fa.joinPath.bind(fa),Sa=fa.normalizePath.bind(fa),La=fa.relativePath.bind(fa),ka=fa.resolvePath.bind(fa),Da=(fa.isAbsolutePath.bind(fa),fa.isEqualAuthority.bind(fa)),xa=fa.hasTrailingPathSeparator.bind(fa);fa.removeTrailingPathSeparator.bind(fa),fa.addTrailingPathSeparator.bind(fa);var Na,Ea;!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(Na||(Na={}));class Ia{constructor(e="",t=!1){var i,n,s;if(this.value=e,"string"!=typeof this.value)throw u("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(n=t.supportThemeIcons)&&void 0!==n&&n,this.supportHtml=null!==(s=t.supportHtml)&&void 0!==s&&s)}appendText(e,t=0){var i;return this.value+=function(e){return e.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}(this.supportThemeIcons?(i=e,i.replace(ia,((e,t)=>t?e:`\\${e}`))):e).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(Js(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function Ma(e){return Ta(e)?!e.value:!Array.isArray(e)||e.every(Ma)}function Ta(e){return e instanceof Ia||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&"object"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function Ra(e){return e.replace(/"/g,""")}function Aa(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}!function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(Ea||(Ea={}));const Oa=Pa("instantiationService");function Pa(e){if(Ea.serviceIds.has(e))return Ea.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[Ea.DI_TARGET]===t?t[Ea.DI_DEPENDENCIES].push({id:e,index:i}):(t[Ea.DI_DEPENDENCIES]=[{id:e,index:i}],t[Ea.DI_TARGET]=t)}(t,e,n)};return t.toString=()=>e,Ea.serviceIds.set(e,t),t}const Fa=Pa("codeEditorService");class Ba{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Ba(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Ba.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Ba.isBefore(this,e)}static isBefore(e,t){return e.lineNumberHa(this,void 0,void 0,(function*(){return e.run(...t)})),tooltip:e.label}}qa.ID="vs.actions.empty";const Ga=Pa("commandService"),Za=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new U,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(const n of e.description.args)t.push(n.constraint);const i=e.handler;e.handler=function(e,...n){return function(e,t){const i=Math.min(e.length,t.length);for(let n=0;n{s();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),o}registerCommandAlias(e,t){return Za.registerCommand(e,((e,...i)=>e.get(Ga).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return v.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};function Ya(...e){switch(e.length){case 1:return ue(0,"Did you mean {0}?",e[0]);case 2:return ue(0,"Did you mean {0} or {1}?",e[0],e[1]);case 3:return ue(0,"Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}Za.registerCommand("noop",(()=>{}));const Xa=ue(0,"Did you forget to open or close the quote?"),Qa=ue(0,"Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class Ja{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:case 8:return">=";case 9:return"=~";case 10:case 17:case 18:case 19:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 20:return"EOF";default:throw g(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();){this._start=this._current;switch(this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(Ya("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(Ya("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(Ya("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&(this._input.charCodeAt(this._current)===e&&(this._current++,!0))}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=Ja._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;39!==this._peek()&&!this._isAtEnd();)this._advance();this._isAtEnd()?this._error(Xa):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,i=!1;for(;;){if(e>=this._input.length)return this._current=e,void this._error(Qa);const n=this._input.charCodeAt(e);if(t)t=!1;else{if(47===n&&!i){e++;break}91===n?i=!0:92===n?t=!0:93===n&&(i=!1)}e++}for(;e=this._input.length}}Ja._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0)))),Ja._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);const el=new Map;el.set("false",!1),el.set("true",!0),el.set("isMac",Pe),el.set("isLinux",Fe),el.set("isWindows",Oe),el.set("isWeb",We),el.set("isMacNative",Pe&&!We),el.set("isEdge",et),el.set("isFirefox",Qe),el.set("isChrome",Xe),el.set("isSafari",Je);const tl=Object.prototype.hasOwnProperty,il={regexParsingWithErrorRecovery:!0},nl=ue(0,"Empty context key expression"),sl=ue(0,"Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),ol=ue(0,"'in' after 'not'."),rl=ue(0,"closing parenthesis ')'"),al=ue(0,"Unexpected token"),ll=ue(0,"Did you forget to put && or || before the token?"),hl=ue(0,"Unexpected end of expression"),dl=ue(0,"Did you forget to put a context key?");class cl{constructor(e=il){this._config=e,this._scanner=new Ja,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?ll:void 0;throw this._parsingErrors.push({message:al,offset:e.offset,lexeme:Ja.getLexeme(e),additionalInfo:t}),cl._parseError}return e}catch(Dre){if(Dre!==cl._parseError)throw Dre;return}}else this._parsingErrors.push({message:nl,offset:0,lexeme:"",additionalInfo:sl})}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return 1===e.length?e[0]:ul.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return 1===e.length?e[0]:ul.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),pl.INSTANCE;case 12:return this._advance(),ml.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,rl),null==e?void 0:e.negate()}case 17:return this._advance(),wl.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),ul.true();case 12:return this._advance(),ul.false();case 0:{this._advance();const e=this._expr();return this._consume(1,rl),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const i=e.lexeme,n=i.lastIndexOf("/"),s=n===i.length-1?void 0:this._removeFlagsGY(i.substring(n+1));let o;try{o=new RegExp(i.substring(1,n),s)}catch(Dre){throw this._errExpectedButGot("REGEX",e)}return xl.create(t,o)}switch(e.type){case 10:case 19:{const i=[e.lexeme];this._advance();let n=this._peek(),s=0;for(let t=0;t=0){const o=i.slice(t+1,s),r="i"===i[s+1]?"i":"";try{n=new RegExp(o,r)}catch(FU){throw this._errExpectedButGot("REGEX",e)}}}if(null===n)throw this._errExpectedButGot("REGEX",e);return xl.create(t,n)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,ol);const e=this._value();return ul.notIn(t,e)}switch(this._peek().type){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return ul.equals(t,e);switch(e){case"true":return ul.has(t);case"false":return ul.not(t);default:return ul.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return ul.notEquals(t,e);switch(e){case"true":return ul.not(t);case"false":return ul.has(t);default:return ul.notEquals(t,e)}}case 5:return this._advance(),kl.create(t,this._value());case 6:return this._advance(),Dl.create(t,this._value());case 7:return this._advance(),Sl.create(t,this._value());case 8:return this._advance(),Ll.create(t,this._value());case 13:return this._advance(),ul.in(t,this._value());default:return ul.has(t)}}case 20:throw this._parsingErrors.push({message:hl,offset:e.offset,lexeme:"",additionalInfo:dl}),cl._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=ue(0,"Expected: {0}\nReceived: '{1}'.",e,Ja.getLexeme(t)),s=t.offset,o=Ja.getLexeme(t);return this._parsingErrors.push({message:n,offset:s,lexeme:o,additionalInfo:i}),cl._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}cl._parseError=new Error;class ul{static false(){return pl.INSTANCE}static true(){return ml.INSTANCE}static has(e){return fl.create(e)}static equals(e,t){return _l.create(e,t)}static notEquals(e,t){return Cl.create(e,t)}static regex(e,t){return xl.create(e,t)}static in(e,t){return vl.create(e,t)}static notIn(e,t){return bl.create(e,t)}static not(e){return wl.create(e)}static and(...e){return Il.create(e,null,!0)}static or(...e){return Ml.create(e,null,!0)}static deserialize(e){if(null==e)return;return this._parser.parse(e)}}function gl(e,t){return e.cmp(t)}ul._parser=new cl({regexParsingWithErrorRecovery:!1});class pl{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return ml.INSTANCE}}pl.INSTANCE=new pl;class ml{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return pl.INSTANCE}}ml.INSTANCE=new ml;class fl{static create(e,t=null){const i=el.get(e);return"boolean"==typeof i?i?ml.INSTANCE:pl.INSTANCE:new fl(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:Al(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=el.get(this.key);return"boolean"==typeof e?e?ml.INSTANCE:pl.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=wl.create(this.key,this)),this.negated}}class _l{static create(e,t,i=null){if("boolean"==typeof t)return t?fl.create(e,i):wl.create(e,i);const n=el.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?ml.INSTANCE:pl.INSTANCE}return new _l(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=el.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?ml.INSTANCE:pl.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Cl.create(this.key,this.value,this)),this.negated}}class vl{static create(e,t){return new vl(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"==typeof i&&"object"==typeof t&&null!==t&&tl.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=bl.create(this.key,this.valueKey)),this.negated}}class bl{static create(e,t){return new bl(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=vl.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class Cl{static create(e,t,i=null){if("boolean"==typeof t)return t?wl.create(e,i):fl.create(e,i);const n=el.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?pl.INSTANCE:ml.INSTANCE}return new Cl(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=el.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?pl.INSTANCE:ml.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_l.create(this.key,this.value,this)),this.negated}}class wl{static create(e,t=null){const i=el.get(e);return"boolean"==typeof i?i?pl.INSTANCE:ml.INSTANCE:new wl(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:Al(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=el.get(this.key);return"boolean"==typeof e?e?pl.INSTANCE:ml.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=fl.create(this.key,this)),this.negated}}function yl(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):pl.INSTANCE}class Sl{static create(e,t,i=null){return yl(t,(t=>new Sl(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Dl.create(this.key,this.value,this)),this.negated}}class Ll{static create(e,t,i=null){return yl(t,(t=>new Ll(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=kl.create(this.key,this.value,this)),this.negated}}class kl{static create(e,t,i=null){return yl(t,(t=>new kl(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))new Dl(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Sl.create(this.key,this.value,this)),this.negated}}class xl{static create(e,t){return new xl(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Nl.create(this)),this.negated}}class Nl{static create(e){return new Nl(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function El(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),s=0===n.length,o=Ml.create(e.expr.map((e=>Il.create([e,t],null,i))),null,s);o&&(n.push(o),n.sort(gl))}if(1===n.length)return n[0];if(i){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=Ml.create(e,this,!0)}return this.negated}}class Ml{static create(e,t,i){return Ml._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of Bl(t))for(const t of Bl(i))n.push(Il.create([e,t],null,!1));e.unshift(Ml.create(n,null,!1))}this.negated=Ml.create(e,this,!0)}return this.negated}}class Tl extends fl{static all(){return Tl._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?Tl._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&Tl._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return _l.create(this.key,e)}}Tl._info=[];const Rl=Pa("contextKeyService");function Al(e,t){return et?1:0}function Ol(e,t,i,n){return ei?1:tn?1:0}function Pl(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&Fl(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(Pl(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return Fl(t.expr,e.expr);for(const i of e.expr)if(Pl(i,t))return!0;return!1}return e.equals(t)}function Fl(e,t){let i=0,n=0;for(;i{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(ql)),this._cachedMergedKeybindings.slice(0)}}const jl=new Kl;function ql(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.commandt.command)return 1}return e.weight2-t.weight2}Ul.add("platform.keybindingsRegistry",jl);var $l,Gl=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Zl=function(e,t){return function(i,n){t(i,n,e)}},Yl=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);st===e}}eh._all=new Map;const th=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new $({merge:eh.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(eh.for(Ql.CommandPalette)),x((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(eh.for(Ql.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new O,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(eh.for(e)),x((()=>{n(),this._onDidChangeMenu.fire(eh.for(e))}))}appendMenuItems(e){const t=new N;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===Ql.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)Xl(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class ih extends ja{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let nh=$l=class{static label(e,t){return(null==t?void 0:t.renderShortTitle)&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,n,s,o){var r,a;let l;if(this.hideActions=n,this._commandService=o,this.id=e.id,this.label=$l.label(e,i),this.tooltip=null!==(a="string"==typeof e.tooltip?e.tooltip:null===(r=e.tooltip)||void 0===r?void 0:r.value)&&void 0!==a?a:"",this.enabled=!e.precondition||s.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=s.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&ea.isThemeIcon(t.icon)&&(l=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}l||(l=ea.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new $l(t,void 0,i,n,s,o):void 0,this._options=i,this.class=l&&ea.asClassName(l)}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};nh=$l=Gl([Zl(4,Rl),Zl(5,Ga)],nh);class sh{constructor(e){this.desc=e}}function oh(e){const t=new N,i=new e,n=i.desc,{f1:s,menu:o,keybinding:r,description:a}=n,l=Yl(n,["f1","menu","keybinding","description"]);if(t.add(Za.registerCommand({id:l.id,handler:(e,...t)=>i.run(e,...t),description:a})),Array.isArray(o))for(const h of o)t.add(th.appendMenuItem(h.id,Object.assign({command:Object.assign(Object.assign({},l),{precondition:null===h.precondition?void 0:l.precondition})},h)));else o&&t.add(th.appendMenuItem(o.id,Object.assign({command:Object.assign(Object.assign({},l),{precondition:null===o.precondition?void 0:l.precondition})},o)));if(s&&(t.add(th.appendMenuItem(Ql.CommandPalette,{command:l,when:l.precondition})),t.add(th.addCommand(l))),Array.isArray(r))for(const h of r)t.add(jl.registerKeybindingRule(Object.assign(Object.assign({},h),{id:l.id,when:l.precondition?ul.and(l.precondition,h.when):h.when})));else r&&t.add(jl.registerKeybindingRule(Object.assign(Object.assign({},r),{id:l.id,when:l.precondition?ul.and(l.precondition,r.when):r.when})));return t}const rh=Pa("telemetryService"),ah=Pa("logService");var lh;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(lh||(lh={}));const hh=lh.Info;class dh extends E{constructor(){super(...arguments),this.level=hh,this._onDidChangeLogLevel=this._register(new U),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==lh.Off&&this.level<=e}}class ch extends dh{constructor(e=hh,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(lh.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(lh.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(lh.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(lh.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(lh.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}dispose(){}}class uh extends dh{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose()}}new Tl("logLevel",function(e){switch(e){case lh.Trace:return"trace";case lh.Debug:return"debug";case lh.Info:return"info";case lh.Warning:return"warn";case lh.Error:return"error";case lh.Off:return"off"}}(lh.Info));class gh{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?ul.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};jl.registerKeybindingRule(i)}}Za.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){th.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class ph extends gh{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(Rl).contextMatchesRules(null!=i?i:void 0))return n(e,o,t)}))}runCommand(e,t){return fh.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class _h extends fh{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=Ql.EditorContext),t.title||(t.title=e.label),t.when=ul.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(_h.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(rh).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class vh extends _h{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e{var i,s;const o=e.get(Rl),r=e.get(ah);if(o.contextMatchesRules(null!==(i=this.desc.precondition)&&void 0!==i?i:void 0))return this.runEditorCommand(e,n,...t);r.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,null===(s=this.desc.precondition)||void 0===s?void 0:s.serialize())}))}}function Ch(e,t){Za.registerCommand(e,(function(e,...i){const n=e.get(Oa),[s,o]=i;jr(an.isUri(s)),jr(Ba.isIPosition(o));const r=e.get(Wa).getModel(s);if(r){const e=Ba.lift(o);return n.invokeFunction(t,r,e,...i.slice(2))}return e.get(Va).createModelReference(s).then((e=>new Promise(((s,r)=>{try{s(n.invokeFunction(t,e.object.textEditorModel,Ba.lift(o),i.slice(2)))}catch(a){r(a)}})).finally((()=>{e.dispose()}))))}))}function wh(e){return Dh.INSTANCE.registerEditorCommand(e),e}function yh(e){const t=new e;return Dh.INSTANCE.registerEditorAction(t),t}function Sh(e){return Dh.INSTANCE.registerEditorAction(e),e}function Lh(e,t,i){Dh.INSTANCE.registerEditorContribution(e,t,i)}var kh;!function(e){e.getEditorCommand=function(e){return Dh.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return Dh.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return Dh.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return Dh.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return Dh.INSTANCE.getDiffEditorContributions()}}(kh||(kh={}));class Dh{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function xh(e){return e.register(),e}Dh.INSTANCE=new Dh,Ul.add("editor.contributions",Dh.INSTANCE);const Nh=xh(new ph({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:Ql.MenubarEditMenu,group:"1_do",title:ue(0,"&&Undo"),order:1},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Undo"),order:1}]}));xh(new mh(Nh,{id:"default:undo",precondition:void 0}));const Eh=xh(new ph({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:Ql.MenubarEditMenu,group:"1_do",title:ue(0,"&&Redo"),order:2},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Redo"),order:1}]}));xh(new mh(Eh,{id:"default:redo",precondition:void 0}));const Ih=xh(new ph({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:Ql.MenubarSelectionMenu,group:"1_basic",title:ue(0,"&&Select All"),order:1},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Select All"),order:1}]}));class Mh{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return Mh.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Mh.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return Mh.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return Mh.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return Mh.plusRange(this,e)}static plusRange(e,t){let i,n,s,o;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new Mh(i,n,s,o)}intersectRanges(e){return Mh.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn;const r=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,h=t.endColumn;return il?(s=l,o=h):s===l&&(o=Math.min(o,h)),i>s||i===s&&n>o?null:new Mh(i,n,s,o)}equalsRange(e){return Mh.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Mh.getEndPosition(this)}static getEndPosition(e){return new Ba(e.endLineNumber,e.endColumn)}getStartPosition(){return Mh.getStartPosition(this)}static getStartPosition(e){return new Ba(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Mh(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Mh(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Mh.collapseToStart(this)}static collapseToStart(e){return new Mh(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return Mh.collapseToEnd(this)}static collapseToEnd(e){return new Mh(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new Mh(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new Mh(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Mh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}class Th extends Mh{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Th.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new Th(this.startLineNumber,this.startColumn,e,t):new Th(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Ba(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Ba(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new Th(e,t,this.endLineNumber,this.endColumn):new Th(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new Th(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new Th(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Th(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Th(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ph=function(e,t){return function(i,n){t(i,n,e)}},Fh=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Bh=new Tl("selectionAnchorSet",!1);let Wh=Ah=class{static get(e){return e.getContribution(Ah.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Bh.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations((t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Th.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new Ia).appendText(ue(0,"Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),Os(ue(0,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Th.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations((t=>{t.removeDecoration(e),this.decorationId=void 0})),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Wh.ID="editor.contrib.selectionAnchorController",Wh=Ah=Oh([Ph(1,Rl)],Wh);Lh(Wh.ID,Wh,4),yh(class extends _h{constructor(){super({id:"editor.action.setSelectionAnchor",label:ue(0,"Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2080),weight:100}})}run(e,t){var i;return Fh(this,void 0,void 0,(function*(){null===(i=Wh.get(t))||void 0===i||i.setSelectionAnchor()}))}}),yh(class extends _h{constructor(){super({id:"editor.action.goToSelectionAnchor",label:ue(0,"Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:Bh})}run(e,t){var i;return Fh(this,void 0,void 0,(function*(){null===(i=Wh.get(t))||void 0===i||i.goToSelectionAnchor()}))}}),yh(class extends _h{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:ue(0,"Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:Bh,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2089),weight:100}})}run(e,t){var i;return Fh(this,void 0,void 0,(function*(){null===(i=Wh.get(t))||void 0===i||i.selectFromAnchorToCursor()}))}}),yh(class extends _h{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:ue(0,"Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:Bh,kbOpts:{kbExpr:Rh.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return Fh(this,void 0,void 0,(function*(){null===(i=Wh.get(t))||void 0===i||i.cancelSelectionAnchor()}))}});const Vh=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var Hh;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||(t instanceof zh||!(!t||"object"!=typeof t)&&("boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested))},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:B.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Vh})}(Hh||(Hh={}));class zh{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Vh:(this._emitter||(this._emitter=new U),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Uh{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new zh),this._token}cancel(){this._token?this._token instanceof zh&&this._token.cancel():this._token=Hh.Cancelled}dispose(e=!1){var t;e&&this.cancel(),null===(t=this._parentListener)||void 0===t||t.dispose(),this._token?this._token instanceof zh&&this._token.dispose():this._token=Hh.None}}const Kh=Symbol("MicrotaskDelay");var jh=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},qh=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,s){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,s,(t=e[i](t)).done,t.value)}))}}};function $h(e){return!!e&&"function"==typeof e.then}function Gh(e){const t=new Uh,i=e(t.token),n=new Promise(((e,n)=>{const s=t.token.onCancellationRequested((()=>{s.dispose(),t.dispose(),n(new c)}));Promise.resolve(i).then((i=>{s.dispose(),t.dispose(),e(i)}),(e=>{s.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return n.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return n.finally(e)}}}function Zh(e,t,i){return new Promise(((n,s)=>{const o=t.onCancellationRequested((()=>{o.dispose(),n(i)}));e.then(n,s).finally((()=>o.dispose()))}))}class Yh{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{if(this.queuedPromise=null,this.isDisposed)return;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}dispose(){this.isDisposed=!0}}class Xh{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{var e;this.deferred=null,null===(e=this.doResolve)||void 0===e||e.call(this,null)};return this.deferred=t===Kh?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){var e;return!!(null===(e=this.deferred)||void 0===e?void 0:e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&(null===(e=this.doReject)||void 0===e||e.call(this,new c),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class Qh{constructor(e){this.delayer=new Xh(e),this.throttler=new Yh}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function Jh(e,t){return t?new Promise(((i,n)=>{const s=setTimeout((()=>{o.dispose(),i()}),e),o=t.onCancellationRequested((()=>{clearTimeout(s),o.dispose(),n(new c)}))})):Gh((t=>Jh(e,t)))}function ed(e,t=0,i){const n=setTimeout((()=>{e(),i&&s.dispose()}),t),s=x((()=>{clearTimeout(n),null==i||i.deleteAndLeak(s)}));return null==i||i.add(s),s}function td(e,t=e=>!!e,i=null){let n=0;const s=e.length,o=()=>{if(n>=s)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):o()))};return o()}class id{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class nd{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class sd{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;null===(e=this.runner)||void 0===e||e.call(this)}}let od;od="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{qe((()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,i-Date.now())}))}));let t=!1;return{dispose(){t||(t=!0)}}}:(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}};class rd{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=od((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class ad{get isRejected(){var e;return 1===(null===(e=this.outcome)||void 0===e?void 0:e.outcome)}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()}))}error(e){return new Promise((t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()}))}cancel(){return this.error(new c)}}var ld;!function(e){e.settled=function(e){return jh(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))},e.withAsyncBody=function(e){return new Promise(((t,i)=>jh(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(n){i(n)}}))))}}(ld||(ld={}));class hd{static fromArray(e){return new hd((t=>{t.emitMany(e)}))}static fromPromise(e){return new hd((t=>jh(this,void 0,void 0,(function*(){t.emitMany(yield e)}))))}static fromPromises(e){return new hd((t=>jh(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>jh(this,void 0,void 0,(function*(){return t.emitOne(yield e)})))))}))))}static merge(e){return new hd((t=>jh(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>{var i,n,s;return jh(this,void 0,void 0,(function*(){var o,r,a,l;try{for(i=!0,n=qh(e);!(o=(s=yield n.next()).done);i=!0){l=s.value,i=!1;const e=l;t.emitOne(e)}}catch(h){r={error:h}}finally{try{i||o||!(a=n.return)||(yield a.call(n))}finally{if(r)throw r.error}}}))})))}))))}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new U,queueMicrotask((()=>jh(this,void 0,void 0,(function*(){const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{yield Promise.resolve(e(t)),this.resolve()}catch(i){this.reject(i)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))))}[Symbol.asyncIterator](){let e=0;return{next:()=>jh(this,void 0,void 0,(function*(){for(;;){if(2===this._state)throw this._error;if(ejh(this,void 0,void 0,(function*(){var n,s,o,r;try{for(var a,l=!0,h=qh(e);!(n=(a=yield h.next()).done);l=!0){r=a.value,l=!1;const e=r;i.emitOne(t(e))}}catch(d){s={error:d}}finally{try{l||n||!(o=h.return)||(yield o.call(h))}finally{if(s)throw s.error}}}))))}map(e){return hd.map(this,e)}static filter(e,t){return new hd((i=>jh(this,void 0,void 0,(function*(){var n,s,o,r;try{for(var a,l=!0,h=qh(e);!(n=(a=yield h.next()).done);l=!0){r=a.value,l=!1;const e=r;t(e)&&i.emitOne(e)}}catch(d){s={error:d}}finally{try{l||n||!(o=h.return)||(yield o.call(h))}finally{if(s)throw s.error}}}))))}filter(e){return hd.filter(this,e)}static coalesce(e){return hd.filter(e,(e=>!!e))}coalesce(){return hd.coalesce(this)}static toPromise(e){var t,i,n,s,o,r,a;return jh(this,void 0,void 0,(function*(){const l=[];try{for(t=!0,i=qh(e);n=yield i.next(),!(s=n.done);t=!0){a=n.value,t=!1;const e=a;l.push(e)}}catch(h){o={error:h}}finally{try{t||s||!(r=i.return)||(yield r.call(i))}finally{if(o)throw o.error}}return l}))}toPromise(){return hd.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}hd.EMPTY=hd.fromArray([]);class dd extends hd{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function cd(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.entries(e).forEach((([e,i])=>{t[e]=i&&"object"==typeof i?cd(i):i})),t}const ud=Object.prototype.hasOwnProperty;function gd(e,t){return pd(e,t,new Set)}function pd(e,t,i){if(Kr(e))return e;const n=t(e);if(void 0!==n)return n;if(Array.isArray(e)){const n=[];for(const s of e)n.push(pd(s,t,i));return n}if(Fr(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const s in e)ud.call(e,s)&&(n[s]=pd(e[s],t,i));return i.delete(e),n}return e}function md(e,t,i=!0){return Fr(e)?(Fr(t)&&Object.keys(t).forEach((n=>{n in e?i&&(Fr(e[n])&&Fr(t[n])?md(e[n],t[n],i):e[n]=t[n]):e[n]=t[n]})),e):t}function fd(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;ie===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n0))return e;n=e-1}}return-(i+1)}(e.length,(n=>i(e[n],t)))}function Td(e,t,i){if((e|=0)>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],s=[],o=[],r=[];for(const a of t){const e=i(a,n);e<0?s.push(a):e>0?o.push(a):r.push(a)}return e!!e))}function Fd(e){let t=0;for(let i=0;i0}function Vd(e,t=e=>e){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function Hd(e,t){return e.length>0?e[0]:t}function zd(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let s=i;st;s--)n.push(s);return n}function Ud(e,t,i){const n=e.slice(0,t),s=e.slice(t);return n.concat(i,s)}function Kd(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function jd(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function qd(e,t){for(const i of t)e.push(i)}function $d(e){return Array.isArray(e)?e:[e]}function Gd(e,t,i,n){const s=Zd(e,t);let o=e.splice(s,i);return void 0===o&&(o=[]),function(e,t,i){const n=Zd(e,t),s=e.length,o=i.length;e.length=s+o;for(let r=s-1;r>=n;r--)e[r+o]=e[r];for(let r=0;rt(e(i),e(n))}!function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(yd||(yd={}));const Xd=(e,t)=>e-t,Qd=(e,t)=>Xd(e?1:0,t?1:0);function Jd(e){return(t,i)=>-e(t,i)}class ec{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class tc{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new tc((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new tc((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||yd.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}function ic(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}tc.empty=new tc((e=>{}));class nc{constructor(e,t,i,n=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=ic(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class sc{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=ic(Math.max(Math.min(1,t),0),3),this.l=ic(Math.max(Math.min(1,i),0),3),this.a=ic(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,o=Math.max(t,i,n),r=Math.min(t,i,n);let a=0,l=0;const h=(r+o)/2,d=o-r;if(d>0){switch(l=Math.min(h<=.5?d/(2*h):d/(2-2*h),1),o){case t:a=(i-n)/d+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:s}=e;let o,r,a;if(0===i)o=r=a=n;else{const e=n<.5?n*(1+i):n+i-n*i,s=2*n-e;o=sc._hue2rgb(s,e,t+1/3),r=sc._hue2rgb(s,e,t),a=sc._hue2rgb(s,e,t-1/3)}return new nc(Math.round(255*o),Math.round(255*r),Math.round(255*a),s)}}class oc{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=ic(Math.max(Math.min(1,t),0),3),this.v=ic(Math.max(Math.min(1,i),0),3),this.a=ic(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),o=s-Math.min(t,i,n),r=0===s?0:o/s;let a;return a=0===o?0:s===t?((i-n)/o%6+6)%6:s===i?(n-t)/o+2:(t-i)/o+4,new oc(Math.round(60*a),r,s,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,o=n*i,r=o*(1-Math.abs(t/60%2-1)),a=n-o;let[l,h,d]=[0,0,0];return t<60?(l=o,h=r):t<120?(l=r,h=o):t<180?(h=o,d=r):t<240?(h=r,d=o):t<300?(l=r,d=o):t<=360&&(l=o,d=r),l=Math.round(255*(l+a)),h=Math.round(255*(h+a)),d=Math.round(255*(d+a)),new nc(l,h,d,s)}}class rc{static fromHex(e){return rc.Format.CSS.parseHex(e)||rc.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:sc.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:oc.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof nc)this.rgba=e;else if(e instanceof sc)this._hsla=e,this.rgba=sc.toRGBA(e);else{if(!(e instanceof oc))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=oc.toRGBA(e)}}equals(e){return!!e&&nc.equals(this.rgba,e.rgba)&&sc.equals(this.hsla,e.hsla)&&oc.equals(this.hsva,e.hsva)}getRelativeLuminance(){return ic(.2126*rc._relativeLuminanceForComponent(this.rgba.r)+.7152*rc._relativeLuminanceForComponent(this.rgba.g)+.0722*rc._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()=t){return l-tt))return new dc(e,t)}static ofLength(e){return new dc(0,e)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new f(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new dc(this.start+e,this.endExclusive+e)}deltaStart(e){return new dc(this.start+e,this.endExclusive)}deltaEnd(e){return new dc(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString())).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length),0)}}function uc(e,t,i){const n=function(e,t,i=e.length-1){for(let n=i;n>=0;n--){if(t(e[n]))return n}return-1}(e,t);if(-1!==n)return e[n]}function gc(e,t){const i=pc(e,t);return-1===i?void 0:e[i]}function pc(e,t,i=0,n=e.length){let s=i,o=n;for(;s0&&(i=s)}return i}function vc(e,t){if(0===e.length)return-1;let i=0;for(let n=1;n0&&(i=n)}return i}fc.assertInvariants=!1;class bc{static fromRange(e){return new bc(e.startLineNumber,e.endLineNumber)}static joinMany(e){if(0===e.length)return[];let t=new Cc(e[0].slice());for(let i=1;it)throw new f(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),i=pc(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=gc(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let i=0,n=0,s=null;for(;i=o.startLineNumber?s=new bc(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(t.push(s),s=o)}return null!==s&&t.push(s),new Cc(t)}subtractFrom(e){const t=mc(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),i=pc(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)return new Cc([e]);const n=[];let s=e.startLineNumber;for(let o=t;os&&n.push(new bc(s,e.startLineNumber)),s=e.endLineNumberExclusive}return se.toString())).join(", ")}getIntersection(e){const t=[];let i=0,n=0;for(;it.delta(e))))}}const wc={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}},yc=Pa("languageService"),Sc="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";const Lc=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of Sc)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function kc(e){let t=Lc;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const Dc=new O;function xc(e,t,i,n,s){if(s||(s=v.first(Dc)),i.length>s.maxLen){let o=e-s.maxLen/2;return o<0?o=0:n+=o,xc(e,t,i=i.substring(o,e+s.maxLen/2),n,s)}const o=Date.now(),r=e-1-n;let a=-1,l=null;for(let h=1;!(Date.now()-o>=s.timeBudget);h++){const e=r-s.windowSize*h;t.lastIndex=Math.max(0,e);const n=Nc(t,i,r,a);if(!n&&l)break;if(l=n,e<=0)break;a=e}if(l){const e={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function Nc(e,t,i,n){let s;for(;s=e.exec(t);){const t=s.index||0;if(t<=i&&e.lastIndex>=i)return s;if(n>0&&t>n)return null}return null}var Ec;Dc.unshift({maxLen:1e3,windowSize:15,timeBudget:150}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(Ec||(Ec={}));class Ic{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t0&&e.getLanguageId(r-1)===s;)r--;return new Ac(e,s,r,o+1,e.getStartOffset(r),e.getEndOffset(o))}class Ac{constructor(e,t,i,n,s,o){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=o}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function Oc(e){return!!(3&e)}class Pc{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new Ic(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new Ic({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new Ic({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:Pc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:Pc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}Pc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t",Pc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t";const Fc="undefined"!=typeof Buffer;new Gs((()=>new Uint8Array(256)));let Bc,Wc,Vc,Hc;class zc{static wrap(e){return Fc&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new zc(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return Fc?this.buffer.toString():(Bc||(Bc=new TextDecoder),Bc.decode(this.buffer))}}function Uc(e,t){return(e[t+0]|0)>>>0|e[t+1]<<8>>>0}function Kc(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function jc(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function qc(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function $c(e,t){return e[t]}function Gc(e,t,i){e[i]=t}function Zc(){return Wc||(Wc=new TextDecoder("UTF-16LE")),Wc}function Yc(){return Hc||(Hc=Ye()?Zc():(Vc||(Vc=new TextDecoder("UTF-16BE")),Vc)),Hc}function Xc(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?function(e,t,i){const n=[];let s=0;for(let o=0;o=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let r=0;r{const[i,n]=e,[s,o]=t;return i===s||i===o||n===s||n===o},s=(e,n)=>{const s=Math.min(e,n),o=Math.max(e,n);for(let r=0;r0&&o.push({open:n,close:s})}return o}(t);this.brackets=i.map(((t,n)=>new Jc(e,n,t.open,t.close,function(e,t,i,n){let s=[];s=s.concat(e),s=s.concat(t);for(let o=0,r=s.length;o=0&&n.push(t);for(const t of o.close)t.indexOf(e)>=0&&n.push(t)}}function iu(e,t){return e.length-t.length}function nu(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function su(e){const t=/^[\w ]+$/.test(e);return e=Js(e),t?`\\b${e}\\b`:e}function ou(e){return no(`(${e.map(su).join(")|(")})`,!0)}const ru=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return Yc().decode(t)}(e)),t}}();class au{static _findPrevBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const o=i.length-(s.index||0),r=s[0].length,a=n+o;return new Mh(t,a-r+1,t,a+1)}static findPrevBracketInRange(e,t,i,n,s){const o=ru(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,o,n)}static findNextBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const o=s.index||0,r=s[0].length;if(0===r)return null;const a=n+o;return new Mh(t,a+1,t,a+1+r)}static findNextBracketInRange(e,t,i,n,s){const o=i.substring(n,s);return this.findNextBracketInText(e,t,o,n)}}class lu{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return Vd(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if(Oc(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,r=au.findPrevBracketInRange(s,1,o,0,o.length);if(!r)return null;const a=o.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function hu(e){return e.global&&(e.lastIndex=0),!0}class du{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&hu(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&hu(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&hu(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&hu(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class cu{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=cu._createOpenBracketRegExp(e[0]),i=cu._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let s=0,o=this._regExpRules.length;s!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return e.action}if(e>=2&&i.length>0&&n.length>0)for(let s=0,o=this._brackets.length;s=2&&i.length>0)for(let s=0,o=this._brackets.length;s0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};Ul.add(Su,Lu);const ku="base.contributions.configuration",Du={properties:{},patternProperties:{}},xu={properties:{},patternProperties:{}},Nu={properties:{},patternProperties:{}},Eu={properties:{},patternProperties:{}},Iu={properties:{},patternProperties:{}},Mu={properties:{},patternProperties:{}},Tu="vscode://schemas/settings/resourceLanguage",Ru=Ul.as(Su);const Au="\\[([^\\]]+)\\]",Ou=new RegExp(Au,"g"),Pu=`^(${Au})+$`,Fu=new RegExp(Pu);function Bu(e){const t=[];if(Fu.test(e)){let i=Ou.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=Ou.exec(e)}}return Vd(t)}const Wu=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new U,this._onDidUpdateConfiguration=new U,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:ue(0,"Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},Ru.registerSchema(Tu,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),Ru.registerSchema(Tu,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var i;const n=[];for(const{overrides:s,source:o}of e)for(const e in s)if(t.add(e),Fu.test(e)){const t=this.configurationDefaultsOverrides.get(e),r=null!==(i=null==t?void 0:t.valuesSources)&&void 0!==i?i:new Map;if(o)for(const i of Object.keys(s[e]))r.set(i,o);const a=Object.assign(Object.assign({},(null==t?void 0:t.value)||{}),s[e]);this.configurationDefaultsOverrides.set(e,{source:o,value:a,valuesSources:r});const l={type:"object",default:a,description:ue(0,"Configure settings to be overridden for the {0} language.",e.replace(/[\[\]]/g,"")),$ref:Tu,defaultDefaultValue:a,source:Pr(o)?void 0:o,defaultValueSource:o};n.push(...Bu(e)),this.configurationProperties[e]=l,this.defaultLanguageConfigurationOverridesNode.properties[e]=l}else{this.configurationDefaultsOverrides.set(e,{value:s[e],source:o});const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.doRegisterOverrideIdentifiers(n)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,s=3,o){var r;s=Kr(e.scope)?s:e.scope;const a=e.properties;if(a)for(const h in a){const e=a[h];t&&Vu(h,e)?delete a[h]:(e.source=i,e.defaultDefaultValue=a[h].default,this.updatePropertyDefaultValue(h,e),Fu.test(h)?e.scope=void 0:(e.scope=Kr(e.scope)?s:e.scope,e.restricted=Kr(e.restricted)?!!(null==n?void 0:n.includes(h)):e.restricted),!a[h].hasOwnProperty("included")||a[h].included?(this.configurationProperties[h]=a[h],(null===(r=a[h].policy)||void 0===r?void 0:r.name)&&this.policyConfigurations.set(a[h].policy.name,h),!a[h].deprecationMessage&&a[h].markdownDeprecationMessage&&(a[h].deprecationMessage=a[h].markdownDeprecationMessage),o.add(h)):(this.excludedConfigurationProperties[h]=a[h],delete a[h]))}const l=e.allOf;if(l)for(const h of l)this.validateAndRegisterProperties(h,t,i,n,s,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const t in i)this.updateSchema(t,i[t]);const n=e.allOf;null==n||n.forEach(t)};t(e)}updateSchema(e,t){switch(Du.properties[e]=t,t.scope){case 1:xu.properties[e]=t;break;case 2:Nu.properties[e]=t;break;case 6:Eu.properties[e]=t;break;case 3:Iu.properties[e]=t;break;case 4:Mu.properties[e]=t;break;case 5:Mu.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:ue(0,"Configure editor settings to be overridden for a language."),errorMessage:ue(0,"This setting does not support per-language configuration."),$ref:Tu};this.updatePropertyDefaultValue(t,i),Du.properties[t]=i,xu.properties[t]=i,Nu.properties[t]=i,Eu.properties[t]=i,Iu.properties[t]=i,Mu.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:ue(0,"Configure editor settings to be overridden for a language."),errorMessage:ue(0,"This setting does not support per-language configuration."),$ref:Tu};Du.patternProperties[Pu]=e,xu.patternProperties[Pu]=e,Nu.patternProperties[Pu]=e,Eu.patternProperties[Pu]=e,Iu.patternProperties[Pu]=e,Mu.patternProperties[Pu]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=null==i?void 0:i.value,s=null==i?void 0:i.source;zr(n)&&(n=t.defaultDefaultValue,s=void 0),zr(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=s}};function Vu(e,t){var i,n,s,o;return e.trim()?Fu.test(e)?ue(0,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==Wu.getConfigurationProperties()[e]?ue(0,"Cannot register '{0}'. This property is already registered.",e):(null===(i=t.policy)||void 0===i?void 0:i.name)&&void 0!==Wu.getPolicyConfigurations().get(null===(n=t.policy)||void 0===n?void 0:n.name)?ue(0,"Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,null===(s=t.policy)||void 0===s?void 0:s.name,Wu.getPolicyConfigurations().get(null===(o=t.policy)||void 0===o?void 0:o.name)):null:ue(0,"Cannot register an empty property")}Ul.add(ku,Wu);const Hu=new class{constructor(){this._onDidChangeLanguages=new U,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t{const t=new Set;return{info:new qu(this,e,t),closing:t}})),s=new $s((e=>{const t=new Set,i=new Set;return{info:new $u(this,e,t,i),opening:t,openingColorized:i}}));for(const[r,a]of i){const e=n.get(r),t=s.get(a);e.closing.add(t.info),t.opening.add(e.info)}const o=t.colorizedBracketPairs?Ku(t.colorizedBracketPairs):i.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[r,a]of o){const e=n.get(r),t=s.get(a);e.closing.add(t.info),t.openingColorized.add(e.info),t.opening.add(e.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...s.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function Ku(e){return e.filter((([e,t])=>""!==e&&""!==t))}class ju{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class qu extends ju{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class $u extends ju{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var Gu=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Zu=function(e,t){return function(i,n){t(i,n,e)}};class Yu{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const Xu=Pa("languageConfigurationService");let Qu=class extends E{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new ag),this.onDidChangeEmitter=this._register(new U),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(Ju));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new Yu(void 0));else for(const i of n)this.languageService.isRegisteredLanguageId(i)&&(this.configurations.delete(i),this.onDidChangeEmitter.fire(new Yu(i)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new Yu(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let s=t.getLanguageConfiguration(e);if(!s){if(!n.isRegisteredLanguageId(e))return new lg(e,{});s=new lg(e,{})}const o=function(e,t){const i=t.getValue(Ju.brackets,{overrideIdentifier:e}),n=t.getValue(Ju.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:eg(i),colorizedBracketPairs:eg(n)}}(s.languageId,i),r=sg([s.underlyingConfig,o]);return new lg(s.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};Qu=Gu([Zu(0,uu),Zu(1,yc)],Qu);const Ju={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function eg(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function tg(e,t,i){let n=ro(e.getLineContent(t));return n.length>i-1&&(n=n.substring(0,i-1)),n}function ig(e,t,i){e.tokenization.forceTokenization(t);return Rc(e.tokenization.getLineTokens(t),void 0===i?e.getLineMaxColumn(t)-1:i-1)}class ng{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new og(e,t,++this._order);return this._entries.push(i),this._resolved=null,x((()=>{for(let e=0;ee.configuration))))}}function sg(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class og{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class rg{constructor(e){this.languageId=e}}class ag extends E{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._register(this.register(zu,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new ng(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new rg(e)),x((()=>{s.dispose(),this._onDidChange.fire(new rg(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}}class lg{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new cu(this.underlyingConfig):null,this.comments=lg._handleComments(this.underlyingConfig),this.characterPair=new Pc(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||Lc,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new du(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new Uu(e,this.underlyingConfig)}getWordDefinition(){return kc(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new eu(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new lu(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new Mc(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}Cu(Xu,Qu,1);class hg{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}}class dg{constructor(e,t,i,n,s,o){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=s,this.bracketPairNode=o}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class cg extends dg{constructor(e,t,i,n,s,o,r){super(e,t,i,n,s,o),this.minVisibleColumnIndentation=r}}class ug{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}ug.zero=new ug(0,0);function gg(e){return 0===e}const pg=Math.pow(2,26);function mg(e,t){return e*pg+t}function fg(e){const t=e,i=Math.floor(t/pg);return new ug(i,t-i*pg)}function _g(e,t){let i=e+t;return t>=pg&&(i-=e%pg),i}function vg(e,t){return e.reduce(((e,i)=>_g(e,t(i))),0)}function bg(e,t){return e===t}function Cg(e,t){const i=e,n=t;if(n-i<=0)return 0;const s=Math.floor(i/pg),o=Math.floor(n/pg),r=n-o*pg;if(s===o){return mg(0,r-(i-s*pg))}return mg(o-s,r)}function wg(e,t){return e=t}function Lg(e){return mg(e.lineNumber-1,e.column-1)}function kg(e,t){const i=e,n=Math.floor(i/pg),s=i-n*pg,o=t,r=Math.floor(o/pg);return new Mh(n+1,s+1,r+1,o-r*pg+1)}class Dg{static fromModelContentChanges(e){const t=e.map((e=>{const t=Mh.lift(e.range);return new Dg(Lg(t.getStartPosition()),Lg(t.getEndPosition()),function(e){const t=so(e);return mg(t.length-1,t[t.length-1].length)}(e.text))})).reverse();return t}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${fg(this.startOffset)}...${fg(this.endOffset)}) -> ${fg(this.newLength)}`}}class xg{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Ng.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:Cg(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?mg(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):mg(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=fg(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?mg(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):mg(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(0===n){const e=1<e};class Tg{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}class Rg{get length(){return this._length}constructor(e){this._length=e}}class Ag extends Rg{static create(e,t,i){let n=e.length;return t&&(n=_g(n,t.length)),i&&(n=_g(n,i.length)),new Ag(n,e,t,i,t?t.missingOpeningBracketIds:Ig.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,s){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=s}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new Ag(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(_g(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class Og extends Rg{static create23(e,t,i,n=!1){let s=e.length,o=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(s=_g(s,t.length),o=o.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");s=_g(s,i.length),o=o.merge(i.missingOpeningBracketIds)}return n?new Fg(s,e.listHeight+1,e,t,i,o):new Pg(s,e.listHeight+1,e,t,i,o)}static getEmpty(){return new Wg(0,0,[],Ig.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){this.throwIfImmutable();if(0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){const e=t.childrenLength;if(0===e)throw new f;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;1&n&&(s+="font-style: italic;"),2&n&&(s+="font-weight: bold;");let o="";return 4&n&&(o+=" underline"),8&n&&(o+=" line-through"),o&&(s+=`text-decoration:${o};`),s}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}class qg{constructor(e,t,i,n,s){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=s}}class $g{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new Gg(this.textModel,this.bracketTokens),this._offset=0,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return mg(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=_g(this._offset,e);const t=fg(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=_g(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class Gg{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=e.length,e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,s=n.getCount();let o=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(s=e,o=t,r=this.lineIdx,a=this.lineCharOffset,s!==r?mg(r-s,a):mg(0,a-o));var s,o,r,a;return new qg(n,0,-1,Ig.getEmpty(),new zg(n))}}class Zg{constructor(e,t){this.text=e,this._offset=0,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,s=[];let o,r=0,a=0,l=0,h=0;const d=[];for(let g=0;g<60;g++)d.push(new qg(mg(0,g),0,-1,Ig.getEmpty(),new zg(mg(0,g))));const c=[];for(let g=0;g<60;g++)c.push(new qg(mg(1,g),0,-1,Ig.getEmpty(),new zg(mg(1,g))));if(n)for(n.lastIndex=0;null!==(o=n.exec(e));){const e=o.index,i=o[0];if("\n"===i)r++,a=e+1;else{if(l!==e){let t;if(h===r){const i=e-l;if(ifunction(e){let t=Js(e);/^[\w ]+/.test(e)&&(t=`\\b${t}`);/[\w ]+$/.test(e)&&(t=`${t}\\b`);return t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class Xg{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=Yg.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Qg(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const n=i>>1;for(let s=0;s=3?e[2]:null,t)}function Jg(e,t){return Math.abs(e.listHeight-t.listHeight)}function ep(e,t){return e.listHeight===t.listHeight?Og.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const n=[];let s;for(;;){if(t.listHeight===i.listHeight){s=t;break}if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let o=n.length-1;o>=0;o--){const e=n[o];s?e.childrenLength>=3?s=Og.create23(e.unappendChild(),s,null,!1):(e.appendChildOfSameHeight(s),s=void 0):e.handleChildrenChanged()}return s?Og.create23(e,s,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const n=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let s=t;for(let o=n.length-1;o>=0;o--){const e=n[o];s?e.childrenLength>=3?s=Og.create23(s,e.unprependChild(),null,!1):(e.prependChildOfSameHeight(s),s=void 0):e.handleChildrenChanged()}return s?Og.create23(s,e,null,!1):e}(t,e)}class tp{constructor(e){this.lastOffset=0,this.nextNodes=[e],this.offsets=[0],this.idxs=[]}readLongestNodeAt(e,t){if(wg(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=np(this.nextNodes);if(!i)return;const n=np(this.offsets);if(wg(e,n))return;if(wg(n,e))if(_g(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=ip(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=ip(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=np(this.offsets),t=np(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=np(this.nextNodes),n=ip(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push(_g(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function ip(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function np(e){return e.length>0?e[e.length-1]:void 0}function sp(e,t,i,n){return new op(e,t,i,n).parseDocument()}class op{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new tp(i):void 0,this.positionMapper=new xg(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ig.getEmpty(),0);return e||(e=Og.getEmpty()),e}parseList(e,t){const i=[];for(;;){let n=this.tryReadChildFromCache(e);if(!n){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}4===n.kind&&0===n.childrenLength||i.push(n)}const n=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t=2?Qg(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),s=i();if(!s)return n;for(let o=i();o;o=i())Jg(n,s)<=Jg(s,o)?(n=ep(n,s),s=o):s=ep(s,o);return ep(n,s)}(i):Qg(i,this.createImmutableLists);return n}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!gg(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>{if(null!==t&&!wg(i.length,t))return!1;return i.canBeReused(e)}));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new Kg(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new zg(i.length);const n=e.merge(i.bracketIds),s=this.parseList(n,t+1),o=this.tokenizer.peek();return o&&2===o.kind&&(o.bracketId===i.bracketId||o.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),Ag.create(i.astNode,s,o.astNode)):Ag.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}function rp(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=new ec(lp(e)),n=lp(t);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let s=i.dequeue();function o(e){if(void 0===e){const e=i.takeWhile((e=>!0))||[];return s&&e.unshift(s),e}const t=[];for(;s&&!gg(e);){const[n,o]=s.splitAt(e);t.push(n),e=Cg(n.lengthAfter,e),s=null!=o?o:i.dequeue()}return gg(e)||t.push(new ap(!1,e,e)),t}const r=[];function a(e,t,i){if(r.length>0&&bg(r[r.length-1].endOffset,e)){const e=r[r.length-1];r[r.length-1]=new Dg(e.startOffset,t,_g(e.newLength,i))}else r.push({startOffset:e,endOffset:t,newLength:i})}let l=0;for(const h of n){const e=o(h.lengthBefore);if(h.modified){const t=_g(l,vg(e,(e=>e.lengthBefore)));a(l,t,h.lengthAfter),l=t}else for(const t of e){const e=l;l=_g(l,t.lengthBefore),t.modified&&a(e,l,t.lengthAfter)}}return r}class ap{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=Cg(e,this.lengthAfter);return bg(t,0)?[this,void 0]:this.modified?[new ap(this.modified,this.lengthBefore,e),new ap(this.modified,0,t)]:[new ap(this.modified,e,e),new ap(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${fg(this.lengthBefore)} -> ${fg(this.lengthAfter)}`}}function lp(e){const t=[];let i=0;for(const n of e){const e=Cg(i,n.startOffset);gg(e)||t.push(new ap(!1,e,e));const s=Cg(n.startOffset,n.endOffset);t.push(new ap(!0,s,n.newLength)),i=n.endOffset}return t}class hp extends E{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new U,this.denseKeyProvider=new Tg,this.brackets=new Xg(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new Zg(this.textModel.getValue(),e);this.initialAstWithoutTokens=sp(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new Dg(mg(e.fromLineNumber-1,0),mg(e.toLineNumber,0),mg(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Dg.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=rp(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=rp(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t;return sp(new $g(this.textModel,this.brackets),e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=mg(e.startLineNumber-1,e.startColumn-1),n=mg(e.endLineNumber-1,e.endColumn-1);return new tc((e=>{const s=this.initialAstWithoutTokens||this.astWithTokens;up(s,0,s.length,i,n,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=Lg(e.getStartPosition()),n=Lg(e.getEndPosition());return new tc((e=>{const s=this.initialAstWithoutTokens||this.astWithTokens,o=new gp(e,t,this.textModel);pp(s,0,s.length,i,n,o,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return cp(t,0,t.length,Lg(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return dp(t,0,t.length,Lg(e))}}function dp(e,t,i,n){if(4===e.kind||2===e.kind){const s=[];for(const n of e.children)i=_g(t,n.length),s.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=s.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:o}=s[t];if(wg(i,n)){const s=dp(e.children[t],i,o,n);if(s)return s}}return null}if(3===e.kind)return null;if(1===e.kind){const n=kg(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function cp(e,t,i,n){if(4===e.kind||2===e.kind){for(const s of e.children){if(wg(n,i=_g(t,s.length))){const e=cp(s,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=kg(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function up(e,t,i,n,s,o,r,a,l,h,d=!1){if(r>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let d=0;d200)return!0;let h=!0;if(2===e.kind){let d=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),d=t,t++,a.set(e.openingBracket.text,t)}const c=_g(t,e.openingBracket.length);let u=-1;if(o.includeMinIndentation&&(u=e.computeMinIndentation(t,o.textModel)),h=o.push(new cg(kg(t,i),kg(t,c),e.closingBracket?kg(_g(c,(null===(l=e.child)||void 0===l?void 0:l.length)||0),i):void 0,r,d,e,u)),t=c,h&&e.child){const l=e.child;if(i=_g(t,l.length),yg(t,s)&&Sg(i,n)&&(h=pp(l,t,i,n,s,o,r+1,a),!h))return!1}null==a||a.set(e.openingBracket.text,d)}else{let i=t;for(const t of e.children){const e=i;if(i=_g(i,t.length),yg(e,s)&&yg(n,i)&&(h=pp(t,e,i,n,s,o,r,a),!h))return!1}}return h}class mp extends E{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new I),this.onDidChangeEmitter=new U,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId))||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())})))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const i=new N;this.bracketPairsTree.value=(e=i.add(new hp(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||tc.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||tc.empty}getBracketsInRange(e,t=!1){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(i=this.bracketPairsTree.value)||void 0===i?void 0:i.object.getBracketsInRange(e,t))||tc.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(Mh.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),o=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!o)return null;const r=o.textIsBracket[t];return r?vp(this._findMatchingBracketUp(r,n,fp(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(Mh.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy(Yd((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),Mh.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=fp(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),o=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let l=n-1;l>=0;l--){const e=t.getEndOffset(l);if(e<=r)break;if(Oc(t.getStandardTokenType(l))||t.getLanguageId(l)!==o){r=e;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let l=n+1;l=a)break;if(Oc(t.getStandardTokenType(l))||t.getLanguageId(l)!==o){a=e;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),o=n.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(o)).brackets;if(r&&!Oc(n.getStandardTokenType(o))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,o),h=null;for(;;){const n=au.findNextBracketInRange(r.forwardRegex,i,s,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=s.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof _p)return null;h=i}}a=n.endColumn-1}if(h)return h}if(o>0&&n.getStartOffset(o)===e.column-1){const r=o-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!Oc(n.getStandardTokenType(r))){const{searchStartOffset:o,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),h=au.findPrevBracketInRange(a.reversedRegex,i,s,o,l);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const e=s.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),i=this._matchFoundBracket(h,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof _p?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof _p?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,s=e.reversedRegex;let o=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return _p.INSTANCE;const h=au.findPrevBracketInRange(s,t,n,a,l);if(!h)break;const d=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return h;l=h.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const e=this.textModel.tokenization.getLineTokens(l),i=e.getCount(),s=this.textModel.getLineContent(l);let o=i-1,r=s.length,h=s.length;l===t.lineNumber&&(o=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,h=t.column-1);let d=!0;for(;o>=0;o--){const t=e.getLanguageId(o)===n&&!Oc(e.getStandardTokenType(o));if(t)d?r=e.getStartOffset(o):(r=e.getStartOffset(o),h=e.getEndOffset(o));else if(d&&r!==h){const e=a(l,s,r,h);if(e)return e}d=t}if(d&&r!==h){const e=a(l,s,r,h);if(e)return e}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,s=e.forwardRegex;let o=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return _p.INSTANCE;const h=au.findNextBracketInRange(s,t,n,a,l);if(!h)break;const d=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return h;a=h.endColumn-1}return null},l=this.textModel.getLineCount();for(let h=t.lineNumber;h<=l;h++){const e=this.textModel.tokenization.getLineTokens(h),i=e.getCount(),s=this.textModel.getLineContent(h);let o=0,r=0,l=0;h===t.lineNumber&&(o=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,l=t.column-1);let d=!0;for(;o=1;r--){const e=this.textModel.tokenization.getLineTokens(r),t=e.getCount(),a=this.textModel.getLineContent(r);let l=t-1,h=a.length,d=a.length;if(r===i.lineNumber){l=e.findTokenIndexAtOffset(i.column-1),h=i.column-1,d=i.column-1;const t=e.getLanguageId(l);n!==t&&(n=t,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,o=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let c=!0;for(;l>=0;l--){const t=e.getLanguageId(l);if(n!==t){if(s&&o&&c&&h!==d){const e=au.findPrevBracketInRange(s.reversedRegex,r,a,h,d);if(e)return this._toFoundBracket(o,e);c=!1}n=t,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,o=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const i=!!s&&!Oc(e.getStandardTokenType(l));if(i)c?h=e.getStartOffset(l):(h=e.getStartOffset(l),d=e.getEndOffset(l));else if(o&&s&&c&&h!==d){const e=au.findPrevBracketInRange(s.reversedRegex,r,a,h,d);if(e)return this._toFoundBracket(o,e)}c=i}if(o&&s&&c&&h!==d){const e=au.findPrevBracketInRange(s.reversedRegex,r,a,h,d);if(e)return this._toFoundBracket(o,e)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let s=null,o=null,r=null;for(let a=i.lineNumber;a<=n;a++){const e=this.textModel.tokenization.getLineTokens(a),t=e.getCount(),n=this.textModel.getLineContent(a);let l=0,h=0,d=0;if(a===i.lineNumber){l=e.findTokenIndexAtOffset(i.column-1),h=i.column-1,d=i.column-1;const t=e.getLanguageId(l);s!==t&&(s=t,o=this.languageConfigurationService.getLanguageConfiguration(s).brackets,r=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let c=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=fp(t),s=this.textModel.getLineCount(),o=new Map;let r=[];const a=(e,t)=>{if(!o.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(n&&++l%100==0&&!n())return _p.INSTANCE;const a=au.findNextBracketInRange(e.forwardRegex,t,i,s,o);if(!a)break;const h=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[h];if(d&&(d.isOpen(h)?r[d.index]++:d.isClose(h)&&r[d.index]--,-1===r[d.index]))return this._matchFoundBracket(a,d,!1,n);s=a.endColumn-1}return null};let d=null,c=null;for(let u=i.lineNumber;u<=s;u++){const e=this.textModel.tokenization.getLineTokens(u),t=e.getCount(),n=this.textModel.getLineContent(u);let s=0,o=0,r=0;if(u===i.lineNumber){s=e.findTokenIndexAtOffset(i.column-1),o=i.column-1,r=i.column-1;const t=e.getLanguageId(s);d!==t&&(d=t,c=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,c))}let l=!0;for(;s!0;{const t=Date.now();return()=>Date.now()-t<=e}}class _p{constructor(){this._searchCanceledBrand=void 0}}function vp(e){return e instanceof _p?null:e}function bp(e){return`--vscode-${e.replace(/\./g,"-")}`}function Cp(e){return`var(${bp(e)})`}_p.INSTANCE=new _p;const wp="base.contributions.colors";const yp=new class{constructor(){this._onDidChangeSchema=new U,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,s){const o={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:s};this.colorsById[e]=o;const r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(r.deprecationMessage=s),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){return D_(i.defaults[t.type],t)}}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function Sp(e,t,i,n,s){return yp.registerColor(e,t,i,n,s)}Ul.add(wp,yp);const Lp=Sp("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},ue(0,"Overall foreground color. This color is only used if not overridden by a component.")),kp=(Sp("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},ue(0,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),Sp("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},ue(0,"Overall foreground color for error messages. This color is only used if not overridden by a component."))),Dp=(Sp("descriptionForeground",{light:"#717171",dark:S_(Lp,.7),hcDark:S_(Lp,.7),hcLight:S_(Lp,.7)},ue(0,"Foreground color for description text providing additional information, for example for a label.")),Sp("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},ue(0,"The default color for icons in the workbench."))),xp=Sp("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},ue(0,"Overall border color for focused elements. This color is only used if not overridden by a component.")),Np=Sp("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},ue(0,"An extra border around elements to separate them from others for greater contrast.")),Ep=Sp("contrastActiveBorder",{light:null,dark:null,hcDark:xp,hcLight:xp},ue(0,"An extra border around active elements to separate them from others for greater contrast.")),Ip=(Sp("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},ue(0,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),Sp("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:rc.black,hcLight:"#292929"},ue(0,"Color for text separators.")),Sp("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},ue(0,"Foreground color for links in text."))),Mp=(Sp("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},ue(0,"Foreground color for links in text when clicked on and on mouse hover.")),Sp("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},ue(0,"Foreground color for preformatted text segments.")),Sp("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},ue(0,"Background color for block quotes in text.")),Sp("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:rc.white,hcLight:"#292929"},ue(0,"Border color for block quotes in text.")),Sp("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:rc.black,hcLight:"#F2F2F2"},ue(0,"Background color for code blocks in text.")),Sp("widget.shadow",{dark:S_(rc.black,.36),light:S_(rc.black,.16),hcDark:null,hcLight:null},ue(0,"Shadow color of widgets such as find/replace inside the editor."))),Tp=Sp("widget.border",{dark:null,light:null,hcDark:Np,hcLight:Np},ue(0,"Border color of widgets such as find/replace inside the editor.")),Rp=Sp("input.background",{dark:"#3C3C3C",light:rc.white,hcDark:rc.black,hcLight:rc.white},ue(0,"Input box background.")),Ap=Sp("input.foreground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"Input box foreground.")),Op=Sp("input.border",{dark:null,light:null,hcDark:Np,hcLight:Np},ue(0,"Input box border.")),Pp=Sp("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:Np,hcLight:Np},ue(0,"Border color of activated options in input fields.")),Fp=(Sp("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},ue(0,"Background color of activated options in input fields.")),Sp("inputOption.activeBackground",{dark:S_(xp,.4),light:S_(xp,.2),hcDark:rc.transparent,hcLight:rc.transparent},ue(0,"Background hover color of options in input fields."))),Bp=Sp("inputOption.activeForeground",{dark:rc.white,light:rc.black,hcDark:Lp,hcLight:Lp},ue(0,"Foreground color of activated options in input fields.")),Wp=(Sp("input.placeholderForeground",{light:S_(Lp,.5),dark:S_(Lp,.5),hcDark:S_(Lp,.7),hcLight:S_(Lp,.7)},ue(0,"Input box foreground color for placeholder text.")),Sp("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:rc.black,hcLight:rc.white},ue(0,"Input validation background color for information severity."))),Vp=Sp("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:Lp},ue(0,"Input validation foreground color for information severity.")),Hp=Sp("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:Np,hcLight:Np},ue(0,"Input validation border color for information severity.")),zp=Sp("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:rc.black,hcLight:rc.white},ue(0,"Input validation background color for warning severity.")),Up=Sp("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:Lp},ue(0,"Input validation foreground color for warning severity.")),Kp=Sp("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:Np,hcLight:Np},ue(0,"Input validation border color for warning severity.")),jp=Sp("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:rc.black,hcLight:rc.white},ue(0,"Input validation background color for error severity.")),qp=Sp("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:Lp},ue(0,"Input validation foreground color for error severity.")),$p=Sp("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:Np,hcLight:Np},ue(0,"Input validation border color for error severity.")),Gp=Sp("dropdown.background",{dark:"#3C3C3C",light:rc.white,hcDark:rc.black,hcLight:rc.white},ue(0,"Dropdown background.")),Zp=Sp("dropdown.listBackground",{dark:null,light:null,hcDark:rc.black,hcLight:rc.white},ue(0,"Dropdown list background.")),Yp=Sp("dropdown.foreground",{dark:"#F0F0F0",light:Lp,hcDark:rc.white,hcLight:Lp},ue(0,"Dropdown foreground.")),Xp=Sp("dropdown.border",{dark:Gp,light:"#CECECE",hcDark:Np,hcLight:Np},ue(0,"Dropdown border.")),Qp=Sp("button.foreground",{dark:rc.white,light:rc.white,hcDark:rc.white,hcLight:rc.white},ue(0,"Button foreground color.")),Jp=Sp("button.separator",{dark:S_(Qp,.4),light:S_(Qp,.4),hcDark:S_(Qp,.4),hcLight:S_(Qp,.4)},ue(0,"Button separator color.")),em=Sp("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},ue(0,"Button background color.")),tm=Sp("button.hoverBackground",{dark:y_(em,.2),light:w_(em,.2),hcDark:em,hcLight:em},ue(0,"Button background color when hovering.")),im=Sp("button.border",{dark:Np,light:Np,hcDark:Np,hcLight:Np},ue(0,"Button border color.")),nm=Sp("button.secondaryForeground",{dark:rc.white,light:rc.white,hcDark:rc.white,hcLight:Lp},ue(0,"Secondary button foreground color.")),sm=Sp("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:rc.white},ue(0,"Secondary button background color.")),om=Sp("button.secondaryHoverBackground",{dark:y_(sm,.2),light:w_(sm,.2),hcDark:null,hcLight:null},ue(0,"Secondary button background color when hovering.")),rm=Sp("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:rc.black,hcLight:"#0F4A85"},ue(0,"Badge background color. Badges are small information labels, e.g. for search results count.")),am=Sp("badge.foreground",{dark:rc.white,light:"#333",hcDark:rc.white,hcLight:rc.white},ue(0,"Badge foreground color. Badges are small information labels, e.g. for search results count.")),lm=Sp("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},ue(0,"Scrollbar shadow to indicate that the view is scrolled.")),hm=Sp("scrollbarSlider.background",{dark:rc.fromHex("#797979").transparent(.4),light:rc.fromHex("#646464").transparent(.4),hcDark:S_(Np,.6),hcLight:S_(Np,.4)},ue(0,"Scrollbar slider background color.")),dm=Sp("scrollbarSlider.hoverBackground",{dark:rc.fromHex("#646464").transparent(.7),light:rc.fromHex("#646464").transparent(.7),hcDark:S_(Np,.8),hcLight:S_(Np,.8)},ue(0,"Scrollbar slider background color when hovering.")),cm=Sp("scrollbarSlider.activeBackground",{dark:rc.fromHex("#BFBFBF").transparent(.4),light:rc.fromHex("#000000").transparent(.6),hcDark:Np,hcLight:Np},ue(0,"Scrollbar slider background color when clicked on.")),um=Sp("progressBar.background",{dark:rc.fromHex("#0E70C0"),light:rc.fromHex("#0E70C0"),hcDark:Np,hcLight:Np},ue(0,"Background color of the progress bar that can show for long running operations.")),gm=(Sp("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},ue(0,"Foreground color of error squigglies in the editor."))),pm=Sp("editorError.border",{dark:null,light:null,hcDark:rc.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},ue(0,"If set, color of double underlines for errors in the editor.")),mm=(Sp("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},ue(0,"Foreground color of warning squigglies in the editor."))),fm=Sp("editorWarning.border",{dark:null,light:null,hcDark:rc.fromHex("#FFCC00").transparent(.8),hcLight:rc.fromHex("#FFCC00").transparent(.8)},ue(0,"If set, color of double underlines for warnings in the editor.")),_m=(Sp("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},ue(0,"Foreground color of info squigglies in the editor."))),vm=Sp("editorInfo.border",{dark:null,light:null,hcDark:rc.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},ue(0,"If set, color of double underlines for infos in the editor.")),bm=Sp("editorHint.foreground",{dark:rc.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},ue(0,"Foreground color of hint squigglies in the editor.")),Cm=(Sp("editorHint.border",{dark:null,light:null,hcDark:rc.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},ue(0,"If set, color of double underlines for hints in the editor.")),Sp("sash.hoverBorder",{dark:xp,light:xp,hcDark:xp,hcLight:xp},ue(0,"Border color of active sashes.")),Sp("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:rc.black,hcLight:rc.white},ue(0,"Editor background color."))),wm=Sp("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:rc.white,hcLight:Lp},ue(0,"Editor default foreground color.")),ym=(Sp("editorStickyScroll.background",{light:Cm,dark:Cm,hcDark:Cm,hcLight:Cm},ue(0,"Sticky scroll background color for the editor")),Sp("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:rc.fromHex("#0F4A85").transparent(.1)},ue(0,"Sticky scroll on hover background color for the editor")),Sp("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:rc.white},ue(0,"Background color of editor widgets, such as find/replace."))),Sm=Sp("editorWidget.foreground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"Foreground color of editor widgets, such as find/replace.")),Lm=Sp("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:Np,hcLight:Np},ue(0,"Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),km=Sp("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},ue(0,"Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),Dm=Sp("quickInput.background",{dark:ym,light:ym,hcDark:ym,hcLight:ym},ue(0,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),xm=Sp("quickInput.foreground",{dark:Sm,light:Sm,hcDark:Sm,hcLight:Sm},ue(0,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Nm=Sp("quickInputTitle.background",{dark:new rc(new nc(255,255,255,.105)),light:new rc(new nc(0,0,0,.06)),hcDark:"#000000",hcLight:rc.white},ue(0,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),Em=Sp("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:rc.white,hcLight:"#0F4A85"},ue(0,"Quick picker color for grouping labels.")),Im=Sp("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:rc.white,hcLight:"#0F4A85"},ue(0,"Quick picker color for grouping borders.")),Mm=Sp("keybindingLabel.background",{dark:new rc(new nc(128,128,128,.17)),light:new rc(new nc(221,221,221,.4)),hcDark:rc.transparent,hcLight:rc.transparent},ue(0,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Tm=Sp("keybindingLabel.foreground",{dark:rc.fromHex("#CCCCCC"),light:rc.fromHex("#555555"),hcDark:rc.white,hcLight:Lp},ue(0,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Rm=Sp("keybindingLabel.border",{dark:new rc(new nc(51,51,51,.6)),light:new rc(new nc(204,204,204,.4)),hcDark:new rc(new nc(111,195,223)),hcLight:Np},ue(0,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Am=Sp("keybindingLabel.bottomBorder",{dark:new rc(new nc(68,68,68,.6)),light:new rc(new nc(187,187,187,.4)),hcDark:new rc(new nc(111,195,223)),hcLight:Lp},ue(0,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),Om=Sp("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},ue(0,"Color of the editor selection.")),Pm=Sp("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:rc.white},ue(0,"Color of the selected text for high contrast.")),Fm=Sp("editor.inactiveSelectionBackground",{light:S_(Om,.5),dark:S_(Om,.5),hcDark:S_(Om,.7),hcLight:S_(Om,.5)},ue(0,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Bm=Sp("editor.selectionHighlightBackground",{light:k_(Om,Cm,.3,.6),dark:k_(Om,Cm,.3,.6),hcDark:null,hcLight:null},ue(0,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Wm=(Sp("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color for regions with the same content as the selection.")),Sp("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},ue(0,"Color of the current search match."))),Vm=Sp("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},ue(0,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Hm=Sp("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},ue(0,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),zm=Sp("editor.findMatchBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of the current search match.")),Um=Sp("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of the other search matches.")),Km=Sp("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:S_(Ep,.4),hcLight:S_(Ep,.4)},ue(0,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),jm=(Sp("searchEditor.findMatchBackground",{light:S_(Vm,.66),dark:S_(Vm,.66),hcDark:Vm,hcLight:Vm},ue(0,"Color of the Search Editor query matches.")),Sp("searchEditor.findMatchBorder",{light:S_(Um,.66),dark:S_(Um,.66),hcDark:Um,hcLight:Um},ue(0,"Border color of the Search Editor query matches.")),Sp("search.resultsInfoForeground",{light:Lp,dark:S_(Lp,.65),hcDark:Lp,hcLight:Lp},ue(0,"Color of the text in the search viewlet's completion message.")),Sp("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},ue(0,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editorHoverWidget.background",{light:ym,dark:ym,hcDark:ym,hcLight:ym},ue(0,"Background color of the editor hover."))),qm=(Sp("editorHoverWidget.foreground",{light:Sm,dark:Sm,hcDark:Sm,hcLight:Sm},ue(0,"Foreground color of the editor hover.")),Sp("editorHoverWidget.border",{light:Lm,dark:Lm,hcDark:Lm,hcLight:Lm},ue(0,"Border color of the editor hover."))),$m=(Sp("editorHoverWidget.statusBarBackground",{dark:y_(jm,.2),light:w_(jm,.05),hcDark:ym,hcLight:ym},ue(0,"Background color of the editor hover status bar.")),Sp("editorLink.activeForeground",{dark:"#4E94CE",light:rc.blue,hcDark:rc.cyan,hcLight:"#292929"},ue(0,"Color of active links."))),Gm=Sp("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:rc.white,hcLight:rc.black},ue(0,"Foreground color of inline hints")),Zm=Sp("editorInlayHint.background",{dark:S_(rm,.1),light:S_(rm,.1),hcDark:S_(rc.white,.1),hcLight:S_(rm,.1)},ue(0,"Background color of inline hints")),Ym=Sp("editorInlayHint.typeForeground",{dark:Gm,light:Gm,hcDark:Gm,hcLight:Gm},ue(0,"Foreground color of inline hints for types")),Xm=Sp("editorInlayHint.typeBackground",{dark:Zm,light:Zm,hcDark:Zm,hcLight:Zm},ue(0,"Background color of inline hints for types")),Qm=Sp("editorInlayHint.parameterForeground",{dark:Gm,light:Gm,hcDark:Gm,hcLight:Gm},ue(0,"Foreground color of inline hints for parameters")),Jm=Sp("editorInlayHint.parameterBackground",{dark:Zm,light:Zm,hcDark:Zm,hcLight:Zm},ue(0,"Background color of inline hints for parameters")),ef=(Sp("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},ue(0,"The color used for the lightbulb actions icon.")),Sp("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The color used for the lightbulb auto fix actions icon.")),new rc(new nc(155,185,85,.2))),tf=new rc(new nc(255,0,0,.2)),nf=Sp("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},ue(0,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),sf=Sp("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},ue(0,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),of=(Sp("diffEditor.insertedLineBackground",{dark:ef,light:ef,hcDark:null,hcLight:null},ue(0,"Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("diffEditor.removedLineBackground",{dark:tf,light:tf,hcDark:null,hcLight:null},ue(0,"Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color for the margin where lines got inserted.")),Sp("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color for the margin where lines got removed.")),Sp("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Diff overview ruler foreground for inserted content."))),rf=Sp("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Diff overview ruler foreground for removed content.")),af=(Sp("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},ue(0,"Outline color for the text that got inserted.")),Sp("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},ue(0,"Outline color for text that got removed.")),Sp("diffEditor.border",{dark:null,light:null,hcDark:Np,hcLight:Np},ue(0,"Border color between the two text editors.")),Sp("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},ue(0,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Sp("diffEditor.unchangedRegionBackground",{dark:"#3e3e3e",light:"#e4e4e4",hcDark:null,hcLight:null},ue(0,"The background color of unchanged blocks in the diff editor.")),Sp("diffEditor.unchangedRegionForeground",{dark:"#a3a2a2",light:"#4d4c4c",hcDark:null,hcLight:null},ue(0,"The foreground color of unchanged blocks in the diff editor.")),Sp("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},ue(0,"The background color of unchanged code in the diff editor.")),Sp("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),lf=Sp("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),hf=Sp("list.focusOutline",{dark:xp,light:xp,hcDark:Ep,hcLight:Ep},ue(0,"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),df=Sp("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),cf=Sp("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:rc.fromHex("#0F4A85").transparent(.1)},ue(0,"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),uf=Sp("list.activeSelectionForeground",{dark:rc.white,light:rc.white,hcDark:null,hcLight:null},ue(0,"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),gf=Sp("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),pf=Sp("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:rc.fromHex("#0F4A85").transparent(.1)},ue(0,"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),mf=Sp("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ff=Sp("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),_f=Sp("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),vf=Sp("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),bf=Sp("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:rc.white.transparent(.1),hcLight:rc.fromHex("#0F4A85").transparent(.1)},ue(0,"List/Tree background when hovering over items using the mouse.")),Cf=Sp("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree foreground when hovering over items using the mouse.")),wf=Sp("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},ue(0,"List/Tree drag and drop background when moving items around using the mouse.")),yf=Sp("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:xp,hcLight:xp},ue(0,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),Sf=Sp("list.focusHighlightForeground",{dark:yf,light:(Lf=cf,kf=yf,Df="#BBE7FF",{op:6,if:Lf,then:kf,else:Df}),hcDark:yf,hcLight:yf},ue(0,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var Lf,kf,Df;Sp("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},ue(0,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),Sp("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},ue(0,"Foreground color of list items containing errors.")),Sp("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},ue(0,"Foreground color of list items containing warnings."));const xf=Sp("listFilterWidget.background",{light:w_(ym,0),dark:y_(ym,0),hcDark:ym,hcLight:ym},ue(0,"Background color of the type filter widget in lists and trees.")),Nf=Sp("listFilterWidget.outline",{dark:rc.transparent,light:rc.transparent,hcDark:"#f38518",hcLight:"#007ACC"},ue(0,"Outline color of the type filter widget in lists and trees.")),Ef=Sp("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:Np,hcLight:Np},ue(0,"Outline color of the type filter widget in lists and trees, when there are no matches.")),If=Sp("listFilterWidget.shadow",{dark:Mp,light:Mp,hcDark:Mp,hcLight:Mp},ue(0,"Shadow color of the type filter widget in lists and trees.")),Mf=(Sp("list.filterMatchBackground",{dark:Vm,light:Vm,hcDark:null,hcLight:null},ue(0,"Background color of the filtered match.")),Sp("list.filterMatchBorder",{dark:Um,light:Um,hcDark:Np,hcLight:Ep},ue(0,"Border color of the filtered match.")),Sp("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},ue(0,"Tree stroke color for the indentation guides."))),Tf=Sp("tree.inactiveIndentGuidesStroke",{dark:S_(Mf,.4),light:S_(Mf,.4),hcDark:S_(Mf,.4),hcLight:S_(Mf,.4)},ue(0,"Tree stroke color for the indentation guides that are not active.")),Rf=Sp("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},ue(0,"Table border color between columns.")),Af=Sp("tree.tableOddRowsBackground",{dark:S_(Lp,.04),light:S_(Lp,.04),hcDark:null,hcLight:null},ue(0,"Background color for odd table rows.")),Of=(Sp("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},ue(0,"List/Tree foreground color for items that are deemphasized. ")),Sp("checkbox.background",{dark:Gp,light:Gp,hcDark:Gp,hcLight:Gp},ue(0,"Background color of checkbox widget."))),Pf=(Sp("checkbox.selectBackground",{dark:ym,light:ym,hcDark:ym,hcLight:ym},ue(0,"Background color of checkbox widget when the element it's in is selected.")),Sp("checkbox.foreground",{dark:Yp,light:Yp,hcDark:Yp,hcLight:Yp},ue(0,"Foreground color of checkbox widget."))),Ff=Sp("checkbox.border",{dark:Xp,light:Xp,hcDark:Xp,hcLight:Xp},ue(0,"Border color of checkbox widget.")),Bf=(Sp("checkbox.selectBorder",{dark:Dp,light:Dp,hcDark:Dp,hcLight:Dp},ue(0,"Border color of checkbox widget when the element it's in is selected.")),Sp("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,ue(0,"Please use quickInputList.focusBackground instead"))),Wf=Sp("quickInputList.focusForeground",{dark:uf,light:uf,hcDark:uf,hcLight:uf},ue(0,"Quick picker foreground color for the focused item.")),Vf=Sp("quickInputList.focusIconForeground",{dark:gf,light:gf,hcDark:gf,hcLight:gf},ue(0,"Quick picker icon foreground color for the focused item.")),Hf=Sp("quickInputList.focusBackground",{dark:L_(Bf,cf),light:L_(Bf,cf),hcDark:null,hcLight:null},ue(0,"Quick picker background color for the focused item.")),zf=Sp("menu.border",{dark:null,light:null,hcDark:Np,hcLight:Np},ue(0,"Border color of menus.")),Uf=Sp("menu.foreground",{dark:Yp,light:Yp,hcDark:Yp,hcLight:Yp},ue(0,"Foreground color of menu items.")),Kf=Sp("menu.background",{dark:Gp,light:Gp,hcDark:Gp,hcLight:Gp},ue(0,"Background color of menu items.")),jf=Sp("menu.selectionForeground",{dark:uf,light:uf,hcDark:uf,hcLight:uf},ue(0,"Foreground color of the selected menu item in menus.")),qf=Sp("menu.selectionBackground",{dark:cf,light:cf,hcDark:cf,hcLight:cf},ue(0,"Background color of the selected menu item in menus.")),$f=Sp("menu.selectionBorder",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of the selected menu item in menus.")),Gf=Sp("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:Np,hcLight:Np},ue(0,"Color of a separator menu item in menus.")),Zf=Sp("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},ue(0,"Toolbar background when hovering over actions using the mouse")),Yf=(Sp("toolbar.hoverOutline",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Toolbar outline when hovering over actions using the mouse")),Sp("toolbar.activeBackground",{dark:y_(Zf,.1),light:w_(Zf,.1),hcDark:null,hcLight:null},ue(0,"Toolbar background when holding the mouse over actions")),Sp("editor.snippetTabstopHighlightBackground",{dark:new rc(new nc(124,124,124,.3)),light:new rc(new nc(10,50,100,.2)),hcDark:new rc(new nc(124,124,124,.3)),hcLight:new rc(new nc(10,50,100,.2))},ue(0,"Highlight background color of a snippet tabstop.")),Sp("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Highlight border color of a snippet tabstop.")),Sp("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Highlight background color of the final tabstop of a snippet.")),Sp("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new rc(new nc(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},ue(0,"Highlight border color of the final tabstop of a snippet.")),Sp("breadcrumb.foreground",{light:S_(Lp,.8),dark:S_(Lp,.8),hcDark:S_(Lp,.8),hcLight:S_(Lp,.8)},ue(0,"Color of focused breadcrumb items."))),Xf=Sp("breadcrumb.background",{light:Cm,dark:Cm,hcDark:Cm,hcLight:Cm},ue(0,"Background color of breadcrumb items.")),Qf=Sp("breadcrumb.focusForeground",{light:w_(Lp,.2),dark:y_(Lp,.1),hcDark:y_(Lp,.1),hcLight:y_(Lp,.1)},ue(0,"Color of focused breadcrumb items.")),Jf=Sp("breadcrumb.activeSelectionForeground",{light:w_(Lp,.2),dark:y_(Lp,.1),hcDark:y_(Lp,.1),hcLight:y_(Lp,.1)},ue(0,"Color of selected breadcrumb items.")),e_=(Sp("breadcrumbPicker.background",{light:ym,dark:ym,hcDark:ym,hcLight:ym},ue(0,"Background color of breadcrumb item picker.")),rc.fromHex("#40C8AE").transparent(.5)),t_=rc.fromHex("#40A6FF").transparent(.5),i_=rc.fromHex("#606060").transparent(.4),n_=.4,s_=Sp("merge.currentHeaderBackground",{dark:e_,light:e_,hcDark:null,hcLight:null},ue(0,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),o_=(Sp("merge.currentContentBackground",{dark:S_(s_,n_),light:S_(s_,n_),hcDark:S_(s_,n_),hcLight:S_(s_,n_)},ue(0,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("merge.incomingHeaderBackground",{dark:t_,light:t_,hcDark:null,hcLight:null},ue(0,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),r_=(Sp("merge.incomingContentBackground",{dark:S_(o_,n_),light:S_(o_,n_),hcDark:S_(o_,n_),hcLight:S_(o_,n_)},ue(0,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("merge.commonHeaderBackground",{dark:i_,light:i_,hcDark:null,hcLight:null},ue(0,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),a_=(Sp("merge.commonContentBackground",{dark:S_(r_,n_),light:S_(r_,n_),hcDark:S_(r_,n_),hcLight:S_(r_,n_)},ue(0,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},ue(0,"Border color on headers and the splitter in inline merge-conflicts."))),l_=(Sp("editorOverviewRuler.currentContentForeground",{dark:S_(s_,1),light:S_(s_,1),hcDark:a_,hcLight:a_},ue(0,"Current overview ruler foreground for inline merge-conflicts.")),Sp("editorOverviewRuler.incomingContentForeground",{dark:S_(o_,1),light:S_(o_,1),hcDark:a_,hcLight:a_},ue(0,"Incoming overview ruler foreground for inline merge-conflicts.")),Sp("editorOverviewRuler.commonContentForeground",{dark:S_(r_,1),light:S_(r_,1),hcDark:a_,hcLight:a_},ue(0,"Common ancestor overview ruler foreground for inline merge-conflicts.")),Sp("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},ue(0,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),h_=Sp("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},ue(0,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),d_=Sp("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},ue(0,"Minimap marker color for find matches."),!0),c_=Sp("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},ue(0,"Minimap marker color for repeating editor selections."),!0),u_=Sp("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},ue(0,"Minimap marker color for the editor selection."),!0),g_=Sp("minimap.infoHighlight",{dark:_m,light:_m,hcDark:vm,hcLight:vm},ue(0,"Minimap marker color for infos.")),p_=Sp("minimap.warningHighlight",{dark:mm,light:mm,hcDark:fm,hcLight:fm},ue(0,"Minimap marker color for warnings.")),m_=Sp("minimap.errorHighlight",{dark:new rc(new nc(255,18,18,.7)),light:new rc(new nc(255,18,18,.7)),hcDark:new rc(new nc(255,50,50,1)),hcLight:"#B5200D"},ue(0,"Minimap marker color for errors.")),f_=Sp("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Minimap background color.")),__=Sp("minimap.foregroundOpacity",{dark:rc.fromHex("#000f"),light:rc.fromHex("#000f"),hcDark:rc.fromHex("#000f"),hcLight:rc.fromHex("#000f")},ue(0,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),v_=(Sp("minimapSlider.background",{light:S_(hm,.5),dark:S_(hm,.5),hcDark:S_(hm,.5),hcLight:S_(hm,.5)},ue(0,"Minimap slider background color.")),Sp("minimapSlider.hoverBackground",{light:S_(dm,.5),dark:S_(dm,.5),hcDark:S_(dm,.5),hcLight:S_(dm,.5)},ue(0,"Minimap slider background color when hovering.")),Sp("minimapSlider.activeBackground",{light:S_(cm,.5),dark:S_(cm,.5),hcDark:S_(cm,.5),hcLight:S_(cm,.5)},ue(0,"Minimap slider background color when clicked on.")),Sp("problemsErrorIcon.foreground",{dark:gm,light:gm,hcDark:gm,hcLight:gm},ue(0,"The color used for the problems error icon."))),b_=Sp("problemsWarningIcon.foreground",{dark:mm,light:mm,hcDark:mm,hcLight:mm},ue(0,"The color used for the problems warning icon.")),C_=Sp("problemsInfoIcon.foreground",{dark:_m,light:_m,hcDark:_m,hcLight:_m},ue(0,"The color used for the problems info icon."));Sp("charts.foreground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color used in charts.")),Sp("charts.lines",{dark:S_(Lp,.5),light:S_(Lp,.5),hcDark:S_(Lp,.5),hcLight:S_(Lp,.5)},ue(0,"The color used for horizontal lines in charts.")),Sp("charts.red",{dark:gm,light:gm,hcDark:gm,hcLight:gm},ue(0,"The red color used in chart visualizations.")),Sp("charts.blue",{dark:_m,light:_m,hcDark:_m,hcLight:_m},ue(0,"The blue color used in chart visualizations.")),Sp("charts.yellow",{dark:mm,light:mm,hcDark:mm,hcLight:mm},ue(0,"The yellow color used in chart visualizations.")),Sp("charts.orange",{dark:d_,light:d_,hcDark:d_,hcLight:d_},ue(0,"The orange color used in chart visualizations.")),Sp("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},ue(0,"The green color used in chart visualizations.")),Sp("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},ue(0,"The purple color used in chart visualizations."));function w_(e,t){return{op:0,value:e,factor:t}}function y_(e,t){return{op:1,value:e,factor:t}}function S_(e,t){return{op:2,value:e,factor:t}}function L_(...e){return{op:4,values:e}}function k_(e,t,i,n){return{op:5,value:e,background:t,factor:i,transparency:n}}function D_(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?rc.fromHex(e):t.getColor(e):e instanceof rc?e:"object"==typeof e?function(e,t){var i,n,s,o;switch(e.op){case 0:return null===(i=D_(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=D_(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(s=D_(e.value,t))||void 0===s?void 0:s.transparent(e.factor);case 3:{const i=D_(e.background,t);return i?null===(o=D_(e.value,t))||void 0===o?void 0:o.makeOpaque(i):D_(e.value,t)}case 4:for(const i of e.values){const e=D_(i,t);if(e)return e}return;case 6:return D_(t.defines(e.if)?e.then:e.else,t);case 5:{const i=D_(e.value,t);if(!i)return;const n=D_(e.background,t);return n?i.isDarkerThan(n)?rc.getLighterColor(i,n,e.factor).transparent(e.transparency):rc.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw Vl()}}(e,t):void 0}const x_="vscode://schemas/workbench-colors",N_=Ul.as(Su);N_.registerSchema(x_,yp.getColorSchema());const E_=new sd((()=>N_.notifySchemaChanged(x_)),200);var I_;function M_(e){return e===I_.HIGH_CONTRAST_DARK||e===I_.HIGH_CONTRAST_LIGHT}function T_(e){return e===I_.DARK||e===I_.HIGH_CONTRAST_DARK}yp.onDidChangeSchema((()=>{E_.isScheduled()||E_.schedule()})),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST_DARK="hcDark",e.HIGH_CONTRAST_LIGHT="hcLight"}(I_||(I_={}));const R_=Pa("themeService");function A_(e){return{id:e}}function O_(e){switch(e){case I_.DARK:return"vs-dark";case I_.HIGH_CONTRAST_DARK:return"hc-black";case I_.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const P_="base.contributions.theming";const F_=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new U}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),x((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function B_(e){return F_.onColorThemeChange(e)}Ul.add(P_,F_);class W_ extends E{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const V_=Sp("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color for the highlight of line at the cursor position.")),H_=Sp("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:Np},ue(0,"Background color for the border around the line at the cursor position.")),z_=(Sp("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},ue(0,"Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Background color of the border around highlighted ranges."),!0),Sp("editor.symbolHighlightBackground",{dark:Vm,light:Vm,hcDark:null,hcLight:null},ue(0,"Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Background color of the border around highlighted symbols."),!0),Sp("editorCursor.foreground",{dark:"#AEAFAD",light:rc.black,hcDark:rc.white,hcLight:"#0F4A85"},ue(0,"Color of the editor cursor."))),U_=Sp("editorCursor.background",null,ue(0,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),K_=Sp("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},ue(0,"Color of whitespace characters in the editor.")),j_=Sp("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:rc.white,hcLight:"#292929"},ue(0,"Color of editor line numbers.")),q_=Sp("editorIndentGuide.background",{dark:K_,light:K_,hcDark:K_,hcLight:K_},ue(0,"Color of the editor indentation guides."),!1,ue(0,"'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),$_=Sp("editorIndentGuide.activeBackground",{dark:K_,light:K_,hcDark:K_,hcLight:K_},ue(0,"Color of the active editor indentation guides."),!1,ue(0,"'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),G_=Sp("editorIndentGuide.background1",{dark:q_,light:q_,hcDark:q_,hcLight:q_},ue(0,"Color of the editor indentation guides (1).")),Z_=Sp("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (2).")),Y_=Sp("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (3).")),X_=Sp("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (4).")),Q_=Sp("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (5).")),J_=Sp("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (6).")),ev=Sp("editorIndentGuide.activeBackground1",{dark:$_,light:$_,hcDark:$_,hcLight:$_},ue(0,"Color of the active editor indentation guides (1).")),tv=Sp("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (2).")),iv=Sp("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (3).")),nv=Sp("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (4).")),sv=Sp("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (5).")),ov=Sp("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (6).")),rv=Sp("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:Ep,hcLight:Ep},ue(0,"Color of editor active line number"),!1,ue(0,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),av=(Sp("editorLineNumber.activeForeground",{dark:rv,light:rv,hcDark:rv,hcLight:rv},ue(0,"Color of editor active line number")),Sp("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Color of the final editor line when editor.renderFinalNewline is set to dimmed."))),lv=(Sp("editorRuler.foreground",{dark:"#5A5A5A",light:rc.lightgrey,hcDark:rc.white,hcLight:"#292929"},ue(0,"Color of the editor rulers.")),Sp("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},ue(0,"Foreground color of editor CodeLens")),Sp("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},ue(0,"Background color behind matching brackets")),Sp("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:Np,hcLight:Np},ue(0,"Color for matching brackets boxes")),Sp("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},ue(0,"Color of the overview ruler border."))),hv=Sp("editorOverviewRuler.background",null,ue(0,"Background color of the editor overview ruler.")),dv=(Sp("editorGutter.background",{dark:Cm,light:Cm,hcDark:Cm,hcLight:Cm},ue(0,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Sp("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:rc.fromHex("#fff").transparent(.8),hcLight:Np},ue(0,"Border color of unnecessary (unused) source code in the editor.")),Sp("editorUnnecessaryCode.opacity",{dark:rc.fromHex("#000a"),light:rc.fromHex("#0007"),hcDark:null,hcLight:null},ue(0,"Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."))),cv=(Sp("editorGhostText.border",{dark:null,light:null,hcDark:rc.fromHex("#fff").transparent(.8),hcLight:rc.fromHex("#292929").transparent(.8)},ue(0,"Border color of ghost text in the editor.")),Sp("editorGhostText.foreground",{dark:rc.fromHex("#ffffff56"),light:rc.fromHex("#0007"),hcDark:null,hcLight:null},ue(0,"Foreground color of the ghost text in the editor.")),Sp("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color of the ghost text in the editor.")),new rc(new nc(0,122,204,.6))),uv=Sp("editorOverviewRuler.rangeHighlightForeground",{dark:cv,light:cv,hcDark:cv,hcLight:cv},ue(0,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),gv=Sp("editorOverviewRuler.errorForeground",{dark:new rc(new nc(255,18,18,.7)),light:new rc(new nc(255,18,18,.7)),hcDark:new rc(new nc(255,50,50,1)),hcLight:"#B5200D"},ue(0,"Overview ruler marker color for errors.")),pv=Sp("editorOverviewRuler.warningForeground",{dark:mm,light:mm,hcDark:fm,hcLight:fm},ue(0,"Overview ruler marker color for warnings.")),mv=Sp("editorOverviewRuler.infoForeground",{dark:_m,light:_m,hcDark:vm,hcLight:vm},ue(0,"Overview ruler marker color for infos.")),fv=Sp("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},ue(0,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),_v=Sp("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},ue(0,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),vv=Sp("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},ue(0,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),bv=Sp("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),Cv=Sp("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),wv=Sp("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),yv=Sp("editorBracketHighlight.unexpectedBracket.foreground",{dark:new rc(new nc(255,18,18,.8)),light:new rc(new nc(255,18,18,.8)),hcDark:new rc(new nc(255,50,50,1)),hcLight:""},ue(0,"Foreground color of unexpected brackets.")),Sv=Sp("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Lv=Sp("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),kv=Sp("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Dv=Sp("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),xv=Sp("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Nv=Sp("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Ev=Sp("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Iv=Sp("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),Mv=Sp("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),Tv=Sp("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Rv=Sp("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),Av=Sp("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));Sp("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},ue(0,"Border color used to highlight unicode characters.")),Sp("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},ue(0,"Background color used to highlight unicode characters."));B_(((e,t)=>{const i=e.getColor(Cm),n=e.getColor(V_),s=n&&!n.isTransparent()?n:i;s&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${s}; }`)}));class Ov extends E{constructor(e){super(),this.textModel=e,this.colorProvider=new Pv,this.onDidChangeEmitter=new U,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){if(n)return[];if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];return this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray()}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new Mh(1,1,this.textModel.getLineCount(),1),e,t):[]}}class Pv{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}function Fv(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}B_(((e,t)=>{const i=[fv,_v,vv,bv,Cv,wv],n=new Pv;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(yv)}; }`);const s=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let o=0;o<30;o++){const e=s[o%s.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(o)} { color: ${e}; }`)}}));class Bv{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Fv(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Fv(this.oldText)}")`:`(replace@${this.oldPosition} "${Fv(this.oldText)}" with "${Fv(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;qc(e,n,i),i+=4;for(let s=0;s0&&(this.changes=(o=this.changes,r=t,null===o||0===o.length?r:new Wv(o,r).compress())),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(qc(e,t?t.length:0,i),i+=4,t)for(const n of t)qc(e,n.selectionStartLineNumber,i),i+=4,qc(e,n.selectionStartColumn,i),i+=4,qc(e,n.positionLineNumber,i),i+=4,qc(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=jc(e,t);t+=4;for(let s=0;se.toString())).join(", ")}matchesResource(e){return(an.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Hv}append(e,t,i,n,s){this._data instanceof Hv&&this._data.append(e,t,i,n,s)}close(){this._data instanceof Hv&&(this._data=this._data.serialize())}open(){this._data instanceof Hv||(this._data=Hv.deserialize(this._data))}undo(){if(an.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Hv&&(this._data=this._data.serialize());const e=Hv.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(an.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Hv&&(this._data=this._data.serialize());const e=Hv.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Hv&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Uv{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const e=Vv(n.resource);this._editStackElementsMap.set(e,n)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=Vv(e);return this._editStackElementsMap.has(t)}setModel(e){const t=Vv(an.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=Vv(e.uri);if(this._editStackElementsMap.has(t)){return this._editStackElementsMap.get(t).canAppend(e)}return!1}append(e,t,i,n,s){const o=Vv(e.uri);this._editStackElementsMap.get(o).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=Vv(e);if(this._editStackElementsMap.has(t)){return this._editStackElementsMap.get(t).heapSize()}return 0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${ba(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function Kv(e){return"\n"===e.getEOL()?0:1}function jv(e){return!!e&&(e instanceof zv||e instanceof Uv)}class qv{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);jv(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);jv(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(jv(i)&&i.canAppend(this._model))return i;const n=new zv(ue(0,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],Kv(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const s=this._getOrCreateEditStackElement(e,n),o=this._model.applyEdits(t,!0),r=qv._computeCursorState(i,o),a=o.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),s.append(this._model,a.map((e=>e.textChange)),Kv(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(Dre){return r(Dre),null}}}class $v extends E{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function Gv(e,t){let i=0,n=0;const s=e.length;for(;nn)throw new f("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide);let r=-2,a=-1,l=-2,h=-1;const d=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,h=-1;for(let t=e;t=0){l=t,h=e;break}}}};let c=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===c){c=-1,u=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){c=t,u=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}};let _=0,v=!0,b=0,C=!0,w=0,y=0;for(let f=0;v||C;f++){const s=e-f,r=e+f;f>1&&(s<1||s1&&(r>n||r>i)&&(C=!1),f>5e4&&(v=!1,C=!1);let g=-1;if(v&&s>=1){const e=this._computeIndentLevel(s-1);e>=0?(l=s-1,h=e,g=Math.ceil(e/this.textModel.getOptions().indentSize)):(d(s),g=this._getIndentLevelForWhitespaceLine(o,a,h))}let S=-1;if(C&&r<=n){const e=this._computeIndentLevel(r-1);e>=0?(c=r-1,u=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(r),S=this._getIndentLevelForWhitespaceLine(o,u,p))}if(0!==f){if(1===f){if(r<=n&&S>=0&&y+1===S){v=!1,_=r,b=r,w=S;continue}if(s>=1&&g>=0&&g-1===y){C=!1,_=s,b=s,w=g;continue}if(_=e,b=e,w=y,0===w)return{startLineNumber:_,endLineNumber:b,indent:w}}v&&(g>=w?_=s:v=!1),C&&(S>=w?b=r:C=!1)}else y=g}return{startLineNumber:_,endLineNumber:b,indent:w}}getLinesBracketGuides(e,t,i,n){var s;const o=[];for(let c=e;c<=t;c++)o.push([]);const r=!0,a=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new Mh(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let l;if(i&&a.length>0){l=null===(s=uc((e<=i.lineNumber&&i.lineNumber<=t?a:this.textModel.bracketPairs.getBracketPairsInRange(Mh.fromPositions(i)).toArray()).filter((e=>Mh.strictContainsPosition(e.range,i))),(e=>r)))||void 0===s?void 0:s.range}const h=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,d=new Jv;for(const c of a){if(!c.closingBracketRange)continue;const i=l&&c.range.equalsRange(l);if(!i&&!n.includeInactive)continue;const s=d.getInlineClassName(c.nestingLevel,c.nestingLevelOfEqualBracketType,h)+(n.highlightActive&&i?" "+d.activeClassName:""),r=c.openingBracketRange.getStartPosition(),a=c.closingBracketRange.getStartPosition(),u=n.horizontalGuides===Zv.Enabled||n.horizontalGuides===Zv.EnabledForActive&&i;if(c.range.startLineNumber===c.range.endLineNumber){u&&o[c.range.startLineNumber-e].push(new Yv(-1,c.openingBracketRange.getEndPosition().column,s,new Xv(!1,a.column),-1,-1));continue}const g=this.getVisibleColumnFromPosition(a),p=this.getVisibleColumnFromPosition(c.openingBracketRange.getStartPosition()),m=Math.min(p,g,c.minVisibleColumnIndentation+1);let f=!1;oo(this.textModel.getLineContent(c.closingBracketRange.startLineNumber))=e&&p>m&&o[r.lineNumber-e].push(new Yv(m,-1,s,new Xv(!1,r.column),-1,-1)),a.lineNumber<=t&&g>m&&o[a.lineNumber-e].push(new Yv(m,-1,s,new Xv(!f,a.column),-1,-1)))}for(const c of o)c.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return o}getVisibleColumnFromPosition(e){return lc.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide),r=new Array(t-e+1);let a=-2,l=-1,h=-2,d=-1;for(let c=e;c<=t;c++){const t=c-e,s=this._computeIndentLevel(c-1);if(s>=0)a=c-1,l=s,r[t]=Math.ceil(s/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=c-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==h&&(-2===h||h=0){h=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,l,d)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t0&&a>0)return;if(l>0&&h>0)return;const d=Math.abs(a-h),c=Math.abs(r-l);if(0===d)return s.spacesDiff=c,void(c>0&&0<=l-1&&l-10?s++:m>1&&o++,tb(r,a,l,p,d),d.looksLikeAlignment&&(!i||t!==d.spacesDiff))continue;const _=d.spacesDiff;_<=8&&h[_]++,r=l,a=p}let c=i;s!==o&&(c=s{const i=h[t];i>e&&(e=i,u=t)})),4===u&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(u=2)}return{insertSpaces:c,tabSize:u}}function nb(e){return(1&e.metadata)>>>0}function sb(e,t){e.metadata=254&e.metadata|t}function ob(e){return(2&e.metadata)>>>1==1}function rb(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function ab(e){return(4&e.metadata)>>>2==1}function lb(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function hb(e){return(64&e.metadata)>>>6==1}function db(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function cb(e,t){e.metadata=231&e.metadata|t<<3}function ub(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class gb{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,sb(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,lb(this,!1),db(this,!1),cb(this,1),ub(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,rb(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;lb(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),db(this,null!==this.options.glyphMarginClassName),cb(this,this.options.stickiness),ub(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const pb=new gb(null,0,0);pb.parent=pb,pb.left=pb,pb.right=pb,sb(pb,0);class mb{constructor(){this.root=pb,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,o){return this.root===pb?[]:function(e,t,i,n,s,o,r){let a=e.root,l=0,h=0,d=0,c=0;const u=[];let g=0;for(;a!==pb;)if(ob(a))rb(a.left,!1),rb(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!ob(a.left)){if(h=l+a.maxEnd,hi)rb(a,!0);else{if(c=l+a.end,c>=t){a.setCachedOffsets(d,c,o);let e=!0;n&&a.ownerId&&a.ownerId!==n&&(e=!1),s&&ab(a)&&(e=!1),r&&!hb(a)&&(e=!1),e&&(u[g++]=a)}rb(a,!0),a.right===pb||ob(a.right)||(l+=a.delta,a=a.right)}}return rb(e.root,!1),u}(this,e,t,i,n,s,o)}search(e,t,i,n){return this.root===pb?[]:function(e,t,i,n,s){let o=e.root,r=0,a=0,l=0;const h=[];let d=0;for(;o!==pb;){if(ob(o)){rb(o.left,!1),rb(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==pb&&!ob(o.left)){o=o.left;continue}a=r+o.start,l=r+o.end,o.setCachedOffsets(a,l,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&ab(o)&&(e=!1),s&&!hb(o)&&(e=!1),e&&(h[d++]=o),rb(o,!0),o.right===pb||ob(o.right)||(r+=o.delta,o=o.right)}return rb(e.root,!1),h}(this,e,t,i,n)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let s=0;for(;i!==pb;)ob(i)?(rb(i.left,!1),rb(i.right,!1),i=i.parent):i.left===pb||ob(i.left)?(i.ownerId===t&&(n[s++]=i),rb(i,!0),i.right===pb||ob(i.right)||(i=i.right)):i=i.left;return rb(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==pb;)ob(t)?(rb(t.left,!1),rb(t.right,!1),t=t.parent):t.left===pb||ob(t.left)?t.right===pb||ob(t.right)?(i[n++]=t,rb(t,!0)):t=t.right:t=t.left;return rb(e.root,!1),i}(this)}insert(e){vb(this,e),this._normalizeDeltaIfNecessary()}delete(e){bb(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,o=i.end+n;i.setCachedOffsets(s,o,t)}acceptReplace(e,t,i,n){const s=function(e,t,i){let n=e.root,s=0,o=0,r=0,a=0;const l=[];let h=0;for(;n!==pb;)if(ob(n))rb(n.left,!1),rb(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;else{if(!ob(n.left)){if(o=s+n.maxEnd,oi?rb(n,!0):(a=s+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[h++]=n),rb(n,!0),n.right===pb||ob(n.right)||(s+=n.delta,n=n.right))}return rb(e.root,!1),l}(this,e,e+t);for(let o=0,r=s.length;oi?(s.start+=l,s.end+=l,s.delta+=l,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0),rb(s,!0)):(rb(s,!0),s.right===pb||ob(s.right)||(o+=s.delta,s=s.right))}rb(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let o=0,r=s.length;oi)&&(1!==n&&(2===n||t))}function _b(e,t,i,n,s){const o=function(e){return(24&e.metadata)>>>3}(e),r=0===o||2===o,a=1===o||2===o,l=i-t,h=n,d=Math.min(l,h),c=e.start;let u=!1;const g=e.end;let p=!1;t<=c&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=s?1:l>0?2:0;!u&&fb(c,r,t,e)&&(u=!0),!p&&fb(g,a,t,e)&&(p=!0)}if(d>0&&!s){const e=l>h?2:0;!u&&fb(c,r,t+d,e)&&(u=!0),!p&&fb(g,a,t+d,e)&&(p=!0)}{const n=s?1:0;!u&&fb(c,r,i,n)&&(e.start=t+h,u=!0),!p&&fb(g,a,i,n)&&(e.end=t+h,p=!0)}const m=h-l;u||(e.start=Math.max(0,c+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function vb(e,t){if(e.root===pb)return t.parent=pb,t.left=pb,t.right=pb,sb(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const s=t.start,o=t.end;for(;;){if(Db(s,o,n.start+i,n.end+i)<0){if(n.left===pb){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===pb){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}}t.parent=n,t.left=pb,t.right=pb,sb(t,1)}(e,t),kb(t.parent);let i=t;for(;i!==e.root&&1===nb(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===nb(t)?(sb(i.parent,0),sb(t,0),sb(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,wb(e,i)),sb(i.parent,0),sb(i.parent.parent,1),yb(e,i.parent.parent))}else{const t=i.parent.parent.left;1===nb(t)?(sb(i.parent,0),sb(t,0),sb(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,yb(e,i)),sb(i.parent,0),sb(i.parent.parent,1),wb(e,i.parent.parent))}return sb(e.root,0),t}function bb(e,t){let i,n;if(t.left===pb?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===pb?(i=t.left,n=t):(n=function(e){for(;e.left!==pb;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,sb(i,0),t.detach(),Cb(),Lb(i),void(e.root.parent=pb);const s=1===nb(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,sb(n,nb(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==pb&&(n.left.parent=n),n.right!==pb&&(n.right.parent=n)),t.detach(),s)return kb(i.parent),n!==t&&(kb(n),kb(n.parent)),void Cb();let o;for(kb(i),kb(i.parent),n!==t&&(kb(n),kb(n.parent));i!==e.root&&0===nb(i);)i===i.parent.left?(o=i.parent.right,1===nb(o)&&(sb(o,0),sb(i.parent,1),wb(e,i.parent),o=i.parent.right),0===nb(o.left)&&0===nb(o.right)?(sb(o,1),i=i.parent):(0===nb(o.right)&&(sb(o.left,0),sb(o,1),yb(e,o),o=i.parent.right),sb(o,nb(i.parent)),sb(i.parent,0),sb(o.right,0),wb(e,i.parent),i=e.root)):(o=i.parent.left,1===nb(o)&&(sb(o,0),sb(i.parent,1),yb(e,i.parent),o=i.parent.left),0===nb(o.left)&&0===nb(o.right)?(sb(o,1),i=i.parent):(0===nb(o.left)&&(sb(o.right,0),sb(o,1),wb(e,o),o=i.parent.left),sb(o,nb(i.parent)),sb(i.parent,0),sb(o.left,0),yb(e,i.parent),i=e.root));sb(i,0),Cb()}function Cb(){pb.parent=pb,pb.delta=0,pb.start=0,pb.end=0}function wb(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==pb&&(i.left.parent=t),i.parent=t.parent,t.parent===pb?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,Lb(t),Lb(i)}function yb(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==pb&&(i.right.parent=t),i.parent=t.parent,t.parent===pb?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,Lb(t),Lb(i)}function Sb(e){let t=e.end;if(e.left!==pb){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==pb){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function Lb(e){e.maxEnd=Sb(e)}function kb(e){for(;e!==pb;){const t=Sb(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function Db(e,t,i,n){return e===i?t-n:e-i}class xb{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Nb)return Eb(this.right);let e=this;for(;e.parent!==Nb&&e.parent.left!==e;)e=e.parent;return e.parent===Nb?Nb:e.parent}prev(){if(this.left!==Nb)return Ib(this.left);let e=this;for(;e.parent!==Nb&&e.parent.right!==e;)e=e.parent;return e.parent===Nb?Nb:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Nb=new xb(null,0);function Eb(e){for(;e.left!==Nb;)e=e.left;return e}function Ib(e){for(;e.right!==Nb;)e=e.right;return e}function Mb(e){return e===Nb?0:e.size_left+e.piece.length+Mb(e.right)}function Tb(e){return e===Nb?0:e.lf_left+e.piece.lineFeedCnt+Tb(e.right)}function Rb(){Nb.parent=Nb}function Ab(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==Nb&&(i.left.parent=t),i.parent=t.parent,t.parent===Nb?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function Ob(e,t){const i=t.left;t.left=i.right,i.right!==Nb&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===Nb?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Pb(e,t){let i,n;if(t.left===Nb?(n=t,i=n.right):t.right===Nb?(n=t,i=n.left):(n=Eb(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),Rb(),void(e.root.parent=Nb);const s=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Wb(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Wb(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==Nb&&(n.left.parent=n),n.right!==Nb&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Wb(e,n)),t.detach(),i.parent.left===i){const t=Mb(i),n=Tb(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const s=t-i.parent.size_left,o=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,Bb(e,i.parent,s,o)}}if(Wb(e,i.parent),s)return void Rb();let o;for(;i!==e.root&&0===i.color;)i===i.parent.left?(o=i.parent.right,1===o.color&&(o.color=0,i.parent.color=1,Ab(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,Ob(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,Ab(e,i.parent),i=e.root)):(o=i.parent.left,1===o.color&&(o.color=0,i.parent.color=1,Ob(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,Ab(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,Ob(e,i.parent),i=e.root));i.color=0,Rb()}function Fb(e,t){for(Wb(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Ab(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Ob(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&Ob(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Ab(e,t.parent.parent))}e.root.color=0}function Bb(e,t,i,n){for(;t!==e.root&&t!==Nb;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Wb(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=Mb((t=t.parent).left)-t.size_left,n=Tb(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}function Vb(e){return e<0?0:e>255?255:0|e}function Hb(e){return e<0?0:e>4294967295?4294967295:0|e}Nb.parent=Nb,Nb.left=Nb,Nb.right=Nb,Nb.color=0;class zb{constructor(e){const t=Vb(e);this._defaultValue=t,this._asciiMap=zb._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=Vb(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Ub{constructor(){this._actual=new zb(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}class Kb extends zb{constructor(e){super(0);for(let t=0,i=e.length;t(t.hasOwnProperty(i)||(t[i]=e(i)),t[i])}((e=>new Kb(e)));class qb{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=no(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(n){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new Dd(t,this.wordSeparators?jb(this.wordSeparators):null,i?this.searchString:null)}}function $b(e,t,i){if(!i)return new Ld(e,null);const n=[];for(let s=0,o=t.length;s=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class Zb{static findMatches(e,t,i,n,s){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new Xb(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let r,a,l=0;if(n?(l=n.findLineFeedCountBeforeOffset(s),r=t+s+l):r=t+s,n){const e=n.findLineFeedCountBeforeOffset(s+o.length)-l;a=r+o.length+e}else a=r+o.length;const h=e.getPositionAt(r),d=e.getPositionAt(a);return new Mh(h.lineNumber,h.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,i,n,s){const o=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new Gb(r):null,l=[];let h,d=0;for(i.reset(0);h=i.next(r);)if(l[d++]=$b(this._getMultilineMatchRange(e,o,r,a,h.index,h[0]),h,n),d>=s)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,s){const o=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s),o}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s);for(let l=t.startLineNumber+1;l=a))return s;return s}const h=new Xb(e.wordSeparators,e.regex);let d;h.reset(0);do{if(d=h.next(t),d&&(o[s++]=$b(new Mh(i,d.index+1+n,i,d.index+1+d[0].length+n),d,r),s>=a))return s}while(d);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new Xb(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,o,n):this._doFindNextMatchLineByLine(e,i,o,n)}static _doFindNextMatchMultiline(e,t,i,n){const s=new Ba(t.lineNumber,1),o=e.getOffsetAt(s),r=e.getLineCount(),a=e.getValueInRange(new Mh(s.lineNumber,s.column,r,e.getLineMaxColumn(r)),1),l="\r\n"===e.getEOL()?new Gb(a):null;i.reset(t.column-1);const h=i.next(a);return h?$b(this._getMultilineMatchRange(e,o,a,l,h.index,h[0]),h,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new Ba(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o),a=this._findFirstMatchInLine(i,r,o,t.column,n);if(a)return a;for(let l=1;l<=s;l++){const t=(o+l-1)%s,r=e.getLineContent(t+1),a=this._findFirstMatchInLine(i,r,t+1,1,n);if(a)return a}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const o=e.next(t);return o?$b(new Mh(i,o.index+1,i,o.index+1+o[0].length),o,s):null}static findPreviousMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new Xb(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,o,n):this._doFindPreviousMatchLineByLine(e,i,o,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const s=this._doFindMatchesMultiline(e,new Mh(1,1,t.lineNumber,t.column),i,n,9990);if(s.length>0)return s[s.length-1];const o=e.getLineCount();return t.lineNumber!==o||t.column!==e.getLineMaxColumn(o)?this._doFindPreviousMatchMultiline(e,new Ba(o,e.getLineMaxColumn(o)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,o,n);if(a)return a;for(let l=1;l<=s;l++){const t=(s+o-l-1)%s,r=e.getLineContent(t+1),a=this._findLastMatchInLine(i,r,t+1,n);if(a)return a}return null}static _findLastMatchInLine(e,t,i,n){let s,o=null;for(e.reset(0);s=e.next(t);)o=$b(new Mh(i,s.index+1,i,s.index+1+s[0].length),s,n);return o}}function Yb(e,t,i,n,s){return function(e,t,i,n,s){if(0===n)return!0;const o=t.charCodeAt(n-1);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,s)&&function(e,t,i,n,s){if(n+s===i)return!0;const o=t.charCodeAt(n+s);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n+s-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,s)}class Xb{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const n=i.index,s=i[0].length;if(n===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){So(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=s,!this._wordSeparators||Yb(this._wordSeparators,e,t,n,s))return i}while(i);return null}}const Qb=65535;function Jb(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class eC{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function tC(e,t=!0){const i=[0];let n=1;for(let s=0,o=e.length;s(e!==Nb&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class oC{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class rC{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new nC("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Nb,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let s=0,o=e.length;s0){e[s].lineStarts||(e[s].lineStarts=tC(e[s].buffer));const t=new iC(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),n=this.rbInsertRight(n,t)}this._searchCache=new oC(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=Qb,i=t-Math.floor(21845),n=2*i;let s="",o=0;const r=[];if(this.iterate(this.root,(t=>{const a=this.getNodeContent(t),l=a.length;if(o<=i||o+l0){const t=s.replace(/\r\n|\r|\n/g,e);r.push(new nC(t,tC(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new sC(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==Nb;)if(n.left!==Nb&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;return i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1)}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==Nb;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,0===s.index){const e=this.getOffsetAt(i+1,1);return new Ba(i+1,n-e+1)}return new Ba(i+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===Nb){const t=this.getOffsetAt(i+1,1);return new Ba(i+1,n-e-t+1)}t=t.right}return new Ba(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(s+e.remainder,s+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let o=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==Nb;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){o+=e.substring(n,n+t.remainder);break}o+=e.substr(n,i.piece.length),i=i.next()}return o}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(s=>{if(s===Nb)return!0;const o=s.piece;let r=o.length;if(0===r)return!0;const a=this._buffers[o.bufferIndex].buffer,l=this._buffers[o.bufferIndex].lineStarts,h=o.start.line,d=o.end.line;let c=l[h]+o.start.column;if(n&&(10===a.charCodeAt(c)&&(c++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(h===d)return this._EOLNormalized||13!==a.charCodeAt(c+r-1)?i+=a.substr(c,r):(n=!0,i+=a.substr(c,r-1)),!0;i+=this._EOLNormalized?a.substring(c,Math.max(c,l[h+1]-this._EOLLength)):a.substring(c,l[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=h+1;ne+g,t.reset(0)):(_=c.buffer,v=e=>e,t.reset(g));do{if(m=t.next(_),m){if(v(m.index)>=p)return h;this.positionInBuffer(e,v(m.index)-u,f);const t=this.getLineFeedCnt(e.piece.bufferIndex,s,f),o=f.line===s.line?f.column-s.column+n:f.column+1,r=o+m[0].length;if(d[h++]=$b(new Mh(i+t,o,i+t,r),m,a),v(m.index)+m[0].length>=p)return h;if(h>=l)return h}}while(m);return h}findMatchesLineByLine(e,t,i,n){const s=[];let o=0;const r=new Xb(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let h=this.positionInBuffer(a.node,a.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,h,d,t,i,n,o,s),s;let c=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,h,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[h.line+l],p=c===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(u,r,c,p,h,this.positionInBuffer(u,g-d),t,i,n,o,s),o>=n)return s;c+=l}const d=c===e.startLineNumber?e.startColumn-1:0;if(c===e.endLineNumber){const a=this.getLineContent(c).substring(d,e.endColumn-1);return o=this._findMatchesInLine(t,r,a,e.endLineNumber,d,o,s,i,n),s}if(o=this._findMatchesInLine(t,r,this.getLineContent(c).substr(d),c,d,o,s,i,n),o>=n)return s;c++,a=this.nodeAt2(c,1),u=a.node,h=this.positionInBuffer(a.node,a.remainder)}if(c===e.endLineNumber){const a=c===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(c).substring(a,e.endColumn-1);return o=this._findMatchesInLine(t,r,l,e.endLineNumber,a,o,s,i,n),s}const g=c===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(l.node,r,c,g,h,d,t,i,n,o,s),s}_findMatchesInLine(e,t,i,n,s,o,r,a,l){const h=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let c=-a;for(;-1!==(c=i.indexOf(t,c+a));)if((!h||Yb(h,i,d,c,a))&&(r[o++]=new Ld(new Mh(n,c+1+s,n,c+1+a+s),null),o>=l))return o;return o}let d;t.reset(0);do{if(d=t.next(i),d&&(r[o++]=$b(new Mh(n,d.index+1+s,n,d.index+1+d[0].length+s),d,a),o>=l))return o}while(d);return o}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Nb){const{node:i,remainder:n,nodeStartOffset:s}=this.nodeAt(e),o=i.piece,r=o.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&o.end.line===this._lastChangeBufferPos.line&&o.end.column===this._lastChangeBufferPos.column&&s+o.length===e&&t.lengthe){const e=[];let s=new iC(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),this.offsetInBuffer(r,o.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){if(10===this.nodeCharCodeAt(i,n)){const e={line:s.start.line+1,column:0};s=new iC(s.bufferIndex,e,s.end,this.getLineFeedCnt(s.bufferIndex,e,s.end),s.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){if(13===this.nodeCharCodeAt(i,n-1)){const s=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,s),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a)}else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);s.length>0&&this.rbInsertRight(i,s);let h=i;for(let t=0;t=0;o--)s=this.rbInsertLeft(s,n[o]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let o=1;o=d))break;a=h+1}return i?(i.line=h,i.column=r-c,null):{line:h,column:r-c}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],o=n[i.line]+i.column;if(s>o+1)return i.line-t.line;const r=o-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tQb){const t=[];for(;e.length>Qb;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,Qb),e=e.substring(Qb));const s=tC(n);t.push(new iC(this._buffers.length,{line:0,column:0},{line:s.length-1,column:n.length-s[s.length-1]},s.length-1,n.length)),this._buffers.push(new nC(n,s))}const i=tC(e);return t.push(new iC(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new nC(e,i)),t}let t=this._buffers[0].buffer.length;const i=tC(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return s+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:s,nodeStartLineNumber:o-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),s=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=s.substring(o+t,o+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,s+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==Nb;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(o,o+s-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==Nb;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==s)return{index:t,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),o=t,r=this.offsetInBuffer(i.bufferIndex,o),a=this.getLineFeedCnt(i.bufferIndex,i.start,o),l=a-n,h=r-s,d=i.length+h;e.piece=new iC(i.bufferIndex,i.start,o,a,d),Bb(this,e,h,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),o=t,r=this.getLineFeedCnt(i.bufferIndex,o,i.end),a=r-n,l=s-this.offsetInBuffer(i.bufferIndex,o),h=i.length+l;e.piece=new iC(i.bufferIndex,o,i.end,r,h),Bb(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,s=n.start,o=n.end,r=n.length,a=n.lineFeedCnt,l=t,h=this.getLineFeedCnt(n.bufferIndex,n.start,l),d=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new iC(n.bufferIndex,n.start,l,h,d),Bb(this,e,d-r,h-a);const c=new iC(n.bufferIndex,i,o,this.getLineFeedCnt(n.bufferIndex,i,o),this.offsetInBuffer(n.bufferIndex,o)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,c);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=tC(t,!1);for(let c=0;ce)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==Nb;)if(i.left!==Nb&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),o=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,o),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Nb;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===Nb||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;if(n===i.length-1)return!1;return!(i[n+1]>s+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(s)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==Nb&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;s=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new iC(e.piece.bufferIndex,e.piece.start,s,r,o),Bb(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new iC(t.piece.bufferIndex,a,t.piece.end,h,l),Bb(this,t,-1,-1),0===t.piece.length&&i.push(t);const d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let c=0;ce.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=o;const u=this._doApplyEdits(a);let g=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),g=[];for(let e=0,t=d.length;e0&&d[e-1].lineNumber===t)continue;const i=d[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===oo(n)&&g.push(t)}}return this._onDidChangeContent.fire(),new xd(c,u,g)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new Mh(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let o=i.startLineNumber,r=i.startColumn;const a=[];for(let u=0,g=e.length;u0&&a.push(i.text),o=n.endLineNumber,r=n.endColumn}const l=a.join(""),[h,d,c]=ac(l);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:l,eolCount:h,firstLineLength:d,lastLineLength:c,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(aC._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;h=1===e?new Mh(a,l,a,l+r.firstLineLength):new Mh(a,l,a+e-1,r.lastLineLength+1)}else h=new Mh(a,l,a,l);i=h.endLineNumber,n=h.endColumn,t.push(h),s=r}return t}static _sortOpsAscending(e,t){const i=Mh.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=Mh.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class lC{constructor(e,t,i,n,s,o,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=o,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let s=0,o=i.length;s=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,s=0,o=0,r=!0;for(let l=0,h=t.length;l126)&&(r=!1)}const a=new eC(Jb(e),n,s,o,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new nC(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=Eo(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=Ro(e)))}finish(e=!0){return this._finish(),new lC(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=tC(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var dC,cC,uC,gC,pC=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class mC extends E{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return pC(this,void 0,void 0,(function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}))}_create(){return pC(this,void 0,void 0,(function*(){const e=yield this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}))}}class fC{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class _C{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class vC{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}!function(e){const t=new Map;t.set(0,Qr.symbolMethod),t.set(1,Qr.symbolFunction),t.set(2,Qr.symbolConstructor),t.set(3,Qr.symbolField),t.set(4,Qr.symbolVariable),t.set(5,Qr.symbolClass),t.set(6,Qr.symbolStruct),t.set(7,Qr.symbolInterface),t.set(8,Qr.symbolModule),t.set(9,Qr.symbolProperty),t.set(10,Qr.symbolEvent),t.set(11,Qr.symbolOperator),t.set(12,Qr.symbolUnit),t.set(13,Qr.symbolValue),t.set(15,Qr.symbolEnum),t.set(14,Qr.symbolConstant),t.set(15,Qr.symbolEnum),t.set(16,Qr.symbolEnumMember),t.set(17,Qr.symbolKeyword),t.set(27,Qr.symbolSnippet),t.set(18,Qr.symbolText),t.set(19,Qr.symbolColor),t.set(20,Qr.symbolFile),t.set(21,Qr.symbolReference),t.set(22,Qr.symbolCustomColor),t.set(23,Qr.symbolFolder),t.set(24,Qr.symbolTypeParameter),t.set(25,Qr.account),t.set(26,Qr.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=Qr.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(dC||(dC={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(cC||(cC={}));class bC{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return Mh.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}!function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(uC||(uC={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(gC||(gC={}));const CC={17:ue(0,"array"),16:ue(0,"boolean"),4:ue(0,"class"),13:ue(0,"constant"),8:ue(0,"constructor"),9:ue(0,"enumeration"),21:ue(0,"enumeration member"),23:ue(0,"event"),7:ue(0,"field"),0:ue(0,"file"),11:ue(0,"function"),10:ue(0,"interface"),19:ue(0,"key"),5:ue(0,"method"),1:ue(0,"module"),2:ue(0,"namespace"),20:ue(0,"null"),15:ue(0,"number"),18:ue(0,"object"),24:ue(0,"operator"),3:ue(0,"package"),6:ue(0,"property"),14:ue(0,"string"),22:ue(0,"struct"),25:ue(0,"type parameter"),12:ue(0,"variable")};var wC,yC,SC;!function(e){const t=new Map;t.set(0,Qr.symbolFile),t.set(1,Qr.symbolModule),t.set(2,Qr.symbolNamespace),t.set(3,Qr.symbolPackage),t.set(4,Qr.symbolClass),t.set(5,Qr.symbolMethod),t.set(6,Qr.symbolProperty),t.set(7,Qr.symbolField),t.set(8,Qr.symbolConstructor),t.set(9,Qr.symbolEnum),t.set(10,Qr.symbolInterface),t.set(11,Qr.symbolFunction),t.set(12,Qr.symbolVariable),t.set(13,Qr.symbolConstant),t.set(14,Qr.symbolString),t.set(15,Qr.symbolNumber),t.set(16,Qr.symbolBoolean),t.set(17,Qr.symbolArray),t.set(18,Qr.symbolObject),t.set(19,Qr.symbolKey),t.set(20,Qr.symbolNull),t.set(21,Qr.symbolEnumMember),t.set(22,Qr.symbolStruct),t.set(23,Qr.symbolEvent),t.set(24,Qr.symbolOperator),t.set(25,Qr.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=Qr.symbolProperty),i}}(wC||(wC={}));class LC{static fromValue(e){switch(e){case"comment":return LC.Comment;case"imports":return LC.Imports;case"region":return LC.Region}return new LC(e)}constructor(e){this.value=e}}LC.Comment=new LC("comment"),LC.Imports=new LC("imports"),LC.Region=new LC("region"),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&("string"==typeof e.id&&"string"==typeof e.title)}}(yC||(yC={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(SC||(SC={}));class kC{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then((e=>{e&&e.dispose()}))}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const DC=new class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),x((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new mC(this,e,t);return this._factories.set(e,n),x((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}getOrCreate(e){return pC(this,void 0,void 0,(function*(){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))}))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},xC=new class{clone(){return this}equals(e){return this===e}};function NC(e,t){return new _C([new fC(0,"",e)],t)}function EC(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(32768|e|2<<24)>>>0,new vC(i,null===t?xC:t)}class IC{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(0===t)return void this.insert(e,i);if(0===i)return void this.delete(e,t);const n=this._store.slice(0,e),s=this._store.slice(e+t),o=function(e,t){const i=[];for(let n=0;n=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let n=0;n0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new MC(e,[t]))}finalize(){return this._tokens}}class RC{static createEmpty(e,t){const i=RC.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new RC(n,e,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}equals(e){return e instanceof RC&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let o=n;o0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=jg.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return jg.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return jg.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return jg.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return jg.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return jg.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return RC.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new AC(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let n=0;n>>1)-1;for(;it&&(n=s)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const s=new Array;let o=0;for(;;){const r=to){n+=this._text.substring(o,a.offset);const e=this._tokens[1+(t<<1)];s.push(n.length,e),o=a.offset}n+=a.text,s.push(n.length,a.tokenMetadata),i++}}return new RC(new Uint32Array(s),n,this._languageIdCodec)}}RC.defaultTokenMetadata=33587200;class AC{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let s=this._firstTokenIndex,o=e.getCount();s=i)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof AC&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class OC{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new FC(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class PC extends OC{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();for(;;){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const s=this._textModel.getLineContent(n.lineNumber),o=VC(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n.startState);e.add(n.lineNumber,o.tokens),this.store.setEndState(n.lineNumber,o.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),o=s.substring(0,e.column-1)+t+s.substring(e.column-1),r=VC(this._languageIdCodec,n,this.tokenizationSupport,o,!0,i),a=new RC(r.tokens,o,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,s=e.column,o=this.getStartState(n);if(!o)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,s-1)+i+r.substring(s-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),h=VC(this._languageIdCodec,l,this.tokenizationSupport,a,!0,o);return new RC(h.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&r>=1;r--){const e=this._textModel.getLineFirstNonWhitespaceColumn(r);if(0!==e&&(e0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class WC{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new dc(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new dc(i.start,e):this._ranges.splice(t,1,new dc(i.start,e),new dc(e+1,i.endExclusive))}}addRange(e){dc.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function VC(e,t,i,n,s,o){let a=null;if(i)try{a=i.tokenizeEncoded(n,s,o.clone())}catch(Dre){r(Dre)}return a||(a=EC(e.encodeLanguageId(t),o)),RC.convertToEndOffset(a.tokens,n.length),a}class HC{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,od((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){var t;const i=null===(t=this._tokenizerWithStateStore)||void 0===t?void 0:t.getFirstInvalidLine();return i?(this._tokenizerWithStateStore.updateTokensUntilLine(e,i.lineNumber),i.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new bc(e,t))}}const zC=new Uint32Array(0).buffer;class UC{static deleteBeginning(e,t){return null===e||e===zC?e:UC.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===zC)return e;const i=KC(e),n=i[i.length-2];return UC.delete(e,t,n)}static delete(e,t,i){if(null===e||e===zC||t===i)return e;const n=KC(e),s=n.length>>>1;if(0===t&&n[n.length-2]===i)return zC;const o=RC.findIndexInTokensArray(n,t),r=o>0?n[o-1<<1]:0;if(il&&(n[a++]=e,n[a++]=n[1+(c<<1)],l=e)}if(a===n.length)return e;const d=new Uint32Array(a);return d.set(n.subarray(0,a),0),d.buffer}static append(e,t){if(t===zC)return e;if(e===zC)return t;if(null===e)return e;if(null===t)return null;const i=KC(e),n=KC(t),s=n.length>>>1,o=new Uint32Array(i.length+n.length);o.set(i,0);let r=i.length;const a=i[i.length-2];for(let l=0;l>>1;let o=RC.findIndexInTokensArray(n,t);if(o>0){n[o-1<<1]===t&&o--}for(let r=o;r0}getTokens(e,t,i){let n=null;if(t1&&(t=jg.getLanguageId(n[1])!==e),!t)return zC}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=qC(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let n=0;n=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=UC.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=UC.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=UC.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=UC.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=UC.insert(this._lineTokens[n],e.column-1,i))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const i=[];for(let n=0,s=e.length;n>>0}class $C{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),s=t[t.length-1].getRange();if(!n||!s)return e;i=e.plusRange(n).plusRange(s)}let n=null;for(let s=0,o=this._pieces.length;si.endLineNumber){n=n||{index:s};break}if(e.removeTokens(i),e.isEmpty()){this._pieces.splice(s,1),s--,o--;continue}if(e.endLineNumberi.endLineNumber){n=n||{index:s};continue}const[t,r]=e.split(i);t.isEmpty()?n=n||{index:s}:r.isEmpty()||(this._pieces.splice(s,1,t,r),s++,o++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=Ud(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=i[$C._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const s=t.getCount(),o=n.getCount();let r=0;const a=[];let l=0,h=0;const d=(e,t)=>{e!==h&&(h=e,a[l++]=e,a[l++]=t)};for(let c=0;c>>0,l=~a>>>0;for(;rt)){for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}n=s-1}}return i}acceptEdit(e,t,i,n,s){for(const o of this._pieces)o.acceptEdit(e,t,i,n,s)}}class GC extends $v{constructor(e,t,i,n,s,o){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this._bracketPairsTextModelPart=n,this._languageId=s,this._attachedViews=o,this._semanticTokens=new $C(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new U),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new U),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new U),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new ZC(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews)),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(this.grammarTokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,i,n]=ac(t.text);this._semanticTokens.acceptEdit(t.range,e,i,n,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new f("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this.grammarTokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[o,r]=GC._findLanguageBoundaries(n,s),a=xc(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(s>0&&o===t.column-1){const[o,r]=GC._findLanguageBoundaries(n,s-1),a=xc(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let s=e.getLineContent().length;for(let o=t,r=e.getCount();o{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let i=this._attachedViewStates.get(e);i||(i=new YC((()=>this.refreshRanges(i.lineRanges))),this._attachedViewStates.set(e,i)),i.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){var t;this._tokens.flush(),null===(t=this._debugBackgroundTokens)||void 0===t||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new FC(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const[i,n]=(()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=DC.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(Dre){return r(Dre),[null,null]}return[e,t]})();if(this._tokenizer=i&&n?new PC(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{if(2===this._backgroundTokenizationState)return;this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(e,t)=>{var i;if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&(null===(i=this._tokenizer)||void 0===i||i.store.setEndState(e,t))}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new HC(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),(null==i?void 0:i.backgroundTokenizerShouldOnlyVerifyTokens)&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new jC(this._languageIdCodec),this._debugBackgroundStates=new FC(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:e=>{var t;null===(t=this._debugBackgroundTokens)||void 0===t||t.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{var i;null===(i=this._debugBackgroundStates)||void 0===i||i.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;null===(e=this._defaultBackgroundTokenizer)||void 0===e||e.handleChanges()}handleDidChangeContent(e){var t,i,n;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const i of e.changes){const[e,n]=ac(i.text);this._tokens.acceptEdit(i.range,e,n),null===(t=this._debugBackgroundTokens)||void 0===t||t.acceptEdit(i.range,e,n)}null===(i=this._debugBackgroundStates)||void 0===i||i.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=bc.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var i,n;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const s=new TC,{heuristicTokens:o}=this._tokenizer.tokenizeHeuristically(s,e,t),r=this.setTokens(s.finalize());if(o)for(const a of r.changes)null===(i=this._backgroundTokenizer.value)||void 0===i||i.requestTokens(a.fromLineNumber,a.toLineNumber+1);null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.checkFinished()}forceTokenization(e){var t,i;const n=new TC;null===(t=this._tokenizer)||void 0===t||t.updateTokensUntilLine(n,e),this.setTokens(n.finalize()),null===(i=this._defaultBackgroundTokenizer)||void 0===i||i.checkFinished()}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;const i=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,i);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const s=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,i);!n.equals(s)&&(null===(t=this._debugBackgroundTokenizer.value)||void 0===t?void 0:t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new Ba(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}class YC extends E{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new sd((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Id(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class XC{constructor(){this.changeType=1}}class QC{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new QC(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new QC(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}}class JC{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class ew{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class tw{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class iw{constructor(){this.changeType=5}}class nw{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},uw=function(e,t){return function(i,n){t(i,n,e)}};function gw(e,t){let i;var n;return"string"==typeof e?i=function(e){const t=new hC;return t.acceptChunk(e),t.finish()}(e):i=(n=e)&&"function"==typeof n.read?function(e){const t=new hC;let i;for(;"string"==typeof(i=e.read());)t.acceptChunk(i);return t.finish()}(e):e,i.create(t)}let pw=0;class mw{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const fw=()=>{throw new Error("Invalid change accessor")};let _w=dw=class extends E{static resolveOptions(e,t){if(t.detectIndentation){const i=ib(e,t.tabSize,t.insertSpaces);return new Sd({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Sd(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return D(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,s,o,r){super(),this._undoRedoService=s,this._languageService=o,this._languageConfigurationService=r,this._onWillDispose=this._register(new U),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Iw((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new U),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new U),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new U),this._eventEmitter=this._register(new Mw),this._languageSelectionListener=this._register(new I),this._deltaDecorationCallCnt=0,this._attachedViews=new Tw,pw++,this.id="$model"+pw,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource=null==n?an.parse("inmemory://model/"+pw):n,this._attachedEditorCount=0;const{textBuffer:a,disposable:l}=gw(e,i.defaultEOL);this._buffer=a,this._bufferDisposable=l,this._options=dw.resolveOptions(this._buffer,i);const h="string"==typeof t?t:t.languageId;"string"!=typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new mp(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Qv(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Ov(this)),this._tokenizationTextModelPart=new GC(this._languageService,this._languageConfigurationService,this,this._bracketPairs,h,this._attachedViews);const d=this._buffer.getLineCount(),c=this._buffer.getValueLengthInRange(new Mh(1,1,d,this._buffer.getLineLength(d)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=c>dw.LARGE_FILE_SIZE_THRESHOLD||d>dw.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=c>dw.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=c>dw._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=Bo(pw),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Cw,this._commandManager=new qv(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(h)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new aC([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=E.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new ow(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw u();const{textBuffer:t,disposable:i}=gw(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,o,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:s,isRedoing:o,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Cw,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new nw([new XC],this._versionId,!1,!1),this._createContentChanged2(new Mh(1,1,s,o),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new nw([new iw],this._versionId,!1,!1),this._createContentChanged2(new Mh(1,1,s,o),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,s=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new Sd({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:o});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=ib(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),hc(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(To.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new f("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new mw(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new f("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor("number"!=typeof i||isNaN(i)?1:i),o=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(s<1)s=1,o=1;else if(s>t)s=t,o=this.getLineMaxColumn(s);else if(o<=1)o=1;else{const e=this.getLineMaxColumn(s);o>=e&&(o=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),h=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,h=1;else if(l>t)l=t,h=this.getLineMaxColumn(l);else if(h<=1)h=1;else{const e=this.getLineMaxColumn(l);h>=e&&(h=e)}return i===s&&n===o&&r===l&&a===h&&e instanceof Mh&&!(e instanceof Th)?e:new Mh(s,o,l,h)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){if(Co(this._buffer.getLineCharCode(e,t-2)))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),s=Math.floor("number"!=typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(n<1)return new Ba(1,1);if(n>o)return new Ba(o,this.getLineMaxColumn(o));if(s<=1)return new Ba(n,1);const r=this.getLineMaxColumn(n);if(s>=r)return new Ba(n,r);if(1===i){if(Co(this._buffer.getLineCharCode(n,s-2)))return new Ba(n,s-1)}return new Ba(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof Ba&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(s,o,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,r=Co(e),a=Co(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof Mh&&!(e instanceof Th)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,s=t.column,o=i.lineNumber,r=i.column;{const e=s>1?this._buffer.getLineCharCode(n,s-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,i=Co(e),a=Co(t);return i||a?n===o&&s===r?new Mh(n,s-1,o,r-1):i&&a?new Mh(n,s-1,o,r+1):i?new Mh(n,s-1,o,r):new Mh(n,s,o,r+1):new Mh(n,s,o,r)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new Mh(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,o,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>Mh.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let h;if(l.push(a.reduce(((e,t)=>Mh.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new qb(e,i,n,s).parseSearchRequest();if(!t)return[];h=e=>this.findMatchesLineByLine(e,t,o,r)}else h=t=>Zb.findMatches(this,new qb(e,i,n,s),t,o,r);return l.map(h).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new qb(e,i,n,s).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new Mh(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),h=this.findMatchesLineByLine(l,t,o,1);return Zb.findNextMatch(this,new qb(e,i,n,s),r,o),h.length>0?h[0]:(l=new Mh(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),h=this.findMatchesLineByLine(l,t,o,1),h.length>0?h[0]:null)}return Zb.findNextMatch(this,new qb(e,i,n,s),r,o)}findPreviousMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);return Zb.findPreviousMatch(this,new qb(e,i,n,s),r,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof kd?e:new kd(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,s=e.length;ts.endLineNumber,r=s.startLineNumber>t.endLineNumber;if(!n&&!r){o=!0;break}}if(!o){n=!1;break}}if(n)for(let e=0,s=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&!(n===t.startLineNumber&&t.startColumn===s&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){o=!1;break}}if(o){const e=new Mh(n,1,n,s);t.push(new kd(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const s=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new Mh(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new Mh(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),o=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==o.length){for(let i=0,n=o.length;i=0;t--){const i=a+t,n=g+t;v.takeFromEndWhile((e=>e.lineNumber>n));const s=v.takeFromEndWhile((e=>e.lineNumber===n));e.push(new JC(i,this.getLineContent(n),s))}if(ce.lineNumbere.lineNumber===t))}e.push(new tw(n+1,a+d,h,l))}t+=u}this._emitContentChangedEvent(new nw(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:o,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===n.reverseEdits?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map((e=>new JC(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new sw(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Ew(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(Dre){r(Dre)}return i.addDecoration=fw,i.changeDecoration=fw,i.changeDecorationOptions=fw,i.removeDecoration=fw,i.deltaDecorations=fw,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),r(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Nw[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),r=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,r,s),n.setOptions(Nw[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;ithis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1,s=!1){const o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),a=Math.min(o,Math.max(1,t)),l=this.getLineMaxColumn(a),h=new Mh(r,1,a,l),d=this._getDecorationsInRange(h,i,n,s);return qd(d,this._decorationProvider.getDecorationsInRange(h,i,n)),d}getDecorationsInRange(e,t=0,i=!1,n=!1,s=!1){const o=this.validateRange(e),r=this._getDecorationsInRange(o,t,i,s);return qd(r,this._decorationProvider.getDecorationsInRange(o,t,i,n)),r}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return QC.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const s=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,s,o,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),o=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),s=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}n!==s?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const s=this.getVersionId(),o=t.length;let r=0;const a=i.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const h=new Array(a);for(;rthis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};function vw(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function bw(e){return!!e.options.after||!!e.options.before}_w._MODEL_SYNC_LIMIT=52428800,_w.LARGE_FILE_SIZE_THRESHOLD=20971520,_w.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,_w.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456,_w.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:wc.tabSize,indentSize:wc.indentSize,insertSpaces:wc.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:wc.trimAutoWhitespace,largeFileOptimizations:wc.largeFileOptimizations,bracketPairColorizationOptions:wc.bracketPairColorizationOptions},_w=dw=cw([uw(4,rw),uw(5,yc),uw(6,Xu)],_w);class Cw{constructor(){this._decorationsTree0=new mb,this._decorationsTree1=new mb,this._injectedTextDecorationsTree=new mb}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s,o){const r=e.getVersionId(),a=this._intervalSearch(t,i,n,s,r,o);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,s,o){const r=this._decorationsTree0.intervalSearch(e,t,i,n,s,o),a=this._decorationsTree1.intervalSearch(e,t,i,n,s,o),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s,o);return r.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const s=e.getVersionId(),o=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,s,!1);return this._ensureNodesHaveRanges(e,o).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n,s){const o=e.getVersionId(),r=this._search(t,i,n,o,s);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n,s){if(i)return this._decorationsTree1.search(e,t,n,s);{const i=this._decorationsTree0.search(e,t,n,s),o=this._decorationsTree1.search(e,t,n,s),r=this._injectedTextDecorationsTree.search(e,t,n,s);return i.concat(o).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){bw(e)?this._injectedTextDecorationsTree.insert(e):vw(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){bw(e)?this._injectedTextDecorationsTree.delete(e):vw(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){bw(e)?this._injectedTextDecorationsTree.resolveNode(e,t):vw(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function ww(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class yw{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Sw extends yw{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:vd.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class Lw{constructor(e){var t;this.position=null!==(t=null==e?void 0:e.position)&&void 0!==t?t:bd.Left}}class kw extends yw{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?rc.fromHex(e):t.getColor(e.id)}}class Dw{static from(e){return e instanceof Dw?e:new Dw(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class xw{static register(e){return new xw(e)}static createDynamic(e){return new xw(e)}constructor(e){var t,i,n,s,o,r;this.description=e.description,this.blockClassName=e.blockClassName?ww(e.blockClassName):null,this.blockDoesNotCollapse=null!==(t=e.blockDoesNotCollapse)&&void 0!==t?t:null,this.blockIsAfterEnd=null!==(i=e.blockIsAfterEnd)&&void 0!==i?i:null,this.blockPadding=null!==(n=e.blockPadding)&&void 0!==n?n:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?ww(e.className):null,this.shouldFillLineOnLineBreak=null!==(s=e.shouldFillLineOnLineBreak)&&void 0!==s?s:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Sw(e.overviewRuler):null,this.minimap=e.minimap?new kw(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Lw(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?ww(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?ww(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?ww(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?ww(e.marginClassName):null,this.inlineClassName=e.inlineClassName?ww(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?ww(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?ww(e.afterContentClassName):null,this.after=e.after?Dw.from(e.after):null,this.before=e.before?Dw.from(e.before):null,this.hideInCommentTokens=null!==(o=e.hideInCommentTokens)&&void 0!==o&&o,this.hideInStringTokens=null!==(r=e.hideInStringTokens)&&void 0!==r&&r}}xw.EMPTY=xw.register({description:"empty"});const Nw=[xw.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),xw.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),xw.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),xw.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Ew(e){return e instanceof xw?e:xw.createDynamic(e)}class Iw extends E{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new U),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Mw extends E{constructor(){super(),this._fastEmitter=this._register(new U),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new U),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}class Tw{constructor(){this._onDidChangeVisibleRanges=new U,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Rw((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Rw{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map((e=>new bc(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}const Aw=Sp("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},ue(0,"Overview ruler marker color for matching brackets."));class Ow{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Pw extends E{static get(e){return e.getContribution(Pw.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new sd((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let s=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?s=n[1].getStartPosition():n[1].containsPosition(i)&&(s=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)s=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(s=t.range.getStartPosition())}}return s?new Th(s.lineNumber,s.column,s.lineNumber,s.column):new Th(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const s=n.getStartPosition();let o=t.bracketPairs.matchBracket(s);if(!o&&(o=t.bracketPairs.findEnclosingBrackets(s),!o)){const e=t.bracketPairs.findNextBracket(s);e&&e.range&&(o=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,a=null;if(o){o.sort(Mh.compareRangesUsingStarts);const[t,i]=o;if(r=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(s)){const e=r;r=a,a=e}}r&&a&&i.push(new Th(r.lineNumber,r.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach((i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())}))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let o=0;for(let d=0,c=e.length;d1&&s.sort(Ba.compare);const r=[];let a=0,l=0;const h=n.length;for(let d=0,c=s.length;d!0,Bw=()=>!1,Ww=e=>" "===e||"\t"===e;class Vw{static shouldRecreate(e){return e.hasChanged(143)||e.hasChanged(129)||e.hasChanged(37)||e.hasChanged(76)||e.hasChanged(78)||e.hasChanged(79)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(127)||e.hasChanged(50)||e.hasChanged(90)}constructor(e,t,i,n){var s;this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,r=o.get(143),a=o.get(50);this.readOnly=o.get(90),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(115),this.lineHeight=a.lineHeight,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=o.get(127),this.wordSeparators=o.get(129),this.emptySelectionClipboard=o.get(37),this.copyWithSyntaxHighlighting=o.get(25),this.multiCursorMergeOverlapping=o.get(76),this.multiCursorPaste=o.get(78),this.multiCursorLimit=o.get(79),this.autoClosingBrackets=o.get(6),this.autoClosingComments=o.get(7),this.autoClosingQuotes=o.get(11),this.autoClosingDelete=o.get(9),this.autoClosingOvertype=o.get(10),this.autoSurround=o.get(14),this.autoIndent=o.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(const d of l)this.surroundingPairs[d.open]=d.close;const h=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=null!==(s=null==h?void 0:h.blockCommentStartToken)&&void 0!==s?s:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(const e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=Rc(t,i-1),s=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return hc(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return Ww;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return Fw;case"never":return Bw}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return lc.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=lc.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),s=e.getLineMinColumn(t);if(no?o:n}}class Hw{static fromModelState(e){return new zw(e)}static fromViewState(e){return new Uw(e)}static fromModelSelection(e){const t=Th.liftSelection(e),i=new Kw(Mh.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return Hw.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;is,l=n>o,h=no)continue;if(pn)continue;if(g0&&n--,$w.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let a=s;a<=o;a++){const i=t.getLineMaxColumn(a),s=e.visibleColumnFromColumn(t,new Ba(a,i));n=Math.max(n,s)}let r=i.toViewVisualColumn;return re.getLineMinColumn(t.lineNumber))return t.delta(void 0,-xo(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new Ba(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),o=Jw.atomicPosition(s,t.column-1,i,0);if(-1!==o&&o+1>=n)return new Ba(t.lineNumber,o+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?ty.leftPositionAtomicSoftTabs(t,i,e.tabSize):ty.leftPosition(t,i);return new ey(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let o,r;if(i.hasSelection()&&!n)o=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(s-1)),a=t.normalizePosition(ty.clipPositionColumn(n,t),0),l=ty.left(e,t,a);o=l.lineNumber,r=l.column}return i.move(n,o,r,0)}static clipPositionColumn(e,t){return new Ba(e.lineNumber,ty.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return ih?(i=h,n=r?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,l),s=u?0:l-lc.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==a){const e=new Ba(i,n),o=t.normalizePosition(e,a);s+=n-o.column,i=o.lineNumber,n=o.column}return new ey(i,n,s)}static down(e,t,i,n,s,o,r){return this.vertical(e,t,i,n,s,i+o,r,4)}static moveDown(e,t,i,n,s){let o,r;i.hasSelection()&&!n?(o=i.selection.endLineNumber,r=i.selection.endColumn):(o=i.position.lineNumber,r=i.position.column);let a,l=0;do{a=ty.down(e,t,o+l,r,i.leftoverVisibleColumns,s,!0);if(t.normalizePosition(new Ba(a.lineNumber,a.column),2).lineNumber>o)break}while(l++<10&&o+l1&&this._isBlankLine(t,s);)s--;for(;s>1&&!this._isBlankLine(t,s);)s--;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,i,n){const s=t.getLineCount();let o=i.position.lineNumber;for(;o=d.length+1)return!1;const c=d.charAt(h.column-2),u=n.get(c);if(!u)return!1;if(qw(c)){if("never"===i)return!1}else if("never"===t)return!1;const g=d.charAt(h.column-1);let p=!1;for(const e of u)e.open===c&&e.close===g&&(p=!0);if(!p)return!1;if("auto"===e){let e=!1;for(let t=0,i=r.length;t1){const e=t.getLineContent(n.lineNumber),s=oo(e),o=-1===s?e.length+1:s+1;if(n.column<=o){const e=i.visibleColumnFromColumn(t,n),s=lc.prevIndentTabStop(e,i.indentSize),o=i.columnFromVisibleColumn(t,n.lineNumber,s);return new Mh(n.lineNumber,o,n.lineNumber,n.column)}}return Mh.fromPositions(iy.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=Ho(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new Ba(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let s=null;i.sort(((e,t)=>Ba.compare(e.getStartPosition(),t.getEndPosition())));for(let o=0,r=i.length;o1&&(null==s?void 0:s.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,a=t.getLineMaxColumn(e.lineNumber-1),l=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,a=1,l=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber));const d=new Mh(i,a,l,h);s=d,d.isEmpty()?n[o]=null:n[o]=new Gw(d,"")}else n[o]=null;else n[o]=new Gw(r,"")}return new jw(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class ny{static _createWord(e,t,i,n,s){return{start:n,end:s,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let s=i.column-2;s>=0;s--){const i=e.charCodeAt(s),o=t.get(i);if(0===o){if(2===n)return this._createWord(e,n,o,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(2===o){if(1===n)return this._createWord(e,n,o,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(1===o&&0!==n)return this._createWord(e,n,o,s+1,this._findEndOfWord(e,t,n,s+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const s=e.length;for(let o=n;o=0;s--){const n=e.charCodeAt(s),o=t.get(n);if(1===o)return s+1;if(1===i&&2===o)return s+1;if(2===i&&0===o)return s+1}return 0}static moveWordLeft(e,t,i,n){let s=i.lineNumber,o=i.column;1===o&&s>1&&(s-=1,o=t.getLineMaxColumn(s));let r=ny._findPreviousWordOnLine(e,t,new Ba(s,o));if(0===n)return new Ba(s,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=ny._findPreviousWordOnLine(e,t,new Ba(s,r.start+1))),new Ba(s,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=ny._findPreviousWordOnLine(e,t,new Ba(s,r.start+1));return new Ba(s,r?r.start+1:1)}return r&&o<=r.end+1&&(r=ny._findPreviousWordOnLine(e,t,new Ba(s,r.start+1))),new Ba(s,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(1===t.column)return i>1?new Ba(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let o=t.column-1;o>1;o--){const e=s.charCodeAt(o-2),t=s.charCodeAt(o-1);if(95===e&&95!==t)return new Ba(i,o);if(45===e&&45!==t)return new Ba(i,o);if((po(e)||go(e))&&mo(t))return new Ba(i,o);if(mo(e)&&mo(t)&&o+1=a.start+1&&(a=ny._findNextWordOnLine(e,t,new Ba(s,a.end+1))),o=a?a.start+1:t.getLineMaxColumn(s);return new Ba(s,o)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i1?l=1:(a--,l=n.getLineMaxColumn(a)):(h&&l<=h.end+1&&(h=ny._findPreviousWordOnLine(i,n,new Ba(a,h.start+1))),h?l=h.end+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a))),new Mh(a,l,r.lineNumber,r.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new Ba(i.positionLineNumber,i.positionColumn),s=this._deleteInsideWordWhitespace(t,n);return s||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let s=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,s))return null;let o=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,o))return null;for(;s>0&&this._charAtIsWhitespace(i,s-1);)s--;for(;o+11?new Mh(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new Mh(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,o=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},l=ny._findPreviousWordOnLine(e,t,i);if(l&&o(l))return a(l);const h=ny._findNextWordOnLine(e,t,i);return h&&o(h)?a(h):l&&h?r(l.end+1,h.start+1):l?r(l.start+1,l.end+1):h?r(h.start+1,h.end+1):r(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=ny._moveWordPartLeft(e,i);return new Mh(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=c.start+1&&(c=ny._findNextWordOnLine(i,n,new Ba(a,c.end+1))),c?l=c.start+1:lBoolean(e)))}class ry{static addCursorDown(e,t,i){const n=[];let s=0;for(let o=0,r=t.length;ot&&(i=t,n=e.model.getLineMaxColumn(i)),Hw.fromModelState(new Kw(new Mh(o.lineNumber,1,i,n),2,0,new Ba(i,n),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumbera){const i=e.getLineCount();let n=r.lineNumber+1,s=1;return n>i&&(n=i,s=e.getLineMaxColumn(n)),Hw.fromViewState(t.viewState.move(!0,n,s,0))}{const e=t.modelState.selectionStart.getEndPosition();return Hw.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const s=e.model.validatePosition(n);return Hw.fromModelState(ny.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new Hw(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return Hw.fromViewState(new Kw(new Mh(i,n,i,n),0,0,new Ba(i,n),0))}static moveTo(e,t,i,n,s){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,s)}const o=e.model.validatePosition(n),r=s?e.coordinatesConverter.validateViewPosition(new Ba(s.lineNumber,s.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);return Hw.fromViewState(t.viewState.move(i,r.lineNumber,r.column,0))}static simpleMove(e,t,i,n,s,o){switch(i){case 0:return 4===o?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return 4===o?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return 2===o?this._moveUpByViewLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return 2===o?this._moveDownByViewLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return 2===o?t.map((t=>Hw.fromViewState(ty.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>Hw.fromModelState(ty.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===o?t.map((t=>Hw.fromViewState(ty.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>Hw.fromModelState(ty.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,s){const o=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 14:{const i=[];for(let s=0,r=t.length;si.endLineNumber-1?i.endLineNumber-1:sHw.fromViewState(ty.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let s=0,o=t.length;sHw.fromViewState(ty.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let s=0,o=t.length;s1&&0===s.firstCharOffset){const e=ig(t,i.startLineNumber-1);e.languageId===s.languageId&&(h=e.getLineContent())}const d=o.onEnter(e,h,a,l);if(!d)return null;const c=d.indentAction;let u=d.appendText;const g=d.removeText||0;u?c===Ec.Indent&&(u="\t"+u):u=c===Ec.Indent||c===Ec.IndentOutdent?"\t":"";let p=tg(t,i.startLineNumber,i.startColumn);return g&&(p=p.substring(0,p.length-g)),{indentAction:c,appendText:u,removeText:g,indentation:p}}!function(e){e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:function(e){if(!Fr(e))return!1;const t=e;return!!Pr(t.to)&&(!(!zr(t.select)&&!Hr(t.select))&&(!(!zr(t.by)&&!Pr(t.by))&&!(!zr(t.value)&&!Wr(t.value))))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=function(t){if(!t.to)return null;let i;switch(t.to){case e.RawDirection.Left:i=0;break;case e.RawDirection.Right:i=1;break;case e.RawDirection.Up:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.PrevBlankLine:i=4;break;case e.RawDirection.NextBlankLine:i=5;break;case e.RawDirection.WrappedLineStart:i=6;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:i=7;break;case e.RawDirection.WrappedLineColumnCenter:i=8;break;case e.RawDirection.WrappedLineEnd:i=9;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:i=10;break;case e.RawDirection.ViewPortTop:i=11;break;case e.RawDirection.ViewPortBottom:i=13;break;case e.RawDirection.ViewPortCenter:i=12;break;case e.RawDirection.ViewPortIfOutside:i=14;break;default:return null}let n=0;switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Character:n=3;break;case e.RawUnit.HalfLine:n=4}return{direction:i,unit:n,select:!!t.select,value:t.value||1}}}(ay||(ay={}));var hy,dy=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cy=function(e,t){return function(i,n){t(i,n,e)}};const uy=Object.create(null);function gy(e,t){if(t<=0)return"";uy[e]||(uy[e]=["",e]);const i=uy[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let py=hy=class{static unshiftIndent(e,t,i,n,s){const o=lc.visibleColumnFromColumn(e,t,i);if(s){const e=gy(" ",n);return gy(e,lc.prevIndentTabStop(o,n)/n)}return gy("\t",lc.prevRenderTabStop(o,i)/i)}static shiftIndent(e,t,i,n,s){const o=lc.visibleColumnFromColumn(e,t,i);if(s){const e=gy(" ",n);return gy(e,lc.nextIndentTabStop(o,n)/n)}return gy("\t",lc.nextRenderTabStop(o,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;1===this._selection.endColumn&&i!==n&&(n-=1);const{tabSize:s,indentSize:o,insertSpaces:r}=this._opts,a=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,h=0;for(let d=i;d<=n;d++,l=h){h=0;const n=e.getLineContent(d);let c,u=oo(n);if((!this._opts.isUnshift||0!==n.length&&0!==u)&&(a||this._opts.isUnshift||0!==n.length)){if(-1===u&&(u=n.length),d>1){if(lc.visibleColumnFromColumn(n,u+1,s)%o!=0&&e.tokenization.isCheapToTokenize(d-1)){const t=ly(this._opts.autoIndent,e,new Mh(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)),this._languageConfigurationService);if(t){if(h=l,t.appendText)for(let e=0,i=t.appendText.length;e0&&""===t.getLineContent(l);l--)if(1===l)return{indentation:"",action:null};const r=function(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let s,o=-1;for(s=t-1;s>=1;s--){if(e.tokenization.getLanguageIdAtPosition(s,0)!==n)return o;const t=e.getLineContent(s);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return s;o=s}}return-1}(t,i,o);if(r<0)return null;if(r<1)return{indentation:"",action:null};const a=t.getLineContent(r);if(o.shouldIncrease(a)||o.shouldIndentNextLine(a))return{indentation:ro(a),action:Ec.Indent,line:r};if(o.shouldDecrease(a))return{indentation:ro(a),action:null,line:r};{if(1===r)return{indentation:ro(t.getLineContent(r)),action:null,line:r};const e=r-1,i=o.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:ro(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:ro(t.getLineContent(r)),action:null,line:r};for(let n=r;n>0;n--){const e=t.getLineContent(n);if(o.shouldIncrease(e))return{indentation:ro(e),action:Ec.Indent,line:n};if(o.shouldIndentNextLine(e)){let e=0;for(let i=n-1;i>0;i--)if(!o.shouldIndentNextLine(t.getLineContent(n))){e=i;break}return{indentation:ro(t.getLineContent(e+1)),action:null,line:e+1}}if(o.shouldDecrease(e))return{indentation:ro(e),action:null,line:n}}return{indentation:ro(t.getLineContent(1)),action:null,line:1}}}function vy(e,t,i,n,s,o){if(e<4)return null;const r=o.getLanguageConfiguration(i);if(!r)return null;const a=o.getLanguageConfiguration(i).indentRulesSupport;if(!a)return null;const l=_y(e,t,n,void 0,o),h=t.getLineContent(n);if(l){const i=l.line;if(void 0!==i){let o=!0;for(let e=i;ee.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}class Cy{static indent(e,t,i){if(null===t||null===i)return[];const n=[];for(let s=0,o=i.length;s1){let n;for(n=i-1;n>=1;n--){if(ao(t.getLineContent(n))>=0)break}if(n<1)return null;const o=t.getLineMaxColumn(n),r=ly(e.autoIndent,t,new Mh(n,o,n,o),e.languageConfigurationService);r&&(s=r.indentation+r.appendText)}return n&&(n===Ec.Indent&&(s=Cy.shiftIndent(e,s)),n===Ec.Outdent&&(s=Cy.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="";const o=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,o),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,s,o,r,a)));return new jw(4,l,{shouldPushStackElementBefore:Ly(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,o){if(!t.isEmpty())return null;const r=t.getPosition(),a=Math.max(1,r.column-n),l=Math.min(e.getLineMaxColumn(r.lineNumber),r.column+s),h=new Mh(r.lineNumber,a,r.lineNumber,l);return e.getValueInRange(h)===i&&0===o?null:new Xw(h,i,0,o)}static _typeCommand(e,t,i){return i?new Yw(e,t,!0):new Gw(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return Cy._typeCommand(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const s=ro(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);return Cy._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}const s=ly(e.autoIndent,t,n,e.languageConfigurationService);if(s){if(s.indentAction===Ec.None)return Cy._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===Ec.Indent)return Cy._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===Ec.IndentOutdent){const t=e.normalizeIndentation(s.indentation),o=e.normalizeIndentation(s.indentation+s.appendText),r="\n"+o+"\n"+t;return i?new Yw(n,r,!0):new Xw(n,r,-1,o.length-t.length,!0)}if(s.indentAction===Ec.Outdent){const t=Cy.unshiftIndent(e,s.indentation);return Cy._typeCommand(n,"\n"+e.normalizeIndentation(t+s.appendText),i)}}const o=ro(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);if(e.autoIndent>=4){const s=function(e,t,i,n,s){if(e<4)return null;t.tokenization.forceTokenization(i.startLineNumber);const o=t.tokenization.getLineTokens(i.startLineNumber),r=Rc(o,i.startColumn-1),a=r.getLineContent();let l,h,d=!1;r.firstCharOffset>0&&o.getLanguageId(0)!==r.languageId?(d=!0,l=a.substr(0,i.startColumn-1-r.firstCharOffset)):l=o.getLineContent().substring(0,i.startColumn-1),h=i.isEmpty()?a.substr(i.startColumn-1-r.firstCharOffset):ig(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset);const c=s.getLanguageConfiguration(r.languageId).indentRulesSupport;if(!c)return null;const u=l,g=ro(l),p={tokenization:{getLineTokens:e=>t.tokenization.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i)},getLineContent:e=>e===i.startLineNumber?u:t.getLineContent(e)},m=ro(o.getLineContent()),f=_y(e,p,i.startLineNumber+1,void 0,s);if(!f){const e=d?m:g;return{beforeEnter:e,afterEnter:e}}let _=d?m:f.indentation;return f.action===Ec.Indent&&(_=n.shiftIndent(_)),c.shouldDecrease(h)&&(_=n.unshiftIndent(_)),{beforeEnter:d?m:g,afterEnter:_}}(e.autoIndent,t,n,{unshiftIndent:t=>Cy.unshiftIndent(e,t),shiftIndent:t=>Cy.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(s){let o=e.visibleColumnFromColumn(t,n.getEndPosition());const r=n.endColumn,a=oo(t.getLineContent(n.endLineNumber));if(n=a>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,a+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new Yw(n,"\n"+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return r<=a+1&&(e.insertSpaces||(o=Math.ceil(o/e.indentSize)),t=Math.min(o+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new Xw(n,"\n"+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return Cy._typeCommand(n,"\n"+e.normalizeIndentation(o),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;nCy.shiftIndent(e,t),unshiftIndent:t=>Cy.unshiftIndent(e,t)},e.languageConfigurationService);if(null===o)return null;if(o!==e.normalizeIndentation(s)){const s=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===s?Cy._typeCommand(new Mh(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+n,!1):Cy._typeCommand(new Mh(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+t.getLineContent(i.startLineNumber).substring(s-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let o=0,r=i.length;o2?l.charCodeAt(a.column-2):0)&&h)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open))),r=s.some((e=>t.startsWith(e.close)));return!o&&r}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(const r of s)if(null===o||r.open.length>o.open.length){let e=!0;for(const s of i){if(t.getValueInRange(new Mh(s.lineNumber,s.column-r.open.length+1,s.lineNumber,s.column))+n!==r.open){e=!1;break}}e&&(o=r)}return o}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let s=null;for(const o of n)o.open!==t.open&&t.open.includes(o.open)&&t.close.endsWith(o.close)&&(!s||o.open.length>s.open.length)&&(s=o);return s}static _getAutoClosingPairClose(e,t,i,n,s){for(const u of i)if(!u.isEmpty())return null;const o=i.map((e=>{const t=e.getPosition();return s?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),r=this._findAutoClosingPairOpen(e,t,o.map((e=>new Ba(e.lineNumber,e.beforeColumn))),n);if(!r)return null;let a,l;if(qw(n))a=e.autoClosingQuotes,l=e.shouldAutoCloseBefore.quote;else{!!e.blockCommentStartToken&&r.open.includes(e.blockCommentStartToken)?(a=e.autoClosingComments,l=e.shouldAutoCloseBefore.comment):(a=e.autoClosingBrackets,l=e.shouldAutoCloseBefore.bracket)}if("never"===a)return null;const h=this._findContainedAutoClosingPair(e,r),d=h?h.close:"";let c=!0;for(const u of o){const{lineNumber:i,beforeColumn:s,afterColumn:o}=u,h=t.getLineContent(i),g=h.substring(0,s-1),p=h.substring(o-1);if(p.startsWith(d)||(c=!1),p.length>0){const t=p.charAt(0);if(!Cy._isBeforeClosingBrace(e,p)&&!l(t))return null}if(1===r.open.length&&("'"===n||'"'===n)&&"always"!==a){const t=jb(e.wordSeparators);if(g.length>0){const e=g.charCodeAt(g.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(i))return null;t.tokenization.forceTokenization(i);const m=Rc(t.tokenization.getLineTokens(i),s-1);if(!r.shouldAutoClose(m,s-m.firstCharOffset))return null;const f=r.findNeutralCharacter();if(f){const e=t.tokenization.getTokenTypeIfInsertingCharacter(i,s,f);if(!r.isOK(e))return null}}return c?r.close.substring(0,r.close.length-d.length):r.close}static _runAutoClosingOpenCharType(e,t,i,n,s,o,r){const a=[];for(let l=0,h=n.length;lnew Gw(new Mh(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new jw(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const h=this._getAutoClosingPairClose(t,i,s,a,!0);return null!==h?this._runAutoClosingOpenCharType(e,t,i,s,a,!0,h):null}static typeWithInterceptors(e,t,i,n,s,o,r){if(!e&&"\n"===r){const e=[];for(let t=0,o=s.length;t{const i=e.get(Fa).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=Xn();return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(i),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(Fa).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}!function(e){class t extends xy{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){if(!t.position)return;e.model.pushStackElement();e.setCursorStates(t.source,3,[ry.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&2!==t.revealType&&e.revealPrimaryCursor(t.source,!0,!0)}}e.MoveTo=wh(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=wh(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends xy{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>Hw.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=wh(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if(void 0===n.position||void 0===n.viewPosition||void 0===n.mouseColumn)return null;const s=e.model.validatePosition(n.position),o=e.coordinatesConverter.validateViewPosition(new Ba(n.viewPosition.lineNumber,n.viewPosition.column),s),r=n.doColumnSelect?i.fromViewLineNumber:o.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return $w.columnSelect(e.cursorConfig,e,r,a,o.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=wh(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return $w.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=wh(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return $w.columnSelectRight(e.cursorConfig,e,i)}});class n extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return $w.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=wh(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=wh(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3595,linux:{primary:0}}}));class s extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return $w.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=wh(new s({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=wh(new s({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3596,linux:{primary:0}}}));class o extends xy{constructor(){super({id:"cursorMove",precondition:void 0,description:ay.description})}runCoreEditorCommand(e,t){const i=ay.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,o._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,s=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return ry.simpleMove(e,t,i.direction,n,s,i.unit);case 11:case 13:case 12:case 14:return ry.viewportMove(e,t,i.direction,n,s);default:return null}}}e.CursorMoveImpl=o,e.CursorMove=wh(new o);class r extends xy{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,ry.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=wh(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=wh(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1039}})),e.CursorRight=wh(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=wh(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1041}})),e.CursorUp=wh(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=wh(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=wh(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:11}})),e.CursorPageUpSelect=wh(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1035}})),e.CursorDown=wh(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=wh(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=wh(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:12}})),e.CursorPageDownSelect=wh(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1036}})),e.CreateCursor=wh(new class extends xy{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?ry.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):ry.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const s=i.modelState?i.modelState.position:null,o=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;io&&(s=o);const r=new Mh(s,1,s,e.model.getLineMaxColumn(s));let a=0;if(i.at)switch(i.at){case Ey.RawAtArgument.Top:a=3;break;case Ey.RawAtArgument.Center:a=1;break;case Ey.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends My{constructor(){super(Ih)}runDOMCommand(e){ne&&(e.focus(),e.select()),e.ownerDocument.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[ry.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=wh(new class extends xy{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[Hw.fromModelSelection(t.selection)]))}})}(Iy||(Iy={}));const Ty=ul.and(Rh.textInputFocus,Rh.columnSelection);function Ry(e,t){jl.registerKeybindingRule({id:e,primary:t,when:Ty,weight:1})}function Ay(e){return e.register(),e}var Oy,Py;Ry(Iy.CursorColumnSelectLeft.id,1039),Ry(Iy.CursorColumnSelectRight.id,1041),Ry(Iy.CursorColumnSelectUp.id,1040),Ry(Iy.CursorColumnSelectPageUp.id,1035),Ry(Iy.CursorColumnSelectDown.id,1042),Ry(Iy.CursorColumnSelectPageDown.id,1036),function(e){class t extends fh{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=wh(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:Rh.writable,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Cy.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=wh(new class extends t{constructor(){super({id:"outdent",precondition:Rh.writable,kbOpts:{weight:0,kbExpr:ul.and(Rh.editorTextFocus,Rh.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Cy.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=wh(new class extends t{constructor(){super({id:"tab",precondition:Rh.writable,kbOpts:{weight:0,kbExpr:ul.and(Rh.editorTextFocus,Rh.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Cy.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=wh(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,s]=iy.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(2)}}),e.DeleteRight=wh(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,s]=iy.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(3)}}),e.Undo=new class extends My{constructor(){super(Nh)}runDOMCommand(e){e.ownerDocument.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(90))return t.getModel().undo()}},e.Redo=new class extends My{constructor(){super(Eh)}runDOMCommand(e){e.ownerDocument.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(90))return t.getModel().redo()}}}(Oy||(Oy={}));class Fy extends gh{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(Fa).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function By(e,t){Ay(new Fy("default:"+e,e)),Ay(new Fy(e,e,t))}By("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),By("replacePreviousChar"),By("compositionType"),By("compositionStart"),By("compositionEnd"),By("paste"),By("cut");class Wy{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||s!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const o=new Mh(i,n-1,i,n),r=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new Mh(i,s,i,s),r)}else{const o=new Mh(i,s,i,s+1),r=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new Mh(i,n,i,n),r)}}computeCursorState(e,t){return this._isMovingLeft?new Th(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Th(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class Vy extends _h{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new Wy(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}yh(class extends Vy{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:ue(0,"Move Selected Text Left"),alias:"Move Selected Text Left",precondition:Rh.writable})}}),yh(class extends Vy{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:ue(0,"Move Selected Text Right"),alias:"Move Selected Text Right",precondition:Rh.writable})}});yh(class extends _h{constructor(){super({id:"editor.action.transposeLetters",label:ue(0,"Transpose Letters"),alias:"Transpose Letters",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const o of s){if(!o.isEmpty())continue;const e=o.startLineNumber,t=o.startColumn,s=i.getLineMaxColumn(e);if(1===e&&(1===t||2===t&&2===s))continue;const r=t===s?o.getPosition():ty.rightPosition(i,o.getPosition().lineNumber,o.getPosition().column),a=ty.leftPosition(i,r),l=ty.leftPosition(i,a),h=i.getValueInRange(Mh.fromPositions(l,a)),d=i.getValueInRange(Mh.fromPositions(a,r)),c=Mh.fromPositions(l,r);n.push(new Gw(c,d+h))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}});class Hy{get event(){return this.emitter.event}constructor(e,t,i){const n=e=>this.emitter.fire(e);this.emitter=new U({onWillAddFirstListener:()=>e.addEventListener(t,n,i),onDidRemoveLastListener:()=>e.removeEventListener(t,n,i)})}dispose(){this.emitter.dispose()}}!function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i=Object.assign({},t),n=Object.assign({},t),s=Object.assign({},t);let o=0;const r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,c()}function h(){1===r.input&&(performance.mark("input/end"),r.input=2)}function d(){1===r.render&&(performance.mark("render/end"),r.render=2)}function c(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",s),o++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/o,max:e.max,min:e.min}}function m(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(h)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(d),c())},e.getAndClearMeasurements=function(){if(0===o)return;const e={keydown:p(t),input:p(i),render:p(n),total:p(s),sampleCount:o};return m(t),m(i),m(n),m(s),o=0,e}}(Py||(Py={}));class zy{constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),s=e.getSelectionEnd();let o;if(t){i.substring(0,n)===t.value.substring(0,t.selectionStart)&&(o=t.newlineCountBeforeSelection)}return new zy(i,n,s,null,o)}collapseSelection(){return this.selectionStart===this.value.length?this:new zy(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,i,n,s,o,r,a,l;if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(null!==(i=null===(t=this.selection)||void 0===t?void 0:t.getStartPosition())&&void 0!==i?i:null,n,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(null!==(s=null===(n=this.selection)||void 0===n?void 0:n.getEndPosition())&&void 0!==s?s:null,t,1)}const h=this.value.substring(this.selectionStart,e);if(-1===h.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(null!==(r=null===(o=this.selection)||void 0===o?void 0:o.getStartPosition())&&void 0!==r?r:null,h,1);const d=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(null!==(l=null===(a=this.selection)||void 0===a?void 0:a.getEndPosition())&&void 0!==l?l:null,d,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;-1!==(s=t.indexOf("\n",s+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min(vo(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(bo(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),o=(e.value.substring(n,e.value.length-s),t.value.substring(n,t.value.length-s)),r=e.selectionStart-n,a=e.selectionEnd-n,l=t.selectionStart-n,h=t.selectionEnd-n;if(l===h){const t=e.selectionStart-n;return{text:o,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}return{text:o,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(vo(e.value,t.value),e.selectionEnd),n=Math.min(bo(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),o=t.value.substring(i,t.value.length-n),r=(e.selectionStart,e.selectionEnd-i),a=(t.selectionStart,t.selectionEnd-i);return{text:o,replacePrevCharCnt:r,replaceNextCharCnt:s.length-r,positionDelta:a-o.length}}}zy.EMPTY=new zy("",0,0,null,void 0);class Uy{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t;return new Mh(i+1,1,i+t+1,1)}static fromEditorSelection(e,t,i,n){const s=500,o=Uy._getPageOfLine(t.startLineNumber,i),r=Uy._getRangeForPage(o,i),a=Uy._getPageOfLine(t.endLineNumber,i),l=Uy._getRangeForPage(a,i);let h=r.intersectRanges(new Mh(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(h,1)>s){const t=e.modifyPosition(h.getEndPosition(),-500);h=Mh.fromPositions(t,h.getEndPosition())}const d=e.getValueInRange(h,1),c=e.getLineCount(),u=e.getLineMaxColumn(c);let g=l.intersectRanges(new Mh(t.endLineNumber,t.endColumn,c,u));if(n&&e.getValueLengthInRange(g,1)>s){const t=e.modifyPosition(g.getStartPosition(),s);g=Mh.fromPositions(g.getStartPosition(),t)}const p=e.getValueInRange(g,1);let m;if(o===a||o+1===a)m=e.getValueInRange(t,1);else{const i=r.intersectRanges(t),n=l.intersectRanges(t);m=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&m.length>1e3&&(m=m.substring(0,s)+String.fromCharCode(8230)+m.substring(m.length-s,m.length)),new zy(d+m+p,d.length,d.length+m.length,t,h.endLineNumber-h.startLineNumber)}}var Ky;!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(Ky||(Ky={}));const jy={forceCopyWithSyntaxHighlighting:!1};class qy{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}qy.INSTANCE=new qy;class $y{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class Gy extends E{get textAreaState(){return this._textAreaState}constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new U),this.onFocus=this._onFocus.event,this._onBlur=this._register(new U),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new U),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new U),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new U),this.onCut=this._onCut.event,this._onPaste=this._register(new U),this.onPaste=this._onPaste.event,this._onType=this._register(new U),this.onType=this._onType.event,this._onCompositionStart=this._register(new U),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new U),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new U),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new U),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new sd((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new sd((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=zy.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let s=null;this._register(this._textArea.onKeyDown((e=>{const t=new St(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),s=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new St(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{const t=new $y;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&s&&s.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===s.code||"ArrowLeft"===s.code))return t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=zy.readFromTextArea(this._textArea,this._textAreaState),i=zy.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=zy.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=zy.readFromTextArea(this._textArea,this._textAreaState),t=zy.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=zy.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=zy.readFromTextArea(this._textArea,this._textAreaState),i=zy.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!Co(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=Zy.getTextData(e.clipboardData);t&&(i=i||qy.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return En(this._textArea.ownerDocument,"selectionchange",(t=>{if(Py.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100)return;if(!this._textAreaState.selection)return;const o=this._textArea.getValue();if(this._textAreaState.value!==o)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(r),h=this._host.deduceModelPosition(l[0],l[1],l[2]),d=this._textAreaState.deduceEditorPosition(a),c=this._host.deduceModelPosition(d[0],d[1],d[2]),u=new Th(h.lineNumber,h.column,c.lineNumber,c.column);this._onSelectionChangeRequest.fire(u)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};qy.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&Zy.setTextData(e.clipboardData,t.text,t.html,i)}}const Zy={getTextData(e){const t=e.getData(yu.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(s){}if(0===t.length&&null===i&&e.files.length>0){return[Array.prototype.slice.call(e.files,0).map((e=>e.name)).join("\n"),null]}return[t,i]},setTextData(e,t,i,n){e.setData(yu.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}};class Yy extends E{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new Hy(this._actual,"keydown")).event,this.onKeyUp=this._register(new Hy(this._actual,"keyup")).event,this.onCompositionStart=this._register(new Hy(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new Hy(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new Hy(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new Hy(this._actual,"beforeinput")).event,this.onInput=this._register(new Hy(this._actual,"input")).event,this.onCut=this._register(new Hy(this._actual,"cut")).event,this.onCopy=this._register(new Hy(this._actual,"copy")).event,this.onPaste=this._register(new Hy(this._actual,"paste")).event,this.onFocus=this._register(new Hy(this._actual,"focus")).event,this.onBlur=this._register(new Hy(this._actual,"blur")).event,this._onSyntheticTap=this._register(new U),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>Py.onKeyDown()))),this._register(this.onBeforeInput((()=>Py.onBeforeInput()))),this._register(this.onInput((()=>Py.onInput()))),this._register(this.onKeyUp((()=>Py.onKeyUp()))),this._register(En(this._actual,Ky.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=Yn(this._actual);return e?e.activeElement===this._actual:!!xn(this._actual)&&this._actual.ownerDocument.activeElement===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let s=null;const o=Yn(n);s=o?o.activeElement:n.ownerDocument.activeElement;const r=s===n,a=n.selectionStart,l=n.selectionEnd;if(r&&a===t&&l===i)ne&&window.parent!==window&&n.focus();else{if(r)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(ne&&window.parent!==window&&n.focus());try{const e=function(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),function(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}(n,e)}catch(Dre){}}}}const Xy=Pa("clipboardService");var Qy=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Jy="9_cutcopypaste",eS=Be||document.queryCommandSupported("cut"),tS=Be||document.queryCommandSupported("copy"),iS=void 0!==navigator.clipboard&&!ne||document.queryCommandSupported("paste");function nS(e){return e.register(),e}const sS=eS?nS(new ph({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Be?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Ql.MenubarEditMenu,group:"2_ccp",title:ue(0,"Cu&&t"),order:1},{menuId:Ql.EditorContext,group:Jy,title:ue(0,"Cut"),when:Rh.writable,order:1},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Cut"),order:1},{menuId:Ql.SimpleEditorContext,group:Jy,title:ue(0,"Cut"),when:Rh.writable,order:1}]})):void 0,oS=tS?nS(new ph({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Be?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Ql.MenubarEditMenu,group:"2_ccp",title:ue(0,"&&Copy"),order:2},{menuId:Ql.EditorContext,group:Jy,title:ue(0,"Copy"),order:2},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Copy"),order:1},{menuId:Ql.SimpleEditorContext,group:Jy,title:ue(0,"Copy"),order:2}]})):void 0;th.appendMenuItem(Ql.MenubarEditMenu,{submenu:Ql.MenubarCopy,title:{value:ue(0,"Copy As"),original:"Copy As"},group:"2_ccp",order:3}),th.appendMenuItem(Ql.EditorContext,{submenu:Ql.EditorContextCopy,title:{value:ue(0,"Copy As"),original:"Copy As"},group:Jy,order:3}),th.appendMenuItem(Ql.EditorContext,{submenu:Ql.EditorContextShare,title:{value:ue(0,"Share"),original:"Share"},group:"11_share",order:-1,when:ul.and(ul.notEquals("resourceScheme","output"),Rh.editorTextFocus)}),th.appendMenuItem(Ql.EditorTitleContext,{submenu:Ql.EditorTitleContextShare,title:{value:ue(0,"Share"),original:"Share"},group:"11_share",order:-1}),th.appendMenuItem(Ql.ExplorerContext,{submenu:Ql.ExplorerContextShare,title:{value:ue(0,"Share"),original:"Share"},group:"11_share",order:-1});const rS=iS?nS(new ph({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Be?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Ql.MenubarEditMenu,group:"2_ccp",title:ue(0,"&&Paste"),order:4},{menuId:Ql.EditorContext,group:Jy,title:ue(0,"Paste"),when:Rh.writable,order:4},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Paste"),order:1},{menuId:Ql.SimpleEditorContext,group:Jy,title:ue(0,"Paste"),when:Rh.writable,order:4}]})):void 0;class aS extends _h{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:ue(0,"Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;!t.getOption(37)&&t.getSelection().isEmpty()||(jy.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),jy.forceCopyWithSyntaxHighlighting=!1)}}function lS(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(Fa).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(37),i=n.getSelection();return i&&i.isEmpty()&&!e||n.getContainerDomNode().ownerDocument.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(Qn().execCommand(t),!0))))}lS(sS,"cut"),lS(oS,"copy"),rS&&(rS.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(Fa),n=e.get(Xy),s=i.getFocusedCodeEditor();if(s&&s.hasTextFocus()){return!(!s.getContainerDomNode().ownerDocument.execCommand("paste")&&We)||Qy(void 0,void 0,void 0,(function*(){const e=yield n.readText();if(""!==e){const t=qy.INSTANCE.get(e);let i=!1,n=null,o=null;t&&(i=s.getOption(37)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),s.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}}))}return!1})),rS.addImplementation(0,"generic-dom",((e,t)=>(Qn().execCommand("paste"),!0)))),tS&&yh(aS);const hS={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0};class dS{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class cS{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class uS{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return pS(e,t)}compute(e,t,i){return i}}class gS{constructor(e,t){this.newValue=e,this.didChange=t}}function pS(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new gS(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&Id(e,t);return new gS(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const s=pS(e[n],t[n]);s.didChange&&(e[n]=s.newValue,i=!0)}return new gS(e,i)}class mS{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return pS(e,t)}validate(e){return this.defaultValue}}class fS{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return pS(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function _S(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class vS extends fS{constructor(e,t,i,n=void 0){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return _S(e,this.defaultValue)}}function bS(e,t,i,n){if(void 0===e)return t;let s=parseInt(e,10);return isNaN(s)?t:(s=Math.max(i,s),s=Math.min(n,s),0|s)}class CS extends fS{static clampedInt(e,t,i,n){return bS(e,t,i,n)}constructor(e,t,i,n,s,o=void 0){void 0!==o&&(o.type="integer",o.default=i,o.minimum=n,o.maximum=s),super(e,t,i,o),this.minimum=n,this.maximum=s}validate(e){return CS.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function wS(e,t,i,n){if(void 0===e)return t;const s=yS.float(e,t);return yS.clamp(s,i,n)}class yS extends fS{static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){void 0!==s&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(yS.float(e,this.defaultValue))}}class SS extends fS{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n=void 0){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return SS.string(e,this.defaultValue)}}function LS(e,t,i,n){return"string"!=typeof e?t:n&&e in n?n[e]:-1===i.indexOf(e)?t:e}class kS extends fS{constructor(e,t,i,n,s=void 0){void 0!==s&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return LS(e,this.defaultValue,this._allowedValues)}}class DS extends uS{constructor(e,t,i,n,s,o,r=void 0){void 0!==r&&(r.type="string",r.enum=s,r.default=n),super(e,t,i,r),this._allowedValues=s,this._convert=o}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var xS;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(xS||(xS={}));class NS extends uS{constructor(){super(51,"fontLigatures",NS.OFF,{anyOf:[{type:"boolean",description:ue(0,"Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:ue(0,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:ue(0,"Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?NS.OFF:"true"===e?NS.ON:e:Boolean(e)?NS.ON:NS.OFF}}NS.OFF='"liga" off, "calt" off',NS.ON='"liga" on, "calt" on';class ES extends uS{constructor(){super(54,"fontVariations",ES.OFF,{anyOf:[{type:"boolean",description:ue(0,"Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:ue(0,"Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:ue(0,"Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?ES.OFF:"true"===e?ES.TRANSLATE:e:Boolean(e)?ES.TRANSLATE:ES.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}ES.OFF="normal",ES.TRANSLATE="translate";class IS extends uS{constructor(){super(53,"fontWeight",US.fontWeight,{anyOf:[{type:"number",minimum:IS.MINIMUM_VALUE,maximum:IS.MAXIMUM_VALUE,errorMessage:ue(0,'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:IS.SUGGESTION_VALUES}],default:US.fontWeight,description:ue(0,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(CS.clampedInt(e,US.fontWeight,IS.MINIMUM_VALUE,IS.MAXIMUM_VALUE))}}IS.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],IS.MINIMUM_VALUE=1,IS.MAXIMUM_VALUE=1e3;class MS extends mS{constructor(){super(143)}compute(e,t,i){return MS.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:Math.floor(e.viewLineCount/s)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const o=t.stableMinimapLayoutInput,r=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.paddingTop===o.paddingTop&&e.paddingBottom===o.paddingBottom&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let c=s>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const u=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,f=e.viewLineCount,_=e.remainingWidth,v=e.isViewportWrapping,b=d?2:3;let C=Math.floor(s*n);const w=C/s;let y=!1,S=!1,L=b*c,k=c/s,D=1;if("fill"===g||"fit"===g){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:o,extraLinesBeyondLastLine:l,desiredRatio:d,minimapLineCount:u}=MS.computeContainedMinimapLineCount({viewLineCount:f,scrollBeyondLastLine:h,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:s});if(f/u>1)y=!0,S=!0,c=1,L=1,k=c/s;else{let n=!1,h=c+1;if("fit"===g){const e=Math.ceil((o+f+l)*L);v&&r&&_<=t.stableFitRemainingWidth?(n=!0,h=t.stableFitMaxMinimapScale):n=e>C}if("fill"===g||n){y=!0;const n=c;L=Math.min(a*s,Math.max(1,Math.floor(1/d))),v&&r&&_<=t.stableFitRemainingWidth&&(h=t.stableFitMaxMinimapScale),c=Math.min(h,Math.max(1,Math.floor(L/b))),c>n&&(D=Math.min(2,c/n)),k=c/s/D,C=Math.ceil(Math.max(i,o+f+l)*L),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=c):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const x=Math.floor(u*k),N=Math.min(x,Math.max(0,Math.floor((_-m-2)*k/(l+k)))+8);let E=Math.floor(s*N);const I=E/s;E=Math.floor(E*D);return{renderMinimap:d?1:2,minimapLeft:"left"===p?0:i-N-m,minimapWidth:N,minimapHeightIsEditorHeight:y,minimapIsSampling:S,minimapScale:c,minimapLineHeight:L,minimapCanvasInnerWidth:E,minimapCanvasInnerHeight:C,minimapCanvasOuterWidth:I,minimapCanvasOuterHeight:w}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,s=0|t.lineHeight,o=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,h=t.viewLineCount,d=e.get(135),c="inherit"===d?e.get(134):d,u="inherit"===c?e.get(130):c,g=e.get(133),p=t.isDominatedByLongLines,m=e.get(57),f=0!==e.get(67).renderType,_=e.get(68),v=e.get(104),b=e.get(83),C=e.get(72),w=e.get(102),y=w.verticalScrollbarSize,S=w.verticalHasArrows,L=w.arrowSize,k=w.horizontalScrollbarSize,D=e.get(43),x="never"!==e.get(109);let N=e.get(65);D&&x&&(N+=16);let E=0;if(f){const e=Math.max(o,_);E=Math.round(e*a)}let I=0;m&&(I=s*t.glyphMarginDecorationLaneCount);let M=0,T=M+I,R=T+E,A=R+N;const O=i-I-E-N;let P=!1,F=!1,B=-1;"inherit"===c&&p?(P=!0,F=!0):"on"===u||"bounded"===u?F=!0:"wordWrapColumn"===u&&(B=g);const W=MS._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:v,paddingTop:b.top,paddingBottom:b.bottom,minimap:C,verticalScrollbarWidth:y,viewLineCount:h,remainingWidth:O,isViewportWrapping:F},t.memory||new cS);0!==W.renderMinimap&&0===W.minimapLeft&&(M+=W.minimapWidth,T+=W.minimapWidth,R+=W.minimapWidth,A+=W.minimapWidth);const V=O-W.minimapWidth,H=Math.max(1,Math.floor((V-y-2)/r)),z=S?L:0;return F&&(B=Math.max(1,H),"bounded"===u&&(B=Math.min(B,g))),{width:i,height:n,glyphMarginLeft:M,glyphMarginWidth:I,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:T,lineNumbersWidth:E,decorationsLeft:R,decorationsWidth:N,contentLeft:A,contentWidth:V,minimap:W,viewportColumn:H,isWordWrapMinified:P,isViewportWrapping:F,wrappingColumn:B,verticalScrollbarWidth:y,horizontalScrollbarHeight:k,overviewRuler:{top:z,width:y,height:n-2*z,right:0}}}}function TS(e){const t=e.get(97);return"editable"===t?e.get(90):"on"!==t}function RS(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const AS="inUntrustedWorkspace",OS="editor.unicodeHighlight.allowedCharacters",PS="editor.unicodeHighlight.invisibleCharacters",FS="editor.unicodeHighlight.nonBasicASCII",BS="editor.unicodeHighlight.ambiguousCharacters",WS="editor.unicodeHighlight.includeComments",VS="editor.unicodeHighlight.includeStrings",HS="editor.unicodeHighlight.allowedLocales";function zS(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const US={fontFamily:Pe?"Menlo, Monaco, 'Courier New', monospace":Fe?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:Pe?12:14,lineHeight:0,letterSpacing:0},KS=[];function jS(e){return KS[e.id]=e,e}const qS={acceptSuggestionOnCommitCharacter:jS(new vS(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:ue(0,"Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:jS(new kS(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",ue(0,"Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:ue(0,"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:jS(new class extends uS{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[ue(0,"Use platform APIs to detect when a Screen Reader is attached"),ue(0,"Optimize for usage with a Screen Reader"),ue(0,"Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:ue(0,"Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:jS(new CS(3,"accessibilityPageSize",10,1,1073741824,{description:ue(0,"Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:jS(new SS(4,"ariaLabel",ue(0,"Editor content"))),ariaRequired:jS(new vS(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:jS(new vS(8,"screenReaderAnnounceInlineSuggestion",!0,{description:ue(0,"Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:jS(new kS(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",ue(0,"Use language configurations to determine when to autoclose brackets."),ue(0,"Autoclose brackets only when the cursor is to the left of whitespace."),""],description:ue(0,"Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:jS(new kS(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",ue(0,"Use language configurations to determine when to autoclose comments."),ue(0,"Autoclose comments only when the cursor is to the left of whitespace."),""],description:ue(0,"Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:jS(new kS(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",ue(0,"Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:ue(0,"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:jS(new kS(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",ue(0,"Type over closing quotes or brackets only if they were automatically inserted."),""],description:ue(0,"Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:jS(new kS(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",ue(0,"Use language configurations to determine when to autoclose quotes."),ue(0,"Autoclose quotes only when the cursor is to the left of whitespace."),""],description:ue(0,"Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:jS(new DS(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[ue(0,"The editor will not insert indentation automatically."),ue(0,"The editor will keep the current line's indentation."),ue(0,"The editor will keep the current line's indentation and honor language defined brackets."),ue(0,"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),ue(0,"The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:ue(0,"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:jS(new vS(13,"automaticLayout",!1)),autoSurround:jS(new kS(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[ue(0,"Use language configurations to determine when to automatically surround selections."),ue(0,"Surround with quotes but not brackets."),ue(0,"Surround with brackets but not quotes."),""],description:ue(0,"Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:jS(new class extends uS{constructor(){const e={enabled:wc.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:wc.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:ue(0,"Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:ue(0,"Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:_S(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}),bracketPairGuides:jS(new class extends uS{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[ue(0,"Enables bracket pair guides."),ue(0,"Enables bracket pair guides only for the active bracket pair."),ue(0,"Disables bracket pair guides.")],default:e.bracketPairs,description:ue(0,"Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[ue(0,"Enables horizontal guides as addition to vertical bracket pair guides."),ue(0,"Enables horizontal guides only for the active bracket pair."),ue(0,"Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:ue(0,"Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:ue(0,"Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:ue(0,"Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[ue(0,"Highlights the active indent guide."),ue(0,"Highlights the active indent guide even if bracket guides are highlighted."),ue(0,"Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:ue(0,"Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:zS(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:zS(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:_S(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:_S(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:zS(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}),stickyTabStops:jS(new vS(115,"stickyTabStops",!1,{description:ue(0,"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:jS(new vS(17,"codeLens",!0,{description:ue(0,"Controls whether the editor shows CodeLens.")})),codeLensFontFamily:jS(new SS(18,"codeLensFontFamily","",{description:ue(0,"Controls the font family for CodeLens.")})),codeLensFontSize:jS(new CS(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:ue(0,"Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:jS(new vS(20,"colorDecorators",!0,{description:ue(0,"Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:jS(new kS(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[ue(0,"Make the color picker appear both on click and hover of the color decorator"),ue(0,"Make the color picker appear on hover of the color decorator"),ue(0,"Make the color picker appear on click of the color decorator")],description:ue(0,"Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:jS(new CS(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:ue(0,"Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:jS(new vS(22,"columnSelection",!1,{description:ue(0,"Enable that the selection with the mouse and keys is doing column selection.")})),comments:jS(new class extends uS{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:ue(0,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:ue(0,"Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:_S(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_S(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:jS(new vS(24,"contextmenu",!0)),copyWithSyntaxHighlighting:jS(new vS(25,"copyWithSyntaxHighlighting",!0,{description:ue(0,"Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:jS(new DS(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:ue(0,"Control the cursor animation style.")})),cursorSmoothCaretAnimation:jS(new kS(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[ue(0,"Smooth caret animation is disabled."),ue(0,"Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),ue(0,"Smooth caret animation is always enabled.")],description:ue(0,"Controls whether the smooth caret animation should be enabled.")})),cursorStyle:jS(new DS(28,"cursorStyle",xS.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return xS.Line;case"block":return xS.Block;case"underline":return xS.Underline;case"line-thin":return xS.LineThin;case"block-outline":return xS.BlockOutline;case"underline-thin":return xS.UnderlineThin}}),{description:ue(0,"Controls the cursor style.")})),cursorSurroundingLines:jS(new CS(29,"cursorSurroundingLines",0,0,1073741824,{description:ue(0,"Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:jS(new kS(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[ue(0,"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),ue(0,"`cursorSurroundingLines` is enforced always.")],markdownDescription:ue(0,"Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:jS(new CS(31,"cursorWidth",0,0,1073741824,{markdownDescription:ue(0,"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:jS(new vS(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:jS(new vS(33,"disableMonospaceOptimizations",!1)),domReadOnly:jS(new vS(34,"domReadOnly",!1)),dragAndDrop:jS(new vS(35,"dragAndDrop",!0,{description:ue(0,"Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:jS(new class extends vS{constructor(){super(37,"emptySelectionClipboard",!0,{description:ue(0,"Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:jS(new class extends uS{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:ue(0,"Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:ue(0,"Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[ue(0,"Show the drop selector widget after a file is dropped into the editor."),ue(0,"Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),showDropSelector:LS(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}),stickyScroll:jS(new class extends uS{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:ue(0,"Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:ue(0,"Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:ue(0,"Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),maxLineCount:CS.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:LS(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:_S(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}),experimentalWhitespaceRendering:jS(new kS(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[ue(0,"Use a new rendering method with svgs."),ue(0,"Use a new rendering method with font characters."),ue(0,"Use the stable rendering method.")],description:ue(0,"Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:jS(new SS(39,"extraEditorClassName","")),fastScrollSensitivity:jS(new yS(40,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:ue(0,"Scrolling speed multiplier when pressing `Alt`.")})),find:jS(new class extends uS{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:ue(0,"Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[ue(0,"Never seed search string from the editor selection."),ue(0,"Always seed search string from the editor selection, including word at cursor position."),ue(0,"Only seed search string from the editor selection.")],description:ue(0,"Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[ue(0,"Never turn on Find in Selection automatically (default)."),ue(0,"Always turn on Find in Selection automatically."),ue(0,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:ue(0,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:ue(0,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Pe},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:ue(0,"Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:ue(0,"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:_S(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":LS(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":LS(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_S(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_S(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_S(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:jS(new vS(42,"fixedOverflowWidgets",!1)),folding:jS(new vS(43,"folding",!0,{description:ue(0,"Controls whether the editor has code folding enabled.")})),foldingStrategy:jS(new kS(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[ue(0,"Use a language-specific folding strategy if available, else the indentation-based one."),ue(0,"Use the indentation-based folding strategy.")],description:ue(0,"Controls the strategy for computing folding ranges.")})),foldingHighlight:jS(new vS(45,"foldingHighlight",!0,{description:ue(0,"Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:jS(new vS(46,"foldingImportsByDefault",!1,{description:ue(0,"Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:jS(new CS(47,"foldingMaximumRegions",5e3,10,65e3,{description:ue(0,"The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:jS(new vS(48,"unfoldOnClickAfterEndOfLine",!1,{description:ue(0,"Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:jS(new SS(49,"fontFamily",US.fontFamily,{description:ue(0,"Controls the font family.")})),fontInfo:jS(new class extends mS{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:jS(new NS),fontSize:jS(new class extends fS{constructor(){super(52,"fontSize",US.fontSize,{type:"number",minimum:6,maximum:100,default:US.fontSize,description:ue(0,"Controls the font size in pixels.")})}validate(e){const t=yS.float(e,this.defaultValue);return 0===t?US.fontSize:yS.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:jS(new IS),fontVariations:jS(new ES),formatOnPaste:jS(new vS(55,"formatOnPaste",!1,{description:ue(0,"Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:jS(new vS(56,"formatOnType",!1,{description:ue(0,"Controls whether the editor should automatically format the line after typing.")})),glyphMargin:jS(new vS(57,"glyphMargin",!0,{description:ue(0,"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:jS(new class extends uS{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[ue(0,"Show Peek view of the results (default)"),ue(0,"Go to the primary result and show a Peek view"),ue(0,"Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:ue(0,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:ue(0,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:ue(0,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:ue(0,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:ue(0,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:ue(0,"Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,o;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:LS(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:LS(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:LS(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:LS(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(s=r.multipleImplementations)&&void 0!==s?s:LS(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(o=r.multipleReferences)&&void 0!==o?o:LS(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:SS.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:SS.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:SS.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:SS.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:SS.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:jS(new vS(59,"hideCursorInOverviewRuler",!1,{description:ue(0,"Controls whether the cursor should be hidden in the overview ruler.")})),hover:jS(new class extends uS{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:ue(0,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:ue(0,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:ue(0,"Controls the delay in milliseconds after thich the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:ue(0,"Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),delay:CS.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_S(t.sticky,this.defaultValue.sticky),hidingDelay:CS.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:_S(t.above,this.defaultValue.above)}}}),inDiffEditor:jS(new vS(61,"inDiffEditor",!1)),letterSpacing:jS(new yS(63,"letterSpacing",US.letterSpacing,(e=>yS.clamp(e,-5,20)),{description:ue(0,"Controls the letter spacing in pixels.")})),lightbulb:jS(new class extends uS{constructor(){const e={enabled:!0};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Enables the Code Action lightbulb in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;return{enabled:_S(e.enabled,this.defaultValue.enabled)}}}),lineDecorationsWidth:jS(new class extends uS{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){if("string"==typeof e&&/^\d+(\.\d+)?ch$/.test(e)){return-parseFloat(e.substring(0,e.length-2))}return CS.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?CS.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}),lineHeight:jS(new class extends yS{constructor(){super(66,"lineHeight",US.lineHeight,(e=>yS.clamp(e,0,150)),{markdownDescription:ue(0,"Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:jS(new class extends uS{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[ue(0,"Line numbers are not rendered."),ue(0,"Line numbers are rendered as absolute number."),ue(0,"Line numbers are rendered as distance in lines to cursor position."),ue(0,"Line numbers are rendered every 10 lines.")],default:"on",description:ue(0,"Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:jS(new CS(68,"lineNumbersMinChars",5,1,300)),linkedEditing:jS(new vS(69,"linkedEditing",!1,{description:ue(0,"Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:jS(new vS(70,"links",!0,{description:ue(0,"Controls whether the editor should detect links and make them clickable.")})),matchBrackets:jS(new kS(71,"matchBrackets","always",["always","near","never"],{description:ue(0,"Highlight matching brackets.")})),minimap:jS(new class extends uS{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:ue(0,"Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[ue(0,"The minimap has the same size as the editor contents (and might scroll)."),ue(0,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),ue(0,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:ue(0,"Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:ue(0,"Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:ue(0,"Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:ue(0,"Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:ue(0,"Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:ue(0,"Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),autohide:_S(t.autohide,this.defaultValue.autohide),size:LS(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:LS(t.side,this.defaultValue.side,["right","left"]),showSlider:LS(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_S(t.renderCharacters,this.defaultValue.renderCharacters),scale:CS.clampedInt(t.scale,1,1,3),maxColumn:CS.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:jS(new kS(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:jS(new yS(74,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:ue(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:jS(new vS(75,"mouseWheelZoom",!1,{markdownDescription:ue(0,"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:jS(new vS(76,"multiCursorMergeOverlapping",!0,{description:ue(0,"Merge multiple cursors when they are overlapping.")})),multiCursorModifier:jS(new DS(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?Pe?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[ue(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),ue(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:ue(0,"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:jS(new kS(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[ue(0,"Each cursor pastes a single line of the text."),ue(0,"Each cursor pastes the full text.")],markdownDescription:ue(0,"Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:jS(new CS(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:ue(0,"Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:jS(new vS(80,"occurrencesHighlight",!0,{description:ue(0,"Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:jS(new vS(81,"overviewRulerBorder",!0,{description:ue(0,"Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:jS(new CS(82,"overviewRulerLanes",3,0,3)),padding:jS(new class extends uS{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:ue(0,"Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:ue(0,"Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:CS.clampedInt(t.top,0,0,1e3),bottom:CS.clampedInt(t.bottom,0,0,1e3)}}}),pasteAs:jS(new class extends uS{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:ue(0,"Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:ue(0,"Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[ue(0,"Show the paste selector widget after content is pasted into the editor."),ue(0,"Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),showPasteSelector:LS(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}),parameterHints:jS(new class extends uS{constructor(){const e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:ue(0,"Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),cycle:_S(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:jS(new kS(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[ue(0,"Focus the tree when opening peek"),ue(0,"Focus the editor when opening peek")],description:ue(0,"Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:jS(new vS(87,"definitionLinkOpensInPeek",!1,{description:ue(0,"Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:jS(new class extends uS{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[ue(0,"Quick suggestions show inside the suggest widget"),ue(0,"Quick suggestions show as ghost text"),ue(0,"Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:ue(0,"Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:ue(0,"Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:ue(0,"Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:ue(0,"Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,s=["on","inline","off"];let o,r,a;return o="boolean"==typeof t?t?"on":"off":LS(t,this.defaultValue.other,s),r="boolean"==typeof i?i?"on":"off":LS(i,this.defaultValue.comments,s),a="boolean"==typeof n?n?"on":"off":LS(n,this.defaultValue.strings,s),{other:o,comments:r,strings:a}}}),quickSuggestionsDelay:jS(new CS(89,"quickSuggestionsDelay",10,0,1073741824,{description:ue(0,"Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:jS(new vS(90,"readOnly",!1)),readOnlyMessage:jS(new class extends uS{constructor(){super(91,"readOnlyMessage",undefined)}validate(e){return e&&"object"==typeof e?e:this.defaultValue}}),renameOnType:jS(new vS(92,"renameOnType",!1,{description:ue(0,"Controls whether the editor auto renames on type."),markdownDeprecationMessage:ue(0,"Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:jS(new vS(93,"renderControlCharacters",!0,{description:ue(0,"Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:jS(new kS(94,"renderFinalNewline",Fe?"dimmed":"on",["off","on","dimmed"],{description:ue(0,"Render last line number when the file ends with a newline.")})),renderLineHighlight:jS(new kS(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",ue(0,"Highlights both the gutter and the current line.")],description:ue(0,"Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:jS(new vS(96,"renderLineHighlightOnlyWhenFocus",!1,{description:ue(0,"Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:jS(new kS(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:jS(new kS(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",ue(0,"Render whitespace characters except for single spaces between words."),ue(0,"Render whitespace characters only on selected text."),ue(0,"Render only trailing whitespace characters."),""],description:ue(0,"Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:jS(new CS(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:jS(new vS(100,"roundedSelection",!0,{description:ue(0,"Controls whether selections should have rounded corners.")})),rulers:jS(new class extends uS{constructor(){const e=[],t={type:"number",description:ue(0,"Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:ue(0,"Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:ue(0,"Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"==typeof i)t.push({column:CS.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:CS.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:jS(new class extends uS{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[ue(0,"The vertical scrollbar will be visible only when necessary."),ue(0,"The vertical scrollbar will always be visible."),ue(0,"The vertical scrollbar will always be hidden.")],default:"auto",description:ue(0,"Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[ue(0,"The horizontal scrollbar will be visible only when necessary."),ue(0,"The horizontal scrollbar will always be visible."),ue(0,"The horizontal scrollbar will always be hidden.")],default:"auto",description:ue(0,"Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:ue(0,"The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:ue(0,"The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:ue(0,"Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=CS.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=CS.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:CS.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:RS(t.vertical,this.defaultValue.vertical),horizontal:RS(t.horizontal,this.defaultValue.horizontal),useShadows:_S(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_S(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_S(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_S(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_S(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:CS.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:CS.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:_S(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:jS(new CS(103,"scrollBeyondLastColumn",4,0,1073741824,{description:ue(0,"Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:jS(new vS(104,"scrollBeyondLastLine",!0,{description:ue(0,"Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:jS(new vS(105,"scrollPredominantAxis",!0,{description:ue(0,"Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:jS(new vS(106,"selectionClipboard",!0,{description:ue(0,"Controls whether the Linux primary clipboard should be supported."),included:Fe})),selectionHighlight:jS(new vS(107,"selectionHighlight",!0,{description:ue(0,"Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:jS(new vS(108,"selectOnLineNumbers",!0)),showFoldingControls:jS(new kS(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[ue(0,"Always show the folding controls."),ue(0,"Never show the folding controls and reduce the gutter size."),ue(0,"Only show the folding controls when the mouse is over the gutter.")],description:ue(0,"Controls when the folding controls on the gutter are shown.")})),showUnused:jS(new vS(110,"showUnused",!0,{description:ue(0,"Controls fading out of unused code.")})),showDeprecated:jS(new vS(138,"showDeprecated",!0,{description:ue(0,"Controls strikethrough deprecated variables.")})),inlayHints:jS(new class extends uS{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:ue(0,"Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[ue(0,"Inlay hints are enabled"),ue(0,"Inlay hints are showing by default and hide when holding {0}",Pe?"Ctrl+Option":"Ctrl+Alt"),ue(0,"Inlay hints are hidden by default and show when holding {0}",Pe?"Ctrl+Option":"Ctrl+Alt"),ue(0,"Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:ue(0,"Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:ue(0,"Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:ue(0,"Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return"boolean"==typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:LS(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:CS.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:SS.string(t.fontFamily,this.defaultValue.fontFamily),padding:_S(t.padding,this.defaultValue.padding)}}}),snippetSuggestions:jS(new kS(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[ue(0,"Show snippet suggestions on top of other suggestions."),ue(0,"Show snippet suggestions below other suggestions."),ue(0,"Show snippets suggestions with other suggestions."),ue(0,"Do not show snippet suggestions.")],description:ue(0,"Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:jS(new class extends uS{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:ue(0,"Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:ue(0,"Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:_S(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:_S(e.selectSubwords,this.defaultValue.selectSubwords)}:this.defaultValue}}),smoothScrolling:jS(new vS(113,"smoothScrolling",!1,{description:ue(0,"Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:jS(new CS(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:jS(new class extends uS{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[ue(0,"Insert suggestion without overwriting text right of the cursor."),ue(0,"Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:ue(0,"Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:ue(0,"Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:ue(0,"Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:ue(0,"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[ue(0,"Always select a suggestion when automatically triggering IntelliSense."),ue(0,"Never select a suggestion when automatically triggering IntelliSense."),ue(0,"Select a suggestion only when triggering IntelliSense from a trigger character."),ue(0,"Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:ue(0,"Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:ue(0,"Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:ue(0,"Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:ue(0,"Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:ue(0,"Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:ue(0,"Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:ue(0,"This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:ue(0,"This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:LS(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_S(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_S(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_S(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_S(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:LS(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:_S(t.showIcons,this.defaultValue.showIcons),showStatusBar:_S(t.showStatusBar,this.defaultValue.showStatusBar),preview:_S(t.preview,this.defaultValue.preview),previewMode:LS(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:_S(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:_S(t.showMethods,this.defaultValue.showMethods),showFunctions:_S(t.showFunctions,this.defaultValue.showFunctions),showConstructors:_S(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:_S(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:_S(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:_S(t.showFields,this.defaultValue.showFields),showVariables:_S(t.showVariables,this.defaultValue.showVariables),showClasses:_S(t.showClasses,this.defaultValue.showClasses),showStructs:_S(t.showStructs,this.defaultValue.showStructs),showInterfaces:_S(t.showInterfaces,this.defaultValue.showInterfaces),showModules:_S(t.showModules,this.defaultValue.showModules),showProperties:_S(t.showProperties,this.defaultValue.showProperties),showEvents:_S(t.showEvents,this.defaultValue.showEvents),showOperators:_S(t.showOperators,this.defaultValue.showOperators),showUnits:_S(t.showUnits,this.defaultValue.showUnits),showValues:_S(t.showValues,this.defaultValue.showValues),showConstants:_S(t.showConstants,this.defaultValue.showConstants),showEnums:_S(t.showEnums,this.defaultValue.showEnums),showEnumMembers:_S(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_S(t.showKeywords,this.defaultValue.showKeywords),showWords:_S(t.showWords,this.defaultValue.showWords),showColors:_S(t.showColors,this.defaultValue.showColors),showFiles:_S(t.showFiles,this.defaultValue.showFiles),showReferences:_S(t.showReferences,this.defaultValue.showReferences),showFolders:_S(t.showFolders,this.defaultValue.showFolders),showTypeParameters:_S(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_S(t.showSnippets,this.defaultValue.showSnippets),showUsers:_S(t.showUsers,this.defaultValue.showUsers),showIssues:_S(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:jS(new class extends uS{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover"],enumDescriptions:[ue(0,"Show the inline suggestion toolbar whenever an inline suggestion is shown."),ue(0,"Show the inline suggestion toolbar when hovering over an inline suggestion.")],description:ue(0,"Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:ue(0,"Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),mode:LS(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:LS(t.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:_S(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:_S(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}),inlineCompletionsAccessibilityVerbose:jS(new vS(147,"inlineCompletionsAccessibilityVerbose",!1,{description:ue(0,"Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:jS(new CS(118,"suggestFontSize",0,0,1e3,{markdownDescription:ue(0,"Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:jS(new CS(119,"suggestLineHeight",0,0,1e3,{markdownDescription:ue(0,"Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:jS(new vS(120,"suggestOnTriggerCharacters",!0,{description:ue(0,"Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:jS(new kS(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[ue(0,"Always select the first suggestion."),ue(0,"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),ue(0,"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:ue(0,"Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:jS(new kS(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[ue(0,"Tab complete will insert the best matching suggestion when pressing tab."),ue(0,"Disable tab completions."),ue(0,"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:ue(0,"Enables tab completions.")})),tabIndex:jS(new CS(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:jS(new class extends uS{constructor(){const e={nonBasicASCII:AS,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:AS,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[FS]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,AS],default:e.nonBasicASCII,description:ue(0,"Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[PS]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:ue(0,"Controls whether characters that just reserve space or have no width at all are highlighted.")},[BS]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:ue(0,"Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[WS]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,AS],default:e.includeComments,description:ue(0,"Controls whether characters in comments should also be subject to Unicode highlighting.")},[VS]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,AS],default:e.includeStrings,description:ue(0,"Controls whether characters in strings should also be subject to Unicode highlighting.")},[OS]:{restricted:!0,type:"object",default:e.allowedCharacters,description:ue(0,"Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[HS]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:ue(0,"Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(fd(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&e&&(fd(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new gS(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:zS(t.nonBasicASCII,AS,[!0,!1,AS]),invisibleCharacters:_S(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:_S(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:zS(t.includeComments,AS,[!0,!1,AS]),includeStrings:zS(t.includeStrings,AS,[!0,!1,AS]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[n,s]of Object.entries(e))!0===s&&(i[n]=!0);return i}}),unusualLineTerminators:jS(new kS(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[ue(0,"Unusual line terminators are automatically removed."),ue(0,"Unusual line terminators are ignored."),ue(0,"Unusual line terminators prompt to be removed.")],description:ue(0,"Remove unusual line terminators that might cause problems.")})),useShadowDOM:jS(new vS(126,"useShadowDOM",!0)),useTabStops:jS(new vS(127,"useTabStops",!0,{description:ue(0,"Inserting and deleting whitespace follows tab stops.")})),wordBreak:jS(new kS(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[ue(0,"Use the default line break rule."),ue(0,"Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:ue(0,"Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:jS(new SS(129,"wordSeparators",Sc,{description:ue(0,"Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:jS(new kS(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[ue(0,"Lines will never wrap."),ue(0,"Lines will wrap at the viewport width."),ue(0,"Lines will wrap at `#editor.wordWrapColumn#`."),ue(0,"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:ue(0,"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:jS(new SS(131,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;\xa2\xb0\u2032\u2033\u2030\u2103\u3001\u3002\uff61\uff64\uffe0\uff0c\uff0e\uff1a\uff1b\uff1f\uff01\uff05\u30fb\uff65\u309d\u309e\u30fd\u30fe\u30fc\u30a1\u30a3\u30a5\u30a7\u30a9\u30c3\u30e3\u30e5\u30e7\u30ee\u30f5\u30f6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308e\u3095\u3096\u31f0\u31f1\u31f2\u31f3\u31f4\u31f5\u31f6\u31f7\u31f8\u31f9\u31fa\u31fb\u31fc\u31fd\u31fe\u31ff\u3005\u303b\uff67\uff68\uff69\uff6a\uff6b\uff6c\uff6d\uff6e\uff6f\uff70\u201d\u3009\u300b\u300d\u300f\u3011\u3015\uff09\uff3d\uff5d\uff63")),wordWrapBreakBeforeCharacters:jS(new SS(132,"wordWrapBreakBeforeCharacters","([{\u2018\u201c\u3008\u300a\u300c\u300e\u3010\u3014\uff08\uff3b\uff5b\uff62\xa3\xa5\uff04\uffe1\uffe5+\uff0b")),wordWrapColumn:jS(new CS(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:ue(0,"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:jS(new kS(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:jS(new kS(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:jS(new class extends mS{constructor(){super(140)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(73)?n.push("mouse-default"):"copy"===t.get(73)&&n.push("mouse-copy"),t.get(110)&&n.push("showUnused"),t.get(138)&&n.push("showDeprecated"),n.join(" ")}}),defaultColorDecorators:jS(new vS(145,"defaultColorDecorators",!1,{markdownDescription:ue(0,"Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:jS(new class extends mS{constructor(){super(141)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:jS(new vS(142,"tabFocusMode",!1,{markdownDescription:ue(0,"Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:jS(new MS),wrappingInfo:jS(new class extends mS{constructor(){super(144)}compute(e,t,i){const n=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}),wrappingIndent:jS(new class extends uS{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[ue(0,"No indentation. Wrapped lines begin at column 1."),ue(0,"Wrapped lines get the same indentation as the parent."),ue(0,"Wrapped lines get +1 indentation toward the parent."),ue(0,"Wrapped lines get +2 indentation toward the parent.")],description:ue(0,"Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return 2===t.get(2)?0:i}}),wrappingStrategy:jS(new class extends uS{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[ue(0,"Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),ue(0,"Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:ue(0,"Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return LS(e,"simple",["simple","advanced"])}compute(e,t,i){return 2===t.get(2)?"advanced":i}})},$S=Object.freeze({id:"editor",order:5,type:"object",title:ue(0,"Editor"),scope:5}),GS=Object.assign(Object.assign({},$S),{properties:{"editor.tabSize":{type:"number",default:wc.tabSize,minimum:1,markdownDescription:ue(0,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:ue(0,'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:wc.insertSpaces,markdownDescription:ue(0,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:wc.detectIndentation,markdownDescription:ue(0,"Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:wc.trimAutoWhitespace,description:ue(0,"Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:wc.largeFileOptimizations,description:ue(0,"Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:ue(0,"Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[ue(0,"Only suggest words from the active document."),ue(0,"Suggest words from all open documents of the same language."),ue(0,"Suggest words from all open documents.")],description:ue(0,"Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[ue(0,"Semantic highlighting enabled for all color themes."),ue(0,"Semantic highlighting disabled for all color themes."),ue(0,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:ue(0,"Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:ue(0,"Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:ue(0,"Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:ue(0,"Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:ue(0,"Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:ue(0,"Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:ue(0,"Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:ue(0,"The opening bracket character or string sequence.")},{type:"string",description:ue(0,"The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:ue(0,"Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:ue(0,"The opening bracket character or string sequence.")},{type:"string",description:ue(0,"The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:hS.maxComputationTime,description:ue(0,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:hS.maxFileSize,description:ue(0,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:hS.renderSideBySide,description:ue(0,"Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:hS.renderSideBySideInlineBreakpoint,description:ue(0,"If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:hS.useInlineViewWhenSpaceIsLimited,description:ue(0,"If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:hS.renderMarginRevertIcon,description:ue(0,"When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:hS.ignoreTrimWhitespace,description:ue(0,"When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:hS.renderIndicators,description:ue(0,"Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:hS.diffCodeLens,description:ue(0,"Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:hS.diffWordWrap,markdownEnumDescriptions:[ue(0,"Lines will never wrap."),ue(0,"Lines will wrap at the viewport width."),ue(0,"Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:hS.diffAlgorithm,markdownEnumDescriptions:[ue(0,"Uses the legacy diffing algorithm."),ue(0,"Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:hS.hideUnchangedRegions.enabled,markdownDescription:ue(0,"Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:hS.hideUnchangedRegions.revealLineCount,markdownDescription:ue(0,"Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:hS.hideUnchangedRegions.minimumLineCount,markdownDescription:ue(0,"Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:hS.hideUnchangedRegions.contextLineCount,markdownDescription:ue(0,"Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:hS.experimental.showMoves,markdownDescription:ue(0,"Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:hS.experimental.showEmptyDecorations,description:ue(0,"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}});for(const xre of KS){const e=xre.schema;if(void 0!==e)if(void 0!==(ZS=e).type||void 0!==ZS.anyOf)GS.properties[`editor.${xre.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(GS.properties[t]=e[t])}var ZS;let YS=null;function XS(){return null===YS&&(YS=Object.create(null),Object.keys(GS.properties).forEach((e=>{YS[e]=!0}))),YS}Ul.as(ku).registerConfiguration(GS);const QS=Pa("IWorkspaceEditService");class JS{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(eL.is(e))return eL.lift(e);if(tL.is(e))return tL.lift(e);throw new Error("Unsupported edit")}))}}class eL extends JS{static is(e){return e instanceof eL||Fr(e)&&an.isUri(e.resource)&&Fr(e.textEdit)}static lift(e){return e instanceof eL?e:new eL(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class tL extends JS{static is(e){return e instanceof tL||Fr(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof tL?e:new tL(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const iL=Pa("ILanguageFeaturesService"),nL=Pa("IEditorCancelService"),sL=new Tl("cancellableOperation",!1,ue(0,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Cu(nL,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:sL.bindTo(e.get(Rl)),tokens:new O}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class oL extends Uh{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(nL).add(e,this)))}dispose(){this._unregister(),super.dispose()}}wh(new class extends fh{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:sL})}runEditorCommand(e,t){e.get(nL).cancel(t)}});class rL{constructor(e,t){if(this.flags=t,1&this.flags){const t=e.getModel();this.modelVersionId=t?Xs("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;4&this.flags?this.position=e.getPosition():this.position=null,2&this.flags?this.selection=e.getSelection():this.selection=null,8&this.flags?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof rL))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&(this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&(!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))))}validate(e){return this._equals(new rL(e,this.flags))}}class aL extends oL{constructor(e,t,i,n){super(e,n),this._listener=new N,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&Mh.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&Mh.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class lL extends Uh{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}var hL;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(hL||(hL={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(s){return s?fo(t,s)?e.Error:fo(i,s)||fo("warn",s)?e.Warning:fo(n,s)?e.Info:e.Ignore:e.Ignore},e.toString=function(s){switch(s){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(hL||(hL={}));const dL=hL;var cL=dL;const uL=Pa("notificationService");const gL=Pa("progressService");Object.freeze({total(){},worked(){},done(){}});class pL{constructor(e,t){this.callback=e,this.report=(null==t?void 0:t.async)?this._reportAsync.bind(this):this._reportSync.bind(this)}_reportSync(e){this._value=e,this.callback(this._value)}_reportAsync(e){Promise.resolve(this._lastTask).finally((()=>{this._value=e;const t=this.callback(this._value);this._lastTask=Promise.resolve(t).finally((()=>this._lastTask=void 0))}))}}pL.None=Object.freeze({report(){}});const mL=Pa("editorProgressService");var fL,_L=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class vL{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+vL.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new vL(this.value+vL.sep+e)}}function bL(e,t,i){return!!t.contains(e)&&(!i||!t.contains(i))}vL.sep=".",vL.None=new vL("@@none@@"),vL.Empty=new vL(""),vL.QuickFix=new vL("quickfix"),vL.Refactor=new vL("refactor"),vL.RefactorExtract=vL.Refactor.append("extract"),vL.RefactorInline=vL.Refactor.append("inline"),vL.RefactorMove=vL.Refactor.append("move"),vL.RefactorRewrite=vL.Refactor.append("rewrite"),vL.Notebook=new vL("notebook"),vL.Source=new vL("source"),vL.SourceOrganizeImports=vL.Source.append("organizeImports"),vL.SourceFixAll=vL.Source.append("fixAll"),vL.SurroundWith=vL.Refactor.append("surround"),function(e){e.Refactor="refactor",e.RefactorPreview="refactor preview",e.Lightbulb="lightbulb",e.Default="other (default)",e.SourceAction="source action",e.QuickFix="quick fix action",e.FixAll="fix all",e.OrganizeImports="organize imports",e.AutoFix="auto fix",e.QuickFixHover="quick fix hover window",e.OnSave="save participants",e.ProblemsView="problems view"}(fL||(fL={}));class CL{static fromUser(e,t){return e&&"object"==typeof e?new CL(CL.getKindFromUser(e,t.kind),CL.getApplyFromUser(e,t.apply),CL.getPreferredUser(e)):new CL(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new vL(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class wL{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}resolve(e){var t;return _L(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(i){a(i)}t&&(this.action.edit=t.edit)}return this}))}}var yL=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const SL="editor.action.codeAction",LL="editor.action.quickFix",kL="editor.action.autoFix",DL="editor.action.refactor",xL="editor.action.sourceAction",NL="editor.action.organizeImports",EL="editor.action.fixAll";class IL extends E{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Wd(e.diagnostics)?Wd(t.diagnostics)?IL.codeActionsPreferredComparator(e,t):-1:Wd(t.diagnostics)?1:IL.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(IL.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&vL.QuickFix.contains(new vL(e.kind))&&!!e.isPreferred))}}const ML={actions:[],documentation:void 0};function TL(e,t,i,n,s,o){var r;return yL(this,void 0,void 0,(function*(){const l=n.filter||{},h=Object.assign(Object.assign({},l),{excludes:[...l.excludes||[],vL.Notebook]}),c={only:null===(r=l.include)||void 0===r?void 0:r.value,trigger:n.type},u=new lL(t,o),g=2===n.type,p=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>function(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>bL(t,i,e.include)))||!e.includeSourceActions&&vL.Source.contains(t))}(i,new vL(e))))))}(e,t,g?h:l),m=new N,f=p.map((e=>yL(this,void 0,void 0,(function*(){try{s.report(e);const n=yield e.provideCodeActions(t,i,c,u.token);if(n&&m.add(n),u.token.isCancellationRequested)return ML;const o=((null==n?void 0:n.actions)||[]).filter((e=>e&&function(e,t){const i=t.kind?new vL(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>bL(i,t,e.include)))||!e.includeSourceActions&&i&&vL.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}(l,e))),r=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new vL(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const s of t)if(s.kind)for(const e of n)if(e.kind.contains(new vL(s.kind)))return e.command;return}(e,o,l.include);return{actions:o.map((t=>new wL(t,e))),documentation:r}}catch(n){if(d(n))throw n;return a(n),ML}})))),_=e.onDidChange((()=>{Id(e.all(t),p)||u.cancel()}));try{const i=yield Promise.all(f),s=i.map((e=>e.actions)).flat(),o=[...Pd(i.map((e=>e.documentation))),...RL(e,t,n,s)];return new IL(s,o,m)}finally{_.dispose(),u.dispose()}}))}function*RL(e,t,i,n){var s,o,r;if(t&&n.length)for(const a of e.all(t))a._getAdditionalMenuItems&&(yield*null===(s=a._getAdditionalMenuItems)||void 0===s?void 0:s.call(a,{trigger:i.type,only:null===(r=null===(o=i.filter)||void 0===o?void 0:o.include)||void 0===r?void 0:r.value},n.map((e=>e.action))))}var AL;function OL(e,t,i,n,s=Hh.None){var o;return yL(this,void 0,void 0,(function*(){const r=e.get(QS),a=e.get(Ga),l=e.get(rh),h=e.get(uL);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),yield t.resolve(s),!s.isCancellationRequested){if(null===(o=t.action.edit)||void 0===o?void 0:o.edits.length){if(!(yield r.apply(t.action.edit,{editor:null==n?void 0:n.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==AL.OnSave,showPreview:null==n?void 0:n.preview})).isApplied)return}if(t.action.command)try{yield a.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(d){const e=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(d);h.error("string"==typeof e?e:ue(0,"An unknown error occurred while applying the code action"))}}}))}!function(e){e.OnSave="onSave",e.FromProblemsView="fromProblemsView",e.FromCodeActions="fromCodeActions"}(AL||(AL={})),Za.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,s){return yL(this,void 0,void 0,(function*(){if(!(t instanceof an))throw u();const{codeActionProvider:o}=e.get(iL),r=e.get(Wa).getModel(t);if(!r)throw u();const a=Th.isISelection(i)?Th.liftSelection(i):Mh.isIRange(i)?r.validateRange(i):void 0;if(!a)throw u();const l="string"==typeof n?new vL(n):void 0,h=yield TL(o,r,a,{type:1,triggerAction:fL.Default,filter:{includeSourceActions:!0,include:l}},pL.None,Hh.None),d=[],c=Math.min(h.validActions.length,"number"==typeof s?s:0);for(let e=0;ee.action))}finally{setTimeout((()=>h.dispose()),100)}}))}));const PL=Pa("keybindingService");var FL,BL=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},WL=function(e,t){return function(i,n){t(i,n,e)}};let VL=FL=class{constructor(e){this.keybindingService=e}getResolver(){const e=new Gs((()=>this.keybindingService.getKeybindings().filter((e=>FL.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===NL?t={kind:vL.SourceOrganizeImports.value}:e.command===EL&&(t={kind:vL.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},CL.fromUser(t,{kind:vL.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new vL(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};VL.codeActionCommands=[DL,SL,xL,NL,EL],VL=FL=BL([WL(0,PL)],VL);Sp("symbolIcon.arrayForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.booleanForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},ue(0,"The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.colorForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.constantForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},ue(0,"The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},ue(0,"The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},ue(0,"The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.fileForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.folderForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},ue(0,"The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.keyForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.keywordForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},ue(0,"The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.moduleForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.namespaceForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.nullForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.numberForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.objectForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.operatorForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.packageForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.propertyForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.referenceForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.snippetForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.stringForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.structForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.textForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.typeParameterForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.unitForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const HL=Object.freeze({kind:vL.Empty,title:ue(0,"More Actions...")}),zL=Object.freeze([{kind:vL.QuickFix,title:ue(0,"Quick Fix")},{kind:vL.RefactorExtract,title:ue(0,"Extract"),icon:Qr.wrench},{kind:vL.RefactorInline,title:ue(0,"Inline"),icon:Qr.wrench},{kind:vL.RefactorRewrite,title:ue(0,"Rewrite"),icon:Qr.wrench},{kind:vL.RefactorMove,title:ue(0,"Move"),icon:Qr.wrench},{kind:vL.SurroundWith,title:ue(0,"Surround With"),icon:Qr.symbolSnippet},{kind:vL.Source,title:ue(0,"Source Action"),icon:Qr.symbolFile},HL]);function UL(e,t,i){let n=null,s=null;if("function"==typeof i.value?(n="value",s=i.value,0!==s.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",s=i.get),!s)throw new Error("not supported");const o=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:s.apply(this,e)}),this[o]}}var KL,jL=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(KL||(KL={}));class qL extends E{constructor(){super(),this.dispatched=!1,this.targets=new O,this.ignoreTargets=new O,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(En(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(En(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(En(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){if(!qL.isTouchDevice())return E.None;qL.INSTANCE||(qL.INSTANCE=S(new qL));return x(qL.INSTANCE.targets.push(e))}static ignoreTarget(e){if(!qL.isTouchDevice())return E.None;qL.INSTANCE||(qL.INSTANCE=S(new qL));return x(qL.INSTANCE.ignoreTargets.push(e))}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=qL.HOLD_DELAY&&Math.abs(o.initialPageX-Ed(o.rollingPageX))<30&&Math.abs(o.initialPageY-Ed(o.rollingPageY))<30){const e=this.newGestureEvent(KL.Contextmenu,o.initialTarget);e.pageX=Ed(o.rollingPageX),e.pageY=Ed(o.rollingPageY),this.dispatchEvent(e)}else if(1===i){const e=Ed(o.rollingPageX),i=Ed(o.rollingPageY),n=Ed(o.rollingTimestamps)-o.rollingTimestamps[0],s=e-o.rollingPageX[0],r=i-o.rollingPageY[0],a=[...this.targets].filter((e=>o.initialTarget instanceof Node&&e.contains(o.initialTarget)));this.inertia(a,t,Math.abs(s)/n,s>0?1:-1,e,Math.abs(r)/n,r>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(KL.End,o.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===KL.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>qL.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==KL.Change&&e.type!==KL.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(const t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,i,n,s,o,r,a){this.handle=An((()=>{const l=Date.now(),h=l-t;let d=0,c=0,u=!0;i+=qL.SCROLL_FRICTION*h,o+=qL.SCROLL_FRICTION*h,i>0&&(u=!1,d=n*i*h),o>0&&(u=!1,c=r*o*h);const g=this.newGestureEvent(KL.Change);g.translationX=d,g.translationY=c,e.forEach((e=>e.dispatchEvent(g))),u||this.inertia(e,l,i,n,s+d,o,r,a+c)}))}onTouchMove(e){const t=Date.now();for(let i=0,n=e.changedTouches.length;i3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(n.pageX),s.rollingPageY.push(n.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}qL.SCROLL_FRICTION=-.005,qL.HOLD_DELAY=700,qL.CLEAR_TAP_COUNT_TIME=400,jL([UL],qL,"isTouchDevice",null);var $L,GL,ZL=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},YL=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Hidden={type:0};e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(GL||(GL={}));let XL=$L=class extends E{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new U),this.onClick=this._onClick.event,this._state=GL.Hidden,this._domNode=fs("div.lightBulbWidget"),this._register(qL.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),this._register(Tn(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=Hn(this._domNode),n=this._editor.getOption(66);let s=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{1&~e.buttons||this.hide()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(64)&&!this._editor.getOption(64).enabled&&this.hide()}))),this._register(B.runAndSubscribe(t.onDidUpdateKeybindings,(()=>{var e,i,n,s;this._preferredKbLabel=null!==(i=null===(e=t.lookupKeybinding(kL))||void 0===e?void 0:e.getLabel())&&void 0!==i?i:void 0,this._quickFixKbLabel=null!==(s=null===(n=t.lookupKeybinding(LL))||void 0===n?void 0:n.getLabel())&&void 0!==s?s:void 0,this._updateLightBulbTitleAndIcon()})))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(64).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:o,column:r}=s.validatePosition(i),a=s.getOptions().tabSize,l=n.get(50),h=Gv(s.getLineContent(o),a),d=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let c=o;if(!(l.spaceWidth*h>22))if(o>1&&!d(o-1))c-=1;else if(d(o+1)){if(r*l.spaceWidth<22)return this.hide()}else c+=1;this.state=new GL.Showing(e,t,i,{position:{lineNumber:c,column:1},preference:$L._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==GL.Hidden&&(this.state=GL.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){1===this.state.type&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...ea.asClassNameArray(Qr.lightBulb)),this._domNode.classList.add(...ea.asClassNameArray(Qr.lightbulbAutofix)),this._preferredKbLabel)?this.title=ue(0,"Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):(this._domNode.classList.remove(...ea.asClassNameArray(Qr.lightbulbAutofix)),this._domNode.classList.add(...ea.asClassNameArray(Qr.lightBulb)),this._quickFixKbLabel?this.title=ue(0,"Show Code Actions ({0})",this._quickFixKbLabel):this.title=ue(0,"Show Code Actions"))}set title(e){this._domNode.title=e}};function QL(e,t={}){const i=JL(t);return tk(i,function(e,t){const i={type:1,children:[]};let n=0,s=i;const o=[],r=new ek(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==nk(r.peek(),t);if(i&&(e=r.next()),!i&&ik(e,t)&&e===r.peek()){r.advance(),2===s.type&&(s=o.pop());const i=nk(e,t);if(s.type===i||5===s.type&&6===i)s=o.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),s.children.push(e),o.push(s),s=e}}else if("\n"===e)2===s.type&&(s=o.pop()),s.children.push({type:8});else if(2!==s.type){const t={type:2,content:e};s.children.push(t),o.push(s),s=t}else s.content+=e}2===s.type&&(s=o.pop());o.length;return i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function JL(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}XL.ID="editor.contrib.lightbulbWidget",XL._posPref=[0],XL=$L=ZL([YL(1,PL)],XL);class ek{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function tk(e,t,i,n){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(7===t.type&&n)s=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(Mn(e,"click",(e=>{i.callback(String(t.index),e)}))),s=e}else 8===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach((e=>{tk(s,e,i,n)}))}function ik(e,t){return 0!==nk(e,t)}function nk(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}const sk=new RegExp(`(\\\\)?\\$\\((${ea.iconNameExpression}(?:${ea.iconModifierExpression})?)\\)`,"g");function ok(e){const t=new Array;let i,n=0,s=0;for(;null!==(i=sk.exec(e));){s=i.index||0,ne.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var o=/[&<>"']/,r=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,h={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(e){return h[e]};function c(e,t){if(t){if(o.test(e))return e.replace(r,d)}else if(a.test(e))return e.replace(l,d);return e}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g;function m(e,t){e="string"==typeof e?e:e.source,t=t||"";var i={replace:function(t,n){return n=(n=n.source||n).replace(p,"$1"),e=e.replace(t,n),i},getRegex:function(){return new RegExp(e,t)}};return i}var f=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function v(e,t,i){if(e){var n;try{n=decodeURIComponent(g(i)).replace(f,"").toLowerCase()}catch(Dre){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!_.test(i)&&(i=function(e,t){b[" "+e]||(C.test(e)?b[" "+e]=e+"/":b[" "+e]=D(e,"/",!0));var i=-1===(e=b[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(w,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(y,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(Dre){return null}return i}var b={},C=/^[^:]+:\/*[^/]*$/,w=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/,S={exec:function(){}};function L(e){for(var t,i,n=1;n=0&&"\\"===i[s];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>t)i.splice(t);else for(;i.length1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function E(e,t,i,n){var s=t.href,o=t.title?c(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;var a={type:"link",raw:i,href:s,title:o,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,a}return{type:"image",raw:i,href:s,title:o,text:c(r)}}var I=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},i.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:D(i,"\n")}}},i.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},i.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=D(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}},i.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},i.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var i=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}},i.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,s,o,r,a,l,h,d,c,u,g,p,m=t[1].trim(),f=m.length>1,_={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?"\\d{1,9}\\"+m.slice(-1):"\\"+m,this.options.pedantic&&(m=f?m:"[*+-]");for(var v=new RegExp("^( {0,3}"+m+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(p=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),d=t[2].split("\n",1)[0],c=e.split("\n",1)[0],this.options.pedantic?(r=2,g=d.trimLeft()):(r=(r=t[2].search(/[^ ]/))>4?1:r,g=d.slice(r),r+=t[1].length),l=!1,!d&&/^ *$/.test(c)&&(i+=c+"\n",e=e.substring(c.length+1),p=!0),!p)for(var b=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),C=new RegExp("^ {0,"+Math.min(3,r-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),w=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:```|~~~)"),y=new RegExp("^ {0,"+Math.min(3,r-1)+"}#");e&&(d=u=e.split("\n",1)[0],this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!w.test(d))&&!y.test(d)&&!b.test(d)&&!C.test(e);){if(d.search(/[^ ]/)>=r||!d.trim())g+="\n"+d.slice(r);else{if(l)break;g+="\n"+d}l||d.trim()||(l=!0),i+=u+"\n",e=e.substring(u.length+1)}_.loose||(h?_.loose=!0:/\n *\n *$/.test(i)&&(h=!0)),this.options.gfm&&(s=/^\[[ xX]\] /.exec(g))&&(o="[ ] "!==s[0],g=g.replace(/^\[[ xX]\] +/,"")),_.items.push({type:"list_item",raw:i,task:!!s,checked:o,loose:!1,text:g}),_.raw+=i}_.items[_.items.length-1].raw=i.trimRight(),_.items[_.items.length-1].text=g.trimRight(),_.raw=_.raw.trimRight();var S=_.items.length;for(a=0;a1)return!0;return!1}));!_.loose&&L.length&&k&&(_.loose=!0,_.items[a].loose=!0)}return _}},i.html=function(e){var t=this.rules.block.html.exec(e);if(t){var i={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var n=this.options.sanitizer?this.options.sanitizer(t[0]):c(t[0]);i.type="paragraph",i.text=n,i.tokens=this.lexer.inline(n)}return i}},i.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},i.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:k(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,s,o,r,a=i.align.length;for(n=0;n/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):c(t[0]):t[0]}},i.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;var n=D(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var s=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var i=e.length,n=0,s=0;s-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var r=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);l&&(r=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^$/.test(i)?r.slice(1):r.slice(1,-1)),E(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}},i.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return E(i,n,i[0],this.lexer)}},i.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var s=n[1]||n[2]||"";if(!s||s&&(""===i||this.rules.inline.punctuation.exec(i))){var o,r,a=n[0].length-1,l=a,h=0,d="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=d.exec(t));)if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(r=o.length,n[3]||n[4])l+=r;else if(!((n[5]||n[6])&&a%3)||(a+r)%3){if(!((l-=r)>0)){if(r=Math.min(r,r+l+h),Math.min(a,r)%2){var c=e.slice(1,a+n.index+r);return{type:"em",raw:e.slice(0,a+n.index+r+1),text:c,tokens:this.lexer.inlineTokens(c)}}var u=e.slice(2,a+n.index+r-1);return{type:"strong",raw:e.slice(0,a+n.index+r+1),text:u,tokens:this.lexer.inlineTokens(u)}}}else h+=r}}},i.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return n&&s&&(i=i.substring(1,i.length-1)),i=c(i,!0),{type:"codespan",raw:t[0],text:i}}},i.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},i.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}},i.autolink=function(e,t){var i,n,s=this.rules.inline.autolink.exec(e);if(s)return n="@"===s[2]?"mailto:"+(i=c(this.options.mangle?t(s[1]):s[1])):i=c(s[1]),{type:"link",raw:s[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},i.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,s;if("@"===i[2])s="mailto:"+(n=c(this.options.mangle?t(i[0]):i[0]));else{var o;do{o=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(o!==i[0]);n=c(i[0]),s="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}},i.inlineText=function(e,t){var i,n=this.rules.inline.text.exec(e);if(n)return i=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):c(n[0]):n[0]:c(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}},t}(),M={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:S,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};M.def=m(M.def).replace("label",M._label).replace("title",M._title).getRegex(),M.bullet=/(?:[*+-]|\d{1,9}[.)])/,M.listItemStart=m(/^( *)(bull) */).replace("bull",M.bullet).getRegex(),M.list=m(M.list).replace(/bull/g,M.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+M.def.source+")").getRegex(),M._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",M._comment=/|$)/,M.html=m(M.html,"i").replace("comment",M._comment).replace("tag",M._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M.paragraph=m(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.blockquote=m(M.blockquote).replace("paragraph",M.paragraph).getRegex(),M.normal=L({},M),M.gfm=L({},M.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),M.gfm.table=m(M.gfm.table).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.gfm.paragraph=m(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",M.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.pedantic=L({},M.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",M._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:S,paragraph:m(M.normal._paragraph).replace("hr",M.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",M.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var T={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:S,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:S,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}T._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",T.punctuation=m(T.punctuation).replace(/punctuation/g,T._punctuation).getRegex(),T.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,T.escapedEmSt=/\\\*|\\_/g,T._comment=m(M._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),T.emStrong.lDelim=m(T.emStrong.lDelim).replace(/punct/g,T._punctuation).getRegex(),T.emStrong.rDelimAst=m(T.emStrong.rDelimAst,"g").replace(/punct/g,T._punctuation).getRegex(),T.emStrong.rDelimUnd=m(T.emStrong.rDelimUnd,"g").replace(/punct/g,T._punctuation).getRegex(),T._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,T._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,T._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,T.autolink=m(T.autolink).replace("scheme",T._scheme).replace("email",T._email).getRegex(),T._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,T.tag=m(T.tag).replace("comment",T._comment).replace("attribute",T._attribute).getRegex(),T._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,T._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,T._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,T.link=m(T.link).replace("label",T._label).replace("href",T._href).replace("title",T._title).getRegex(),T.reflink=m(T.reflink).replace("label",T._label).replace("ref",M._label).getRegex(),T.nolink=m(T.nolink).replace("ref",M._label).getRegex(),T.reflinkSearch=m(T.reflinkSearch,"g").replace("reflink",T.reflink).replace("nolink",T.nolink).getRegex(),T.normal=L({},T),T.pedantic=L({},T.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",T._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",T._label).getRegex()}),T.gfm=L({},T.normal,{escape:m(T.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\0?t[t.length-1].raw+="\n":t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?t.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else if(s=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,i=e.slice(1),n=void 0;r.options.extensions.startBlock.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}(),this.state.top&&(i=this.tokenizer.paragraph(s)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i),o=s.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,t},r.inline=function(e,t){return void 0===t&&(t=[]),this.inlineQueue.push({src:e,tokens:t}),t},r.inlineTokens=function(e,t){var i,n,s,o=this;void 0===t&&(t=[]);var r,a,l,h=e;if(this.tokens.links){var d=Object.keys(this.tokens.links);if(d.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(h));)d.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,r.index)+"["+N("a",r[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(h));)h=h.slice(0,r.index)+"["+N("a",r[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(h));)h=h.slice(0,r.index)+"++"+h.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(i=n.call({lexer:o},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,h,l))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,A))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,A))){if(s=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,i=e.slice(1),n=void 0;o.options.extensions.startInline.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}(),i=this.tokenizer.inlineText(s,R))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(i.raw.length),t.push(i);return t},n=i,o=[{key:"rules",get:function(){return{block:M,inline:T}}}],(s=null)&&t(n.prototype,s),o&&t(n,o),Object.defineProperty(n,"prototype",{writable:!1}),i}(),P=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var s=this.options.highlight(e,n);null!=s&&s!==e&&(i=!0,e=s)}return e=e.replace(/\n$/,"")+"\n",n?'
'+(i?e:c(e,!0))+"
\n":"
"+(i?e:c(e,!0))+"
\n"},i.blockquote=function(e){return"
\n"+e+"
\n"},i.html=function(e){return e},i.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},i.hr=function(){return this.options.xhtml?"
\n":"
\n"},i.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},i.listitem=function(e){return"
  • "+e+"
  • \n"},i.checkbox=function(e){return" "},i.paragraph=function(e){return"

    "+e+"

    \n"},i.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},i.tablerow=function(e){return"\n"+e+"\n"},i.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},i.strong=function(e){return""+e+""},i.em=function(e){return""+e+""},i.codespan=function(e){return""+e+""},i.br=function(){return this.options.xhtml?"
    ":"
    "},i.del=function(e){return""+e+""},i.link=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"},i.image=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">"},i.text=function(e){return e},t}(),F=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),B=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),W=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new P,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new F,this.slugger=new B}t.parse=function(e,i){return new t(i).parse(e)},t.parseInline=function(e,i){return new t(i).parseInline(e)};var i=t.prototype;return i.parse=function(e,t){void 0===t&&(t=!0);var i,n,s,o,r,a,l,h,d,c,u,p,m,f,_,v,b,C,w,y="",S=e.length;for(i=0;i0&&"paragraph"===_.tokens[0].type?(_.tokens[0].text=C+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&"text"===_.tokens[0].tokens[0].type&&(_.tokens[0].tokens[0].text=C+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:C}):f+=C),f+=this.parse(_.tokens,m),d+=this.renderer.listitem(f,b,v);y+=this.renderer.list(d,u,p);continue;case"html":y+=this.renderer.html(c.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":for(d=c.tokens?this.parseInline(c.tokens):c.text;i+1An error occurred:

    "+c(e.message+"",!0)+"
    ";throw e}try{var l=O.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(V.walkTokens(l,t.walkTokens)).then((function(){return W.parse(l,t)})).catch(a);V.walkTokens(l,t.walkTokens)}return W.parse(l,t)}catch(Dre){a(Dre)}}V.options=V.setOptions=function(t){var i;return L(V.defaults,t),i=V.defaults,e.defaults=i,V},V.getDefaults=s,V.defaults=e.defaults,V.use=function(){for(var e=arguments.length,t=new Array(e),i=0;iAn error occurred:

    "+c(Dre.message+"",!0)+"
    ";throw Dre}},V.Parser=W,V.parser=W.parse,V.Renderer=P,V.TextRenderer=F,V.Lexer=O,V.lexer=O.lex,V.Tokenizer=I,V.Slugger=B,V.parse=V;var H=V.options,z=V.setOptions,U=V.use,K=V.walkTokens,j=V.parseInline,q=V,$=W.parse,G=O.lex;e.Lexer=O,e.Parser=W,e.Renderer=P,e.Slugger=B,e.TextRenderer=F,e.Tokenizer=I,e.getDefaults=s,e.lexer=G,e.marked=V,e.options=H,e.parse=q,e.parseInline=j,e.parser=$,e.setOptions=z,e.use=U,e.walkTokens=K,Object.defineProperty(e,"__esModule",{value:!0})},e.amd?e(0,i):"object"==typeof exports?i(exports):i((t="undefined"!=typeof globalThis?globalThis:t||self).marked={})}();hk.Lexer||exports.Lexer,hk.Parser||exports.Parser,hk.Renderer||exports.Renderer,hk.Slugger||exports.Slugger,hk.TextRenderer||exports.TextRenderer,hk.Tokenizer||exports.Tokenizer,hk.getDefaults||exports.getDefaults,hk.lexer||exports.lexer;var dk=hk.marked||exports.marked;hk.options||exports.options,hk.parse||exports.parse,hk.parseInline||exports.parseInline,hk.parser||exports.parser,hk.setOptions||exports.setOptions,hk.use||exports.use,hk.walkTokens||exports.walkTokens;function ck(e){let t=JSON.parse(e);return t=gk(t),t}function uk(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function gk(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return an.revive(e);case 2:return new RegExp(e.source,e.flags);case 17:return new Date(e.source)}if(e instanceof zc||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i{let n=[],s=[];return e&&(({href:e,dimensions:n}=function(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),s=e?e[1]:"",o=i?i[1]:"",r=isFinite(parseInt(o)),a=isFinite(parseInt(s));r&&t.push(`width="${o}"`),a&&t.push(`height="${s}"`)}return{href:e,dimensions:t}}(e)),s.push(`src="${Ra(e)}"`)),i&&s.push(`alt="${Ra(i)}"`),t&&s.push(`title="${Ra(t)}"`),n.length&&(s=s.concat(n)),""},paragraph:e=>`

    ${e}

    `,link:(e,t,i)=>"string"!=typeof e?"":(e===i&&(i=Aa(i)),t="string"==typeof t?Ra(Aa(t)):"",`
    /g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${t||e}">${i}`)});function mk(e,t={},i={}){var n,s;const o=new N;let a=!1;const l=JL(t),h=function(t){let i;try{i=ck(decodeURIComponent(t))}catch(Dre){}return i?(i=gd(i,(t=>e.uris&&e.uris[t]?an.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},d=function(t,i){const n=e.uris&&e.uris[t];let s=an.revive(n);return i?t.startsWith(vn.data+":")?t:(s||(s=an.parse(t)),wn.uriToBrowserUri(s).toString(!0)):s?an.parse(t).toString()===s.toString()?t:(s.query&&(s=s.with({query:h(s.query)})),s.toString()):t},c=new dk.Renderer;c.image=pk.image,c.link=pk.link,c.paragraph=pk.paragraph;const u=[],g=[];if(t.codeBlockRendererSync?c.code=(e,i)=>{const n=lk.nextId(),s=t.codeBlockRendererSync(fk(i),e);return g.push([n,s]),`
    ${Qs(e)}
    `}:t.codeBlockRenderer&&(c.code=(e,i)=>{const n=lk.nextId(),s=t.codeBlockRenderer(fk(i),e);return u.push(s.then((e=>[n,e]))),`
    ${Qs(e)}
    `}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let s=n.dataset.href;s&&(e.baseUri&&(s=_k(an.from(e.baseUri),s)),t.actionHandler.callback(s,i))}catch(s){r(s)}finally{i.preventDefault()}},n=t.actionHandler.disposables.add(new Hy(l,"click")),s=t.actionHandler.disposables.add(new Hy(l,"auxclick"));t.actionHandler.disposables.add(B.any(n.event,s.event)((e=>{const t=new Nt(e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(En(l,"keydown",(e=>{const t=new St(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(i.sanitizer=t=>(e.isTrusted?t.match(/^(]+>)|(<\/\s*span>)$/):void 0)?t:"",i.sanitize=!0,i.silent=!0),i.renderer=c;let p=null!==(n=e.value)&&void 0!==n?n:"";let m;if(p.length>1e5&&(p=`${p.substr(0,1e5)}\u2026`),e.supportThemeIcons&&(p=p.replace(na,(e=>`\\${e}`))),t.fillInIncompleteTokens){const e=Object.assign(Object.assign({},dk.defaults),i),t=function(e){let t,i;for(t=0;t"string"==typeof e?e:e.outerHTML)).join("")}const f=(new DOMParser).parseFromString(vk(e,m),"text/html");if(f.body.querySelectorAll("img").forEach((t=>{const i=t.getAttribute("src");if(i){let s=i;try{e.baseUri&&(s=_k(an.from(e.baseUri),s))}catch(n){}t.src=d(s,!0)}})),f.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=d(i,!1);e.baseUri&&(n=_k(an.from(e.baseUri),i)),t.dataset.href=n}})),l.innerHTML=vk(e,f.body.innerHTML),u.length>0)Promise.all(u).then((e=>{var i,n;if(a)return;const s=new Map(e),o=l.querySelectorAll("div[data-code]");for(const t of o){const e=s.get(null!==(i=t.dataset.code)&&void 0!==i?i:"");e&&us(t,e)}null===(n=t.asyncRenderCallback)||void 0===n||n.call(t)}));else if(g.length>0){const e=new Map(g),t=l.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(null!==(s=i.dataset.code)&&void 0!==s?s:"");t&&us(i,t)}}if(t.asyncRenderCallback)for(const r of l.getElementsByTagName("img")){const e=o.add(En(r,"load",(()=>{e.dispose(),t.asyncRenderCallback()})))}return{element:l,dispose:()=>{a=!0,o.dispose()}}}function fk(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function _k(e,t){return/^\w[\w\d+.-]*:/.test(t)?t:e.path.endsWith("/")?ka(e,t).toString():ka(wa(e),t).toString()}function vk(e,t){const{config:i,allowedSchemes:n}=function(e){const t=[vn.http,vn.https,vn.mailto,vn.data,vn.file,vn.vscodeFileResource,vn.vscodeRemote,vn.vscodeRemoteResource];e.isTrusted&&t.push(vn.command);return{config:{ALLOWED_TAGS:[...Ls],ALLOWED_ATTR:bk,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}(e);Di("uponSanitizeAttribute",((e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName);else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}));const s=function(e,t=!1){const i=document.createElement("a");return Di("afterSanitizeAttributes",(n=>{for(const s of["href","src"])if(n.hasAttribute(s)){const o=n.getAttribute(s);if("href"===s&&o.startsWith("#"))continue;if(i.href=o,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===s&&i.href.startsWith("data:"))continue;n.removeAttribute(s)}}})),x((()=>{xi("afterSanitizeAttributes")}))}(n);try{return ki(t,Object.assign(Object.assign({},i),{RETURN_TRUSTED_TYPE:!0}))}finally{xi("uponSanitizeAttribute"),s.dispose()}}const bk=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function Ck(e){return"string"==typeof e?e:function(e){var t;let i=null!==(t=e.value)&&void 0!==t?t:"";i.length>1e5&&(i=`${i.substr(0,1e5)}\u2026`);const n=dk.parse(i,{renderer:yk.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(e=>{var t;return null!==(t=wk.get(e))&&void 0!==t?t:e}));return vk({isTrusted:!1},n).toString()}(e)}const wk=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),yk=new Gs((()=>{const e=new dk.Renderer;return e.code=e=>e,e.blockquote=e=>e,e.html=e=>"",e.heading=(e,t,i)=>e+"\n",e.hr=()=>"",e.list=(e,t)=>e,e.listitem=e=>e+"\n",e.paragraph=e=>e+"\n",e.table=(e,t)=>e+t+"\n",e.tablerow=e=>e,e.tablecell=(e,t)=>e+" ",e.strong=e=>e,e.em=e=>e,e.codespan=e=>e,e.br=()=>"\n",e.del=e=>e,e.image=(e,t,i)=>"",e.text=e=>e,e.link=(e,t,i)=>i,e}));function Sk(e){let t="";return e.forEach((e=>{t+=e.raw})),t}function Lk(e){for(const t of e.tokens)if("text"===t.type){const i=t.raw.split("\n"),n=i[i.length-1];if(n.includes("`"))return Dk(e);if(n.includes("**"))return Tk(e,"**");if(n.match(/\*\w/))return xk(e);if(n.match(/(^|\s)__\w/))return Mk(e);if(n.match(/(^|\s)_\w/))return Nk(e);if(n.match(/(^|\s)\[.*\]\(\w*/))return Ek(e);if(n.match(/(^|\s)\[\w/))return Ik(e)}}function kk(e){const t=Sk(e);return dk.lexer(t+"\n```")}function Dk(e){return Tk(e,"`")}function xk(e){return Tk(e,"*")}function Nk(e){return Tk(e,"_")}function Ek(e){return Tk(e,")")}function Ik(e){return Tk(e,"](about:blank)")}function Mk(e){return Tk(e,"__")}function Tk(e,t){const i=Sk(Array.isArray(e)?e:[e]);return dk.lexer(i+t)[0]}function Rk(e){const t=Sk(e),i=t.split("\n");let n,s=!1;for(let o=0;o0){const e=s?i.slice(0,-1).join("\n"):t,o=!!e.match(/\|\s*$/),r=e+(o?"":"|")+`\n|${" --- |".repeat(n)}`;return dk.lexer(r)}}function Ak(e,t){var i;const n=globalThis.MonacoEnvironment;if(null==n?void 0:n.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(s){return void r(s)}try{return null===(i=window.trustedTypes)||void 0===i?void 0:i.createPolicy(e,t)}catch(s){return void r(s)}}class Ok{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=Pk(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=Pk(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=Pk(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=Pk(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=Pk(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=Pk(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=Pk(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=Pk(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=Pk(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=Pk(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=Pk(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function Pk(e){return"number"==typeof e?`${e}px`:e}function Fk(e){return new Ok(e)}function Bk(e,t){e instanceof Ok?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}var Wk=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Vk={getInitialState:()=>xC,tokenizeEncoded:(e,t,i)=>EC(0,i)};function Hk(e,t,i,n,s,o,r){let a="
    ",l=n,h=0,d=!0;for(let c=0,u=t.getCount();c0;)r&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="\ufffd",d=!1;break;case 13:g+="​",d=!1;break;case 32:r&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,u>s||l>=s)break}return a+="
    ",a}function zk(e,t,i){let n='
    ';const s=so(e);let o=i.getInitialState();for(let r=0,a=s.length;r0&&(n+="
    ");const a=i.tokenizeEncoded(e,!0,o);RC.convertToEndOffset(a.tokens,e.length);const l=new RC(a.tokens,e,t).inflate();let h=0;for(let t=0,i=l.getCount();t${Qs(e.substring(h,s))}`,h=s}o=a.endState}return n+="
    ",n}const Uk=Pa("openerService");function Kk(e,t){return an.isUri(e)?fo(e.scheme,t):_o(e,t+":")}function jk(e,...t){return t.some((t=>Kk(e,t)))}var qk,$k=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Gk=function(e,t){return function(i,n){t(i,n,e)}},Zk=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Yk=qk=class{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new U,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e){return{element:document.createElement("span"),dispose:()=>{}}}const n=new N,s=n.add(mk(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(e,t)=>Zk(this,void 0,void 0,(function*(){var i,n,s;let o;e?o=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(o=null===(i=this._options.editor.getModel())||void 0===i?void 0:i.getLanguageId()),o||(o=zu);const r=yield function(e,t,i){return Wk(this,void 0,void 0,(function*(){if(!i)return zk(t,e.languageIdCodec,Vk);const n=yield DC.getOrCreate(i);return zk(t,e.languageIdCodec,n||Vk)}))}(this._languageService,t,o),a=document.createElement("span");if(a.innerHTML=null!==(s=null===(n=qk._ttpTokenizer)||void 0===n?void 0:n.createHTML(r))&&void 0!==s?s:r,this._options.editor){Bk(a,this._options.editor.getOption(50))}else this._options.codeBlockFontFamily&&(a.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(a.style.fontSize=this._options.codeBlockFontSize),a})),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:t=>Xk(this._openerService,t,e.isTrusted),disposables:t}}}};function Xk(e,t,i){return Zk(this,void 0,void 0,(function*(){try{return yield e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Qk(i)})}catch(Dre){return r(Dre),!1}}))}function Qk(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}Yk._ttpTokenizer=Ak("tokenizeToString",{createHTML:e=>e}),Yk=qk=$k([Gk(1,yc),Gk(2,Uk)],Yk);var Jk,eD=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},tD=function(e,t){return function(i,n){t(i,n,e)}};let iD=Jk=class{static get(e){return e.getContribution(Jk.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new I,this._messageListeners=new N,this._mouseOverMessage=!1,this._editor=e,this._visible=Jk.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;null===(e=this._message)||void 0===e||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;Os(Ta(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=Ta(e)?mk(e,{actionHandler:{callback:t=>Xk(this._openerService,t,Ta(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new nD(this._editor,t,"string"==typeof e?e:this._message.element),this._messageListeners.add(B.debounce(this._editor.onDidBlurEditorText,((e,t)=>t),0)((()=>{this._mouseOverMessage||this._messageWidget.value&&qn(Xn(),this._messageWidget.value.getDomNode())||this.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(En(this._messageWidget.value.getDomNode(),os.MOUSE_ENTER,(()=>this._mouseOverMessage=!0),!0)),this._messageListeners.add(En(this._messageWidget.value.getDomNode(),os.MOUSE_LEAVE,(()=>this._mouseOverMessage=!1),!0)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new Mh(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(nD.fadeOut(this._messageWidget.value))}};iD.ID="editor.contrib.messageController",iD.MESSAGE_VISIBLE=new Tl("messageVisible",!1,ue(0,"Whether the editor is currently showing an inline message")),iD=Jk=eD([tD(1,Rl),tD(2,Uk)],iD);wh(new(fh.bindToContribution(iD.get))({id:"leaveEditorMessage",precondition:iD.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class nD{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");"string"==typeof n?(o.classList.add("message"),o.textContent=n):(n.classList.add("message"),o.appendChild(n)),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}Lh(iD.ID,iD,4);const sD={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:yu.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"};var oD=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class rD{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t,i){var n;return oD(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(void 0===e||Pr(e)||e instanceof HTMLElement)s=e;else if($r(e.markdown)){this._hoverWidget||this.show(ue(0,"Loading..."),t),this._cancellationTokenSource=new Uh;const i=this._cancellationTokenSource.token;if(s=yield e.markdown(i),void 0===s&&(s=e.markdownNotSupportedFallback),this.isDisposed||i.isCancellationRequested)return}else s=null!==(n=e.markdown)&&void 0!==n?n:e.markdownNotSupportedFallback;this.show(s,t,i)}))}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s=Object.assign({content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n},i);this._hoverWidget=this.hoverDelegate.showHover(s,t)}null==n||n.dispose()}hasContent(e){return!!e&&(!Ta(e)||!!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}function aD(e,t,i,n){let s,o;const r=(t,i)=>{var n;const r=void 0!==o;t&&(null==o||o.dispose(),o=void 0),i&&(null==s||s.dispose(),s=void 0),r&&(null===(n=e.onDidHideHover)||void 0===n||n.call(e))},a=(s,r,a)=>new id((()=>oD(this,void 0,void 0,(function*(){o&&!o.isDisposed||(o=new rD(e,a||t,s>0),yield o.update(i,r,n))}))),s),l=En(t,os.MOUSE_OVER,(()=>{if(s)return;const i=new N;i.add(En(t,os.MOUSE_LEAVE,(e=>r(!1,e.fromElement===t)),!0));i.add(En(t,os.MOUSE_DOWN,(()=>r(!0,!0)),!0));const n={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{n.x=e.x+10,e.target instanceof HTMLElement&&e.target.classList.contains("action-label")&&r(!0,!0)};i.add(En(t,os.MOUSE_MOVE,e,!0))}i.add(a(e.delay,!1,n)),s=i}),!0);return{show:e=>{r(!1,!0),a(0,e)},hide:()=>{r(!0,!0)},update:(e,t)=>oD(this,void 0,void 0,(function*(){i=e,yield null==o?void 0:o.update(i,void 0,t)})),dispose:()=>{l.dispose(),r(!0,!0)}}}class lD{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}function hD(e,t,i){return Math.min(Math.max(e,t),i)}class dD{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class cD{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{try{e.releasePointerCapture(t)}catch(i){}})))}catch(r){o=window}this._hooks.add(En(o,os.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(En(o,os.POINTER_UP,(e=>this.stopMonitoring(!0))))}}class pD extends E{onclick(e,t){this._register(En(e,os.CLICK,(e=>t(new Nt(e)))))}onmousedown(e,t){this._register(En(e,os.MOUSE_DOWN,(e=>t(new Nt(e)))))}onmouseover(e,t){this._register(En(e,os.MOUSE_OVER,(e=>t(new Nt(e)))))}onmouseleave(e,t){this._register(En(e,os.MOUSE_LEAVE,(e=>t(new Nt(e)))))}onkeydown(e,t){this._register(En(e,os.KEY_DOWN,(e=>t(new St(e)))))}onkeyup(e,t){this._register(En(e,os.KEY_UP,(e=>t(new St(e)))))}oninput(e,t){this._register(En(e,os.INPUT,t))}onblur(e,t){this._register(En(e,os.BLUR,t))}onfocus(e,t){this._register(En(e,os.FOCUS,t))}ignoreGesture(e){return qL.ignoreTarget(e)}}const mD=11;class fD extends pD{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...ea.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new gD),this._register(Mn(this.bgDomNode,os.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(Mn(this.domNode,os.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new nd),this._pointerdownScheduleRepeatTimer=this._register(new id)}_arrowPointerDown(e){if(!(e.target&&e.target instanceof Element))return;this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet((()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault()}}class _D extends E{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new id)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{var e;null===(e=this._domNode)||void 0===e||e.setClassName(this._visibleClassName)}),0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,null===(t=this._domNode)||void 0===t||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}class vD extends pD{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new _D(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new gD),this._shouldRender=!0,this.domNode=Fk(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(En(this.domNode.domNode,os.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new fD(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=Fk(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(En(this.slider.domNode,os.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=Hn(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const s=this._sliderOrthogonalPointerPosition(e),o=Math.abs(s-i);if(Oe&&o>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class bD{constructor(e,t,i,n,s,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new bD(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){const o=Math.max(0,i-e),r=Math.max(0,o-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),h=(r-l)/(n-i),d=s*h;return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:h,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=bD._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new Et(null,1,0))}),this._createArrow({className:"scra",icon:Qr.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Et(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class wD extends vD{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new bD(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-mD)/2,i=(t.verticalScrollbarSize-mD)/2;this._createArrow({className:"scra",icon:Qr.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Et(null,0,1))}),this._createArrow({className:"scra",icon:Qr.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Et(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class yD{constructor(e,t,i,n,s,o,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,s|=0,o|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),r+s>o&&(r=o-s),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new yD(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new yD(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:a}}}class SD extends E{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new U),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new yD(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),null===(i=this._smoothScrolling)||void 0===i||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new DD(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=DD.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class LD{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function kD(e,t){const i=t-e;return function(t){return e+i*(1-function(e){return Math.pow(e,3)}(1-t))}}class DD{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e0&&Math.abs(e.deltaY)>0)return 1;let t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}ND.INSTANCE=new ND;class ED extends pD{get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new U),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new U),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,Pe&&(t.className+=" mac");return t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new wD(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new CD(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Fk(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Fk(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Fk(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new id),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=k(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Pe&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Et(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=k(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new Et(e))};this._mouseWheelToDispose.push(En(this._listenOnDomNode,os.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){var t;if(null===(t=e.browserEvent)||void 0===t?void 0:t.defaultPrevented)return;const i=ND.INSTANCE;i.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let t=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&s+t===0?s=t=0:Math.abs(t)>=Math.abs(s)?s=0:t=0),this._options.flipAxes&&([t,s]=[s,t]);const o=!Pe&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!o||s||(s=t,t=0),e.browserEvent&&e.browserEvent.altKey&&(s*=this._options.fastScrollSensitivity,t*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(t){const e=50*t,i=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,i)}if(s){const e=50*s,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}if(a=this._scrollable.validateScrollPosition(a),r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop){this._options.mouseWheelSmoothScroll&&i.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),n=!0}}let s=n;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"",o=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class ID extends ED{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new SD({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>An(e)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class MD extends ED{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class TD extends ED{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new SD({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>An(e)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}))),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}var RD;function AD(e,t){const i=[];for(const n of t){if(e.start>=n.range.end)continue;if(e.end=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],s={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return i(s)||n.push(s),i(o)||n.push(o),n}}(RD||(RD={}));class PD{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=null!=e?e:0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,s=AD({start:0,end:e},this.groups),o=AD({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:OD(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(const n of e){const e=n.range.start,s=n.range.end,o=n.size;i&&o===i.size?i.range.end=s:(i={range:{start:e,end:s},size:o},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(s,r,o),this._size=this._paddingTop+this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e){this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}})),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var BD=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const WD={CurrentDragAndDropData:void 0},VD={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class HD{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class zD{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class UD{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class jD{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:Un(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=VD){var s,o,r,a,l,h,d,c,u,g,p,m,f;if(this.virtualDelegate=t,this.domId="list_id_"+ ++jD.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Xh(50),this.splicing=!1,this.dragOverAnimationStopDisposable=E.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=E.None,this.onDragLeaveTimeout=E.None,this.disposables=new N,this._onDidChangeContentHeight=new U,this._onDidChangeContentWidth=new U,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new PD(null!==(s=n.paddingTop)&&void 0!==s?s:0);for(const _ of i)this.renderers.set(_.templateId,_);this.cache=this.disposables.add(new FD(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=null!==(o=n.horizontalScrolling)&&void 0!==o?o:VD.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=void 0===n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new KD(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";(null!==(r=n.transformOptimization)&&void 0!==r?r:VD.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(qL.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new SD({forceIntegerValues:!0,smoothScrollDuration:null!==(a=n.smoothScrolling)&&void 0!==a&&a?125:0,scheduleAtNextAnimationFrame:e=>An(e)})),this.scrollableElement=this.disposables.add(new MD(this.rowsContainer,{alwaysConsumeMouseWheel:null!==(l=n.alwaysConsumeMouseWheel)&&void 0!==l?l:VD.alwaysConsumeMouseWheel,horizontal:1,vertical:null!==(h=n.verticalScrollMode)&&void 0!==h?h:VD.verticalScrollMode,useShadows:null!==(d=n.useShadows)&&void 0!==d?d:VD.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(En(this.rowsContainer,KL.Change,(e=>this.onTouchChange(e)))),this.disposables.add(En(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add(En(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add(En(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add(En(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add(En(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=null!==(c=n.setRowLineHeight)&&void 0!==c?c:VD.setRowLineHeight,this.setRowHeight=null!==(u=n.setRowHeight)&&void 0!==u?u:VD.setRowHeight,this.supportDynamicHeights=null!==(g=n.supportDynamicHeights)&&void 0!==g?g:VD.supportDynamicHeights,this.dnd=null!==(p=n.dnd)&&void 0!==p?p:this.disposables.add(VD.dnd),this.layout(null===(m=n.initialSize)||void 0===m?void 0:m.height,null===(f=n.initialSize)||void 0===f?void 0:f.width)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t=Object.assign(Object.assign({},null!=t?t:{}),{scrollByPage:e.scrollByPage})),void 0!==e.mouseWheelScrollSensitivity&&(t=Object.assign(Object.assign({},null!=t?t:{}),{mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity})),void 0!==e.fastScrollSensitivity&&(t=Object.assign(Object.assign({},null!=t?t:{}),{fastScrollSensitivity:e.fastScrollSensitivity})),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},o=RD.intersect(n,s),r=new Map;for(let C=o.end-1;C>=o.start;C--){const e=this.items[C];if(e.dragStartDisposable.dispose(),e.checkedDisposable.dispose(),e.row){let t=r.get(e.templateId);t||(t=[],r.set(e.templateId,t));const i=this.renderers.get(e.templateId);i&&i.disposeElement&&i.disposeElement(e.element,C,e.row.templateData,e.size),t.push(e.row)}e.row=null}const a={start:e+t,end:this.items.length},l=RD.intersect(a,n),h=RD.relativeComplement(a,n),d=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:E.None,checkedDisposable:E.None})));let c;0===e&&t>=this.items.length?(this.rangeMap=new PD(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),c=this.items,this.items=d):(this.rangeMap.splice(e,t,d),c=this.items.splice(e,t,...d));const u=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=OD(l,u),m=RD.intersect(g,p);for(let C=m.start;COD(e,u))),v=[{start:e,end:e+i.length},..._].map((e=>RD.intersect(g,e))),b=this.getNextToLastElement(v);for(const C of v)for(let e=C.start;ee.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=An((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){const e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),t=this.rangeMap.positionAt(e.start),i=this.rangeMap.positionAt(e.start+1);if(-1!==i){if((i-t)/2+t{for(const e of l)for(let t=e.start;tn.row.domNode.setAttribute("aria-checked",String(!!e));e(r.value),n.checkedDisposable=r.onDidChange(e)}!s&&n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const a=this.renderers.get(n.templateId);if(!a)throw new Error(`No renderer found for template id ${n.templateId}`);null==a||a.renderElement(n.element,e,n.row.templateData,n.size);const l=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!l,l&&(n.dragStartDisposable=En(n.row.domNode,"dragstart",(e=>this.onDragStart(n.element,l,e)))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=Un(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return B.map(this.disposables.add(new Hy(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return B.map(this.disposables.add(new Hy(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return B.filter(B.map(this.disposables.add(new Hy(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return B.map(this.disposables.add(new Hy(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return B.map(this.disposables.add(new Hy(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return B.map(this.disposables.add(new Hy(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return B.any(B.map(this.disposables.add(new Hy(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),B.map(this.disposables.add(new Hy(this.domNode,KL.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return B.map(this.disposables.add(new Hy(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return B.map(this.disposables.add(new Hy(this.rowsContainer,KL.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){var n,s;if(!i.dataTransfer)return;const o=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(sD.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(o,i)),void 0===e&&(e=String(o.length));const t=fs(".monaco-drag-image");t.textContent=e;const n=(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||document.body})(this.domNode);n.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>n.removeChild(t)),0)}this.domNode.classList.add("dragging"),this.currentDragData=new HD(o),WD.CurrentDragAndDropData=new zD(o),null===(s=(n=this.dnd).onDragStart)||void 0===s||s.call(n,this.currentDragData,i)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),WD.CurrentDragAndDropData&&"vscode-ui"===WD.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(WD.CurrentDragAndDropData)this.currentDragData=WD.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new UD}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof i?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let n;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof i&&0===i.effect?"copy":"move",n="boolean"!=typeof i&&i.feedback?i.feedback:void 0===e.index?[-1]:[e.index],n=Vd(n).filter((e=>e>=-1&&ee-t)),n=-1===n[0]?[-1]:n,s=this.currentDragFeedback,o=n,Array.isArray(s)&&Array.isArray(o)?Id(s,o):s===o)return!0;var s,o;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),-1===n[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=x((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of n){const i=this.items[e];i.dropTarget=!0,null===(t=i.row)||void 0===t||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=x((()=>{var e;for(const t of n){const i=this.items[t];i.dropTarget=!1,null===(e=i.row)||void 0===e||e.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=ed((()=>this.clearDragOverFeedback()),100,this.disposables),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,WD.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,WD.CurrentDragAndDropData=void 0,null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=E.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=Vn(this.domNode).top;this.dragOverAnimationDisposable=function(e){const t=()=>{e(),i=An(t)};let i=An(t);return x((()=>i.dispose()))}(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=ed((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,o;e===this.elementTop(n.start)?(s=n.start,o=0):n.end-n.start>1&&(s=n.start+1,o=this.elementTop(s)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ZD=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class YD{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class XD{get name(){return this._trait}get renderer(){return new YD(this)}constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new U,this.onChange=this._onChange.event}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const s=i.length-t,o=e+t,r=[];let a=0;for(;a=o;)r.push(this.sortedIndexes[a++]+s);const l=this.length+s;if(this.sortedIndexes.length>0&&0===r.length&&l>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:l-1;r.push(Math.min(t,l-1))}this.renderer.splice(e,t,i.length),this._set(r,r),this.length=l}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(mx),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=px(s,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return Md(this.sortedIndexes,e,mx)>=0}dispose(){k(this._onChange)}}GD([UL],XD.prototype,"renderer",null);class QD extends XD{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class JD{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString()));if(0===n.length)return this.trait.splice(e,t,new Array(i.length).fill(!1));const s=new Set(n),o=i.map((e=>s.has(this.identityProvider.getId(e).toString())));this.trait.splice(e,t,o)}}function ex(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function tx(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&(!!e.parentElement&&tx(e.parentElement))}function ix(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&(!!e.parentElement&&ix(e.parentElement))}class nx{get onKeyDown(){return B.chain(this.disposables.add(new Hy(this.view.domNode,"keydown")).event,(e=>e.filter((e=>!ex(e.target))).map((e=>new St(e)))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new N,this.multipleSelectionDisposables=new N,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown((e=>{switch(e.keyCode){case 3:return this.onEnter(e);case 16:return this.onUpArrow(e);case 18:return this.onDownArrow(e);case 11:return this.onPageUpArrow(e);case 12:return this.onPageDownArrow(e);case 9:return this.onEscape(e);case 31:this.multipleSelectionSupport&&(Pe?e.metaKey:e.ctrlKey)&&this.onCtrlA(e)}})))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(zd(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}GD([UL],nx.prototype,"onKeyDown",null),function(e){e[e.Automatic=0]="Automatic",e[e.Trigger=1]="Trigger"}(qD||(qD={})),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}($D||($D={}));const sx=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=98&&e.keyCode<=107||e.keyCode>=85&&e.keyCode<=95)}};class ox{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=$D.Idle,this.mode=qD.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new N,this.disposables=new N,this.updateOptions(e.options)}updateOptions(e){var t,i;null===(t=e.typeNavigationEnabled)||void 0===t||t?this.enable():this.disable(),this.mode=null!==(i=e.typeNavigationMode)&&void 0!==i?i:qD.Automatic}enable(){if(this.enabled)return;let e=!1;const t=B.chain(this.enabledDisposables.add(new Hy(this.view.domNode,"keydown")).event,(t=>t.filter((e=>!ex(e.target))).filter((()=>this.mode===qD.Automatic||this.triggered)).map((e=>new St(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>as(e,!0))).map((e=>e.browserEvent.key)))),i=B.debounce(t,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables);B.reduce(B.any(t,i),((e,t)=>null===t?null:(e||"")+t),void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t((()=>e=!0),void 0,this.enabledDisposables),i((()=>e=!1),void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&Os(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=$D.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===$D.Idle?1:0;this.state=$D.Typing;for(let s=0;s1&&1===n.length)return this.previouslyFocused=i,this.list.setFocus([t]),void this.list.reveal(t)}}}else if(void 0===r||qo(e,r))return this.previouslyFocused=i,this.list.setFocus([t]),void this.list.reveal(t)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class rx{constructor(e,t){this.list=e,this.view=t,this.disposables=new N;const i=B.chain(this.disposables.add(new Hy(t.domNode,"keydown")).event,(e=>e.filter((e=>!ex(e.target))).map((e=>new St(e))))),n=B.chain(i,(e=>e.filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)))));n(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const s=window.getComputedStyle(n);"hidden"!==s.visibility&&"none"!==s.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function ax(e){return Pe?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function lx(e){return e.browserEvent.shiftKey}const hx={isSelectionSingleChangeEvent:ax,isSelectionRangeChangeEvent:lx};class dx{constructor(e){this.list=e,this.disposables=new N,this._onPointer=new U,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||hx),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(qL.addTarget(e.getHTMLElement()))),B.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||hx))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){tx(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(ex(e.browserEvent.target)||tx(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(ex(e.browserEvent.target)||tx(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(ex(e.browserEvent.target)||tx(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=zd(Math.min(i,t),Math.max(i,t)+1),s=this.list.getSelection(),o=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let s=i-1;for(;s>=0&&e[s]===t-(i-s);)n.push(e[s--]);n.reverse(),s=i;for(;s=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){n++,s++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class cx{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,i;const n=this.selectorSuffix&&`.${this.selectorSuffix}`,s=[];e.listBackground&&s.push(`.monaco-list${n} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(s.push(`.monaco-list${n}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),s.push(`.monaco-list${n}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(s.push(`.monaco-list${n}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),s.push(`.monaco-list${n}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(s.push(`.monaco-list${n} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),s.push(`.monaco-list${n} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&s.push(`.monaco-list${n} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(s.push(`.monaco-list${n} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),s.push(`.monaco-list${n} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(s.push(`.monaco-list${n} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),s.push(`.monaco-list${n} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&s.push(`.monaco-list${n} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&s.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&s.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const o=Ss(e.listFocusAndSelectionOutline,Ss(e.listSelectionOutline,null!==(t=e.listFocusOutline)&&void 0!==t?t:""));o&&s.push(`.monaco-list${n}:focus .monaco-list-row.focused.selected { outline: 1px solid ${o}; outline-offset: -1px;}`),e.listFocusOutline&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const r=Ss(e.listSelectionOutline,null!==(i=e.listInactiveFocusOutline)&&void 0!==i?i:"");r&&s.push(`.monaco-list${n} .monaco-list-row.focused.selected { outline: 1px dotted ${r}; outline-offset: -1px; }`),e.listSelectionOutline&&s.push(`.monaco-list${n} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&s.push(`.monaco-list${n} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&s.push(`.monaco-list${n} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&s.push(`\n\t\t\t\t.monaco-list${n}.drop-target,\n\t\t\t\t.monaco-list${n} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${n} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.tableColumnsBorder&&s.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&s.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=s.join("\n")}}const ux={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:rc.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:rc.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:rc.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},gx={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}}};function px(e,t){const i=[];let n=0,s=0;for(;n=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){i.push(e[n]),n++,s++;continue}e[n]e-t;class fx{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let s=0;for(const o of this.renderers)o.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){var s;let o=0;for(const r of this.renderers)null===(s=r.disposeElement)||void 0===s||s.call(r,e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class _x{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof s?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class vx{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var s,o;null===(o=(s=this.dnd).onDragLeave)||void 0===o||o.call(s,e,t,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}dispose(){this.dnd.dispose()}}class bx{get onDidChangeFocus(){return B.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return B.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=B.chain(this.disposables.add(new Hy(this.view.domNode,"keydown")).event,(t=>t.map((e=>new St(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>as(e,!0))).filter((()=>!1)))),i=B.chain(this.disposables.add(new Hy(this.view.domNode,"keyup")).event,(t=>t.forEach((()=>e=!1)).map((e=>new St(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>as(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})))),n=B.chain(this.view.onContextMenu,(t=>t.filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new Nt(i),browserEvent:i})))));return B.any(t,i,n)}get onKeyDown(){return this.disposables.add(new Hy(this.view.domNode,"keydown")).event}get onDidFocus(){return B.signal(this.disposables.add(new Hy(this.view.domNode,"focus",!0)).event)}constructor(e,t,i,n,s=gx){var o,r,a,l;this.user=e,this._options=s,this.focus=new XD("focused"),this.anchor=new XD("anchor"),this.eventBufferer=new Z,this._ariaLabel="",this.disposables=new N,this._onDidDispose=new U,this.onDidDispose=this._onDidDispose.event;const h=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(o=this._options.accessibilityProvider)||void 0===o?void 0:o.getWidgetRole():"list";this.selection=new QD("listbox"!==h);const d=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(d.push(new _x(this.accessibilityProvider)),null===(a=(r=this.accessibilityProvider).onDidChangeActiveDescendant)||void 0===a||a.call(r,this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map((e=>new fx(e.templateId,[...d,e])));const c=Object.assign(Object.assign({},s),{dnd:s.dnd&&new vx(this,s.dnd)});if(this.view=this.createListView(t,i,n,c),this.view.domNode.setAttribute("role",h),s.styleController)this.styleController=s.styleController(this.view.domId);else{const e=Jn(this.view.domNode);this.styleController=new cx(e,this.view.domId)}if(this.spliceable=new lD([new JD(this.focus,this.view,s.identityProvider),new JD(this.selection,this.view,s.identityProvider),new JD(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new rx(this,this.view)),("boolean"!=typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new nx(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||sx;this.typeNavigationController=new ox(this,this.view,s.keyboardNavigationLabelProvider,null!==(l=s.keyboardNavigationEventFilter)&&void 0!==l?l:()=>!0,e),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new jD(e,t,i,n)}createMouseController(e){return new dx(this)}updateOptions(e={}){var t,i;this._options=Object.assign(Object.assign({},this._options),e),null===(t=this.typeNavigationController)||void 0===t||t.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(i=this.keyboardController)||void 0===i||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new uD(this.user,`Invalid start index: ${e}`);if(t<0)throw new uD(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new uD(this.user,`Invalid index ${i}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new uD(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return Hd(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new uD(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findNextIndex(s.length>0?s[0]+e:0,t,n);o>-1&&this.setFocus([o],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);o>-1&&this.setFocus([o],i)}focusNextPage(e,t){return ZD(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{const s=this.view.getScrollTop();let o=s+this.view.renderHeight;i>n&&(o-=this.view.elementHeight(i)),this.view.setScrollTop(o),this.view.getScrollTop()!==s&&(this.setFocus([]),yield Jh(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return ZD(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const s=this.getFocus()[0];if(s!==i&&(void 0===s||s>=i)){const n=this.findNextIndex(i,!1,t);n>-1&&s!==n?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield Jh(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new uD(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(Wr(t)){const e=s-this.view.renderHeight;this.view.setScrollTop(e*hD(t,0,1)+n)}else{const e=n+s,t=i+this.view.renderHeight;n=t||(n=t&&s>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(e){return this.view.getElementDomId(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}GD([UL],bx.prototype,"onDidChangeFocus",null),GD([UL],bx.prototype,"onDidChangeSelection",null),GD([UL],bx.prototype,"onContextMenu",null),GD([UL],bx.prototype,"onKeyDown",null),GD([UL],bx.prototype,"onDidFocus",null);const Cx=fs,wx="selectOption.entry.template";class yx{get templateId(){return wx}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=ds(e,Cx(".option-text")),t.detail=ds(e,Cx(".option-detail")),t.decoratorRight=ds(e,Cx(".option-decorator-right")),t}renderElement(e,t,i){const n=i,s=e.text,o=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=s,n.detail.textContent=o||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class Sx extends E{constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=Sx.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new U,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return wx}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=fs(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=ds(this.selectDropDownContainer,Cx(".select-box-details-pane"));const t=ds(this.selectDropDownContainer,Cx(".select-box-dropdown-container-width-control")),i=ds(t,Cx(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",ds(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=Jn(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(En(this.selectDropDownContainer,os.DRAG_START,(e=>{as(e,!0)})))}registerListeners(){let e;this._register(Mn(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}))),this._register(En(this.selectElement,os.CLICK,(e=>{as(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(En(this.selectElement,os.MOUSE_DOWN,(e=>{as(e)}))),this._register(En(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(En(this.selectElement,"touchend",(t=>{as(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(En(this.selectElement,os.KEY_DOWN,(e=>{const t=new St(e);let i=!1;Pe?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),as(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){Id(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;null===(e=this.selectList)||void 0===e||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){var e,t,i;const n=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",s=null!==(t=this.styles.selectForeground)&&void 0!==t?t:"",o=null!==(i=this.styles.selectBorder)&&void 0!==i?i:"";this.selectElement.style.backgroundColor=n,this.selectElement.style.color=s,this.selectElement.style.borderColor=o}styleList(){var e,t;const i=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",n=Ss(this.styles.selectListBackground,i);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const s=null!==(t=this.styles.focusBorder)&&void 0!==t?t:"";this.selectDropDownContainer.style.outlineColor=s,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch(t){}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach(((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)})),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=Hn(this.selectElement),i=getComputedStyle(this.selectElement),n=parseFloat(i.getPropertyValue("--dropdown-padding-top"))+parseFloat(i.getPropertyValue("--dropdown-padding-bottom")),s=window.innerHeight-t.top-t.height-(this.selectBoxOptions.minBottomMargin||0),o=t.top-Sx.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,r=this.selectElement.offsetWidth,a=this.setWidthControlElement(this.widthControlElement),l=Math.max(a,Math.round(r)).toString()+"px";this.selectDropDownContainer.style.width=l,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const d=this._hasDetails?this._cachedMaxDetailsHeight:0,c=h+n+d,u=Math.floor((s-n-d)/this.getHeight()),g=Math.floor((o-n-d)/this.getHeight());if(e)return!(t.top+t.height>window.innerHeight-22||t.topu&&this.options.length>u?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(t.top+t.height>window.innerHeight-22||t.tops&&(h=u*this.getHeight())}else c>o&&(h=g*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=h+n+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=h+n+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=l,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const s=e.detail?e.detail.length:0,o=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+s+o;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=zn(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=ds(e,Cx(".select-box-dropdown-list-container")),this.listRenderer=new yx,this.selectList=new bx("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>ue(0,"Select Box"),getRole:()=>Pe?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new Hy(this.selectDropDownListContainer,"keydown")),i=B.chain(t.event,(e=>e.filter((()=>this.selectList.length>0)).map((e=>new St(e)))));this._register(B.chain(i,(e=>e.filter((e=>3===e.keyCode))))(this.onEnter,this)),this._register(B.chain(i,(e=>e.filter((e=>2===e.keyCode))))(this.onEnter,this)),this._register(B.chain(i,(e=>e.filter((e=>9===e.keyCode))))(this.onEscape,this)),this._register(B.chain(i,(e=>e.filter((e=>16===e.keyCode))))(this.onUpArrow,this)),this._register(B.chain(i,(e=>e.filter((e=>18===e.keyCode))))(this.onDownArrow,this)),this._register(B.chain(i,(e=>e.filter((e=>12===e.keyCode))))(this.onPageDown,this)),this._register(B.chain(i,(e=>e.filter((e=>11===e.keyCode))))(this.onPageUp,this)),this._register(B.chain(i,(e=>e.filter((e=>14===e.keyCode))))(this.onHome,this)),this._register(B.chain(i,(e=>e.filter((e=>13===e.keyCode))))(this.onEnd,this)),this._register(B.chain(i,(e=>e.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))))(this.onCharacter,this)),this._register(En(this.selectList.getHTMLElement(),os.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>void 0!==e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(En(this.selectDropDownContainer,os.FOCUS_OUT,(e=>{this._isVisible&&!qn(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()}))),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;as(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n{for(let t=0;tthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){if(this.selected>0){as(e,!0);this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onPageUp(e){as(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){as(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){as(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=gt.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(En(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(Mn(this.selectElement,"click",(e=>{as(e,!0)}))),this._register(Mn(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(Mn(this.selectElement,"keydown",(e=>{let t=!1;Pe?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&Id(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Ua)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(qL.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,ne&&this._register(En(e,os.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(sD.TEXT,this._action.label)})))),this._register(En(t,KL.Tap,(e=>this.onClick(e,!0)))),this._register(En(t,os.MOUSE_DOWN,(e=>{i||as(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),Pe&&this._register(En(t,os.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register(En(t,os.CLICK,(e=>{as(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register(En(t,os.DBLCLICK,(e=>{as(e,!0)}))),[os.MOUSE_UP,os.MOUSE_OUT].forEach((e=>{this._register(En(t,e,(e=>{as(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;as(e,!0);const n=Kr(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=aD(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class xx extends Dx{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=ds(this.element,fs("a.action-label"))),this.label&&this.label.setAttribute("role",this.getDefaultAriaRole()),this.options.label&&this.options.keybinding&&this.element&&(ds(this.element,fs("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Ka.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=ue(0,"{0} ({1})",e,this.options.keybinding))),null!=e?e:void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):null===(e=this.label)||void 0===e||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),null===(e=this.element)||void 0===e||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),null===(t=this.element)||void 0===t||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.setAttribute("aria-checked",""),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class Nx extends Dx{constructor(e,t,i,n,s,o,r){super(e,t),this.selectBox=new kx(i,n,s,o,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;null===(e=this.selectBox)||void 0===e||e.focus()}blur(){var e;null===(e=this.selectBox)||void 0===e||e.blur()}render(e){this.selectBox.render(e)}}var Ex=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Ix extends E{constructor(e,t={}){var i,n,s,o,r,a;let l,h;switch(super(),this._actionRunnerDisposables=this._register(new N),this.viewItemDisposables=this._register(new R),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new U),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new U({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new U),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new U),this.onWillRun=this._onWillRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys={keyDown:null!==(o=null===(s=this.options.triggerKeys)||void 0===s?void 0:s.keyDown)&&void 0!==o&&o,keys:null!==(a=null===(r=this.options.triggerKeys)||void 0===r?void 0:r.keys)&&void 0!==a?a:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Ua,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:l=[15],h=[17];break;case 1:l=[16],h=[18],this.domNode.className+=" vertical"}this._register(En(this.domNode,os.KEY_DOWN,(e=>{const t=new St(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;l&&(t.equals(l[0])||t.equals(l[1]))?i=this.focusPrevious():h&&(t.equals(h[0])||t.equals(h[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof Dx&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(En(this.domNode,os.KEY_UP,(e=>{const t=new St(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(hs(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{Xn()!==this.domNode&&qn(Xn(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof Dx&&e.isEnabled()));e instanceof Dx&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof Dx&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){var t;if("number"==typeof e)return null===(t=this.viewItems[e])||void 0===t?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{const i=document.createElement("li");let s;i.className="action-item",i.setAttribute("role","presentation");const o=Object.assign({hoverDelegate:this.options.hoverDelegate},t);this.options.actionViewItemProvider&&(s=this.options.actionViewItemProvider(e,o)),s||(s=new xx(this.context,e,o)),this.options.allowContextMenu||this.viewItemDisposables.set(s,En(i,os.CONTEXT_MENU,(e=>{as(e,!0)}))),s.actionRunner=this._actionRunner,s.setActionContext(this.context),s.render(i),this.focusable&&s instanceof Dx&&0===this.viewItems.length&&s.setFocusable(!0),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(s)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,s),n++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=k(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),Dn(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===Ka.ID));return this.updateFocus(),!0}focusPrevious(e){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===Ka.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&(null===(n=this.viewItems[this.previouslyFocusedItem])||void 0===n||n.blur());const s=void 0!==this.focusedItem&&this.viewItems[this.focusedItem];if(s){let n=!0;$r(s.focus)||(n=!1),this.options.focusOnlyEnabledItems&&$r(s.isEnabled)&&!s.isEnabled()&&(n=!1),s.action.id===Ka.ID&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof Dx){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return Ex(this,void 0,void 0,(function*(){yield this._actionRunner.run(e,t)}))}dispose(){this._context=void 0,this.viewItems=k(this.viewItems),this.getContainer().remove(),super.dispose()}}class Mx{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let s=0,o=t.length;s=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},iN=function(e,t){return function(i,n){t(i,n,e)}},nN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const sN="acceptSelectedCodeAction",oN="previewSelectedCodeAction";class rN{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){var n,s;i.text.textContent=null!==(s=null===(n=e.group)||void 0===n?void 0:n.title)&&void 0!==s?s:""}disposeTemplate(e){}}let aN=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);return{container:e,icon:t,text:i,keybinding:new Wx(e,$e)}}renderElement(e,t,i){var n,s,o;if((null===(n=e.group)||void 0===n?void 0:n.icon)?(i.icon.className=ea.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=Cp(e.group.icon.color.id))):(i.icon.className=ea.asClassName(Qr.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=uN(e.label),i.keybinding.set(e.keybinding),function(e,...t){e?_s(...t):vs(...t)}(!!e.keybinding,i.keybinding.element);const r=null===(s=this._keybindingService.lookupKeybinding(sN))||void 0===s?void 0:s.getLabel(),a=null===(o=this._keybindingService.lookupKeybinding(oN))||void 0===o?void 0:o.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:r&&a?this._supportsPreview&&e.canPreview?i.container.title=ue(0,"{0} to apply, {1} to preview",r,a):i.container.title=ue(0,"{0} to apply",r):i.container.title=""}disposeTemplate(e){}};aN=tN([iN(1,PL)],aN);class lN extends UIEvent{constructor(){super("acceptSelectedAction")}}class hN extends UIEvent{constructor(){super("previewSelectedAction")}}function dN(e){if("action"===e.kind)return e.label}let cN=class extends E{constructor(e,t,i,n,s,o){super(),this._delegate=n,this._contextViewService=s,this._keybindingService=o,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new Uh),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new bx(e,this.domNode,r,[new aN(t,this._keybindingService),new rN],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:dN},accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?uN(null==e?void 0:e.label):"";return e.disabled&&(t=ue(0,"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>ue(0,"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Zx),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this.onFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const n=this._allMenuItems.map(((e,t)=>{const i=document.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0})),s=Math.max(...n,e),o=Math.min(i,.7*document.body.clientHeight);return this._list.layout(o,s),this.domNode.style.height=`${o}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new hN:new lN;this._list.setSelection([i],s)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof hN):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const i=this._list.getFocus();if(0===i.length)return;const n=i[0],s=this._list.element(n);null===(t=(e=this._delegate).onFocus)||void 0===t||t.call(e,s.item)}onListHover(e){return nN(this,void 0,void 0,(function*(){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&"action"===t.kind){const e=yield this._delegate.onHover(t.item,this.cts.token);t.canPreview=e?e.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus("number"==typeof e.index?[e.index]:[])}))}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function uN(e){return e.replace(/\r\n|\r|\n/g," ")}cN=tN([iN(4,Vx),iN(5,PL)],cN);var gN=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},pN=function(e,t){return function(i,n){t(i,n,e)}};Sp("actionBar.toggledBackground",{dark:Fp,light:Fp,hcDark:Fp,hcLight:Fp},ue(0,"Background color for toggled action items in action bar."));const mN={Visible:new Tl("codeActionMenuVisible",!1,ue(0,"Whether the action widget list is visible"))},fN=Pa("actionWidgetService");let _N=class extends E{get isVisible(){return mN.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new I)}show(e,t,i,n,s,o,r){const a=mN.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(cN,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>s,render:e=>(a.set(!0),this._renderWidget(e,l,null!=r?r:[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},o,!1)}acceptSelected(e){var t;null===(t=this._list.value)||void 0===t||t.acceptSelected(e)}focusPrevious(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusPrevious()}focusNext(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusNext()}hide(){var e;null===(e=this._list.value)||void 0===e||e.hide(),this._list.clear()}_renderWidget(e,t,i){var n;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,!this._list.value)throw new Error("List has no value");s.appendChild(this._list.value.domNode);const o=new N,r=document.createElement("div"),a=e.appendChild(r);a.classList.add("context-view-block"),o.add(En(a,os.MOUSE_DOWN,(e=>e.stopPropagation())));const l=document.createElement("div"),h=e.appendChild(l);h.classList.add("context-view-pointerBlock"),o.add(En(h,os.POINTER_MOVE,(()=>h.remove()))),o.add(En(h,os.MOUSE_DOWN,(()=>h.remove())));let d=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(s.appendChild(e.getContainer().parentElement),o.add(e),d=e.getContainer().offsetWidth)}const c=null===(n=this._list.value)||void 0===n?void 0:n.layout(d);s.style.width=`${c}px`;const u=o.add(hs(e));return o.add(u.onDidBlur((()=>this.hide()))),o}_createActionBar(e,t){if(!t.length)return;const i=fs(e),n=new Ix(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;null===(t=this._list.value)||void 0===t||t.hide(e)}};_N=gN([pN(0,Vx),pN(1,Rl),pN(2,Oa)],_N),Cu(fN,_N,1);const vN=1100;var bN,CN;oh(class extends sh{constructor(){super({id:"hideCodeActionWidget",title:{value:ue(0,"Hide action widget"),original:"Hide action widget"},precondition:mN.Visible,keybinding:{weight:vN,primary:9,secondary:[1033]}})}run(e){e.get(fN).hide()}}),oh(class extends sh{constructor(){super({id:"selectPrevCodeAction",title:{value:ue(0,"Select previous action"),original:"Select previous action"},precondition:mN.Visible,keybinding:{weight:vN,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(fN);t instanceof _N&&t.focusPrevious()}}),oh(class extends sh{constructor(){super({id:"selectNextCodeAction",title:{value:ue(0,"Select next action"),original:"Select next action"},precondition:mN.Visible,keybinding:{weight:vN,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(fN);t instanceof _N&&t.focusNext()}}),oh(class extends sh{constructor(){super({id:sN,title:{value:ue(0,"Accept selected action"),original:"Accept selected action"},precondition:mN.Visible,keybinding:{weight:vN,primary:3,secondary:[2137]}})}run(e){const t=e.get(fN);t instanceof _N&&t.acceptSelected()}}),oh(class extends sh{constructor(){super({id:oN,title:{value:ue(0,"Preview selected action"),original:"Preview selected action"},precondition:mN.Visible,keybinding:{weight:vN,primary:2051}})}run(e){const t=e.get(fN);t instanceof _N&&t.acceptSelected(!0)}}),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(bN||(bN={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=ue(0,"Error"),t[e.Warning]=ue(0,"Warning"),t[e.Info]=ue(0,"Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case dL.Error:return e.Error;case dL.Warning:return e.Warning;case dL.Info:return e.Info;case dL.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return dL.Error;case e.Warning:return dL.Warning;case e.Info:return dL.Info;case e.Hint:return dL.Ignore}}}(bN||(bN={})),function(e){const t="";function i(e,i){const n=[t];return e.source?n.push(e.source.replace("\xa6","\\\xa6")):n.push(t),e.code?"string"==typeof e.code?n.push(e.code.replace("\xa6","\\\xa6")):n.push(e.code.value.replace("\xa6","\\\xa6")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(bN.toString(e.severity)):n.push(t),e.message&&i?n.push(e.message.replace("\xa6","\\\xa6")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("\xa6")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(CN||(CN={}));const wN=Pa("markerService");var yN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const SN=new Tl("supportedCodeAction","");class LN extends E{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new id),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._tryAutoTrigger())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>_a(e,t.uri)))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:fL.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),s=t.getLineContent(e);if(0===s.length)return;if(1===n){if(/\s/.test(s[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[n-2])&&/\s/.test(s[n-1]))return}return i}}var kN;!function(e){e.Empty={type:0};e.Triggered=class{constructor(e,t,i){this.trigger=e,this.position=t,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if(d(e))return DN;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(kN||(kN={}));const DN=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class xN extends E{constructor(e,t,i,n,s,o){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=o,this._codeActionOracle=this._register(new I),this._state=kN.Empty,this._onDidChangeState=this._register(new U),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=SN.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(kN.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return!!this._configurationService&&this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickfixes",{resource:null==t?void 0:t.uri})}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(kN.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap((e=>{var t;return null!==(t=e.providedCodeActionKinds)&&void 0!==t?t:[]}));this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new LN(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(kN.Empty);const n=t.selection.getStartPosition(),s=Gh((i=>yN(this,void 0,void 0,(function*(){var n,s,o,r,a,l;if(this._settingEnabledNearbyQuickfixes()&&1===t.trigger.type&&(t.trigger.triggerAction===fL.QuickFix||(null===(s=null===(n=t.trigger.filter)||void 0===n?void 0:n.include)||void 0===s?void 0:s.contains(vL.QuickFix)))){const n=yield TL(this._registry,e,t.selection,t.trigger,pL.None,i);if(i.isCancellationRequested)return DN;if(!(null===(o=n.validActions)||void 0===o?void 0:o.some((e=>!!e.action.kind&&vL.QuickFix.contains(new vL(e.action.kind)))))){const s=this._markerService.read({resource:e.uri});if(s.length>0){const o=t.selection.getPosition();let h=o,d=Number.MAX_VALUE,c=!1;for(const e of s){const t=e.endColumn,i=e.endLineNumber,n=e.startLineNumber;(i===o.lineNumber||n===o.lineNumber)&&Math.abs(o.column-t){e.highlightRange=e.action.isPreferred})),c.push(...d.validActions)),{validActions:c,allActions:n.allActions,documentation:n.documentation,hasAutoFix:n.hasAutoFix,dispose:()=>{n.dispose()}}}}}}return TL(this._registry,e,t.selection,t.trigger,pL.None,i)}))));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(s,250)),this.setState(new kN.Triggered(t.trigger,n,s))}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:fL.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;null===(t=this._codeActionOracle.value)||void 0===t||t.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||this._disposed||this._onDidChangeState.fire(e))}}var NN,EN=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},IN=function(e,t){return function(i,n){t(i,n,e)}},MN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let TN=NN=class extends E{static get(e){return e.getContribution(NN.ID)}constructor(e,t,i,n,s,o,r,a,l,h){super(),this._commandService=r,this._configurationService=a,this._actionWidgetService=l,this._instantiationService=h,this._activeCodeActions=this._register(new I),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new xN(this._editor,s.codeActionProvider,t,i,o,a)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._lightBulbWidget=new Gs((()=>{const e=this._editor.getContribution(XL.ID);return e&&this._register(e.onClick((e=>this.showCodeActionList(e.actions,e,{includeDisabledActions:!1,fromLightbulb:!0})))),e})),this._resolver=n.createInstance(VL),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){var s;if(!this._editor.hasModel())return;null===(s=iD.get(this._editor))||void 0===s||s.closeMessage();const o=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,i){return MN(this,void 0,void 0,(function*(){try{yield this._instantiationService.invokeFunction(OL,e,AL.FromCodeActions,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:fL.QuickFix,filter:{}})}}))}update(e){var t,i,n,s,o,a,l;return MN(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let h;try{h=yield e.actions}catch(Dre){return void r(Dre)}if(!this._disposed)if(null===(i=this._lightBulbWidget.value)||void 0===i||i.update(h,e.trigger,e.position),1===e.trigger.type){if(null===(n=e.trigger.filter)||void 0===n?void 0:n.include){const t=this.tryGetValidActionToApply(e.trigger,h);if(t){try{null===(s=this._lightBulbWidget.value)||void 0===s||s.hide(),yield this._applyCodeAction(t,!1,!1)}finally{h.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,h);if(t&&t.action.disabled)return null===(o=iD.get(this._editor))||void 0===o||o.showMessage(t.action.disabled,e.trigger.context.position),void h.dispose()}}const t=!!(null===(a=e.trigger.filter)||void 0===a?void 0:a.include);if(e.trigger.context&&(!h.allActions.length||!t&&!h.validActions.length))return null===(l=iD.get(this._editor))||void 0===l||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=h,void h.dispose();this._activeCodeActions.value=h,this.showCodeActionList(h,this.toCoords(e.position),{includeDisabledActions:t,fromLightbulb:!1})}else this._actionWidgetService.isVisible?h.dispose():this._activeCodeActions.value=h}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,i){return MN(this,void 0,void 0,(function*(){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const o=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!o.length)return;const r=Ba.isIPosition(t)?this.toCoords(t):t,a={onSelect:(e,t)=>MN(this,void 0,void 0,(function*(){this._applyCodeAction(e,!0,!!t),this._actionWidgetService.hide(),n.clear()})),onHide:()=>{var e;null===(e=this._editor)||void 0===e||e.focus(),n.clear()},onHover:(e,t)=>MN(this,void 0,void 0,(function*(){var i;if(yield e.resolve(t),!t.isCancellationRequested)return{canPreview:!!(null===(i=e.action.edit)||void 0===i?void 0:i.edits.length)}})),onFocus:e=>{var t,i;if(e&&e.highlightRange&&e.action.diagnostics){const s=[{range:e.action.diagnostics[0],options:NN.DECORATION}];n.set(s);const o=e.action.diagnostics[0];Ps(ue(0,"Context: {0} at line {1} and column {2}.",null===(i=null===(t=this._editor.getModel())||void 0===t?void 0:t.getWordAtPosition({lineNumber:o.startLineNumber,column:o.startColumn}))||void 0===i?void 0:i.word,o.startLineNumber,o.startColumn))}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,function(e,t,i){if(!t)return e.map((e=>{var t;return{kind:"action",item:e,group:HL,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title,canPreview:!!(null===(t=e.action.edit)||void 0===t?void 0:t.edits.length)}}));const n=zL.map((e=>({group:e,actions:[]})));for(const o of e){const e=o.action.kind?new vL(o.action.kind):vL.None;for(const t of n)if(t.group.kind.contains(e)){t.actions.push(o);break}}const s=[];for(const o of n)if(o.actions.length){s.push({kind:"header",group:o.group});for(const e of o.actions)s.push({kind:"action",item:e,group:o.group,label:e.action.title,disabled:!!e.action.disabled,keybinding:i(e.action)})}return s}(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,r,s,this._getActionBarActions(e,t,i))}))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=Hn(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}_shouldShowHeaders(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:null==t?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>{var t;return{id:e.id,label:e.title,tooltip:null!==(t=e.tooltip)&&void 0!==t?t:"",class:void 0,enabled:!0,run:()=>{var t;return this._commandService.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}}}));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:ue(0,"Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:ue(0,"Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};function RN(e){return ul.regex(SN.keys()[0],new RegExp("(\\s|^)"+Js(e.value)+"\\b"))}TN.ID="editor.contrib.codeActionController",TN.DECORATION=xw.register({description:"quickfix-highlight",className:"quickfix-edit-highlight"}),TN=NN=EN([IN(1,wN),IN(2,Rl),IN(3,Oa),IN(4,iL),IN(5,mL),IN(6,Ga),IN(7,uu),IN(8,fN),IN(9,Oa)],TN),B_(((e,t)=>{((e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)})(".quickfix-edit-highlight",e.getColor(Vm));const i=e.getColor(Um);i&&t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${M_(e.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)}));const AN={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:ue(0,"Kind of the code action to run.")},apply:{type:"string",description:ue(0,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[ue(0,"Always apply the first returned code action."),ue(0,"Apply the first returned code action if it is the only one."),ue(0,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:ue(0,"Controls if only preferred code actions should be returned.")}}};function ON(e,t,i,n,s=fL.Default){if(e.hasModel()){const o=TN.get(e);null==o||o.manualTriggerAtCurrentPosition(t,s,i,n)}}Lh(TN.ID,TN,3),Lh(XL.ID,XL,4),yh(class extends _h{constructor(){super({id:LL,label:ue(0,"Quick Fix..."),alias:"Quick Fix...",precondition:ul.and(Rh.writable,Rh.hasCodeActionsProvider),kbOpts:{kbExpr:Rh.textInputFocus,primary:2137,weight:100}})}run(e,t){return ON(t,ue(0,"No code actions available"),void 0,void 0,fL.QuickFix)}}),yh(class extends _h{constructor(){super({id:DL,label:ue(0,"Refactor..."),alias:"Refactor...",precondition:ul.and(Rh.writable,Rh.hasCodeActionsProvider),kbOpts:{kbExpr:Rh.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ul.and(Rh.writable,RN(vL.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:AN}]}})}run(e,t,i){const n=CL.fromUser(i,{kind:vL.Refactor,apply:"never"});return ON(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?ue(0,"No preferred refactorings for '{0}' available",i.kind):ue(0,"No refactorings for '{0}' available",i.kind):n.preferred?ue(0,"No preferred refactorings available"):ue(0,"No refactorings available"),{include:vL.Refactor.contains(n.kind)?n.kind:vL.None,onlyIncludePreferredActions:n.preferred},n.apply,fL.Refactor)}}),yh(class extends _h{constructor(){super({id:xL,label:ue(0,"Source Action..."),alias:"Source Action...",precondition:ul.and(Rh.writable,Rh.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ul.and(Rh.writable,RN(vL.Source))},description:{description:"Source Action...",args:[{name:"args",schema:AN}]}})}run(e,t,i){const n=CL.fromUser(i,{kind:vL.Source,apply:"never"});return ON(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?ue(0,"No preferred source actions for '{0}' available",i.kind):ue(0,"No source actions for '{0}' available",i.kind):n.preferred?ue(0,"No preferred source actions available"):ue(0,"No source actions available"),{include:vL.Source.contains(n.kind)?n.kind:vL.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,fL.SourceAction)}}),yh(class extends _h{constructor(){super({id:NL,label:ue(0,"Organize Imports"),alias:"Organize Imports",precondition:ul.and(Rh.writable,RN(vL.SourceOrganizeImports)),kbOpts:{kbExpr:Rh.textInputFocus,primary:1581,weight:100}})}run(e,t){return ON(t,ue(0,"No organize imports action available"),{include:vL.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",fL.OrganizeImports)}}),yh(class extends _h{constructor(){super({id:kL,label:ue(0,"Auto Fix..."),alias:"Auto Fix...",precondition:ul.and(Rh.writable,RN(vL.QuickFix)),kbOpts:{kbExpr:Rh.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return ON(t,ue(0,"No auto fixes available"),{include:vL.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",fL.AutoFix)}}),yh(class extends _h{constructor(){super({id:EL,label:ue(0,"Fix All"),alias:"Fix All",precondition:ul.and(Rh.writable,RN(vL.SourceFixAll))})}run(e,t){return ON(t,ue(0,"No fix all action available"),{include:vL.SourceFixAll,includeSourceActions:!0},"ifSingle",fL.FixAll)}}),wh(new class extends fh{constructor(){super({id:SL,precondition:ul.and(Rh.writable,Rh.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:AN}]}})}runEditorCommand(e,t,i){const n=CL.fromUser(i,{kind:vL.Empty,apply:"ifSingle"});return ON(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?ue(0,"No preferred code actions for '{0}' available",i.kind):ue(0,"No code actions for '{0}' available",i.kind):n.preferred?ue(0,"No preferred code actions available"):ue(0,"No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}),Ul.as(ku).registerConfiguration(Object.assign(Object.assign({},$S),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:ue(0,"Enable/disable showing group headers in the Code Action menu."),default:!0}}})),Ul.as(ku).registerConfiguration(Object.assign(Object.assign({},$S),{properties:{"editor.codeActionWidget.includeNearbyQuickfixes":{type:"boolean",scope:5,description:ue(0,"Enable/disable showing nearest quickfix within a line when not currently on a diagnostic."),default:!1}}}));class PN{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new PN(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}return new PN(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}var FN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class BN{constructor(){this.lenses=[],this._disposables=new N}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function WN(e,t,i){return FN(this,void 0,void 0,(function*(){const n=e.ordered(t),s=new Map,o=new BN,r=n.map(((e,n)=>FN(this,void 0,void 0,(function*(){s.set(e,n);try{const n=yield Promise.resolve(e.provideCodeLenses(t,i));n&&o.add(n,e)}catch(r){a(r)}}))));return yield Promise.all(r),o.lenses=o.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:s.get(e.provider)s.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),o}))}Za.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;jr(an.isUri(i)),jr("number"==typeof n||!n);const{codeLensProvider:s}=e.get(iL),o=e.get(Wa).getModel(i);if(!o)throw u();const r=[],a=new N;return WN(s,o,Hh.None).then((e=>{a.add(e);const t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?r.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(o,i.symbol,Hh.None)).then((e=>r.push(e||i.symbol))));return Promise.all(t)})).then((()=>r)).finally((()=>{setTimeout((()=>a.dispose()),100)}))}));var VN,HN,zN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",e[e.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"}(VN||(VN={})),function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(HN||(HN={}));class UN extends E{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new j),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=HN.None,this.cache=new Map,this.flushDelayer=this._register(new Qh(UN.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;this._onDidChangeStorage.pause();try{null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.acceptExternal(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.acceptExternal(e,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===HN.Closed)return;let i=!1;if(Kr(t))i=this.cache.delete(e);else{this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0)}i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return Kr(i)?t:i}getBoolean(e,t){const i=this.get(e);return Kr(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return Kr(i)?t:parseInt(i,10)}set(e,t,i=!1){return zN(this,void 0,void 0,(function*(){if(this.state===HN.Closed)return;if(Kr(t))return this.delete(e,i);const n=Fr(t)||Array.isArray(t)?(s=t,JSON.stringify(s,uk)):String(t);var s;return this.cache.get(e)!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()):void 0}))}delete(e,t=!1){return zN(this,void 0,void 0,(function*(){if(this.state===HN.Closed)return;return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return zN(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}doFlush(e){return zN(this,void 0,void 0,(function*(){return this.options.hint===VN.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger((()=>this.flushPending()),e)}))}}UN.DEFAULT_FLUSH_DELAY=100;class KN{constructor(){this.onDidChangeItemsExternal=B.None,this.items=new Map}updateItems(e){var t,i;return zN(this,void 0,void 0,(function*(){null===(t=e.insert)||void 0===t||t.forEach(((e,t)=>this.items.set(t,e))),null===(i=e.delete)||void 0===i||i.forEach((e=>this.items.delete(e)))}))}}const jN="__$__targetStorageMarker",qN=Pa("storageService");var $N;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}($N||($N={}));class GN extends E{constructor(e={flushInterval:GN.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new j),this._onDidChangeTarget=this._register(new j),this._onWillSaveState=this._register(new U),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return B.filter(this._onDidChangeValue.event,(i=>i.scope===e&&(void 0===t||i.key===t)),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===jN){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n,s=!1){Kr(t)?this.remove(e,i,s):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t,s)}))}remove(e,t,i=!1){this.withPausedEmitters((()=>{var n;this.updateKeyTarget(e,t,void 0),null===(n=this.getStorage(t))||void 0===n||n.delete(e,i)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){var s,o;const r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(s=this.getStorage(t))||void 0===s||s.set(jN,JSON.stringify(r),n)):"number"==typeof r[e]&&(delete r[e],null===(o=this.getStorage(t))||void 0===o||o.set(jN,JSON.stringify(r),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?function(e){const t=e.get(jN);if(t)try{return JSON.parse(t)}catch(i){}return Object.create(null)}(t):Object.create(null)}}GN.DEFAULT_FLUSH_INTERVAL=6e4;var ZN=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},YN=function(e,t){return function(i,n){t(i,n,e)}};const XN=Pa("ICodeLensCache");class QN{constructor(e,t){this.lineCount=e,this.data=t}}let JN=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Ks(20,.75);od((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),B.once(e.onWillSaveState)((i=>{i.reason===$N.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new BN;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new QN(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new Mh(e,1,e,11)});const s=new BN;s.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new QN(i.lineCount,s))}}catch(ge){}}};JN=ZN([YN(0,qN)],JN),Cu(XN,JN,1);class eE{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class tE{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+tE._idPool++,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let s=0;s{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:nE},(e=>this._decorationIds[t]=e)),r=r?Mh.plusRange(r,e.symbol.range):Mh.lift(e.symbol.range)})),this._viewZone=new eE(r.startLineNumber-1,s,o),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new tE(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],null==t||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||Mh.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:nE},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;tdE(t,e)),n)):function(e,t){return t=cE(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=uE(i,t),dE(e[i],t))),t)}(e,t);case"string":return uE(e,t);case"boolean":return function(e,t){return cE(e?433:863,t)}(e,t);case"number":return cE(e,t);case"undefined":return cE(937,t);default:return cE(617,t)}var i,n}function cE(e,t){return(t<<5)-t+e|0}function uE(e,t){t=cE(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function pE(e,t=0,i=e.byteLength,n=0){for(let s=0;se.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}class fE{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let n,s,o=this._buffLen,r=this._leftoverHighSurrogate;for(0!==r?(n=r,s=-1,r=0):(n=e.charCodeAt(0),s=0);;){let a=n;if(Co(n)){if(!(s+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),mE(this._h0)+mE(this._h1)+mE(this._h2)+mE(this._h3)+mE(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,pE(this._buff,this._buffLen),this._buffLen>56&&(this._step(),pE(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=fE._bigBlock32,t=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,t.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,gE(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let i,n,s,o=this._h0,r=this._h1,a=this._h2,l=this._h3,h=this._h4;for(let d=0;d<80;d++)d<20?(i=r&a|~r&l,n=1518500249):d<40?(i=r^a^l,n=1859775393):d<60?(i=r&a|r&l|a&l,n=2400959708):(i=r^a^l,n=3395469782),s=gE(o,5)+i+h+n+e.getUint32(4*d,!1)&4294967295,h=l,l=a,a=gE(r,30),r=o,o=s;this._h0=this._h0+o&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+h&4294967295}}fE._bigBlock32=new DataView(new ArrayBuffer(320));const _E=Pa("environmentService");var vE=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},bE=function(e,t){return function(i,n){t(i,n,e)}};const CE=Pa("ILanguageFeatureDebounceService");var wE;!function(e){const t=new WeakMap;let i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(wE||(wE={}));class yE{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class SE{constructor(e,t,i,n,s,o){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=o,this._cache=new Ks(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>dE(wE.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?hD(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new cD(6),this._cache.set(i,n));const s=hD(n.update(t),this._min,this._max);return Kk(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new dD;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){return hD(0|this._overall()||this._default,this._min,this._max)}}let LE=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){var n,s,o;const r=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,a=null!==(s=null==i?void 0:i.max)&&void 0!==s?s:Math.pow(r,2),l=null!==(o=null==i?void 0:i.key)&&void 0!==o?o:void 0,h=`${wE.of(e)},${r}${l?","+l:""}`;let d=this._data.get(h);return d||(this._isDev?d=new SE(this._logService,t,e,0|this._overallAverage()||1.5*r,r,a):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),d=new yE(1.5*r)),this._data.set(h,d)),d}_overallAverage(){const e=new dD;for(const t of this._data.values())e.update(t.default());return e.value}};LE=vE([bE(0,ah),bE(1,_E)],LE),Cu(CE,LE,1);var kE=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},DE=function(e,t){return function(i,n){t(i,n,e)}},xE=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let NE=class{constructor(e,t,i,n,s,o){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=o,this._disposables=new N,this._localToDispose=new N,this._lenses=[],this._oldCodeLensModels=new N,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new sd((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(50)||e.hasChanged(19)||e.hasChanged(18))&&this._updateLensStyle(),e.hasChanged(17)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=.9*this._editor.getOption(52)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",US.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&this._localToDispose.add(ed((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const n of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof n.onDidChange){const e=n.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new sd((()=>{var t;const n=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=Gh((t=>WN(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const s=this._provideCodeLensDebounce.update(e,Date.now()-n);i.delay=s,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),r)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(x((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{var e;this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const s=new iE;i.forEach((e=>{e.dispose(s,t),this._lenses.splice(this._lenses.indexOf(e),1)})),s.commit(e)}))})),i.schedule(),this._resolveCodeLensesScheduler.cancel(),null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidBlurEditorText((()=>{i.cancel()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(x((()=>{if(this._editor.getModel()){const e=PN.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const i of this._lenses){const e=i.getCommand(t);if(e){this._commandService.executeCommand(e.id,...e.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new iE;for(const n of this._lenses)n.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const r of e.lenses){const e=r.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(r):(n=[r],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=PN.capture(this._editor),o=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new iE;let s=0,r=0;for(;rthis._resolveCodeLensesInViewportSoon()))),s++,r++)}for(;sthis._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach((e=>{const s=e.computeIfNecessary(t);s&&(i.push(s),n.push(e))})),0===i.length)return;const s=Date.now(),o=Gh((e=>{const s=i.map(((i,s)=>{const o=new Array(i.length),r=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(o[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{o[n]=e}),a)));return Promise.all(r).then((()=>{e.isCancellationRequested||n[s].isDisposed()||n[s].updateCommands(o)}))}));return Promise.all(s)}));this._resolveCodeLensesPromise=o,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{r(e),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getModel(){var e;return xE(this,void 0,void 0,(function*(){return yield this._getCodeLensModelPromise,yield this._resolveCodeLensesPromise,(null===(e=this._currentCodeLensModel)||void 0===e?void 0:e.isDisposed)?void 0:this._currentCodeLensModel}))}};NE.ID="css.editor.codeLens",NE=kE([DE(1,iL),DE(2,CE),DE(3,Ga),DE(4,uL),DE(5,XN)],NE),Lh(NE.ID,NE,1),yh(class extends _h{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:Rh.hasCodeLensProvider,label:ue(0,"Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return xE(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(lE),n=e.get(Ga),s=e.get(uL),o=t.getSelection().positionLineNumber,r=t.getContribution(NE.ID);if(!r)return;const a=yield r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===o&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const h=yield i.pick(l,{canPickMany:!1,placeHolder:ue(0,"Select a command")});if(!h)return;let d=h.command;if(a.isDisposed){const e=yield r.getModel(),t=null==e?void 0:e.lenses.find((e=>{var t;return e.symbol.range.startLineNumber===o&&(null===(t=e.symbol.command)||void 0===t?void 0:t.title)===d.title}));if(!t||!t.symbol.command)return;d=t.symbol.command}try{yield n.executeCommand(d.id,...d.arguments||[])}catch(c){s.error(c)}}))}});class EE{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new IE(this.x-window.scrollX,this.y-window.scrollY)}}class IE{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new EE(this.clientX+window.scrollX,this.clientY+window.scrollY)}}class ME{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class TE{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function RE(e){const t=Hn(e);return new ME(t.left,t.top,t.width,t.height)}function AE(e,t,i){const n=t.width/e.offsetWidth,s=t.height/e.offsetHeight,o=(i.x-t.x)/n,r=(i.y-t.y)/s;return new TE(o,r)}class OE extends Nt{constructor(e,t,i){super(e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new EE(this.posx,this.posy),this.editorPos=RE(i),this.relativePos=AE(i,this.editorPos,this.pos)}}class PE{constructor(e){this._editorViewDomNode=e}_create(e){return new OE(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return En(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return En(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return En(e,os.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return En(e,os.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return En(e,os.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return En(e,"mousemove",(e=>t(this._create(e))))}}class FE{constructor(e){this._editorViewDomNode=e}_create(e){return new OE(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return En(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return En(e,os.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return En(e,os.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return En(e,"pointermove",(e=>t(this._create(e))))}}class BE extends E{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new gD),this._keydownListener=null}startMonitoring(e,t,i,n,s){this._keydownListener=Mn(e.ownerDocument,"keydown",(e=>{e.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{n(new OE(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),s(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class WE{constructor(e){this._editor=e,this._instanceId=++WE._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new sd((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const n=this._counter++;i=new VE(t,`dyn-rule-${this._instanceId}-${n}`,Zn(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}WE._idPool=0;class VE{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElement=Jn(i),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const n in t){const e=t[n];let s;s="object"==typeof e?Cp(e.id):e;i+=`\n\t${HE(n)}: ${s};`}return i+="\n}",i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function HE(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}const zE="$initialize";let UE=!1;function KE(e){We&&(UE||(UE=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class jE{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class qE{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class $E{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class GE{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class ZE{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class YE{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise(((n,s)=>{this._pendingReplies[i]={resolve:n,reject:s},this._send(new jE(this._workerId,i,e,t))}))}listen(e,t){let i=null;const n=new U({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new $E(this._workerId,i,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new ZE(this._workerId,i)),i=null}});return n.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new qE(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=l(e.detail)),this._send(new qE(this._workerId,t,void 0,l(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new GE(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i{this._protocol.handleMessage(e)}),(e=>{null==n||n(e)}))),this._protocol=new YE({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(Dre){return Promise.reject(Dre)}},handleEvent:(e,t)=>{if(JE(e)){const n=i[e].call(i,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on main thread host.`);return n}if(QE(e)){const t=i[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on main thread host.`);return t}throw new Error(`Malformed event name ${e}`)}}),this._protocol.setWorkerId(this._worker.getId());let s=null;const o=globalThis.require;void 0!==o&&"function"==typeof o.getConfig?s=o.getConfig():void 0!==globalThis.requirejs&&(s=globalThis.requirejs.s.contexts._.config);const r=_d(i);this._onModuleLoaded=this._protocol.sendMessage(zE,[this._worker.getId(),JSON.parse(JSON.stringify(s)),t,r]);const a=(e,t)=>this._request(e,t),l=(e,t)=>this._protocol.listen(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(eI(t,a,l))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}function QE(e){return"o"===e[0]&&"n"===e[1]&&mo(e.charCodeAt(2))}function JE(e){return/^onDynamic/.test(e)&&mo(e.charCodeAt(9))}function eI(e,t,i){const n=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},s=e=>function(t){return i(e,t)},o={};for(const r of e)JE(r)?o[r]=s(r):QE(r)?o[r]=i(r,void 0):o[r]=n(r);return o}const tI=Ak("defaultWorkerFactory",{createScriptURL:e=>e});class iI{constructor(e,t,i,n,s){this.id=t,this.label=i;const o=function(e){const t=globalThis.MonacoEnvironment;if(t){if("function"==typeof t.getWorker)return t.getWorker("workerMain.js",e);if("function"==typeof t.getWorkerUrl){const i=t.getWorkerUrl("workerMain.js",e);return new Worker(tI?tI.createScriptURL(i):i,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(i);"function"==typeof o.then?this.worker=o:this.worker=Promise.resolve(o),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=s,"function"==typeof e.addEventListener&&e.addEventListener("error",s)}))}getId(){return this.id}postMessage(e,t){var i;null===(i=this.worker)||void 0===i||i.then((i=>{try{i.postMessage(e,t)}catch(n){r(n),r(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:n}))}}))}dispose(){var e;null===(e=this.worker)||void 0===e||e.then((e=>e.terminate())),this.worker=null}}class nI{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++nI.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new iI(e,n,this._label||"anonymous"+n,t,(e=>{KE(e),this._webWorkerFailedBeforeError=e,i(e)}))}}nI.LAST_WORKER_ID=0;class sI{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class oI{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new sI(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class dI{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,s,o]=dI._getElements(e),[r,a,l]=dI._getElements(t);this._hasStrings=o&&l,this._originalStringElements=n,this._originalElementsOrHash=s,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(dI._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let s;return i<=n?(aI.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new sI(e,0,i,n-i+1)]):e<=t?(aI.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),s=[new sI(e,t-e+1,i,0)]):(aI.Assert(e===t+1,"originalStart should only be one more than originalEnd"),aI.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const o=[0],r=[0],a=this.ComputeRecursionPoint(e,t,i,n,o,r,s),l=o[0],h=r[0];if(null!==a)return a;if(!s[0]){const o=this.ComputeDiffRecursive(e,l,i,h,s);let r=[];return r=s[0]?[new sI(l+1,t-(l+1)+1,h+1,n-(h+1)+1)]:this.ComputeDiffRecursive(l+1,t,h+1,n,s),this.ConcatenateChanges(o,r)}return[new sI(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p,m,f,_){let v=null,b=null,C=new hI,w=t,y=i,S=u[0]-m[0]-n,L=-1073741824,k=this.m_forwardHistory.length-1;do{const t=S+e;t===w||t=0&&(e=(l=this.m_forwardHistory[k])[0],w=1,y=l.length-1)}while(--k>=-1);if(v=C.getReverseChanges(),_[0]){let e=u[0]+1,t=m[0]+1;if(null!==v&&v.length>0){const i=v[v.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}b=[new sI(e,c-e+1,t,p-t+1)]}else{C=new hI,w=o,y=r,S=u[0]-m[0]-a,L=1073741824,k=f?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+s;e===w||e=h[e+1]?(g=(d=h[e+1]-1)-S-a,d>L&&C.MarkNextChange(),L=d+1,C.AddOriginalElement(d+1,g+1),S=e+1-s):(g=(d=h[e-1])-S-a,d>L&&C.MarkNextChange(),L=d,C.AddModifiedElement(d+1,g+1),S=e-1-s),k>=0&&(s=(h=this.m_reverseHistory[k])[0],w=1,y=h.length-1)}while(--k>=-1);b=C.getChanges()}return this.ConcatenateChanges(v,b)}ComputeRecursionPoint(e,t,i,n,s,o,r){let a=0,l=0,h=0,d=0,c=0,u=0;e--,i--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),p=g+1,m=new Int32Array(p),f=new Int32Array(p),_=n-i,v=t-e,b=e-i,C=t-n,w=(v-_)%2==0;m[_]=e,f[v]=t,r[0]=!1;for(let y=1;y<=g/2+1;y++){let g=0,S=0;h=this.ClipDiagonalBound(_-y,y,_,p),d=this.ClipDiagonalBound(_+y,y,_,p);for(let e=h;e<=d;e+=2){a=e===h||eg+S&&(g=a,S=l),!w&&Math.abs(e-v)<=y-1&&a>=f[e])return s[0]=a,o[0]=l,i<=f[e]&&y<=1448?this.WALKTRACE(_,h,d,b,v,c,u,C,m,f,a,t,s,l,n,o,w,r):null}const L=(g-e+(S-i)-y)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(g,L))return r[0]=!0,s[0]=g,o[0]=S,L>0&&y<=1448?this.WALKTRACE(_,h,d,b,v,c,u,C,m,f,a,t,s,l,n,o,w,r):(e++,i++,[new sI(e,t-e+1,i,n-i+1)]);c=this.ClipDiagonalBound(v-y,y,v,p),u=this.ClipDiagonalBound(v+y,y,v,p);for(let p=c;p<=u;p+=2){a=p===c||p=f[p+1]?f[p+1]-1:f[p-1],l=a-(p-v)-C;const g=a;for(;a>e&&l>i&&this.ElementsAreEqual(a,l);)a--,l--;if(f[p]=a,w&&Math.abs(p-_)<=y&&a<=m[p])return s[0]=a,o[0]=l,g>=m[p]&&y<=1448?this.WALKTRACE(_,h,d,b,v,c,u,C,m,f,a,t,s,l,n,o,w,r):null}if(y<=1447){let e=new Int32Array(d-h+2);e[0]=_-h+1,lI.Copy2(m,h,e,1,d-h+1),this.m_forwardHistory.push(e),e=new Int32Array(u-c+2),e[0]=v-c+1,lI.Copy2(f,c,e,1,u-c+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,h,d,b,v,c,u,C,m,f,a,t,s,l,n,o,w,r)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,s=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,s=i.modifiedStart+i.modifiedLength}const o=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,h=i.modifiedStart-e;if(tl&&(l=d,a=e)}i.originalStart-=a,i.modifiedStart-=a;const h=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],h)&&(e[t-1]=h[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&t>a&&(a=t,l=d,h=e)}return a>0?[l,h]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let s=0;s=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return lI.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],lI.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return lI.Copy(e,0,i,0,e.length),lI.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(aI.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),aI.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const n=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let r=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(r=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new sI(n,s,o,r),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Hb(e),t=Hb(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const s=i.length-e;return t>=s&&(t=s),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Hb(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,s=0,o=0;for(;t<=i;)if(n=t+(i-t)/2|0,s=this.prefixSum[n],o=s-this.values[n],e=s))break;t=n+1}return new gI(n,e-o)}}class uI{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new gI(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=Ud(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;nt&&(t=o),n>i&&(i=n),r>i&&(i=r)}t++,i++;const n=new mI(i,t,0);for(let s=0,o=e.length;s=this._maxCharCode?0:this._states.get(e,t)}}let _I=null;let vI=null;class bI{static _createLink(e,t,i,n,s){let o=s-1;do{const i=t.charCodeAt(o);if(2!==e.get(i))break;o--}while(o>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(o);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&o--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:o+2},url:t.substring(n,o+1)}}static computeLinks(e,t=function(){return null===_I&&(_I=new fI([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),_I}()){const i=function(){if(null===vI){vI=new zb(0);const e=" \t<>'\"\u3001\u3002\uff61\uff64\uff0c\uff0e\uff1a\uff1b\u2018\u3008\u300c\u300e\u3014\uff08\uff3b\uff5b\uff62\uff63\uff5d\uff3d\uff09\u3015\u300f\u300d\u3009\u2019\uff40\uff5e\u2026";for(let i=0;i=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}var wI,yI,SI,LI,kI,DI,xI,NI,EI,II,MI,TI,RI,AI,OI,PI,FI,BI,WI,VI,HI,zI,UI,KI,jI,qI,$I,GI,ZI,YI,XI,QI,JI,eM,tM,iM,nM,sM,oM;CI.INSTANCE=new CI,function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(wI||(wI={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(yI||(yI={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(SI||(SI={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(LI||(LI={})),function(e){e[e.Deprecated=1]="Deprecated"}(kI||(kI={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(DI||(DI={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(xI||(xI={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(NI||(NI={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(EI||(EI={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(II||(II={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(MI||(MI={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.letterSpacing=63]="letterSpacing",e[e.lightbulb=64]="lightbulb",e[e.lineDecorationsWidth=65]="lineDecorationsWidth",e[e.lineHeight=66]="lineHeight",e[e.lineNumbers=67]="lineNumbers",e[e.lineNumbersMinChars=68]="lineNumbersMinChars",e[e.linkedEditing=69]="linkedEditing",e[e.links=70]="links",e[e.matchBrackets=71]="matchBrackets",e[e.minimap=72]="minimap",e[e.mouseStyle=73]="mouseStyle",e[e.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=75]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",e[e.multiCursorModifier=77]="multiCursorModifier",e[e.multiCursorPaste=78]="multiCursorPaste",e[e.multiCursorLimit=79]="multiCursorLimit",e[e.occurrencesHighlight=80]="occurrencesHighlight",e[e.overviewRulerBorder=81]="overviewRulerBorder",e[e.overviewRulerLanes=82]="overviewRulerLanes",e[e.padding=83]="padding",e[e.pasteAs=84]="pasteAs",e[e.parameterHints=85]="parameterHints",e[e.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",e[e.quickSuggestions=88]="quickSuggestions",e[e.quickSuggestionsDelay=89]="quickSuggestionsDelay",e[e.readOnly=90]="readOnly",e[e.readOnlyMessage=91]="readOnlyMessage",e[e.renameOnType=92]="renameOnType",e[e.renderControlCharacters=93]="renderControlCharacters",e[e.renderFinalNewline=94]="renderFinalNewline",e[e.renderLineHighlight=95]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=97]="renderValidationDecorations",e[e.renderWhitespace=98]="renderWhitespace",e[e.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",e[e.roundedSelection=100]="roundedSelection",e[e.rulers=101]="rulers",e[e.scrollbar=102]="scrollbar",e[e.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=104]="scrollBeyondLastLine",e[e.scrollPredominantAxis=105]="scrollPredominantAxis",e[e.selectionClipboard=106]="selectionClipboard",e[e.selectionHighlight=107]="selectionHighlight",e[e.selectOnLineNumbers=108]="selectOnLineNumbers",e[e.showFoldingControls=109]="showFoldingControls",e[e.showUnused=110]="showUnused",e[e.snippetSuggestions=111]="snippetSuggestions",e[e.smartSelect=112]="smartSelect",e[e.smoothScrolling=113]="smoothScrolling",e[e.stickyScroll=114]="stickyScroll",e[e.stickyTabStops=115]="stickyTabStops",e[e.stopRenderingLineAfter=116]="stopRenderingLineAfter",e[e.suggest=117]="suggest",e[e.suggestFontSize=118]="suggestFontSize",e[e.suggestLineHeight=119]="suggestLineHeight",e[e.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",e[e.suggestSelection=121]="suggestSelection",e[e.tabCompletion=122]="tabCompletion",e[e.tabIndex=123]="tabIndex",e[e.unicodeHighlighting=124]="unicodeHighlighting",e[e.unusualLineTerminators=125]="unusualLineTerminators",e[e.useShadowDOM=126]="useShadowDOM",e[e.useTabStops=127]="useTabStops",e[e.wordBreak=128]="wordBreak",e[e.wordSeparators=129]="wordSeparators",e[e.wordWrap=130]="wordWrap",e[e.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=133]="wordWrapColumn",e[e.wordWrapOverride1=134]="wordWrapOverride1",e[e.wordWrapOverride2=135]="wordWrapOverride2",e[e.wrappingIndent=136]="wrappingIndent",e[e.wrappingStrategy=137]="wrappingStrategy",e[e.showDeprecated=138]="showDeprecated",e[e.inlayHints=139]="inlayHints",e[e.editorClassName=140]="editorClassName",e[e.pixelRatio=141]="pixelRatio",e[e.tabFocusMode=142]="tabFocusMode",e[e.layoutInfo=143]="layoutInfo",e[e.wrappingInfo=144]="wrappingInfo",e[e.defaultColorDecorators=145]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"}(TI||(TI={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(RI||(RI={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(AI||(AI={})),function(e){e[e.Left=1]="Left",e[e.Right=2]="Right"}(OI||(OI={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(PI||(PI={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(FI||(FI={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(BI||(BI={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(WI||(WI={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"}(VI||(VI={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(HI||(HI={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(zI||(zI={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(UI||(UI={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(KI||(KI={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(jI||(jI={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(qI||(qI={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}($I||($I={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(GI||(GI={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(ZI||(ZI={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(YI||(YI={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(XI||(XI={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(QI||(QI={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(JI||(JI={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(eM||(eM={})),function(e){e[e.Deprecated=1]="Deprecated"}(tM||(tM={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(iM||(iM={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(nM||(nM={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(sM||(sM={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(oM||(oM={}));class rM{static chord(e,t){return pt(e,t)}}function aM(){return{editor:void 0,languages:void 0,CancellationTokenSource:Uh,Emitter:U,KeyCode:VI,KeyMod:rM,Position:Ba,Range:Mh,Selection:Th,SelectionDirection:QI,MarkerSeverity:HI,MarkerTag:zI,Uri:an,Token:fC}}rM.CtrlCmd=2048,rM.Shift=1024,rM.Alt=512,rM.WinCtrl=256;class lM{static computeUnicodeHighlights(e,t,i){const n=i?i.startLineNumber:1,s=i?i.endLineNumber:e.getLineCount(),o=new hM(t),r=o.getCandidateCodePoints();let a;a="allNonBasicAscii"===r?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(""+`[${Js(Array.from(r).map((e=>String.fromCodePoint(e))).join(""))}]`,"g");const l=new Xb(null,a),h=[];let d,c=!1,u=0,g=0,p=0;e:for(let m=n,f=s;m<=f;m++){const t=e.getLineContent(m),i=t.length;l.reset(0);do{if(d=l.next(t),d){let e=d.index,n=d.index+d[0].length;if(e>0){Co(t.charCodeAt(e-1))&&e--}if(n+1=t){c=!0;break e}h.push(new Mh(m,e+1,m,n+1))}}}while(d)}return{ranges:h,hasMore:c,ambiguousCharacterCount:u,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(e,t){const i=new hM(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),s=i.ambiguousCharacters.getPrimaryConfusable(n),o=Uo.getLocales().filter((e=>!Uo.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}class hM{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Uo.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of Ko.codePoints)dM(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,s=!1;if(t)for(const o of t){const e=o.codePointAt(0),t=Mo(o);n=n||t,t||this.ambiguousCharacters.isAmbiguous(e)||Ko.isInvisibleCharacter(e)||(s=!0)}return!n&&s?0:this.options.invisibleCharacters&&!dM(e)&&Ko.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function dM(e){return" "===e||"\n"===e||"\t"===e}class cM{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class uM{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}class gM{static inverse(e,t,i){const n=[];let s=1,o=1;for(const a of e){const e=new pM(new bc(s,a.original.startLineNumber),new bc(o,a.modified.startLineNumber),void 0);e.modified.isEmpty||n.push(e),s=a.original.endLineNumberExclusive,o=a.modified.endLineNumberExclusive}const r=new pM(new bc(s,t+1),new bc(o,i+1),void 0);return r.modified.isEmpty||n.push(r),n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new gM(this.modified,this.original)}join(e){return new gM(this.original.join(e.original),this.modified.join(e.modified))}}class pM extends gM{constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){var e;return new pM(this.modified,this.original,null===(e=this.innerChanges)||void 0===e?void 0:e.map((e=>e.flip())))}}class mM{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new mM(this.modifiedRange,this.originalRange)}}class fM{computeDiff(e,t,i){var n;const s=new yM(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[];let r=null;for(const a of s.changes){let e,t;e=0===a.originalEndLineNumber?new bc(a.originalStartLineNumber+1,a.originalStartLineNumber+1):new bc(a.originalStartLineNumber,a.originalEndLineNumber+1),t=0===a.modifiedEndLineNumber?new bc(a.modifiedStartLineNumber+1,a.modifiedStartLineNumber+1):new bc(a.modifiedStartLineNumber,a.modifiedEndLineNumber+1);let i=new pM(e,t,null===(n=a.charChanges)||void 0===n?void 0:n.map((e=>new mM(new Mh(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new Mh(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));r&&(r.modified.endLineNumberExclusive!==i.modified.startLineNumber&&r.original.endLineNumberExclusive!==i.original.startLineNumber||(i=new pM(r.original.join(i.original),r.modified.join(i.modified),r.innerChanges&&i.innerChanges?r.innerChanges.concat(i.innerChanges):void 0),o.pop())),o.push(i),r=i}return Hl((()=>zl(o,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class CM{constructor(e,t,i,n,s,o,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),s=t.getStartColumn(e.originalStart),o=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),h=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new CM(n,s,o,r,a,l,h,d)}}class wM{constructor(e,t,i,n,s){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=s}static createFromDiffResult(e,t,i,n,s,o,r){let a,l,h,d,c;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(h=n.getStartLineNumber(t.modifiedStart)-1,d=0):(h=n.getStartLineNumber(t.modifiedStart),d=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),o&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const o=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(o.getElements().length>0&&a.getElements().length>0){let e=_M(o,a,s,!0).changes;r&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,s=e.length;n1&&r>1;){if(e.charCodeAt(i-2)!==t.charCodeAt(r-2))break;i--,r--}(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,i,o+1,1,r)}{let i=LM(e,1),r=LM(t,1);const a=e.length+1,l=t.length+1;for(;i!0;const t=Date.now();return()=>Date.now()-t{i.push(xM.fromOffsetPairs(e?e.getEndExclusives():NM.zero,n?n.getStarts():new NM(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),i}static fromOffsetPairs(e,t){return new xM(new dc(e.offset1,t.offset1),new dc(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new xM(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new xM(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new xM(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new xM(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new xM(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(t&&i)return new xM(t,i)}getStarts(){return new NM(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new NM(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class NM{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}}NM.zero=new NM(0,0),NM.max=new NM(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class EM{isValid(){return!0}}EM.instance=new EM;class IM{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new f("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&a>0&&3===o.get(g-1,a-1)&&(d+=r.get(g-1,a-1)),d+=n?n(g,a):1):d=-1;const c=Math.max(l,h,d);if(c===d){const e=g>0&&a>0?r.get(g-1,a-1):0;r.set(g,a,e+1),o.set(g,a,3)}else c===l?(r.set(g,a,0),o.set(g,a,1)):c===h&&(r.set(g,a,0),o.set(g,a,2));s.set(g,a,c)}const a=[];let l=e.length,h=t.length;function d(e,t){e+1===l&&t+1===h||a.push(new xM(new dc(e+1,l),new dc(t+1,h))),l=e,h=t}let c=e.length-1,u=t.length-1;for(;c>=0&&u>=0;)3===o.get(c,u)?(d(c,u),c--,u--):1===o.get(c,u)?c--:u--;return d(-1,-1),a.reverse(),new DM(a,!1)}}class OM{compute(e,t,i=EM.instance){if(0===e.length||0===t.length)return DM.trivial(e,t);const n=e,s=t;function o(e,t){for(;en.length||u>s.length)continue;const g=o(c,u);a.set(h,g);const p=c===r?l.get(h+1):l.get(h-1);if(l.set(h,g!==c?new PM(p,c,u,g-c):p),a.get(h)===n.length&&a.get(h)-h===s.length)break e}}let d=l.get(h);const c=[];let u=n.length,g=s.length;for(;;){const e=d?d.x+d.length:0,t=d?d.y+d.length:0;if(e===u&&t===g||c.push(new xM(new dc(e,u),new dc(t,g))),!d)break;u=d.x,g=d.y,d=d.prev}return c.reverse(),new DM(c,!1)}}class PM{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class FM{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class BM{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}class WM{constructor(e,t,i){this.lines=e,this.considerWhitespaceChanges=i,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let n=!1;t.start>0&&t.endExclusive>=e.length&&(t=new dc(t.start-1,t.endExclusive),n=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let s=this.lineRange.start;sString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=UM(e>0?this.elements[e-1]:-1),i=UM(et<=e));return new Ba(this.lineRange.start+t+1,e-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(e){return Mh.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!VM(this.elements[e]))return;let t=e;for(;t>0&&VM(this.elements[t-1]);)t--;let i=e;for(;it<=e.start)))&&void 0!==t?t:0,s=null!==(i=function(e,t){const i=mc(e,t);return i===e.length?void 0:e[i]}(this.firstCharOffsetByLine,(t=>e.endExclusive<=t)))&&void 0!==i?i:this.elements.length;return new dc(n,s)}}function VM(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const HM={0:0,1:0,2:0,3:10,4:2,5:3,6:10,7:10};function zM(e){return HM[e]}function UM(e){return 10===e?7:13===e?6:TM(e)?5:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:4}function KM(e,t,i,n,s,o){let{moves:r,excludedChanges:a}=function(e,t,i,n){const s=[],o=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new RM(e.original,t,e))),r=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new RM(e.modified,i,e)))),a=new Set;for(const l of o){let e,t=-1;for(const i of r){const n=l.computeSimilarity(i);n>t&&(t=n,e=i)}if(t>.9&&e&&(r.delete(e),s.push(new gM(l.range,e.range)),a.add(l.source),a.add(e.source)),!n.isValid())return{moves:s,excludedChanges:a}}return{moves:s,excludedChanges:a}}(e,t,i,o);if(!o.isValid())return[];const l=function(e,t,i,n,s,o){const r=[],a=new qs;for(const u of e)for(let e=u.original.startLineNumber;ee.modified.startLineNumber),Xd));for(const u of e){let e=[];for(let t=u.modified.startLineNumber;t{for(const n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===s.endLineNumberExclusive)return n.originalLineRange=new bc(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new bc(n.modifiedLineRange.startLineNumber,s.endLineNumberExclusive),void o.push(n);const i={modifiedLineRange:s,originalLineRange:t};l.push(i),o.push(i)})),e=o}if(!o.isValid())return[]}l.sort(Jd(Yd((e=>e.modifiedLineRange.length),Xd)));const h=new Cc,d=new Cc;for(const u of l){const e=u.modifiedLineRange.startLineNumber-u.originalLineRange.startLineNumber,t=h.subtractFrom(u.modifiedLineRange),i=d.subtractFrom(u.originalLineRange).getWithDelta(e),n=t.getIntersection(i);for(const s of n.ranges){if(s.length<3)continue;const t=s,i=s.delta(-e);r.push(new gM(i,t)),h.addRange(t),d.addRange(i)}}r.sort(Yd((e=>e.original.startLineNumber),Xd));const c=new fc(e);for(let u=0;ue.original.startLineNumber<=t.original.startLineNumber)),a=gc(e,(e=>e.modified.startLineNumber<=t.modified.startLineNumber)),l=Math.max(t.original.startLineNumber-i.original.startLineNumber,t.modified.startLineNumber-a.modified.startLineNumber),g=c.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbern.length||i>s.length)break;if(h.contains(i)||d.contains(e))break;if(!jM(n[e-1],s[i-1],o))break}for(f>0&&(d.addRange(new bc(t.original.startLineNumber-f,t.original.startLineNumber)),h.addRange(new bc(t.modified.startLineNumber-f,t.modified.startLineNumber))),_=0;_n.length||i>s.length)break;if(h.contains(i)||d.contains(e))break;if(!jM(n[e-1],s[i-1],o))break}_>0&&(d.addRange(new bc(t.original.endLineNumberExclusive,t.original.endLineNumberExclusive+_)),h.addRange(new bc(t.modified.endLineNumberExclusive,t.modified.endLineNumberExclusive+_))),(f>0||_>0)&&(r[u]=new gM(new bc(t.original.startLineNumber-f,t.original.endLineNumberExclusive+_),new bc(t.modified.startLineNumber-f,t.modified.endLineNumberExclusive+_)))}return r}(e.filter((e=>!a.has(e))),n,s,t,i,o);return qd(r,l),r=function(e){if(0===e.length)return e;e.sort(Yd((e=>e.original.startLineNumber),Xd));const t=[e[0]];for(let i=1;i=0&&r>=0&&o+r<=2?t[t.length-1]=n.join(s):t.push(s)}return t}(r),r=r.filter((e=>e.original.toOffsetRange().slice(t).map((e=>e.trim())).join("\n").length>=10)),r=function(e,t){const i=new fc(e);return t=t.filter((t=>(i.findLastMonotonous((e=>e.original.endLineNumberExclusivee.modified.endLineNumberExclusive300&&t.length>300)return!1;const n=(new OM).compute(new WM([e],new dc(0,1),!1),new WM([t],new dc(0,1),!1),i);let s=0;const o=xM.invert(n.diffs,e.length);for(const a of o)a.seq1Range.forEach((t=>{TM(e.charCodeAt(t))||s++}));const r=function(t){let i=0;for(let n=0;nt.length?e:t);return s/r>.6&&r>10}function qM(e,t,i){let n=i;return n=function(e,t,i){if(0===i.length)return i;const n=[];n.push(i[0]);for(let o=1;o0&&(r=r.delta(a))}s.push(r)}n.length>0&&s.push(n[n.length-1]);return s}(e,t,n),n=function(e,t,i){if(!e.getBoundaryScore||!t.getBoundaryScore)return i;for(let n=0;n0?i[n-1]:void 0,o=i[n],r=n+1=n.start&&e.seq2Range.start-o>=s.start&&i.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let r=0;for(;e.seq1Range.start+rl&&(l=r,a=h)}return e.delta(a)}class GM{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:ZM(this.lines[e-1]))+(e===this.lines.length?0:ZM(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function ZM(e){let t=0;for(;te===t)))return new cM([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new cM([new pM(new bc(1,e.length+1),new bc(1,t.length+1),[new mM(new Mh(1,1,e.length,e[0].length+1),new Mh(1,1,t.length,t[0].length+1))])],[],!1);const n=0===i.maxComputationTimeMs?EM.instance:new IM(i.maxComputationTimeMs),s=!i.ignoreTrimWhitespace,o=new Map;function r(e){let t=o.get(e);return void 0===t&&(t=o.size,o.set(e,t)),t}const a=e.map((e=>r(e.trim()))),l=t.map((e=>r(e.trim()))),h=new GM(a,e),d=new GM(l,t),c=(()=>h.length+d.length<1700?this.dynamicProgrammingDiffing.compute(h,d,n,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(h,d))();let u=c.diffs,g=c.hitTimeout;u=qM(h,d,u),u=function(e,t,i){let n=i;if(0===n.length)return n;let s,o=0;do{s=!1;const r=[n[0]];for(let a=1;a5||i.seq1Range.length+i.seq2Range.length>5)}d(h,l)?(s=!0,r[r.length-1]=r[r.length-1].join(l)):r.push(l)}n=r}while(o++<10&&s);return n}(h,0,u);const p=[],m=i=>{if(s)for(let o=0;oC.seq1Range.start-f==C.seq2Range.start-_));m(C.seq1Range.start-f),f=C.seq1Range.endExclusive,_=C.seq2Range.endExclusive;const i=this.refineDiff(e,t,C,n,s);i.hitTimeout&&(g=!0);for(const e of i.mappings)p.push(e)}m(e.length-f);const v=XM(p,e,t);let b=[];return i.computeMoves&&(b=this.computeMoves(v,e,t,a,l,n,s)),Hl((()=>{function i(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const i=t[e.lineNumber-1];return!(e.column<1||e.column>i.length+1)}function n(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const s of v){if(!s.innerChanges)return!1;for(const n of s.innerChanges){if(!(i(n.modifiedRange.getStartPosition(),t)&&i(n.modifiedRange.getEndPosition(),t)&&i(n.originalRange.getStartPosition(),e)&&i(n.originalRange.getEndPosition(),e)))return!1}if(!n(s.modified,t)||!n(s.original,e))return!1}return!0})),new cM(v,b,g)}computeMoves(e,t,i,n,s,o,r){return KM(e,t,i,n,s,o).map((e=>{const n=XM(this.refineDiff(t,i,new xM(e.original.toOffsetRange(),e.modified.toOffsetRange()),o,r).mappings,t,i,!0);return new uM(e,n)}))}refineDiff(e,t,i,n,s){const o=new WM(e,i.seq1Range,s),r=new WM(t,i.seq2Range,s),a=o.length+r.length<500?this.dynamicProgrammingDiffing.compute(o,r,n):this.myersDiffingAlgorithm.compute(o,r,n);let l=a.diffs;l=qM(o,r,l),l=function(e,t,i){const n=[];let s;function o(){if(!s)return;const e=s.s1Range.length-s.deleted;s.s2Range.length,s.added,Math.max(s.deleted,s.added)+(s.count-1)>e&&n.push(new xM(s.s1Range,s.s2Range)),s=void 0}for(const r of i){function a(e,t){var i,n,a,l;if(!s||!s.s1Range.containsRange(e)||!s.s2Range.containsRange(t))if(!s||s.s1Range.endExclusive0||t.length>0;){const n=e[0],s=t[0];let o;o=n&&(!s||n.seq1Range.start0&&i[i.length-1].seq1Range.endExclusive>=o.seq1Range.start?i[i.length-1]=i[i.length-1].join(o):i.push(o)}return i}(i,n)}(o,r,l),l=function(e,t,i){const n=[];for(const s of i){const e=n[n.length-1];e&&(s.seq1Range.start-e.seq1Range.endExclusive<=2||s.seq2Range.start-e.seq2Range.endExclusive<=2)?n[n.length-1]=new xM(e.seq1Range.join(s.seq1Range),e.seq2Range.join(s.seq2Range)):n.push(s)}return n}(0,0,l),l=function(e,t,i){let n=i;if(0===n.length)return n;let s,o=0;do{s=!1;const a=[n[0]];for(let l=1;l5||s.length>500)return!1;const o=e.getText(s).trim();if(o.length>20||o.split(/\r\n|\r|\n/).length>1)return!1;const r=e.countLinesIn(i.seq1Range),a=i.seq1Range.length,l=t.countLinesIn(i.seq2Range),c=i.seq2Range.length,u=e.countLinesIn(n.seq1Range),g=n.seq1Range.length,p=t.countLinesIn(n.seq2Range),m=n.seq2Range.length;function f(e){return Math.min(e,130)}return Math.pow(Math.pow(f(40*r+a),1.5)+Math.pow(f(40*l+c),1.5),1.5)+Math.pow(Math.pow(f(40*u+g),1.5)+Math.pow(f(40*p+m),1.5),1.5)>1.3*Math.pow(Math.pow(130,1.5),1.5)}c(d,h)?(s=!0,a[a.length-1]=a[a.length-1].join(h)):a.push(h)}n=a}while(o++<10&&s);const r=[];return function(e,t){for(let i=0;i{let s=i;function o(e){return e.length>0&&e.trim().length<=3&&i.seq1Range.length+i.seq2Range.length>100}const a=e.extendToFullLines(i.seq1Range),l=e.getText(new dc(a.start,i.seq1Range.start));o(l)&&(s=s.deltaStart(-l.length));const h=e.getText(new dc(i.seq1Range.endExclusive,a.endExclusive));o(h)&&(s=s.deltaEnd(h.length));const d=xM.fromOffsetPairs(t?t.getEndExclusives():NM.zero,n?n.getStarts():NM.max),c=s.intersect(d);r.push(c)})),r}(o,r,l);return{mappings:l.map((e=>new mM(o.translateRange(e.seq1Range),r.translateRange(e.seq2Range)))),hitTimeout:a.hitTimeout}}}function XM(e,t,i,n=!1){const s=[];for(const o of Ad(e.map((e=>function(e,t,i){let n=0,s=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+n<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+n<=e.modifiedRange.endLineNumber&&(s=-1);e.modifiedRange.startColumn-1>=i[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+s&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+s&&(n=1);const o=new bc(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+s),r=new bc(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+s);return new pM(o,r,[e])}(e,t,i))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=o[0],t=o[o.length-1];s.push(new pM(e.original.join(t.original),e.modified.join(t.modified),o.map((e=>e.innerChanges[0]))))}return Hl((()=>!(!n&&s.length>0&&s[0].original.startLineNumber!==s[0].modified.startLineNumber)&&zl(s,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusivenew fM,JM=()=>new YM;function eT(e){const t=[];for(const i of e){const e=Number(i);(e||0===e&&""!==i.replace(/\s/g,""))&&t.push(e)}return t}function tT(e,t,i,n){return{red:e/255,blue:i/255,green:t/255,alpha:n}}function iT(e,t){const i=t.index,n=t[0].length;if(!i)return;const s=e.positionAt(i);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:s.lineNumber,endColumn:s.column+n}}function nT(e,t){if(!e)return;const i=rc.Format.CSS.parseHex(t);return i?{range:e,color:tT(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}:void 0}function sT(e,t,i){if(!e||1!==t.length)return;const n=eT(t[0].values());return{range:e,color:tT(n[0],n[1],n[2],i?n[3]:1)}}function oT(e,t,i){if(!e||1!==t.length)return;const n=eT(t[0].values()),s=new rc(new sc(n[0],n[1]/100,n[2]/100,i?n[3]:1));return{range:e,color:tT(s.rgba.r,s.rgba.g,s.rgba.b,s.rgba.a)}}function rT(e,t){return"string"==typeof e?[...e.matchAll(t)]:e.findMatches(t)}function aT(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],i=rT(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(i.length>0)for(const n of i){const i=n.filter((e=>void 0!==e)),s=i[1],o=i[2];if(!o)continue;let r;if("rgb"===s){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=sT(iT(e,n),rT(o,t),!1)}else if("rgba"===s){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=sT(iT(e,n),rT(o,t),!0)}else if("hsl"===s){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=oT(iT(e,n),rT(o,t),!1)}else if("hsla"===s){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=oT(iT(e,n),rT(o,t),!0)}else"#"===s&&(r=nT(iT(e,n),s+o));r&&t.push(r)}return t}(e):[]}var lT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class hT extends pI{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;ithis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class dT{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new hT(an.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,t,i){return lT(this,void 0,void 0,(function*(){const n=this._getModel(e);return n?lM.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}))}computeDiff(e,t,i,n){return lT(this,void 0,void 0,(function*(){const s=this._getModel(e),o=this._getModel(t);return s&&o?dT.computeDiff(s,o,i,n):null}))}static computeDiff(e,t,i,n){const s="advanced"===n?JM():QM(),o=e.getLinesContent(),r=t.getLinesContent(),a=s.computeDiff(o,r,i);function l(e){return e.map((e=>{var t;return[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,null===(t=e.innerChanges)||void 0===t?void 0:t.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]}))}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)]))}}static _modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++){if(e.getLineContent(n)!==t.getLineContent(n))return!1}return!0}computeMoreMinimalEdits(e,t,i){return lT(this,void 0,void 0,(function*(){const n=this._getModel(e);if(!n)return t;const s=[];let o;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return Mh.compareRangesUsingStarts(e.range,t.range);return(e.range?0:1)-(t.range?0:1)}));let r=0;for(let e=1;edT._diffLimit){s.push({range:e,text:a});continue}const r=rI(t,a,i),h=n.offsetAt(Mh.lift(e).getStartPosition());for(const e of r){const t=n.positionAt(h+e.originalStart),i=n.positionAt(h+e.originalStart+e.originalLength),o={text:a.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}};n.getValueInRange(o.range)!==o.text&&s.push(o)}}return"number"==typeof o&&s.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}))}computeLinks(e){return lT(this,void 0,void 0,(function*(){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?bI.computeLinks(e):[]}(t):null}))}computeDefaultDocumentColors(e){return lT(this,void 0,void 0,(function*(){const t=this._getModel(e);return t?aT(t):null}))}textualSuggest(e,t,i,n){return lT(this,void 0,void 0,(function*(){const s=new F,o=new RegExp(i,n),r=new Set;e:for(const i of e){const e=this._getModel(i);if(e)for(const i of e.words(o))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>dT._suggestionsLimit))break e}return{words:Array.from(r),duration:s.elapsed()}}))}computeWordRanges(e,t,i,n){return lT(this,void 0,void 0,(function*(){const s=this._getModel(e);if(!s)return Object.create(null);const o=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;efunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const s of e)n[s]=i(s);return n}(i,((e,t)=>this._host.fhr(e,t))),s={host:n,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve(_d(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(Dre){return Promise.reject(Dre)}}}dT._diffLimit=1e5,dT._suggestionsLimit=1e4,"function"==typeof importScripts&&(globalThis.monaco=aM());const cT=Pa("textResourceConfigurationService"),uT=Pa("textResourcePropertiesService");var gT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},pT=function(e,t){return function(i,n){t(i,n,e)}},mT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const fT=3e5;function _T(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let vT=class extends E{constructor(e,t,i,n,s){super(),this._modelService=e,this._workerManager=this._register(new CT(this._modelService,n)),this._logService=i,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>_T(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(s.completionProvider.register("*",new bT(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return _T(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then((n=>n.computedUnicodeHighlights(e,t,i)))}computeDiff(e,t,i,n){return mT(this,void 0,void 0,(function*(){const s=yield this._workerManager.withWorker().then((s=>s.computeDiff(e,t,i,n)));if(!s)return null;return{identical:s.identical,quitEarly:s.quitEarly,changes:o(s.changes),moves:s.moves.map((e=>new uM(new gM(new bc(e[0],e[1]),new bc(e[2],e[3])),o(e[4]))))};function o(e){return e.map((e=>{var t;return new pM(new bc(e[0],e[1]),new bc(e[2],e[3]),null===(t=e[4])||void 0===t?void 0:t.map((e=>new mM(new Mh(e[0],e[1],e[2],e[3]),new Mh(e[4],e[5],e[6],e[7])))))}))}}))}computeMoreMinimalEdits(e,t,i=!1){if(Wd(t)){if(!_T(this._modelService,e))return Promise.resolve(t);const n=F.create(),s=this._workerManager.withWorker().then((n=>n.computeMoreMinimalEdits(e,t,i)));return s.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed()))),Promise.race([s,Jh(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return _T(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return _T(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};vT=gT([pT(0,Wa),pT(1,cT),pT(2,ah),pT(3,Xu),pT(4,iL)],vT);class bT{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return mT(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)_T(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())_T(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const s=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),o=e.getWordAtPosition(t),r=o?new Mh(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):Mh.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),h=yield l.textualSuggest(n,null==o?void 0:o.word,s);return h?{duration:h.duration,suggestions:h.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}))}}class CT extends E{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime();this._register(new nd).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;(new Date).getTime()-this._lastWorkerUsedTime>fT&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new LT(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class wT extends E{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const e=new nd;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(const e in this._syncedModels)k(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime){e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i)}for(const i of t)this._stopModelSync(i)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new N;s.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),s.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),s.add(x((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],k(t)}}class yT{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class ST{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class LT extends E{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new nI(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new XE(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new ST(this)))}catch(e){KE(e),this._worker=new yT(new dT(new ST(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(KE(e),this._worker=new yT(new dT(new ST(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new wT(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return mT(this,void 0,void 0,(function*(){return this._disposed?Promise.reject(function(){const e=new Error(h);return e.name=e.message,e}()):this._getProxy().then((i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i)))}))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeUnicodeHighlights(e.toString(),t,i)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then((s=>s.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeMoreMinimalEdits(e.toString(),t,i)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then((t=>t.computeDefaultDocumentColors(e.toString())))}textualSuggest(e,t,i){return mT(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),s=i.source,o=i.flags;return n.textualSuggest(e.map((e=>e.toString())),t,s,o)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),o=s.source,r=s.flags;return i.computeWordRanges(e.toString(),t,o,r)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{const s=this._modelService.getModel(e);if(!s)return null;const o=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),r=o.source,a=o.flags;return n.navigateValueSet(e.toString(),t,i,r,a)}))}dispose(){super.dispose(),this._disposed=!0}}const kT=[];function DT(e){kT.push(e)}function xT(){return kT.slice(0)}var NT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ET=function(e,t){return function(i,n){t(i,n,e)}},IT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class MT{constructor(e,t){this._editorWorkerClient=new LT(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return IT(this,void 0,void 0,(function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}))}provideColorPresentations(e,t,i){const n=t.range,s=t.color,o=s.alpha,r=new rc(new nc(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),o)),a=o?rc.Format.CSS.formatRGB(r):rc.Format.CSS.formatRGBA(r),l=o?rc.Format.CSS.formatHSL(r):rc.Format.CSS.formatHSLA(r),h=o?rc.Format.CSS.formatHex(r):rc.Format.CSS.formatHexA(r),d=[];return d.push({label:a,textEdit:{range:n,text:a}}),d.push({label:l,textEdit:{range:n,text:l}}),d.push({label:h,textEdit:{range:n,text:h}}),d}}let TT=class extends E{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new MT(e,t)))}};TT=NT([ET(0,Wa),ET(1,Xu),ET(2,iL)],TT),DT(TT);var RT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function AT(e,t,i,n=!0){return RT(this,void 0,void 0,(function*(){return WT(new PT,e,t,i,n)}))}function OT(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}class PT{constructor(){}compute(e,t,i,n){return RT(this,void 0,void 0,(function*(){const s=yield e.provideDocumentColors(t,i);if(Array.isArray(s))for(const t of s)n.push({colorInfo:t,provider:e});return Array.isArray(s)}))}}class FT{constructor(){}compute(e,t,i,n){return RT(this,void 0,void 0,(function*(){const s=yield e.provideDocumentColors(t,i);if(Array.isArray(s))for(const e of s)n.push({range:e.range,color:[e.color.red,e.color.green,e.color.blue,e.color.alpha]});return Array.isArray(s)}))}}class BT{constructor(e){this.colorInfo=e}compute(e,t,i,n){return RT(this,void 0,void 0,(function*(){const i=yield e.provideColorPresentations(t,this.colorInfo,Hh.None);return Array.isArray(i)&&n.push(...i),Array.isArray(i)}))}}function WT(e,t,i,n,s){return RT(this,void 0,void 0,(function*(){let o,r=!1;const l=[],h=t.ordered(i);for(let t=h.length-1;t>=0;t--){const s=h[t];if(s instanceof MT)o=s;else try{(yield e.compute(s,i,n,l))&&(r=!0)}catch(Dre){a(Dre)}}return r?l:o&&s?(yield e.compute(o,i,n,l),l):[]}))}function VT(e,t){const{colorProvider:i}=e.get(iL),n=e.get(Wa).getModel(t);if(!n)throw u();return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:e.get(uu).getValue("editor.defaultColorDecorators",{resource:t})}}Za.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof an))throw u();const{model:n,colorProviderRegistry:s,isDefaultColorDecoratorsEnabled:o}=VT(e,i);return WT(new FT,s,n,Hh.None,o)})),Za.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,n]=t,{uri:s,range:o}=n;if(!(s instanceof an&&Array.isArray(i)&&4===i.length&&Mh.isIRange(o)))throw u();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=VT(e,s),[h,d,c,g]=i;return WT(new BT({range:o,color:{red:h,green:d,blue:c,alpha:g}}),a,r,Hh.None,l)}));var HT,zT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},UT=function(e,t){return function(i,n){t(i,n,e)}},KT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const jT=Object.create({});let qT=HT=class extends E{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new N),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new WE(this._editor),this._decoratorLimitReporter=new $T,this._colorDecorationClassRefs=this._register(new N),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:HT.RECOMPUTE_TIME}),this._register(e.onDidChangeModel((()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()}))),this._register(e.onDidChangeModelLanguage((()=>this.updateColors()))),this._register(i.colorProvider.onDidChange((()=>this.updateColors()))),this._register(e.onDidChangeConfiguration((e=>{const t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const i=t!==this._isColorDecoratorsEnabled||e.hasChanged(21),n=e.hasChanged(145);(i||n)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new id,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}beginCompute(){return KT(this,void 0,void 0,(function*(){this._computePromise=Gh((e=>KT(this,void 0,void 0,(function*(){const t=this._editor.getModel();if(!t)return[];const i=new F(!1),n=yield AT(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n}))));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(Dre){r(Dre)}}))}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:xw.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let s=0;sthis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};qT.ID="editor.contrib.colorDetector",qT.RECOMPUTE_TIME=1e3,qT=HT=zT([UT(1,uu),UT(2,iL),UT(3,CE)],qT);class $T{constructor(){this._onDidChange=new U,this._computed=0,this._limited=!1}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}Lh(qT.ID,qT,1);class GT{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new U,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new U,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new U,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let n=0;n({format:e.format,location:e.location.toString()})))}},e.fromJSONObject=function(e){const t=e=>Pr(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>Pr(e.format)&&Pr(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:an.parse(e.location)})))}}}(YT||(YT={}));const XT=new class{constructor(){this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:ue(0,"The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:ue(0,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${ea.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return s}const o={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=o;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;ea.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const s of n.filter((e=>!!e.description)).sort(e))i.push(`||${s.id}|${ea.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter((e=>!ea.isThemeIcon(e.defaults))).sort(e))i.push(`||${s.id}|`);return i.join("\n")}};function QT(e,t,i,n){return XT.registerIcon(e,t,i,n)}function JT(){return XT}Ul.add("base.contributions.icons",XT),function(){const e=Xr();for(const t in e){const i="\\"+e[t].toString(16);XT.registerIcon(t,{fontCharacter:i})}}();const eR="vscode://schemas/icons",tR=Ul.as(Su);tR.registerSchema(eR,XT.getIconSchema());const iR=new sd((()=>tR.notifySchemaChanged(eR)),200);XT.onDidChange((()=>{iR.isScheduled()||iR.schedule()}));const nR=QT("widget-close",Qr.close,ue(0,"Icon for the close action in widgets.")),sR=(QT("goto-previous-location",Qr.arrowUp,ue(0,"Icon for goto previous editor location.")),QT("goto-next-location",Qr.arrowDown,ue(0,"Icon for goto next editor location.")),ea.modify(Qr.sync,"spin"),ea.modify(Qr.loading,"spin"),fs);class oR extends E{constructor(e,t,i,n=!1){super(),this.model=t,this.showingStandaloneColorPicker=n,this._closeButton=null,this._domNode=sR(".colorpicker-header"),ds(e,this._domNode),this._pickedColorNode=ds(this._domNode,sR(".picked-color")),ds(this._pickedColorNode,sR("span.codicon.codicon-color-mode")),this._pickedColorPresentation=ds(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const s=ue(0,"Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",s),this._originalColorNode=ds(this._domNode,sR(".original-color")),this._originalColorNode.style.backgroundColor=rc.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(jm)||rc.white,this._register(i.onDidColorThemeChange((e=>{this.backgroundColor=e.getColor(jm)||rc.white}))),this._register(En(this._pickedColorNode,os.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(En(this._originalColorNode,os.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=rc.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new rR(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=rc.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class rR extends E{constructor(e){super(),this._onClicked=this._register(new U),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),ds(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),ds(this._button,t);ds(t,sR(".button"+ea.asCSSSelector(QT("color-picker-close",Qr.close,ue(0,"Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class aR extends E{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=sR(".colorpicker-body"),ds(e,this._domNode),this._saturationBox=new lR(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new dR(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new cR(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new uR(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new rc(new oc(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new rc(new oc(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new rc(new oc(360===i?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class lR extends E{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new U,this.onColorFlushed=this._onColorFlushed.event,this._domNode=sR(".saturation-wrap"),ds(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",ds(this._domNode,this._canvas),this.selection=sR(".saturation-selection"),ds(this._domNode,this.selection),this.layout(),this._register(En(this._domNode,os.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;this.monitor=this._register(new gD);const t=Hn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=En(e.target.ownerDocument,os.POINTER_UP,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new rc(new oc(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=rc.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class hR extends E{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new U,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=ds(e,sR(".standalone-strip")),this.overlay=ds(this.domNode,sR(".standalone-overlay"))):(this.domNode=ds(e,sR(".strip")),this.overlay=ds(this.domNode,sR(".overlay"))),this.slider=ds(this.domNode,sR(".slider")),this.slider.style.top="0px",this._register(En(this.domNode,os.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._register(new gD),i=Hn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=En(e.target.ownerDocument,os.POINTER_UP,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class dR extends hR{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,s=new rc(new nc(t,i,n,1)),o=new rc(new nc(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${o} 100%)`}getValue(e){return e.hsva.a}}class cR extends hR{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class uR extends E{constructor(e){super(),this._onClicked=this._register(new U),this.onClicked=this._onClicked.event,this._button=ds(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=e=>{this._onClicked.fire()}}get button(){return this._button}}class gR extends pD{constructor(e,t,i,n,s=!1){super(),this.model=t,this.pixelRatio=i,this._register(te.onDidChange((()=>this.layout())));const o=sR(".colorpicker-widget");e.appendChild(o),this.header=this._register(new oR(o,this.model,n,s)),this.body=this._register(new aR(o,this.model,this.pixelRatio,s))}layout(){this.body.layout()}}var pR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},mR=function(e,t){return function(i,n){t(i,n,e)}},fR=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class _R{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let vR=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return hd.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return fR(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=qT.get(this._editor);if(!e)return[];for(const i of t){if(!e.isColorDecoration(i))continue;const t=e.getColorData(i.range.getStartPosition());if(t){return[yield wR(this,this._editor.getModel(),t.colorInfo,t.provider)]}}return[]}))}renderHoverParts(e,t){return yR(this,this._editor,this._themeService,t,e)}};vR=pR([mR(1,R_)],vR);class bR{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let CR=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,i){return fR(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return null;if(!qT.get(this._editor))return null;const n=yield AT(i,this._editor.getModel(),Hh.None);let s=null,o=null;for(const t of n){const i=t.colorInfo;Mh.containsRange(i.range,e.range)&&(s=i,o=t.provider)}const r=null!=s?s:e,a=null!=o?o:t,l=!!s;return{colorHover:yield wR(this,this._editor.getModel(),r,a),foundInEditor:l}}))}updateEditorModel(e){return fR(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=e.model;let i=new Mh(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield LR(this._editor.getModel(),t,this._color,i,e),i=SR(this._editor,i,t))}))}renderHoverParts(e,t){return yR(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};function wR(e,t,i,n){return fR(this,void 0,void 0,(function*(){const s=t.getValueInRange(i.range),{red:o,green:r,blue:a,alpha:l}=i.color,h=new nc(Math.round(255*o),Math.round(255*r),Math.round(255*a),l),d=new rc(h),c=yield OT(t,i,n,Hh.None),u=new GT(d,[],0);return u.colorPresentations=c||[],u.guessColorPresentation(d,s),e instanceof vR?new _R(e,Mh.lift(i.range),u,n):new bR(e,Mh.lift(i.range),u,n)}))}function yR(e,t,i,n,s){if(0===n.length||!t.hasModel())return E.None;if(s.setMinimumDimensions){const e=t.getOption(66)+8;s.setMinimumDimensions(new Wn(302,e))}const o=new N,r=n[0],a=t.getModel(),l=r.model,h=o.add(new gR(s.fragment,l,t.getOption(141),i,e instanceof CR));s.setColorPicker(h);let d=!1,c=new Mh(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);if(e instanceof CR){const t=n[0].model.color;e.color=t,LR(a,l,t,c,r),o.add(l.onColorFlushed((t=>{e.color=t})))}else o.add(l.onColorFlushed((e=>fR(this,void 0,void 0,(function*(){yield LR(a,l,e,c,r),d=!0,c=SR(t,c,l,s)})))));return o.add(l.onDidChangeColor((e=>{LR(a,l,e,c,r)}))),o.add(t.onDidChangeModelContent((e=>{d?d=!1:(s.hide(),t.focus())}))),o}function SR(e,t,i,n){let s,o;if(i.presentation.textEdit){s=[i.presentation.textEdit],o=new Mh(i.presentation.textEdit.range.startLineNumber,i.presentation.textEdit.range.startColumn,i.presentation.textEdit.range.endLineNumber,i.presentation.textEdit.range.endColumn);const t=e.getModel()._setTrackedRange(null,o,3);e.pushUndoStop(),e.executeEdits("colorpicker",s),o=e.getModel()._getTrackedRange(t)||o}else s=[{range:t,text:i.presentation.label,forceMoveMarkers:!1}],o=t.setEndPosition(t.endLineNumber,t.startColumn+i.presentation.label.length),e.pushUndoStop(),e.executeEdits("colorpicker",s);return i.presentation.additionalTextEdits&&(s=[...i.presentation.additionalTextEdits],e.executeEdits("colorpicker",s),n&&n.hide()),e.pushUndoStop(),o}function LR(e,t,i,n,s){return fR(this,void 0,void 0,(function*(){const o=yield OT(e,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},s.provider,Hh.None);t.colorPresentations=o||[]}))}function kR(e,t){return!!e[t]}CR=pR([mR(1,R_)],CR);class DR{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=kR(e.event,t.triggerModifier),this.hasSideBySideModifier=kR(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class xR{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=kR(e,t.triggerModifier)}}class NR{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function ER(e){return"altKey"===e?Pe?new NR(57,"metaKey",6,"altKey"):new NR(5,"ctrlKey",6,"altKey"):Pe?new NR(6,"altKey",57,"metaKey"):new NR(6,"altKey",5,"ctrlKey")}class IR extends E{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new U),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new U),this.onExecute=this._onExecute.event,this._onCancel=this._register(new U),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=null!==(i=null==t?void 0:t.extractLineNumberFromMouseEvent)&&void 0!==i?i:e=>e.target.position?e.target.position.lineNumber:0,this._opts=ER(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(77)){const e=ER(this._editor.getOption(77));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new DR(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new DR(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new DR(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new xR(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new xR(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}const MR=Pa("markerDecorationsService");var TR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},RR=function(e,t){return function(i,n){t(i,n,e)}};let AR=class{constructor(e,t){}dispose(){}};AR.ID="editor.contrib.markerDecorations",AR=TR([RR(1,MR)],AR),Lh(AR.ID,AR,0);class OR extends E{constructor(e,t){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const s=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{requestAnimationFrame((()=>{n=!1,s()}))}};this._resizeObserver=new ResizeObserver((t=>{e=t&&t[0]&&t[0].contentRect?t[0].contentRect:null,i=!0,s()})),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}class PR{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class FR{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");Bk(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");Bk(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");Bk(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const s=[];for(const o of this._requests){let e;0===o.type&&(e=t),2===o.type&&(e=i),1===o.type&&(e=n),e.appendChild(document.createElement("br"));const r=document.createElement("span");FR._render(r,o),e.appendChild(r),s.push(r)}this._container=e,this._testElements=s}static _render(e,t){if(" "===t.chr){let t="\xa0";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;ethis._values[e]))}}const UR=new class extends E{constructor(){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._cache=new zR,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new zR,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=window.setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new HR({pixelRatio:te.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const s=new PR(e,t);return i.push(s),null==n||n.push(s),s}_actualReadFontInfo(e){const t=[],i=[],n=this._createRequest("n",0,t,i),s=this._createRequest("\uff4d",0,t,null),o=this._createRequest(" ",0,t,i),r=this._createRequest("0",0,t,i),a=this._createRequest("1",0,t,i),l=this._createRequest("2",0,t,i),h=this._createRequest("3",0,t,i),d=this._createRequest("4",0,t,i),c=this._createRequest("5",0,t,i),u=this._createRequest("6",0,t,i),g=this._createRequest("7",0,t,i),p=this._createRequest("8",0,t,i),m=this._createRequest("9",0,t,i),f=this._createRequest("\u2192",0,t,i),_=this._createRequest("\uffeb",0,t,null),v=this._createRequest("\xb7",0,t,i),b=this._createRequest(String.fromCharCode(11825),0,t,null),C="|/-_ilm%";for(let k=0,D=8;k.001){y=!1;break}}let L=!0;return y&&_.width!==S&&(L=!1),_.width>f.width&&(L=!1),new HR({pixelRatio:te.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:y,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:L,spaceWidth:o.width,middotWidth:v.width,wsmiddotWidth:b.width,maxDigitWidth:w},!0)}};class KR{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=KR._read(e,this.key);this.migrate(t,(t=>KR._read(e,t)),((t,i)=>KR._write(e,t,i)))}static _read(e,t){if(void 0===e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const s=t.substring(0,n);return e[s]=e[s]||{},void this._write(e[s],t.substring(n+1),i)}e[t]=i}}function jR(e,t){KR.items.push(new KR(e,t))}function qR(e,t){jR(e,((i,n,s)=>{if(void 0!==i)for(const[o,r]of t)if(i===o)return void s(e,r)}))}KR.items=[],qR("wordWrap",[[!0,"on"],[!1,"off"]]),qR("lineNumbers",[[!0,"on"],[!1,"off"]]),qR("cursorBlinking",[["visible","solid"]]),qR("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),qR("renderLineHighlight",[[!0,"line"],[!1,"none"]]),qR("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),qR("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),qR("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),qR("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),qR("autoIndent",[[!1,"advanced"],[!0,"full"]]),qR("matchBrackets",[[!0,"always"],[!1,"never"]]),qR("renderFinalNewline",[[!0,"on"],[!1,"off"]]),qR("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),jR("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))})),jR("renderIndentGuides",((e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))})),jR("highlightActiveIndentGuide",((e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const $R={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};jR("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"==typeof e){for(const n of Object.entries($R)){!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1)}i("suggest.filteredTypes",void 0)}})),jR("quickSuggestions",((e,t,i)=>{if("boolean"==typeof e){const t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}})),jR("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),jR("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))}));const GR=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new U,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}},ZR=Pa("accessibilityService"),YR=new Tl("accessibilityModeEnabled",!1);var XR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},QR=function(e,t){return function(i,n){t(i,n,e)}};let JR=class extends E{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new U),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new cS,this.isSimpleWidget=e,this._containerObserver=this._register(new OR(i,t.dimension)),this._rawOptions=sA(t),this._validatedOptions=nA.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(BR.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(GR.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(UR.onDidChange((()=>this._recomputeOptions()))),this._register(te.onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=nA.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=VR.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:GR.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return nA.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:eA(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:se||ne,pixelRatio:te.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return UR.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=sA(e);nA.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=nA.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};function eA(){let e="";return re||ae||(e+="no-user-select "),re&&(e+="no-minimap-shadow ",e+="enable-user-select "),Pe&&(e+="mac "),e}JR=XR([QR(3,ZR)],JR);class tA{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class iA{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class nA{static validateOptions(e){const t=new tA;for(const i of KS){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new iA;for(const n of KS)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&Id(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!nA._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of KS){const o=!nA._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=o,o&&(n=!0)}return n?new dS(i):null}static applyUpdate(e,t){let i=!1;for(const n of KS)if(t.hasOwnProperty(n.name)){const s=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=s.newValue,i=i||s.didChange}return i}}function sA(e){const t=cd(e);return function(e){KR.items.forEach((t=>t.apply(e)))}(t),t}class oA extends E{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=o.left?n.width=Math.max(n.width,o.left+o.width-n.left):(t[i++]=n,n=o)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let s=0,o=e.length;sr)return null;if((t=Math.min(r,Math.max(0,t)))===(n=Math.min(r,Math.max(0,n)))&&i===s&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return o.markDidDomLayout(),this._createHorizontalRangesFromClientRects(i,o.clientRectDeltaLeft,o.clientRectScale)}t!==n&&n>0&&0===s&&(n--,s=1073741824);let a=e.children[t].firstChild,l=e.children[n].firstChild;if(a&&l||(!a&&0===i&&t>0&&(a=e.children[t-1].firstChild,i=1073741824),!l&&0===s&&n>0&&(l=e.children[n-1].firstChild,s=1073741824)),!a||!l)return null;i=Math.min(a.textContent.length,Math.max(0,i)),s=Math.min(l.textContent.length,Math.max(0,s));const h=this._readClientRects(a,i,l,s,o.endNode);return o.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,o.clientRectDeltaLeft,o.clientRectScale)}}class fA{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n=s||(r[a++]=new fA(Math.max(1,l.startColumn-n+1),Math.min(o+1,l.endColumn-n+1),l.className,l.type));return r}static filter(e,t,i,n){if(0===e.length)return[];const s=[];let o=0;for(let r=0,a=e.length;rt)continue;if(l.isEmpty()&&(0===a.type||3===a.type))continue;const h=l.startLineNumber===t?l.startColumn:i,d=l.endLineNumber===t?l.endColumn:n;s[o++]=new fA(h,d,a.inlineClassName,a.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=fA._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class bA{static normalize(e,t){if(0===t.length)return[];const i=[],n=new vA;let s=0;for(let o=0,r=t.length;o1){Co(e.charCodeAt(a-2))&&a--}if(l>1){Co(e.charCodeAt(l-2))&&l--}const c=a-1,u=l-2;s=n.consumeLowerThan(c,s,i),0===n.count&&(s=c),n.insert(u,h,d)}return n.consumeLowerThan(1073741824,s,i),i}}class CA{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class wA{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class yA{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p,m,f,_,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=r,this.lineTokens=a,this.lineDecorations=l.sort(fA.compare),this.tabSize=h,this.startVisibleColumn=d,this.spaceWidth=c,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=f,this.fontLigatures=_,this.selectionsOnLine=v&&v.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const s=(t<<16|i)>>>0;this._data[e-1]=s,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=LA.getPartIndex(t),n=LA.getCharIndex(t);return new SA(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i)>>>0;let s=0,o=this.length-1;for(;s+1>>1,t=this._data[e];if(t===n)return e;t>n?o=e:s=e}if(s===o)return s;const r=this._data[s],a=this._data[o];if(r===n)return s;if(a===n)return o;const l=LA.getPartIndex(r),h=LA.getCharIndex(r);let d;d=l!==LA.getPartIndex(a)?t:LA.getCharIndex(a);return i-h<=d-i?s:o}}class kA{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function DA(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("");let i=0,n=0,s=0;for(const r of e.lineDecorations)1!==r.type&&2!==r.type||(t.appendString(''),1===r.type&&(s|=1,i++),2===r.type&&(s|=2,n++));t.appendString("");const o=new LA(1,i+n);return o.setColumnInfo(1,i,0,0),new kA(o,!1,s)}return t.appendString(""),new kA(new LA(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,n=e.canUseHalfwidthRightwardsArrow,s=e.containsForeignElements,o=e.lineContent,r=e.len,a=e.isOverflowing,l=e.overflowingCharCount,h=e.parts,d=e.fauxIndentLength,c=e.tabSize,u=e.startVisibleColumn,g=e.containsRTL,p=e.spaceWidth,m=e.renderSpaceCharCode,f=e.renderWhitespace,_=e.renderControlCharacters,v=new LA(r+1,h.length);let b=!1,C=0,w=u,y=0,S=0,L=0;g?t.appendString(''):t.appendString("");for(let k=0,D=h.length;k=d&&(i+=n)}}for(D&&(t.appendString(' style="width:'),t.appendString(String(p*e)),t.appendString('px"')),t.appendASCIICharCode(62);C1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=i;e++)t.appendCharCode(160)}else e=2,i=1,t.appendCharCode(m),t.appendCharCode(8204);y+=e,S+=i,C>=d&&(w+=i)}}else for(t.appendASCIICharCode(62);C=d&&(w+=n)}x?L++:L=0,C>=r&&!b&&e.isPseudoAfter()&&(b=!0,v.setColumnInfo(C+1,k,y,S)),t.appendString("")}b||v.setColumnInfo(r+1,h.length-1,y,S);a&&(t.appendString(''),t.appendString(ue(0,"Show more ({0})",function(e){if(e<1024)return ue(0,"{0} chars",e);if(e<1048576)return`${(e/1024).toFixed(1)} KB`;return`${(e/1024/1024).toFixed(1)} MB`}(l))),t.appendString(""));return t.appendString(""),new kA(v,g,s)}(function(e){const t=e.lineContent;let i,n,s;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(o[r++]=new CA(n,"",0,!1));let a=n;for(let l=0,h=i.getCount();l=s){const i=!!t&&Eo(e.substring(a,s));o[r++]=new CA(s,d,0,i);break}const c=!!t&&Eo(e.substring(a,h));o[r++]=new CA(h,d,0,c),a=h}return o}(t,e.containsRTL,e.lineTokens,e.fauxIndentLength,s);e.renderControlCharacters&&!e.isBasicASCII&&(o=function(e,t){const i=[];let n=new CA(0,"",0,!1),s=0;for(const o of t){const t=o.endIndex;for(;sn.endIndex&&(n=new CA(s,o.type,o.metadata,o.containsRTL),i.push(n)),n=new CA(s+1,"mtkcontrol",o.metadata,!1),i.push(n))}s>n.endIndex&&(n=new CA(t,o.type,o.metadata,o.containsRTL),i.push(n))}return i}(t,o));(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(o=function(e,t,i,n){const s=e.continuesWithWrappedLine,o=e.fauxIndentLength,r=e.tabSize,a=e.startVisibleColumn,l=e.useMonospaceOptimizations,h=e.selectionsOnLine,d=1===e.renderWhitespace,c=3===e.renderWhitespace,u=e.renderSpaceWidth!==e.spaceWidth,g=[];let p=0,m=0,f=n[m].type,_=n[m].containsRTL,v=n[m].endIndex;const b=n.length;let C,w=!1,y=oo(t);-1===y?(w=!0,y=i,C=i):C=ao(t);let S=!1,L=0,k=h&&h[L],D=a%r;for(let N=o;N=k.endOffset&&(L++,k=h&&h[L]),NC)s=!0;else if(9===e)s=!0;else if(32===e)if(d)if(S)s=!0;else{const e=N+1N),s&&c&&(s=w||N>C),s&&_&&N>=y&&N<=C&&(s=!1),S){if(!s||!l&&D>=r){if(u){for(let e=(p>0?g[p-1].endIndex:o)+1;e<=N;e++)g[p++]=new CA(e,"mtkw",1,!1)}else g[p++]=new CA(N,"mtkw",1,!1);D%=r}}else(N===v||s&&N>o)&&(g[p++]=new CA(N,f,0,_),D%=r);for(9===e?D=r:Ao(e)?D+=2:D++,S=s;N===v&&(m++,m0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(x=!0)}else x=!0;if(x)if(u){for(let e=(p>0?g[p-1].endIndex:o)+1;e<=i;e++)g[p++]=new CA(e,"mtkw",1,!1)}else g[p++]=new CA(i,"mtkw",1,!1);else g[p++]=new CA(i,f,0,_);return g}(e,t,s,o));let r=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;th&&(h=e.startOffset,a[l++]=new CA(h,n,d,u)),!(e.endOffset+1<=t)){h=t,a[l++]=new CA(h,n+" "+e.className,d|e.metadata,u);break}h=e.endOffset+1,a[l++]=new CA(h,n+" "+e.className,d|e.metadata,u),r++}t>h&&(h=t,a[l++]=new CA(h,n,d,u))}const d=i[i.length-1].endIndex;if(r=50&&(s[o++]=new CA(h+1,t,r,l),d=h+1,h=-1);d!==a&&(s[o++]=new CA(a,t,r,l))}else s[o++]=i;n=a}else for(let r=0,a=t.length;r50){const t=e.type,r=e.metadata,l=e.containsRTL,h=Math.ceil(a/50);for(let e=1;e=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e)}function MA(e){return e.toString(16).toUpperCase().padStart(4,"0")}const TA=!!Be||!(Fe||ne||re);let RA=!0;class AA{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50),s=i.get(38);this.renderWhitespace="off"===s?i.get(98):"none",this.renderControlCharacters=i.get(93),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(66),this.stopRenderingLineAfter=i.get(116),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class OA{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Fk(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!M_(this._options.themeType)&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const s=i.getViewLineRenderingData(e),o=this._options,r=fA.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let a=null;if(M_(o.themeType)||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:s.minColumn,n=i.endLineNumber===e?i.endColumn:s.maxColumn;t');const h=DA(l,n);n.appendString("");let d=null;return RA&&TA&&s.isBasicASCII&&o.useMonospaceOptimizations&&0===h.containsForeignElements&&(d=new PA(this._renderedViewLine?this._renderedViewLine.domNode:null,l,h.characterMapping)),d||(d=WA(this._renderedViewLine?this._renderedViewLine.domNode:null,l,h.characterMapping,h.containsRTL,h.containsForeignElements)),this._renderedViewLine=d,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof PA}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof PA?this._renderedViewLine.monospaceAssumptionsAreValid():RA}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof PA&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const s=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==s&&t>s+1&&i>s+1)return new pA(!0,[new uA(this.getWidth(n),0)]);-1!==s&&t>s+1&&(t=s+1),-1!==s&&i>s+1&&(i=s+1);const o=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return o&&o.length>0?new pA(!1,o):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}OA.CLASS_NAME="view-line";class PA{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),RA=!1)}return RA}toSlowRenderedLine(){return WA(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const s=this._getColumnPixelOffset(e,t,n),o=this._getColumnPixelOffset(e,i,n);return[new uA(s,o-s)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,s=300*(n+1)+1;let o=-1;if(this._keyColumnPixelOffsetCache&&(o=this._keyColumnPixelOffsetCache[n],-1===o&&(o=this._actualReadPixelOffset(e,s,i),this._keyColumnPixelOffsetCache[n]=o)),-1===o){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(s),a=this._characterMapping.getHorizontalOffset(t);return o+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),s=mA.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return s&&0!==s.length?s[0].left:-1}getColumnOfNodeOffset(e,t){return zA(this._characterMapping,e,t)}}class FA{constructor(e,t,i,n,s){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=s,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,null==e||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const s=this._readPixelOffset(this.domNode,e,t,n);if(-1===s)return null;const o=this._readPixelOffset(this.domNode,e,i,n);return-1===o?null:[new uA(s,o-s)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,s){if(i===n){const n=this._readPixelOffset(e,t,i,s);return-1===n?null:[new uA(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,s)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(n);const t=this._getReadingTarget(e);return t.firstChild?(n.markDidDomLayout(),t.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){const s=this._pixelOffsetCache[i];if(-1!==s)return s;const o=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=o,o}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=mA.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(n);const s=this._characterMapping.getDomPosition(i),o=mA.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n);if(!o||0===o.length)return-1;const r=o[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new uA(0,this.getWidth(n))];const s=this._characterMapping.getDomPosition(t),o=this._characterMapping.getDomPosition(i);return mA.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,o.partIndex,o.charIndex,n)}getColumnOfNodeOffset(e,t){return zA(this._characterMapping,e,t)}}class BA extends FA{_readVisibleRangesForRange(e,t,i,n,s){const o=super._readVisibleRangesForRange(e,t,i,n,s);if(!o||0===o.length||i===n||1===i&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,s);if(-1!==i){const e=o[o.length-1];e.left=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class ZA{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(143),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(66),this.stickyTabStops=n.get(115),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return ZA.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,s=e.viewModel.getLineCount();let o,r=null,a=null;return i.afterLineNumber!==s&&(a=new Ba(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new Ba(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),o=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,eO._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class XA extends YA{constructor(e,t,i,n,s){super(e,t,i,n),this._ctx=e,s?(this.target=s,this.targetPath=aA.collect(s,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columno.contentLeft+o.width)continue;const i=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(i<=s&&s<=i+o.height)return t.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return GA.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.relativePos.x);const o={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};return s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,o):(s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,o)))}return null}static _hitTestViewLines(e,t,i){if(!GA.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new Ba(1,1),QA);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new Ba(i,n),QA)}if(i){if(GA.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),s=JA(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new Ba(i,1),s)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const s=JA(t.mouseContentHorizontalOffset-n),o=new Ba(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}}return t.fulfillUnknown()}const n=eO._doHitTest(e,t);return 1===n.type?eO.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(GA.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Ba(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(GA.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Ba(i,n))}}return null}static _hitTestScrollbar(e,t){if(GA.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Ba(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(143),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return eO._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;return Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){const o=n.lineNumber,r=n.column,a=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>a){const e=JA(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(o,r);if(!l)return t.fulfillUnknown(n);const h=l.left;if(Math.abs(t.mouseContentHorizontalOffset-h)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});const d=[];if(d.push({offset:l.left,column:r}),r>1){const t=e.visibleRangeForPosition(o,r-1);t&&d.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const c=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=c.clientX&&c.clientX<=u.right;let p=null;for(let m=1;ms)){const i=Math.floor((n+s)/2);let o=t.pos.y+(i-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);const r=new EE(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=Yn(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let s=e.elementFromPoint(t,i);if(null!==s){for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;const e=s.getBoundingClientRect(),i=`${window.getComputedStyle(s,null).getPropertyValue("font-style")} ${window.getComputedStyle(s,null).getPropertyValue("font-variant")} ${window.getComputedStyle(s,null).getPropertyValue("font-weight")} ${window.getComputedStyle(s,null).getPropertyValue("font-size")}/${window.getComputedStyle(s,null).getPropertyValue("line-height")} ${window.getComputedStyle(s,null).getPropertyValue("font-family")}`,o=s.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=o.length;else{const e=tO.getInstance();for(let n=0;nthis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;const n=new PE(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=En(this.viewHelper.viewDomNode.ownerDocument,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new OE(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{s=t}))),this._register(En(this.viewHelper.viewDomNode,os.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,s)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=ND.INSTANCE;let t=0,i=BR.getZoomLevel(),n=!1,s=0;function o(e){return Pe?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(En(this.viewHelper.viewDomNode,os.MOUSE_WHEEL,(r=>{if(this.viewController.emitMouseWheel(r),!this._context.configuration.options.get(75))return;const a=new Et(r);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(o(r)){const e=BR.getZoomLevel(),t=a.deltaY>0?1:-1;BR.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=BR.getZoomLevel(),n=o(r),s=0),t=Date.now(),s+=a.deltaY,n&&(BR.setZoomLevel(i+s/5),a.preventDefault(),a.stopPropagation())}),{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(143)){const e=this._context.configuration.options.get(143).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new IE(e,t).toPageCoordinates(),n=RE(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const s=AE(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,s,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=Yn(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){if(this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive())return;e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(h&&(n||o&&r))d(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(a){const n=i.detail;h&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class nO extends E{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new BE(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new sO(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new rO,this._currentSelection=new Th(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const s=this._context.configuration.options;if(!s.get(90)&&s.get(35)&&!s.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posyt.y+t.height){const o=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=ZA.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return $A.createOutsideEditor(s,e,"below",o)}const l=n.getLineNumberAtVerticalOffset(r);return $A.createOutsideEditor(s,new Ba(l,i.getLineMaxColumn(l)),"below",o)}const o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const n=e.posx-t.x-t.width;return $A.createOutsideEditor(s,new Ba(o,i.getLineMaxColumn(o)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return $A.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new Ba(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class sO extends E{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new oO(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class oO extends E{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=o,this._lastTime=Date.now(),this._animationFrameDisposable=An((()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(66),t=this._context.configuration.options.get(143).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(66),t=this._getScrollSpeed()*(this._tick()/1e3)*e,i="above"===this._position.outsidePosition?-t:t;this._context.viewModel.viewLayout.deltaScrollNow(0,i),this._viewHelper.renderNow();const n=this._context.viewLayout.getLinesViewportData(),s="above"===this._position.outsidePosition?n.startLineNumber:n.endLineNumber;let o;{const e=RE(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(143).horizontalScrollbarHeight,i=new EE(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=AE(this._viewHelper.viewDomNode,e,i);o=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}o.position&&o.position.lineNumber===s||(o="above"===this._position.outsidePosition?$A.createOutsideEditor(this._position.mouseColumn,new Ba(s,1),"above",this._position.outsideDistance):$A.createOutsideEditor(this._position.mouseColumn,new Ba(s,this._context.viewModel.getLineMaxColumn(s)),"below",this._position.outsideDistance)),this._dispatchMouse(o,!0,2),this._animationFrameDisposable=An((()=>this._execute()))}}class rO{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>rO.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}rO.CLEAR_MOUSE_DOWN_COUNT_TIME=400;class aO extends iO{constructor(e,t,i){super(e,t,i),this._register(qL.addTarget(this.viewHelper.linesContentDomNode)),this._register(En(this.viewHelper.linesContentDomNode,KL.Tap,(e=>this.onTap(e)))),this._register(En(this.viewHelper.linesContentDomNode,KL.Change,(e=>this.onChange(e)))),this._register(En(this.viewHelper.linesContentDomNode,KL.Contextmenu,(e=>this._onContextMenu(new OE(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(En(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new FE(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new OE(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===t.type&&null!==t.detail.injectedText})}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class lO extends iO{constructor(e,t,i){super(e,t,i),this._register(qL.addTarget(this.viewHelper.linesContentDomNode)),this._register(En(this.viewHelper.linesContentDomNode,KL.Tap,(e=>this.onTap(e)))),this._register(En(this.viewHelper.linesContentDomNode,KL.Change,(e=>this.onChange(e)))),this._register(En(this.viewHelper.linesContentDomNode,KL.Contextmenu,(e=>this._onContextMenu(new OE(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new OE(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(Ky.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class hO extends E{constructor(e,t,i){super(),He&&tt?this.handler=this._register(new aO(e,t,i)):window.TouchEvent?this.handler=this._register(new lO(e,t,i)):this.handler=this._register(new iO(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}class dO extends oA{}class cO extends dO{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Ba(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(66);const t=e.get(67);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(94);const i=e.get(143);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Ba(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=Fe?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getLineCount(),o=[];for(let r=i;r<=n;r++){const e=r-i,n=this._getLineRenderLineNumber(r);if(!n){o[e]="";continue}let a="";if(r===s&&0===this._context.viewModel.getLineLength(r)){if("off"===this._renderFinalNewline){o[e]="";continue}"dimmed"===this._renderFinalNewline&&(a=" dimmed-line-number")}r===this._activeLineNumber&&(a=" active-line-number"),o[e]=`
    ${n}
    `}this._renderResult=o}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}cO.CLASS_NAME="line-numbers",B_(((e,t)=>{const i=e.getColor(j_),n=e.getColor(av);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));class uO extends rA{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=Fk(document.createElement("div")),this._domNode.setClassName(uO.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Fk(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(uO.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}uO.CLASS_NAME="glyph-margin",uO.OUTER_CLASS_NAME="margin";const gO="monaco-mouse-cursor-text";const pO=new class{constructor(){this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}};var mO=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fO=function(e,t){return function(i,n){t(i,n,e)}};class _O{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new Ba(this.modelLineNumber,this.distanceToModelLineStart+1),i=new Ba(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const vO=ne;let bO=class extends rA{constructor(e,t,i,n){super(e),this._keybindingService=n,this._primaryCursorPosition=new Ba(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const s=this._context.configuration.options,o=s.get(143);this._setAccessibilityOptions(s),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=s.get(50),this._lineHeight=s.get(66),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new Th(1,1,1,1)],this._modelSelections=[new Th(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Fk(document.createElement("textarea")),aA.write(this.textArea,6),this.textArea.setClassName(`inputarea ${gO}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:r}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=r*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",ue(0,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=Fk(document.createElement("div")),this.textAreaCover.setPosition("absolute");const a={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},l={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,Oe),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,s=Array.isArray(e)?e.join(t):e;let o,r=null;if(jy.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&s.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(o=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:s,html:o,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(Pe&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new zy(i,i.length,i.length,Mh.fromPositions(t),0)}const t=500;if(Pe&&!e.isEmpty()&&a.getValueLengthInRange(e,0)0)return new zy(i,n,n,Mh.fromPositions(t),0)}return zy.EMPTY}return Uy.fromEditorSelection(a,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},h=this._register(new Yy(this.textArea.domNode));this._textAreaInput=this._register(new Gy(l,h,$e,{isAndroid:le,isChrome:oe,isFirefox:ne,isSafari:re})),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta):this._viewController.type(e.text)}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:s}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),s=e.substring(n+1),o=s.lastIndexOf("\t"),r=s.length-o-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),h=a.column-1-l,d=s.substring(0,s.length-l),{tabSize:c}=this._context.viewModel.model.getOptions(),u=function(e,t,i,n){if(0===t.length)return 0;const s=e.createElement("div");s.style.position="absolute",s.style.top="-50000px",s.style.width="50000px";const o=e.createElement("span");Bk(o,i),o.style.whiteSpace="pre",o.style.tabSize=n*i.spaceWidth+"px",o.append(t),s.appendChild(o),e.body.appendChild(s);const r=o.offsetWidth;return e.body.removeChild(s),r}(this.textArea.domNode.ownerDocument,d,this._fontInfo,c);return{distanceToModelLineStart:h,widthOfHiddenTextBefore:u}})(),{distanceToModelLineEnd:o}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),s=-1===n?e:e.substring(0,n),o=s.indexOf("\t"),r=-1===o?s.length:s.length-o-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,Mh.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new _O(this._context,i.startLineNumber,n,s,o),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${gO} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${gO}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)}))),this._register(pO.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeScreenReaderContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=jb('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,s=e.column,o=!0,r=e.column,a=0;for(;a<50&&(n||o);){if(n&&s<=1&&(n=!1),n){const e=t.charCodeAt(s-2);0!==i.get(e)?n=!1:s--}if(o&&r>t.length&&(o=!1),o){const e=t.charCodeAt(r-1);0!==i.get(e)?o=!1:r++}a++}return[t.substring(s-1,r-1),e.column-s]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=jb(this._context.configuration.options.get(129));let n=e.column,s=0;for(;n>1;){const o=t.charCodeAt(n-2);if(0!==i.get(o)||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Co(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){var t,i,n;if(1===e.get(2)){const e=null===(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))||void 0===t?void 0:t.getAriaLabel(),s=null===(i=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))||void 0===i?void 0:i.getAriaLabel(),o=null===(n=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))||void 0===n?void 0:n.getAriaLabel(),r=ue(0,"The editor is not accessible at this time.");return e?ue(0,"{0} To enable screen reader optimized mode, use {1}",r,e):s?ue(0,"{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",r,s):o?ue(0,"{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",r,o):r}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===qS.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(143).wrappingColumn;if(-1!==i&&1!==this._accessibilitySupport){const t=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=vO?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(66),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=n*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(123))),(e.hasChanged(34)||e.hasChanged(90))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!pO.enabled||e.get(34)&&e.get(90)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new Ba(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),null===(t=this._visibleTextArea)||void 0===t||t.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const s=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,o=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(athis._contentWidth&&(l=this._contentWidth);const h=this._context.viewModel.getViewLineData(i.lineNumber),d=h.tokens.findTokenIndexAtOffset(i.column-1),c=d===h.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(c?h.tokens.getPresentation(d):null);this.textArea.domNode.scrollTop=o*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:s,left:a,width:l,height:this._lineHeight,useCover:!1,color:(DC.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(tthis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const i=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(i<0||i>this._contentHeight)this._renderAtTopLeft();else if(Pe){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=null!==(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)&&void 0!==e?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:vO?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;;){if(i=e.indexOf("\n",i+1),-1===i)break;t++}return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:vO?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;Bk(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?rc.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(57)?i.setClassName("monaco-editor-background textAreaCover "+uO.OUTER_CLASS_NAME):0!==n.get(67).renderType?i.setClassName("monaco-editor-background textAreaCover "+cO.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};bO=mO([fO(3,PL)],bO);class CO{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Iy.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Iy.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Iy.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Iy.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Iy.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Iy.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Iy.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Iy.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Iy.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Iy.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Iy.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Iy.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Iy.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Iy.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class wO{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;null===(t=this.onKeyDown)||void 0===t||t.call(this,e)}emitKeyUp(e){var t;null===(t=this.onKeyUp)||void 0===t||t.call(this,e)}emitContextMenu(e){var t;null===(t=this.onContextMenu)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;null===(t=this.onMouseMove)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;null===(t=this.onMouseLeave)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;null===(t=this.onMouseDown)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;null===(t=this.onMouseUp)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;null===(t=this.onMouseDrag)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;null===(t=this.onMouseDrop)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;null===(e=this.onMouseDropCanceled)||void 0===e||e.call(this)}emitMouseWheel(e){var t;null===(t=this.onMouseWheel)||void 0===t||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return wO.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),5!==i.type&&8!==i.type||(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new Ba(e.afterLineNumber,1)).lineNumber}}}class yO{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new f("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let s=0,o=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===o?(s=i,o=1):o++)}if(e=n&&r<=s&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s){return this._lines.splice(e-this._rendLineNumberStart,s-e+1)}const o=[];for(let d=0;di)continue;const r=Math.max(t,o.fromLineNumber),a=Math.min(i,o.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class SO{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new yO((()=>this._host.createVisibleLine()))}_createDomNode(){const e=Fk(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(143)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;it){const e=t,o=Math.min(i,s.rendLineNumberStart-1);e<=o&&(this._insertLinesBefore(s,e,o,n,t),s.linesLength+=o-e+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,e),s.linesLength-=e)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1i){const e=Math.max(0,i-s.rendLineNumberStart+1),t=s.linesLength-1-e+1;t>0&&(this._removeLinesAfter(s,t),s.linesLength-=t)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const o=e.rendLineNumberStart,r=e.lines;for(let a=t;a<=i;a++){const e=o+a;r[a].layoutLine(e,n[e-s])}}_insertLinesBefore(e,t,i,n,s){const o=[];let r=0;for(let a=t;a<=i;a++)o[r++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;r--){const t=e.lines[r];n[r]&&(t.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");LO._ttPolicy&&(t=LO._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;se}),LO._sb=new Qc(1e5);class kO extends rA{constructor(e){super(e),this._visibleLines=new SO(this),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(50);Bk(this.domNode,t),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),n.appendString(s),n.appendString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class xO extends kO{constructor(e){super(e);const t=this._context.configuration.options.get(143);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(143);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class NO extends kO{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Bk(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;Bk(this.domNode,t.get(50));const i=t.get(143);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class EO extends rA{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Fk(document.createElement("div")),aA.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Fk(document.createElement("div")),aA.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){const t=new IO(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,s){this._widgets[e.getId()].setPosition(t,i,n,s),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class IO{constructor(e,t,i){this._primaryAnchor=new MO(null,null),this._secondaryAnchor=new MO(null,null),this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=Fk(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,s=n.get(143);this._fixedOverflowWidgets=n.get(42),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(66),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(66),e.hasChanged(143)){const e=t.get(143);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){function n(e,t,i){if(!e)return new MO(null,null);const n=t.model.validatePosition(e);if(t.coordinatesConverter.modelPositionIsVisible(n)){const s=t.coordinatesConverter.convertModelPositionToViewPosition(n,null!=i?i:void 0);return new MO(e,s)}return new MO(e,null)}this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity)}_getMaxWidth(){const e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?(null==t?void 0:t.innerWidth)||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const s=e.top,o=s,r=e.top+e.height,a=s-i,l=o>=i,h=r,d=n.viewportHeight-r>=i;let c=e.left;return c+t>n.scrollLeft+n.viewportWidth&&(c=n.scrollLeft+n.viewportWidth-t),cr){const e=l-(r-n);l-=e,i-=e}if(l=22,_=u+i<=g.height-22;return this._fixedOverflowWidgets?{fitsAbove:f,aboveTop:Math.max(c,22),fitsBelow:_,belowTop:u,left:m}:{fitsAbove:f,aboveTop:r,fitsBelow:_,belowTop:a,left:p}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new TO(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,i;return{primary:n(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),secondary:n((null===(t=this._secondaryAnchor.viewPosition)||void 0===t?void 0:t.lineNumber)===(null===(i=this._primaryAnchor.viewPosition)||void 0===i?void 0:i.lineNumber)?this._secondaryAnchor.viewPosition:null,this._affinity,this._lineHeight)};function n(t,i,n){if(!t)return null;const s=e.visibleRangeForPosition(t);if(!s)return null;const o=1===t.column&&3===i?0:s.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new RO(r,o,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let s=t.left;return s=se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&AO(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&AO(this._actual.afterRender,this._actual,this._renderData.position)}}class MO{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class TO{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class RO{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function AO(e,t,...i){try{return e.call(t,...i)}catch(ge){return null}}class OO extends dO{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(143);this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Th(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map((e=>e.positionLineNumber));t.sort(((e,t)=>e-t)),Id(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);return this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let o=0;const r=[];for(let a=i;a<=n;a++){const e=a-i;for(;o=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class PO extends OO{_renderOne(e){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class FO extends OO{_renderOne(e){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}B_(((e,t)=>{const i=e.getColor(V_);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(H_)){const i=e.getColor(H_);i&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),M_(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));class BO extends dO{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let a=0,l=t.length;a{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:Mh.compareRangesUsingStarts(e.range,t.range)}));const s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=[];for(let a=s;a<=o;a++){r[a-s]=""}this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let r=0,a=t.length;r',l=Math.max(e.range.startLineNumber,s),h=Math.min(e.range.endLineNumber,o);for(let t=l;t<=h;t++){i[t-s]+=a}}}_renderNormalDecorations(e,t,i){var n;const s=String(this._lineHeight),o=e.visibleRange.startLineNumber;let r=null,a=!1,l=null,h=!1;for(let d=0,c=t.length;d';a[t]+=d}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class WO extends rA{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,o=s.get(102),r=s.get(74),a=s.get(40),l=s.get(105),h={listenOnDomNode:i.domNode,className:"editor-scrollable "+O_(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:o.scrollByPage};this.scrollbar=this._register(new MD(t.domNode,h,this._context.viewLayout.getScrollable())),aA.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Fk(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(En(i.domNode,"scroll",(e=>d(i.domNode,!0,!0)))),this._register(En(t.domNode,"scroll",(e=>d(t.domNode,!0,!1)))),this._register(En(n.domNode,"scroll",(e=>d(n.domNode,!0,!1)))),this._register(En(this.scrollbarDomNode.domNode,"scroll",(e=>d(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(143);this.scrollbarDomNode.setLeft(t.contentLeft);"right"===e.get(72).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(102)||e.hasChanged(74)||e.hasChanged(40)){const e=this._context.configuration.options,t=e.get(102),i=e.get(74),n=e.get(40),s=e.get(105),o={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:s};this.scrollbar.updateOptions(o)}return e.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+O_(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class VO extends dO{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(144),n=t.get(50);this._lineHeight=t.get(66),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(144),n=t.get(50);return this._lineHeight=t.get(66),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,s;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,h=this._primaryPosition,d=this.getGuidesByLine(o,Math.min(r+1,this._context.viewModel.getLineCount()),h),c=[];for(let u=o;u<=r;u++){const r=u-o,h=d[r];let g="";const p=null!==(i=null===(t=e.visibleRangeForPosition(new Ba(u,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of h){const i=-1===t.column?p+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new Ba(u,t.column)).left;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const o=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(null!==(s=null===(n=e.visibleRangeForPosition(new Ba(u,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==s?s:i+this._spaceWidth)-i:this._spaceWidth;g+=`
    `}c[r]=g}this._renderResult=c}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?Zv.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?Zv.EnabledForActive:Zv.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let o=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);o=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),h=[];for(let d=e;d<=t;d++){const t=new Array;h.push(t);const i=n?n[d-e]:[],c=new ec(i),u=s?s[d-e]:0;for(let e=1;e<=u;e++){const n=(e-1)*l+1,s=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===i.length)&&o<=d&&d<=r&&e===a;t.push(...c.takeWhile((e=>e.visibleColumn!0))||[])}return h}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function HO(e){if(!e||!e.isTransparent())return e}B_(((e,t)=>{const i=[{bracketColor:fv,guideColor:Sv,guideColorActive:Ev},{bracketColor:_v,guideColor:Lv,guideColorActive:Iv},{bracketColor:vv,guideColor:kv,guideColorActive:Mv},{bracketColor:bv,guideColor:Dv,guideColorActive:Tv},{bracketColor:Cv,guideColor:xv,guideColorActive:Rv},{bracketColor:wv,guideColor:Nv,guideColorActive:Av}],n=new Jv,s=[{indentColor:G_,indentColorActive:ev},{indentColor:Z_,indentColorActive:tv},{indentColor:Y_,indentColorActive:iv},{indentColor:X_,indentColorActive:nv},{indentColor:Q_,indentColorActive:sv},{indentColor:J_,indentColorActive:ov}],o=i.map((t=>{var i,n;const s=e.getColor(t.bracketColor),o=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=HO(null!==(i=HO(o))&&void 0!==i?i:null==s?void 0:s.transparent(.3)),l=HO(null!==(n=HO(r))&&void 0!==n?n:s);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(Ur),r=s.map((t=>{const i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),s=HO(i),o=HO(n);if(s&&o)return{indentColor:s,indentColorActive:o}})).filter(Ur);if(o.length>0){for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}));class zO{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class UO{constructor(){this._currentVisibleRange=new Mh(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class KO{constructor(e,t,i,n,s,o,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class jO{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let o=t[0].startLineNumber,r=t[0].endLineNumber;for(let a=1,l=t.length;a{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new sd((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new UO,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(114).enabled,this._maxNumberStickyLines=n.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new OA(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(144)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(144);return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(99),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(114).enabled,this._maxNumberStickyLines=t.get(114).maxLineCount,Bk(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new AA(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++){this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let s=t;s<=i;s++)n=this._visibleLines.getVisibleLine(s).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new KO(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new jO(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new Ba(n,1);const s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(no)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri)return-1;const n=new zO(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=Mh.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const s=[];let o=0;const r=new zO(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Ba(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),h=this._visibleLines.getEndLineNumber();for(let d=n.startLineNumber;d<=n.endLineNumber;d++){if(dh)continue;const e=d===n.startLineNumber?n.startColumn:1,c=d!==n.endLineNumber,u=c?this._context.viewModel.getLineMaxColumn(d):n.endColumn,g=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,e,u,r);if(g){if(t&&dthis._visibleLines.getEndLineNumber())return null;const n=new zO(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new gA(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let o=t;o<=i;o++){const t=this._visibleLines.getVisibleLine(o);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth(null)):s=!1}return s&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const i=this._visibleLines.getVisibleLine(s);if(i.needsMonospaceFontCheck()){const n=i.getWidth(null);n>t&&(t=n,e=s)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=i;s<=n;s++){this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),Fe&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++){if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=s[0].startLineNumber,t=s[0].endLineNumber;for(let i=1,n=s.length;ia){if(!h)return-1;u=d}else if(5===o||6===o)if(6===o&&r<=d&&c<=l)u=r;else{const e=d-Math.max(5*this._lineHeight,.2*a),t=c-a;u=Math.max(t,e)}else if(1===o||2===o)if(2===o&&r<=d&&c<=l)u=r;else{const e=(d+c)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,d,c,3===o,4===o);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(143),n=t.left,s=n+t.width-i.verticalScrollbarWidth;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const a of e.selections){if(a.startLineNumber!==a.endLineNumber)return null;const e=this._visibleRangesForLineRange(a.startLineNumber,a.startColumn,a.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}if(e.minimalReveal||(o=Math.max(0,o-qO.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-o>t.width)return null;return{scrollLeft:this._computeMinimumScrolling(n,s,o,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,s,o){s=!!s,o=!!o;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-r):e:i}}qO.HORIZONTAL_EXTRA_PX=30;class $O{constructor(e,t,i,n){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i),this.zIndex=null!=n?n:0}}class GO{constructor(e,t){this.className=e,this.zIndex=t}}class ZO{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class YO extends dO{_render(e,t,i){const n=[];for(let r=e;r<=t;r++){n[r-e]=new ZO}if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.classNamen)continue;const o=Math.max(e.startLineNumber,i),r=Math.min(s.preference.lane,this._glyphMarginDecorationLaneCount);t.push(new JO(o,r,s.preference.zIndex,s))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.lane===t.lane?e.zIndex===t.zIndex?t.type===e.type?0===e.type&&0===t.type?e.className0;){const e=t.peek();if(!e)break;const n=t.takeWhile((t=>t.lineNumber===e.lineNumber&&t.lane===e.lane));if(!n||0===n.length)break;const s=n[0];if(0===s.type){const e=[];for(const t of n){if(t.zIndex!==s.zIndex||t.type!==s.type)break;0!==e.length&&e[e.length-1]===t.className||e.push(t.className)}i.push(s.accept(e.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,lane:s.lane}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(i.renderInfo){const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+(i.renderInfo.lane-1)*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;ithis._decorationGlyphsToRender.length;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}}}class QO{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new eP(this.lineNumber,this.lane,e)}}class JO{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.widget=n,this.type=1}}class eP{constructor(e,t,i){this.lineNumber=e,this.lane=t,this.combinedClassName=i}}class tP extends YO{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(143);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(143);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let s=0,o=t.length;s',o=[];for(let r=t;r<=i;r++){const e=r-t,i=n[e].getDecorations();let a="";for(const t of i)a+='
    ';s[e]=r}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class nP{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=nP._clamp(e),this.g=nP._clamp(t),this.b=nP._clamp(i),this.a=nP._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}nP.Empty=new nP(0,0,0,0);class sP extends E{static getInstance(){return this._INSTANCE||(this._INSTANCE=S(new sP)),this._INSTANCE}constructor(){super(),this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(DC.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=DC.getColorMap();if(!e)return this._colors=[nP.Empty],void(this._backgroundIsLight=!0);this._colors=[nP.Empty];for(let i=1;i=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}sP._INSTANCE=null;class oP{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class rP{constructor(e,t){this.tabSize=e,this.data=t}}class aP{constructor(e,t,i,n,s,o,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=r}}class lP{constructor(e,t,i,n,s,o,r,a,l,h){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=lP.isBasicASCII(i,o),this.containsRTL=lP.containsRTL(i,this.isBasicASCII,s),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=h}static isBasicASCII(e,t){return!t||Mo(e)}static containsRTL(e,t,i){return!(t||!i)&&Eo(e)}}class hP{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class dP{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new hP(new Mh(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class cP{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class uP{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&Id(e.data,t.data)}static equalsArr(e,t){return Id(e,t,uP.equals)}}const gP=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();class pP{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=pP.soften(e,.8),this.charDataLight=pP.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=h?this.charDataLight:this.charDataNormal,m=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),f=4*e.width,_=r.r,v=r.g,b=r.b,C=s.r-_,w=s.g-v,y=s.b-b,S=Math.max(o,a),L=e.data;let k=m*c*u,D=i*f+4*t;for(let x=0;xe.width||i+d>e.height)return void console.warn("bad render request outside image data");const c=4*e.width,u=s/255*.5,g=o.r,p=o.g,m=o.b,f=g+(n.r-g)*u,_=p+(n.g-p)*u,v=m+(n.b-m)*u,b=Math.max(s,r),C=e.data;let w=i*c+4*t;for(let y=0;y{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=mP[e[i]]<<4|15&mP[e[i+1]];return t},_P={1:_((()=>fP("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:_((()=>fP("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class vP{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=_P[e]?new pP(_P[e](),e):vP.createFromSampleData(vP.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const s of gP)i.fillText(String.fromCharCode(s),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=vP._downsample(e,t);return new pP(i,t)}static _downsampleChar(e,t,i,n,s){const o=1*s,r=2*s;let a=n,l=0;for(let h=0;h0){const e=255/a;for(let t=0;tvP.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=bP._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=bP._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(f_);return i?new nP(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(__);return t?nP._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class CP{constructor(e,t,i,n,s,o,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,o,r,a,l,h,d){const c=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,s-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(s*s/t)),n=Math.max(0,e.minimapHeight-i),o=n/(h-s),d=l*o,c=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new CP(l,h,c,o,d,i,g,1,Math.min(r,u))}let m;if(o&&i!==r){const e=i-t+1;m=Math.floor(e*u/c)}else{const e=s/p;m=Math.floor(e*u/c)}const f=Math.floor(e.paddingTop/p);let _,v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=s/p;v=Math.max(v,e-1)}if(v>0){_=(f+r+v-s/p-1)*u/c}else _=Math.max(0,(f+r)*u/c-m);_=Math.min(e.minimapHeight-m,_);const b=_/(h-s),C=l*b;if(g>=f+r+v){return new CP(l,h,_>0,b,C,m,f,1,r)}{let i,s;i=t>1?t+f:Math.max(1,l/p);let o=Math.max(1,Math.floor(i-C*c/u));ol&&(o=Math.min(o,d.startLineNumber),s=Math.max(s,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?(t-o+s+_)*u/c:l/e.paddingTop*(s+_)*u/c,new CP(l,h,!0,b,v,m,s,o,a)}}}class wP{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}wP.INVALID=new wP(-1);class yP{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new yO((()=>wP.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let i=0,n=t.length;i1){for(let t=0,i=n-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=LP.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let s=0,o=t-e+1;s{e.preventDefault();if(0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=Hn(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderPointerMoveMonitor=new gD,this._sliderPointerDownListener=Mn(this._slider.domNode,os.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=qL.addTarget(this._domNode.domNode),this._sliderTouchStartListener=En(this._domNode.domNode,KL.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=En(this._domNode.domNode,KL.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=Mn(this._domNode.domNode,KL.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i){if(!(e.target&&e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const s=(e,s)=>{const o=Hn(this._domNode.domNode),r=Math.min(Math.abs(s-n),Math.abs(s-o.left),Math.abs(s-o.left-o.width));if(Oe&&r>140)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>s(e.pageY,e.pageX)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new SP(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(u_),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=CP.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(Mh.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,s);const h=new xP(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,h,e,o),this._renderDecorationsLineHighlights(l,i,h,e,o);const d=new xP(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,o,a,r,n),this._renderDecorationsHighlights(l,i,d,e,o,a,r,n)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,h]=t;for(let e=l;e<=h;e++)i.set(e,!0);const d=n.getYForLineNumber(l,s),c=n.getYForLineNumber(h,s);r>=d||(r>o&&e.fillRect(8,o,e.canvas.width,r-o),o=d),r=c}r>o&&e.fillRect(8,o,e.canvas.width,r-o)}_renderDecorationsLineHighlights(e,t,i,n,s){const o=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||l.position!==Cd.Inline)continue;const h=n.intersectWithViewport(a.range);if(!h)continue;const[d,c]=h,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=o.get(u.toString());g||(g=u.transparent(.5).toString(),o.set(u.toString(),g)),e.fillStyle=g;for(let t=d;t<=c;t++){if(i.has(t))continue;i.set(t,!0);const o=n.getYForLineNumber(d,s);e.fillRect(8,o,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,o,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[h,d]=t;for(let c=h;c<=d;c++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,c,s,s,o,r,a)}}_renderDecorationsHighlights(e,t,i,n,s,o,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const h=n.intersectWithViewport(l.range);if(!h)continue;const[d,c]=h,u=t.getColor(this._theme.value);if(u&&!u.isTransparent())for(let g=d;g<=c;g++)switch(t.position){case Cd.Inline:this.renderDecorationOnLine(e,i,l.range,u,n,g,s,s,o,r,a);continue;case Cd.Gutter:{const t=n.getYForLineNumber(g,s),i=2;this.renderDecoration(e,u,i,t,2,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,o,r,a,l,h,d){const c=s.getYForLineNumber(o,a);if(c+r<0||c>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===o?i.startColumn:1,m=g===o?i.endColumn:this._model.getLineMaxColumn(o),f=this.getXOffsetForPosition(t,o,p,l,h,d),_=this.getXOffsetForPosition(t,o,m,l,h,d);this.renderDecoration(e,n,f,c,_-f,r)}getXOffsetForPosition(e,t,i,n,s,o){if(1===i)return 8;if((i-1)*s>=o)return o;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[8];let a=8;for(let e=1;e=o){r[e]=o;break}r[e]=l,a=l}e.set(t,r)}return i-1b?Math.floor((n-b)/2):0,w=c.a/255,y=new nP(Math.round((c.r-d.r)*w+d.r),Math.round((c.g-d.g)*w+d.g),Math.round((c.b-d.b)*w+d.b),255);let S=e.topPaddingLineCount*n;const L=[];for(let x=0,N=i-t+1;x=0&&t_)return;const r=m.charCodeAt(C);if(9===r){const e=c-(C+w)%c;w+=e-1,b+=e*o}else if(32===r)b+=o;else{const c=Ao(r)?2:1;for(let u=0;u_)return}}}}}class xP{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let n=0,s=this._endLineNumber-this._startLineNumber+1;nthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class NP extends rA{constructor(e){super(e);const t=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=Fk(document.createElement("div")),aA.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=Fk(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?(this._updateMaxMinWidth(),!1):(i.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let i=0;const n=Object.keys(this._widgets);for(let s=0,o=n.length;s=3){const t=Math.floor(n/3),i=Math.floor(n/3),s=n-t-i,o=e+t;return[[0,e,o,e,e+t+s,e,o,e],[0,t,s,t+s,i,t+s+i,s+i,t+s+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&rc.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class IP extends rA{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=Fk(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=DC.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new EP(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;te.lineNumber===t.lineNumber))||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,o=this._context.viewLayout,r=n/this._context.viewLayout.getScrollHeight(),a=6*this._settings.pixelRatio|0,l=a/2|0,h=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(h.fillStyle=rc.Format.CSS.formatHexA(e),h.fillRect(0,0,i,n)):(h.clearRect(0,0,i,n),h.fillStyle=rc.Format.CSS.formatHexA(e),h.fillRect(0,0,i,n)):h.clearRect(0,0,i,n);const d=this._settings.x,c=this._settings.w;for(const u of t){const e=u.color,t=u.data;h.fillStyle=e;let i=0,g=0,p=0;for(let u=0,m=t.length/3;un&&(e=n-l),_=e-l,v=e+l}_>p+1||e!==i?(0!==u&&h.fillRect(d[i],g,c[i],p-g),i=e,g=_,p=v):v>p&&(p=v)}h.fillRect(d[i],g,c[i],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],s=this._settings.w[7];h.fillStyle=this._settings.cursorColor;let a=-100,l=-100;for(let d=0,c=this._cursorPositions.length;dn&&(u=n-t);const g=u-t,p=g+e;g>l+1?(0!==d&&h.fillRect(i,a,s,l-a),a=g,l=p):p>l&&(l=p)}h.fillRect(i,a,s,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,n),h.stroke(),h.moveTo(0,0),h.lineTo(i,0),h.stroke())}}class MP{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class TP{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(u=i-g);const p=a.color;let m=this._color2Id[p];m||(m=++this._lastAssignedId,this._color2Id[p]=m,this._id2Color[m]=p);const f=new MP(u-g,u+g,m);a.setColorZone(f),o.push(f)}return this._colorZonesInvalid=!1,o.sort(MP.compare),o}}class AP extends oA{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=Fk(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new RP((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(66)),this._zoneManager.setPixelRatio(i.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(66)&&(this._zoneManager.setLineHeight(t.get(66)),this._render()),e.hasChanged(141)&&(this._zoneManager.setPixelRatio(t.get(141)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,o=0,r=0;for(const a of t){const t=a.colorId,l=a.from,h=a.to;t!==s?(e.fillRect(0,o,n,r-o),s=t,e.fillStyle=i[s],o=l,r=h):r>=l?r=Math.max(r,h):(e.fillRect(0,o,n,r-o),o=l,r=h)}e.fillRect(0,o,n,r-o)}}class OP extends rA{constructor(e){super(e),this.domNode=Fk(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=Fk(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),s--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(143);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(102);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class FP{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class BP{constructor(e,t){this.lineNumber=e,this.ranges=t}}function WP(e){return new FP(e)}function VP(e){return new BP(e.lineNumber,e.ranges.map(WP))}class HP extends dO{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,o=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!s&&e=0;e--)i[e].lineNumber===r&&(o=i[e].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let r=0,a=t.length;r0){const e=t[r-1].ranges[0].left,s=t[r-1].ranges[0].left+t[r-1].ranges[0].width;zP(i-e)e&&(h.top=1),zP(l-s)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const s=!!n[0].ranges[0].startStyle,o=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let h=0,d=n.length;h1,r)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function zP(e){return e<0?-e:e}HP.SELECTION_CLASS_NAME="selected-text",HP.SELECTION_TOP_LEFT="top-left-radius",HP.SELECTION_BOTTOM_LEFT="bottom-left-radius",HP.SELECTION_TOP_RIGHT="top-right-radius",HP.SELECTION_BOTTOM_RIGHT="bottom-right-radius",HP.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",HP.ROUNDED_PIECE_WIDTH=10,B_(((e,t)=>{const i=e.getColor(Pm);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));class UP{constructor(e,t,i,n,s,o,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=o,this.textContentClassName=r}}class KP{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Fk(document.createElement("div")),this._domNode.setClassName(`cursor ${gO}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Bk(this._domNode,i),this._domNode.setDisplay("none"),this._position=new Ba(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),Bk(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=function(e,t){t>0&&wo(e.charCodeAt(t))&&t--;const i=t+Do(e,t);return[i-xo(e,i),i]}(i,t-1);return[new Ba(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="";const[n,s]=this._getGraphemeAwarePosition();if(this._cursorStyle===xS.Line||this._cursorStyle===xS.LineThin){const o=e.visibleRangeForPosition(n);if(!o||o.outsideRenderedLine)return null;let r;this._cursorStyle===xS.Line?(r=bs(this._lineCursorWidth>0?this._lineCursorWidth:2),r>2&&(t=s,i=this._getTokenClassName(n))):r=bs(1);let a=o.left,l=0;r>=2&&a>=1&&(l=1,a-=l);const h=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new UP(h,a,l,r,this._lineHeight,t,i)}const o=e.linesVisibleRangesForRange(new Mh(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],l="\t"===s||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===xS.Block&&(t=s,i=this._getTokenClassName(n));let h=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return this._cursorStyle!==xS.Underline&&this._cursorStyle!==xS.UnderlineThin||(h+=this._lineHeight-2,d=2),new UP(h,a.left,0,l,d,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${gO} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class jP extends rA{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new KP(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Fk(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new id,this._cursorFlatBlinkInterval=new nd,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;it.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),jP.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),jP.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case xS.Line:e+=" cursor-line-style";break;case xS.Block:e+=" cursor-block-style";break;case xS.Underline:e+=" cursor-underline-style";break;case xS.LineThin:e+=" cursor-line-thin-style";break;case xS.BlockOutline:e+=" cursor-block-outline-style";break;case xS.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=e.getColor(z_);if(i){let n=e.getColor(U_);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),M_(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const qP=()=>{throw new Error("Invalid change accessor")};class $P extends rA{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._lineHeight=t.get(66),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=Fk(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Fk(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let s=0,o=n.length;s{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{return e(t)}catch(Dre){r(Dre)}}(e,n),n.addZone=qP,n.removeZone=qP,n.layoutZone=qP})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:Fk(t.domNode),marginDomNode:t.marginDomNode?Fk(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(Dre){r(Dre)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(Dre){r(Dre)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const o of t)this._zones[o.id].isInHiddenArea||(i[o.id]=o,n=!0);const s=Object.keys(this._zones);for(let o=0,r=s.length;oo)continue;const e=t.startLineNumber===o?t.startColumn:i.minColumn,s=t.endLineNumber===o?t.endColumn:i.maxColumn;e=S.endOffset&&(y++,S=i&&i[y]),9!==n&&32!==n)continue;if(c&&!C&&k<=v)continue;if(d&&k>=w&&k<=v&&32===n){const e=k-1>=0?r.charCodeAt(k-1):0,t=k+1=0?r.charCodeAt(k-1):0;if(32===n&&32!==e&&9!==e)continue}if(i&&(!S||S.startOffset>k||S.endOffset<=k))continue;const s=e.visibleRangeForPosition(new Ba(t,k+1));s&&(o?(L=Math.max(L,s.left),b+=9===n?this._renderArrow(u,m,s.left):``):b+=9===n?`
    ${_?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:`
    ${String.fromCharCode(f)}
    `)}return o?(L=Math.round(L+m),``+b+""):b}_renderArrow(e,t,i){const n=e/2,s=i,o={x:0,y:t/7/2},r={x:.8*t,y:o.y},a={x:r.x-.2*r.x,y:r.y+.2*r.x},l={x:a.x+.1*r.x,y:a.y+.1*r.x},h={x:l.x+.35*r.x,y:l.y-.35*r.x};return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class JP{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(98),this.renderWithSVG=!0):(this.renderWhitespace=t.get(98),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(66),this.stopRenderingLineAfter=t.get(116)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}var eF=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},tF=function(e,t){return function(i,n){t(i,n,e)}};let iF=class extends oA{constructor(e,t,i,n,s,o,r){super(),this._instantiationService=r,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Th(1,1,1,1)],this._renderAnimationFrame=null;const a=new CO(t,n,s,e);this._context=new ZP(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(bO,this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=Fk(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Fk(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=Fk(document.createElement("div")),aA.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new WO(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new qO(this._context,this._linesContent),this._viewZones=new $P(this._context),this._viewParts.push(this._viewZones);const l=new IP(this._context);this._viewParts.push(l);const h=new PP(this._context);this._viewParts.push(h);const d=new xO(this._context);this._viewParts.push(d),d.addDynamicOverlay(new PO(this._context)),d.addDynamicOverlay(new HP(this._context)),d.addDynamicOverlay(new VO(this._context)),d.addDynamicOverlay(new BO(this._context)),d.addDynamicOverlay(new QP(this._context));const c=new NO(this._context);this._viewParts.push(c),c.addDynamicOverlay(new FO(this._context)),c.addDynamicOverlay(new iP(this._context)),c.addDynamicOverlay(new tP(this._context)),c.addDynamicOverlay(new cO(this._context)),this._glyphMarginWidgets=new XO(this._context),this._viewParts.push(this._glyphMarginWidgets);const u=new uO(this._context);u.getDomNode().appendChild(this._viewZones.marginDomNode),u.getDomNode().appendChild(c.getDomNode()),u.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(u),this._contentWidgets=new EO(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new jP(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new NP(this._context),this._viewParts.push(this._overlayWidgets);const g=new OP(this._context);this._viewParts.push(g);const p=new XP(this._context);this._viewParts.push(p);const m=new kP(this._context);if(this._viewParts.push(m),l){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(l.getDomNode(),e.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(m.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),o?o.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new hO(this._context,a,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),Py.onRenderStart(),this._renderNow()}_computeGlyphMarginLaneCount(){const e=this._context.viewModel.model;let t=[];t=t.concat(e.getAllMarginDecorations().map((e=>{var t,i;const n=null!==(i=null===(t=e.options.glyphMargin)||void 0===t?void 0:t.position)&&void 0!==i?i:bd.Left;return{range:e.range,lane:n}}))),t=t.concat(this._glyphMarginWidgets.getWidgets().map((t=>({range:e.validateRange(t.preference.range),lane:t.preference.lane})))),t.sort(((e,t)=>Mh.compareRangesUsingStarts(e.range,t.range)));let i=null,n=null;for(const s of t)if(s.lane===bd.Left&&(!i||Mh.compareRangesUsingEnds(i,s.range)<0)&&(i=s.range),s.lane===bd.Right&&(!n||Mh.compareRangesUsingEnds(n,s.range)<0)&&(n=s.range),i&&n){if(i.endLineNumber{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new qA(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Ba(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(143);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+O_(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=Rn(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{return e()}catch(Dre){r(Dre)}}((()=>this._actualRender()))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!xn(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new YP(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new hA(this._context.viewLayout,i,this._viewLines);for(const s of e)s.prepareRender(n);for(const s of e)s.render(n),s.onDidRender()}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new Ba(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?wO.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new AP(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i,n,s,o,r,a,l;this._contentWidgets.setWidgetPosition(e.widget,null!==(i=null===(t=e.position)||void 0===t?void 0:t.position)&&void 0!==i?i:null,null!==(s=null===(n=e.position)||void 0===n?void 0:n.secondaryPosition)&&void 0!==s?s:null,null!==(r=null===(o=e.position)||void 0===o?void 0:o.preference)&&void 0!==r?r:null,null!==(l=null===(a=e.position)||void 0===a?void 0:a.positionAffinity)&&void 0!==l?l:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};iF=eF([tF(6,Oa)],iF);class nF{constructor(e,t,i,n,s,o){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=s,this._contextKeyService=o}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}const sF={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};class oF{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Kw(new Mh(1,1,1,1),0,0,new Ba(1,1),0),new Kw(new Mh(1,1,1,1),0,0,new Ba(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Hw(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?Th.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):Th.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),o=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,o),a=this._validatePositionWithCache(e,s,n,r);return i.equals(o)&&n.equals(r)&&s.equals(a)?t:new Kw(Mh.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,o,t.leftoverVisibleColumns+i.column-o.column)}_setState(e,t,i){if(i&&(i=oF._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),o=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new Kw(i,t.selectionStartKind,n,s,o)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Kw(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Kw(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new Ba(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new Ba(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new Mh(n.lineNumber,n.column,s.lineNumber,s.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Kw(o,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class rF{constructor(e){this.context=e,this.cursors=[new oF(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return function(e,t){return _c(e,((e,i)=>-t(e,i)))}(this.cursors,Yd((e=>e.viewState.position),Ba.compare)).viewState.position}getBottomMostViewPosition(){return function(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=s)}return i}(this.cursors,Yd((e=>e.viewState.position),Ba.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(Hw.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),Mh.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class aF{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class lF{constructor(){this.type=0}}class hF{constructor(){this.type=1}}class dF{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class cF{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class uF{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0)}}class gF{constructor(){this.type=5}}class pF{constructor(e){this.type=6,this.isFocused=e}}class mF{constructor(){this.type=7}}class fF{constructor(){this.type=8}}class _F{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class vF{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class bF{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class CF{constructor(e,t,i,n,s,o,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=o,this.scrollType=r,this.type=12}}class wF{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class yF{constructor(e){this.theme=e,this.type=14}}class SF{constructor(e){this.type=15,this.ranges=e}}class LF{constructor(){this.type=16}}class kF{constructor(){this.type=17}}class DF extends E{constructor(){super(),this._onEvent=this._register(new U),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class xF{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class NF{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new NF(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class EF{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new EF(this.oldHasFocus,e.hasFocus)}}class IF{constructor(e,t,i,n,s,o,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=o,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}attemptToMerge(e){return e.kind!==this.kind?null:new IF(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class MF{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class TF{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class RF{constructor(e,t,i,n,s,o,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=o,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;to&&(n=n.slice(0,o),s=!0);const r=zF.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,s,o){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=Mh.fromPositions(r[0],r[0]),e.emitViewEvent(new CF(t,i,a,l,n,s,o))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const t=Hw.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Hw.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,Hw.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let r=0,a=e.length;r0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const o=zF.from(this._model,this);if(o.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new cF(a,r,i)),!n||n.cursorState.length!==o.cursorState.length||o.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new RF(a,r,l,o.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const s=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;const o=s[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-s[2].length-1,h=n.text.lastIndexOf(a,l-1);if(-1===h)return null;t.push([h,l])}return t}executeEdits(e,t,i,n){let s=null;"snippet"===t&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const o=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(s)for(let i=0,n=s.length;i0&&this._pushAutoClosedAction(o,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=zF.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){r(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return UF.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new qF(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(Cy.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(Cy.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))}),e,o);else if(0!==s){const t=this.getSelections().map((e=>{const t=e.getPosition();return new Th(t.lineNumber,t.column+s,t.lineNumber,t.column+s)}));this.setSelections(e,o,t,0)}}paste(e,t,i,n,s){this._executeEdit((()=>{this._executeEditOperation(Cy.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,s,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(iy.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new jw(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new jw(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class zF{static from(e,t){return new zF(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class KF{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let o=0,r=n.trackedRanges.length;o0&&(o[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,o,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,o=[];for(let r=0;r0?(n[r].sort(s),o[r]=t[r].computeCursorState(e.model,{getInverseEditOperations:()=>n[r],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new Th(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new Th(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):o[r]=e.selectionsBefore[r];return o}));r||(r=e.selectionsBefore);const a=[];for(const l in s)s.hasOwnProperty(l)&&a.push(parseInt(l,10));a.sort(((e,t)=>t-e));for(const l of a)r.splice(l,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{Mh.isEmpty(e)&&""===o||n.push({identifier:{major:t,minor:s++},range:e,text:o,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const l={addEditOperation:o,addTrackedEditOperation:(e,t,i)=>{a=!0,o(e,t,i)},trackSelection:(t,i)=>{const n=Th.liftSelection(t);let s;if(n.isEmpty())if("boolean"==typeof i)s=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);s=n.startColumn===t?2:3}else s=1;const o=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,s);return e.trackedRanges[o]=r,e.trackedRangesDirection[o]=n.getDirection(),o.toString()}};try{i.getEditOperations(e.model,l)}catch(Dre){return r(Dre),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-Mh.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;is.identifier.major?n.identifier.major:s.identifier.major,t[o.toString()]=!0;for(let t=0;t0&&i--}}return t}}class jF{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class qF{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new jF(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=qF._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=qF._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let s=0,o=this._original.length;s>>1;t===e[o].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,s|=0;const o=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new GF(o,e,i,n,s)),o},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const a of i)n.add(a.id);const s=new Map;for(const a of t)s.set(a.id,a);const o=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(s.has(i.id)){const e=s.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=o(this._arr).concat(o(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=ZF.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[s+1].afterLineNumber>=e)return s;i=s+1|0}else n=s-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0;return i+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0))+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e|=0;return this._lineHeight*e+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0))+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,s=t;for(;n=o+i)n=t+1;else{if(e>=o)return t;s=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(n);let o=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,h;-1===r?(r=a,h=o+1,l=0):(h=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let d=s,c=d;const u=5e5;let g=0;s>=u&&(g=Math.floor(s/u)*u,g=Math.floor(g/i)*i,c-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let C=n;C<=o;C++){if(-1===f){(d<=m&&mm)&&(f=C)}for(d+=i,p[C-n]=c,c+=i;h===C;)c+=l,d+=l,r++,r>=a?h=o+1:(h=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(d>=t){o=C;break}}-1===f&&(f=o);const _=0|this.getVerticalOffsetForLineNumber(o);let v=n,b=o;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:o,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=s+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=s)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const s=[];for(let o=i;o<=n;o++){const e=this.getVerticalOffsetForWhitespaceIndex(o),i=this.getHeightForWhitespaceIndex(o);if(e>=t)break;s.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:e,height:i})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}ZF.INSTANCE_COUNT=0;class YF{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class XF extends E{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new U),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new YF(0,0,0,0),this._scrollable=this._register(new SD({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new NF(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class QF extends E{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,s=n.get(143),o=n.get(83);this._linesLayout=new ZF(t,n.get(66),o.top,o.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new XF(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new YF(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(113)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(66)&&this._linesLayout.setLineHeight(t.get(66)),e.hasChanged(83)){const e=t.get(83);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(143)){const e=t.get(143),i=e.contentWidth,n=e.height,s=this._scrollable.getScrollDimensions(),o=s.contentWidth;this._scrollable.setScrollDimensions(new YF(i,s.contentWidth,n,this._getContentHeight(i,n,o)))}else this._updateHeight();e.hasChanged(113)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(102);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(104)?s+=Math.max(0,t-n.get(66)-n.get(83).bottom):s+=this._getHorizontalScrollbarHeight(e,i),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new YF(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new oP(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new oP(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(144),n=e.get(50),s=e.get(143);if(i.isViewportWrapping){const i=e.get(72);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+s.verticalScrollbarWidth:t}{const i=e.get(103)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+s.verticalScrollbarWidth,o,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new YF(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class JF{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,s=e.options;let o;if(s.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new Ba(n.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new Ba(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);o=new Mh(e.lineNumber,e.column,t.lineNumber,t.column)}else o=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new cP(o,s),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new Mh(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,TS(this.configuration.options),t,i),s=e.startLineNumber,o=e.endLineNumber,r=[];let a=0;const l=[];for(let h=s;h<=o;h++)l[h-s]=[];for(let h=0,d=n.length;h1===e))}function iB(e,t){return nB(e,t.range,(e=>2===e))}function nB(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const s=e.tokenization.getLineTokens(n),o=n===t.startLineNumber,r=n===t.endLineNumber;let a=o?s.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1)break}if(!i(s.getStandardTokenType(a)))return!1;a++}}return!0}function sB(e,t){return null===e?t?rB.INSTANCE:aB.INSTANCE:new oB(e,t)}class oB{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let o;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new QC(0,0,e+1,this._projectionData.injectionOptions[t],0)));o=QC.applyInjectedText(e.getLineContent(t),i).substring(n,s)}else o=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(o=hB(this._projectionData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,s,o,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,h=a.injectionOptions;let d,c=null;if(l){c=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,o=a.breakOffsets[i];for(;to)break;if(s0?a.wrappedTextIndentLength:0,r=t+Math.max(d-s,0),l=t+Math.min(c-s,o-s);r!==l&&n.push(new dP(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(c<=o))break;e+=r,t++}}}d=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:h[t].content,tokenMetadata:RC.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let u=i;u0?n.wrappedTextIndentLength:0,o=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(o,r,s);let l=a.getLineContent();i>0&&(l=hB(n.wrappedTextIndentLength)+l);const h=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,c=i+1=lB.length)for(let t=1;t<=e;t++)lB[t]=dB(t);return lB[e]}function dB(e){return new Array(e+1).join(" ")}class cB{constructor(e,t,i,n,s,o,r,a,l,h){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=h,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new pB(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,o=this.createLineBreaksComputer(),r=new ec(QC.fromDecorations(n));for(let p=0;pe.lineNumber===p+1));o.addRequest(i[p],e,t?t[p]:null)}const a=o.finalize(),l=[],h=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Mh.compareRangesUsingStarts);let d=1,c=0,u=-1,g=u+1=d&&e<=c,i=sB(a[p],!t);l[p]=i.getViewLineCount(),this.modelLineProjections[p]=i}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new uI(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(Mh.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,s=t[0].endLineNumber;for(let o=1,r=t.length;os+1?(i.push(new Mh(n,1,s,1)),n=e.startLineNumber,s=e.endLineNumber):e.endLineNumber>s&&(s=e.endLineNumber)}return i.push(new Mh(n,1,s,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Mh.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n({range:e,options:xw.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const s=t;let o=1,r=0,a=-1,l=a+1=o&&e<=r?this.modelLineProjections[d].isVisible()&&(this.modelLineProjections[d]=this.modelLineProjections[d].setVisible(!1),t=!0):(h=!0,this.modelLineProjections[d].isVisible()||(this.modelLineProjections[d]=this.modelLineProjections[d].setVisible(!0),t=!0)),t){const e=this.modelLineProjections[d].getViewLineCount();this.projectedModelLineLineCounts.setValue(d,e)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,s){const o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,h=this.wordBreak===s;if(o&&r&&a&&l&&h)return!1;const d=o&&r&&!a&&l&&h;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=s;let c=null;if(d){c=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),o=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let h=0,d=n.length;hr?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,h=l+r-1,u=h+1,g=u+(s-r)-1,a=!0):st?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,o.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new uB(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Ba(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Ba(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let o=this.getModelStartPositionOfViewLine(i),r=new Array;for(let a=i.modelLineNumber;a<=n.modelLineNumber;a++){const e=this.modelLineProjections[a-1];if(e.isVisible()){const t=a===i.modelLineNumber?i.modelLineWrappedLineIdx:0,s=a===n.modelLineNumber?n.modelLineWrappedLineIdx+1:e.getViewLineCount();for(let e=t;e{if(-1!==e.forWrappedLinesAfterColumn){if(this.modelLineProjections[i.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn).lineNumber>=i.modelLineWrappedLineIdx)return}if(-1!==e.forWrappedLinesBeforeOrAtColumn){if(this.modelLineProjections[i.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn).lineNumberi.modelLineWrappedLineIdx)return}const n=this.convertModelPositionToViewPosition(i.modelLineNumber,e.horizontalLine.endColumn),s=this.modelLineProjections[i.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return s.lineNumber===i.modelLineWrappedLineIdx?new Yv(e.visibleColumn,t,e.className,new Xv(e.horizontalLine.top,n.column),-1,-1):s.lineNumber!!e)))}}return o}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const o=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let h=null;for(let g=a;g<=l;g++){const e=this.modelLineProjections[g];if(e.isVisible()){const t=e.getViewLineNumberOfModelPosition(0,g===a?i.column:1),n=e.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),s=n-t+1;let l=0;s>1&&1===e.getViewLineMinColumn(this.model,g+1,n)&&(l=0===t?1:2),o.push(s),r.push(l),null===h&&(h=new Ba(g+1,0))}else null!==h&&(s=s.concat(this.model.guides.getLinesIndentGuides(h.lineNumber,g)),h=null)}null!==h&&(s=s.concat(this.model.guides.getLinesIndentGuides(h.lineNumber,n.lineNumber)),h=null);const d=t-e+1,c=new Array(d);let u=0;for(let g=0,p=s.length;gt&&(c=!0,d=t-s+1),n.getViewLinesData(this.model,l+1,h,d,s-e,i,a),s+=d,c)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,o=n.remainder,r=this.modelLineProjections[s],a=r.getViewLineMinColumn(this.model,s+1,o),l=r.getViewLineMaxColumn(this.model,s+1,o);tl&&(t=l);const h=r.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new Ba(s+1,h)).equals(i)?new Ba(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new Mh(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new Ba(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Mh(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,s=!1){const o=this.model.validatePosition(new Ba(e,t)),r=o.lineNumber,a=o.column;let l=r-1,h=!1;if(s)for(;l0&&!this.modelLineProjections[l].isVisible();)l--,h=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new Ba(n?0:1,1);const d=1+this.projectedModelLineLineCounts.getPrefixSum(l);let c;return c=h?s?this.modelLineProjections[l].getViewPositionOfModelPosition(d,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(d,a,i),c}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return Mh.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new Mh(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,s){const o=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-o.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new Mh(o.lineNumber,1,r.lineNumber,r.column),t,i,n,s);let a=[];const l=o.lineNumber-1,h=r.lineNumber-1;let d=null;for(let p=l;p<=h;p++){if(this.modelLineProjections[p].isVisible())null===d&&(d=new Ba(p+1,p===l?o.column:1));else if(null!==d){const e=this.model.getLineMaxColumn(p);a=a.concat(this.model.getDecorationsInRange(new Mh(d.lineNumber,d.column,p,e),t,i,n)),d=null}}null!==d&&(a=a.concat(this.model.getDecorationsInRange(new Mh(d.lineNumber,d.column,r.lineNumber,r.column),t,i,n)),d=null),a.sort(((e,t)=>{const i=Mh.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));const c=[];let u=0,g=null;for(const p of a){const e=p.id;g!==e&&(g=e,c[u++]=p)}return c}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class uB{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class gB{constructor(e,t){this.modelRange=e,this.viewLines=t}}class pB{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class mB{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new fB(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new vF(t,i)}onModelLinesInserted(e,t,i,n){return new bF(t,i)}onModelLineChanged(e,t,i){return[!1,new _F(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let s=0;st)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class _B extends E{constructor(e,t,i,n,s,o,r,a,l){if(super(),this.languageConfigurationService=r,this._themeService=a,this._attachedView=l,this.hiddenAreasModel=new CB,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new DF,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new sd((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=vB.create(this.model),this.model.isTooLargeForTokenization())this._lines=new mB(this.model);else{const e=this._configuration.options,t=e.get(50),i=e.get(137),o=e.get(144),r=e.get(136),a=e.get(128);this._lines=new cB(this._editorId,this.model,n,s,t,this.model.getOptions().tabSize,i,o.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new HF(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new QF(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new wF(e)),this._eventDispatcher.emitOutgoingEvent(new IF(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new JF(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(sP.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new LF)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new yF(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new Mh(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new pF(e)),this._eventDispatcher.emitOutgoingEvent(new EF(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new lF)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new hF)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new Ba(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new yB(t,this._viewportStart.startLineDelta)}return new yB(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,s=n.get(50),o=n.get(137),r=n.get(144),a=n.get(136),l=n.get(128);this._lines.setWrappingSettings(s,o,r.wrappingColumn,a,l)&&(e.emitViewEvent(new gF),e.emitViewEvent(new fF),e.emitViewEvent(new uF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(90)&&(this._decorations.reset(),e.emitViewEvent(new uF(null))),e.emitViewEvent(new dF(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),Vw.shouldRecreate(t)&&(this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const s=e instanceof ow?e.rawContentChangedEvent.changes:e.changes,o=e instanceof ow?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of s)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new ec(a);for(const e of s)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new gF),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(o,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),s=this._lines.onModelLinesInserted(o,e.fromLineNumber,e.toLineNumber,n);null!==s&&(t.emitViewEvent(s),this.viewLayout.onLinesInserted(s.fromLineNumber,s.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[s,r,a,h]=this._lines.onModelLineChanged(o,e.lineNumber,i);n=s,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),h&&(t.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber));break}}null!==o&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new fF),t.emitViewEvent(new uF(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof ow&&t.emitOutgoingEvent(new BF(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new mF),this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new FF(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new PF(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new gF),e.emitViewEvent(new fF),e.emitViewEvent(new uF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new WF(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new uF(e)),this._eventDispatcher.emitOutgoingEvent(new OF(e))})))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const i=this.hiddenAreasModel.getMergedRanges();if(i===this.previousHiddenAreas)return;this.previousHiddenAreas=i;const n=this._captureStableViewport();let s=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();s=this._lines.setHiddenAreas(i),s&&(e.emitViewEvent(new gF),e.emitViewEvent(new fF),e.emitViewEvent(new uF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),s&&this._eventDispatcher.emitOutgoingEvent(new TF)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(143),t=this._configuration.options.get(66),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),o=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new Mh(s,this.getLineMinColumn(s),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let s=0,o=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let h=0,d=i.length;ha||(ot.toInlineDecoration(e)))]),new lP(o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,i,n,o.tokens,t,s,o.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new rP(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,TS(this._configuration.options)),i=new bB;for(const n of t){const t=n.options,s=t.overviewRuler;if(!s)continue;const o=s.position;if(0===o)continue;const r=s.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,o)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;null==e||e.invalidateCachedColor();const i=t.options.minimap;null==i||i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);return this.model.modifyPosition(i,t)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const s=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(Mh.compareRangesUsingStarts);let s=!1,o=!1;for(const a of e)a.isEmpty()?s=!0:o=!0;if(!o){if(!t)return"";const i=e.map((e=>e.startLineNumber));let s="";for(let e=0;e0&&i[e-1]===i[e]||(s+=this.model.getLineContent(i[e])+n);return s}if(s&&t){const t=[];let n=0;for(const s of e){const e=s.startLineNumber;s.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(s,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const a of e)a.isEmpty()||r.push(this.model.getValueInRange(a,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===zu)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new Mh(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const s=this._configuration.options.get(50),o=this._getColorMap();let r;if(/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===US.fontFamily)r=US.fontFamily;else{r=s.fontFamily,r=r.replace(/"/g,"'");if(!/[,']/.test(r)){/[+ ]/.test(r)&&(r=`'${r}'`)}r=`${r}, ${US.fontFamily}`}return{mode:i,html:`
    `+this._getHTMLToCopy(n,o)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,r=this.getTabSize();let a="";for(let l=i;l<=s;l++){const e=this.model.tokenization.getLineTokens(l),h=e.getLineContent(),d=l===i?n-1:0,c=l===s?o-1:h.length;a+=""===h?"
    ":Hk(h,e.inflate(),t,d,c,r,Oe)}return a}_getColorMap(){const e=DC.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new AF):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,s){this._executeCursorEdit((o=>this._cursor.compositionType(o,e,t,i,n,s)))}paste(e,t,i,n){this._executeCursorEdit((s=>this._cursor.paste(s,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new Mh(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new CF(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new Mh(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new CF(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,s){this._withViewEventsCollector((o=>o.emitViewEvent(new CF(e,!1,i,null,n,t,s))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new kF),this._eventDispatcher.emitOutgoingEvent(new MF))}_withViewEventsCollector(e){try{return e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class vB{static create(e){const t=e._setTrackedRange(null,new Mh(1,1,1,1),1);return new vB(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new Ba(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new Mh(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),o=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=o-s}invalidate(){this._isValid=!1}}class bB{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){const o=this._asMap[e];if(o){const e=o.data,t=e[e.length-3],r=e[e.length-1];if(t===s&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(s,i,n)}else{const o=new uP(e,t,[s,i,n]);this._asMap[e]=o,this.asArray.push(o)}}}class CB{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&wB(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce(((e,t)=>function(e,t){const i=[];let n=0,s=0;for(;n0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let n=0;nthis.injectionOffsets[n];n++)i0?this.breakOffsets[s-1]:0,0===t)if(e<=o)n=s-1;else{if(!(e>r))break;i=s+1}else if(e=r))break;i=s+1}}let r=e-o;return s>0&&(r+=this.wrappedTextIndentLength),new xB(s,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new xB(e-1,this.getMaxOutputOffset(e-1))}else if(1===i){if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength));return(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&kB(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(DB(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!kB(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!DB(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}Vl()}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let s=0;se)break;if(e<=a)return{injectedTextIndex:s,offsetInInputWithInjections:r,length:o};n+=o}}}}function kB(e){return null==e||(e===wd.Right||e===wd.Both)}function DB(e){return null==e||(e===wd.Left||e===wd.Both)}class xB{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new Ba(e+this.outputLineIndex,this.outputOffset+1)}}class NB{static create(e){return new NB(e.get(132),e.get(131))}constructor(e,t){this.classifier=new EB(e,t)}createLineBreaksComputer(e,t,i,n,s){const o=[],r=[],a=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,h=[];for(let e=0,d=o.length;e=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let IB=[],MB=[];function TB(e,t,i,n,s,o,r,a){if(-1===s)return null;const l=i.length;if(l<=1)return null;const h="keepAll"===a,d=t.breakOffsets,c=t.breakOffsetsVisibleColumn,u=FB(i,n,s,o,r),g=s-u,p=IB,m=MB;let f=0,_=0,v=0,b=s;const C=d.length;let w=0;if(w>=0){let e=Math.abs(c[w]-b);for(;w+1=e)break;e=t,w++}}for(;wt&&(t=_,s=v);let r=0,a=0,u=0,y=0;if(s<=b){let v=s,C=0===t?0:i.charCodeAt(t-1),w=0===t?0:e.get(C),S=!0;for(let s=t;s_&&PB(C,w,l,d,h)&&(r=t,a=v),v+=c,v>b){t>_?(u=t,y=v-c):(u=s+1,y=v),v-a>g&&(r=0),S=!1;break}C=l,w=d}if(S){f>0&&(p[f]=d[d.length-1],m[f]=c[d.length-1],f++);break}}if(0===r){let l=s,d=i.charCodeAt(t),c=e.get(d),p=!1;for(let n=t-1;n>=_;n--){const t=n+1,s=i.charCodeAt(n);if(9===s){p=!0;break}let m,f;if(wo(s)?(n--,m=0,f=2):(m=e.get(s),f=Ao(s)?o:1),l<=b){if(0===u&&(u=t,y=l),l<=b-g)break;if(PB(s,m,d,c,h)){r=t,a=l;break}}l-=f,d=s,c=m}if(0!==r){const e=g-(y-a);if(e<=n){const t=i.charCodeAt(u);let s;s=Co(t)?2:AB(t,y,n,o),e-s<0&&(r=0)}}if(p){w--;continue}}if(0===r&&(r=u,a=y),r<=_){const e=i.charCodeAt(_);Co(e)?(r=_+2,a=v+2):(r=_+1,a=v+AB(e,v,n,o))}for(_=r,p[f]=r,v=a,m[f]=a,f++,b=a+g;w<0||w=S)break;S=e,w++}}return 0===f?null:(p.length=f,m.length=f,IB=t.breakOffsets,MB=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=m,t.wrappedTextIndentLength=u,t)}function RB(e,t,i,n,s,o,r,a){const l=QC.applyInjectedText(t,i);let h,d;if(i&&i.length>0?(h=i.map((e=>e.options)),d=i.map((e=>e.column-1))):(h=null,d=null),-1===s)return h?new LB(d,h,[l.length],[],0):null;const c=l.length;if(c<=1)return h?new LB(d,h,[l.length],[],0):null;const u="keepAll"===a,g=FB(l,n,s,o,r),p=s-g,m=[],f=[];let _=0,v=0,b=0,C=s,w=l.charCodeAt(0),y=e.get(w),S=AB(w,0,n,o),L=1;Co(w)&&(S+=1,w=l.charCodeAt(1),y=e.get(w),L++);for(let k=L;kC&&((0===v||S-b>p)&&(v=t,b=S-r),m[_]=v,f[_]=b,_++,C=b+p,v=0),w=i,y=s}return 0!==_||i&&0!==i.length?(m[_]=c,f[_]=S,new LB(d,h,m,f,g)):null}function AB(e,t,i,n){return 9===e?i-t%i:Ao(e)||e<32?n:1}function OB(e,t){return t-e%t}function PB(e,t,i,n,s){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!s&&3===t&&2!==n||!s&&3===n&&1!==t)}function FB(e,t,i,n,s){let o=0;if(0!==s){const r=oo(e);if(-1!==r){for(let i=0;ii&&(o=0)}}return o}const BB=Ak("domLineBreaksComputer",{createHTML:e=>e});class WB{static create(){return new WB}constructor(){}createLineBreaksComputer(e,t,i,n,s){const o=[],r=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t)},finalize:()=>function(e,t,i,n,s,o,r){var a;function l(t){const i=r[t];if(i){const n=QC.applyInjectedText(e[t],i),s=i.map((e=>e.options)),o=i.map((e=>e.column-1));return new LB(o,s,[n.length],[],0)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;ih?(o=0,a=0):l=h-e}const d=n.substr(o),c=VB(d,a,i,l,p,u);m[k]=o,f[k]=a,_[k]=d,v[k]=c[0],b[k]=c[1]}const C=p.build(),w=null!==(a=null==BB?void 0:BB.createHTML(C))&&void 0!==a?a:C;g.innerHTML=w,g.style.position="absolute",g.style.top="10000","keepAll"===o?(g.style.wordBreak="keep-all",g.style.overflowWrap="anywhere"):(g.style.wordBreak="inherit",g.style.overflowWrap="break-word");document.body.appendChild(g);const y=document.createRange(),S=Array.prototype.slice.call(g.children,0),L=[];for(let k=0;ke.options)),a=h.map((e=>e.column-1))):(o=null,a=null),L[k]=new LB(a,o,e,s,i)}return document.body.removeChild(g),L}(o,e,t,i,n,s,r)}}}function VB(e,t,i,n,s,o){if(0!==o){const e=String(o);s.appendString('
    ');const r=e.length;let a=t,l=0;const h=[],d=[];let c=0");for(let u=0;u"),h[u]=l,d[u]=a;const t=c;c=u+1"),h[e.length]=l,d[e.length]=a,s.appendString("
    "),[h,d]}function HB(e,t,i,n){if(i.length<=1)return null;const s=Array.prototype.slice.call(t.children,0),o=[];try{zB(e,s,n,0,null,i.length-1,null,o)}catch(r){return console.log(r),null}return 0===o.length?null:(o.push(i.length),o)}function zB(e,t,i,n,s,o,r,a){if(n===o)return;if(s=s||UB(e,t,i[n],i[n+1]),r=r||UB(e,t,i[o],i[o+1]),Math.abs(s[0].top-r[0].top)<=.1)return;if(n+1===o)return void a.push(o);const l=n+(o-n)/2|0,h=UB(e,t,i[l],i[l+1]);zB(e,t,i,n,s,l,h,a),zB(e,t,i,l,h,o,r,a)}function UB(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}class KB extends E{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new R),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const n of t)this._pending.has(n.id)?r(new Error(`Cannot have two contributions with the same id ${n.id}`)):this._pending.set(n.id,n);this._instantiateSome(0),this._register(od((()=>{this._instantiateSome(1)}))),this._register(od((()=>{this._instantiateSome(2)}))),this._register(od((()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"==typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"==typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register(od((()=>{this._instantiateSome(1)}),50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const i of t)this._instantiateById(i.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"==typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(i){r(i)}}}}var jB,qB=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},$B=function(e,t){return function(i,n){t(i,n,e)}},GB=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let ZB=0;class YB{constructor(e,t,i,n,s,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s,this.attachedView=o}dispose(){k(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let XB=jB=class extends E{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,i,n,s,o,a,l,h,d,c,u){var g;super(),this.languageConfigurationService=c,this._deliveryQueue=new K,this._contributions=this._register(new KB),this._onDidDispose=this._register(new U),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new QB({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new QB({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new JB(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new JB(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new JB(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new JB(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),s.willCreateCodeEditor();const p=Object.assign({},t);let m;this._domElement=e,this._overflowWidgetsDomNode=p.overflowWidgetsDomNode,delete p.overflowWidgetsDomNode,this._id=++ZB,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,p,d)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(143)){const e=t.get(143);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=h,this._codeEditorService=s,this._commandService=o,this._themeService=l,this._register(new eW(this,this._contextKeyService)),this._register(new tW(this,this._contextKeyService,u)),this._instantiationService=n.createChild(new SB([Rl,this._contextKeyService])),this._modelData=null,this._focusTracker=new iW(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},m=Array.isArray(i.contributions)?i.contributions:kh.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(const _ of kh.getEditorActions()){if(this._actions.has(_.id)){r(new Error(`Cannot have two actions with the same id ${_.id}`));continue}const e=new nF(_.id,_.label,_.alias,null!==(g=_.precondition)&&void 0!==g?g:void 0,(()=>this._instantiationService.invokeFunction((e=>Promise.resolve(_.runEditorCommand(e,this,null))))),this._contextKeyService);this._actions.set(e.id,e)}const f=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new Ds(this._domElement,{onDragEnter:()=>{},onDragOver:e=>{if(!f())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this.showDropIndicatorAt(t.position)},onDrop:e=>GB(this,void 0,void 0,(function*(){if(!f())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this._onDropIntoEditor.fire({position:t.position,event:e})})),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;null===(t=this._modelData)||void 0===t||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i){return new JR(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return sF.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?ny.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const s={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(n),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(o.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?jB._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?jB._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?jB._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var i;null===(i=this._modelData)||void 0===i||i.viewModel.setHiddenAreas(e.map((e=>Mh.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return lc.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!Ba.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!Mh.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,o,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new Mh(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!Ba.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new Mh(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=Th.isISelection(e),n=Mh.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new Th(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new Mh(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!Mh.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(Mh.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){var e;null===(e=this._getViewModel())||void 0===e||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run(i)).then(void 0,r):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s){if(!this._modelData||0===t.length)return;const o=this._modelData.viewModel,r=o.getSelection().getStartPosition();o.paste(t,i,n,e);const a=o.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new Mh(r.lineNumber,r.column,a.lineNumber,a.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=kh.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,r)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(90)&&(this._modelData.model.pushStackElement(),!0))}popUndoStop(){return!!this._modelData&&(!this._configuration.options.get(90)&&(this._modelData.model.popStackElement(),!0))}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(90))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new nW(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,TS(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,TS(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(143);return{top:jB._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),height:i.get(66)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Bk(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new _B(this._id,this._configuration,e,WB.create(),NB.create(this._configuration.options),(e=>An(e)),this.languageConfigurationService,this._themeService,i);t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=ue(0,"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",this.getOption(79));this._notificationService.prompt(cL.Warning,e,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:ue(0,"Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let s=0,o=t.selections.length;s{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const s={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",s)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const s={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",s)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new wO(e.coordinatesConverter);i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e);return[new iF(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){null==e||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){const t=[{range:new Mh(e.lineNumber,e.column,e.lineNumber,e.column),options:jB.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};XB.dropIntoEditorDecorationOptions=xw.register({description:"workbench-dnd-target",className:"dnd-target"}),XB=jB=qB([$B(3,Oa),$B(4,Fa),$B(5,Ga),$B(6,Rl),$B(7,R_),$B(8,uL),$B(9,ZR),$B(10,Xu),$B(11,iL)],XB);class QB extends E{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new U(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new U(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class JB extends U{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class eW extends E{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Rh.editorSimpleInput.bindTo(t),this._editorFocus=Rh.focus.bindTo(t),this._textInputFocus=Rh.textInputFocus.bindTo(t),this._editorTextFocus=Rh.editorTextFocus.bindTo(t),this._tabMovesFocus=Rh.tabMovesFocus.bindTo(t),this._editorReadonly=Rh.readOnly.bindTo(t),this._inDiffEditor=Rh.inDiffEditor.bindTo(t),this._editorColumnSelection=Rh.columnSelection.bindTo(t),this._hasMultipleSelections=Rh.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Rh.hasNonEmptySelection.bindTo(t),this._canUndo=Rh.canUndo.bindTo(t),this._canRedo=Rh.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._register(GR.onDidChangeTabFocus((e=>this._tabMovesFocus.set(e)))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(GR.getTabFocusMode()),this._editorReadonly.set(e.get(90)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class tW extends E{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=Rh.languageId.bindTo(t),this._hasCompletionItemProvider=Rh.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Rh.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Rh.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Rh.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Rh.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Rh.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Rh.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Rh.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Rh.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Rh.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Rh.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Rh.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Rh.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=Rh.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=Rh.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Rh.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Rh.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Rh.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=Rh.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===vn.walkThroughSnippet)})):this.reset()}}class iW extends E{constructor(e){super(),this._onChange=this._register(new U),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(hs(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}class nW{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations((t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)}))}finally{this._isChangingDecorations=!1}return this._decorationIds}}const sW=encodeURIComponent("");function rW(e){return sW+encodeURIComponent(e.toString())+oW}const aW=encodeURIComponent('');B_(((e,t)=>{const i=e.getColor(gm);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${rW(i)}") repeat-x bottom left; }`);const n=e.getColor(mm);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${rW(n)}") repeat-x bottom left; }`);const s=e.getColor(_m);s&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${rW(s)}") repeat-x bottom left; }`);const o=e.getColor(bm);o&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return aW+encodeURIComponent(e.toString())+lW}(o)}") no-repeat bottom left; }`);const r=e.getColor(dv);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}));var hW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},dW=function(e,t){return function(i,n){t(i,n,e)}};let cW=class extends XB{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),i,s,o,r,a,l,h,d,c,u),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){md(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};cW=hW([dW(4,Oa),dW(5,Fa),dW(6,Ga),dW(7,Rl),dW(8,R_),dW(9,uL),dW(10,ZR),dW(11,Xu),dW(12,iL)],cW);var uW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};var gW;!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(gW||(gW={}));const pW=new U;const mW=new U;class fW{constructor(){this.disposables=new N}get onPointerMove(){return this.disposables.add(new Hy(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new Hy(window,"mouseup")).event}dispose(){this.disposables.dispose()}}uW([UL],fW.prototype,"onPointerMove",null),uW([UL],fW.prototype,"onPointerUp",null);class _W{get onPointerMove(){return this.disposables.add(new Hy(this.el,KL.Change)).event}get onPointerUp(){return this.disposables.add(new Hy(this.el,KL.End)).event}constructor(e){this.el=e,this.disposables=new N}dispose(){this.disposables.dispose()}}uW([UL],_W.prototype,"onPointerMove",null),uW([UL],_W.prototype,"onPointerUp",null);class vW{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}uW([UL],vW.prototype,"onPointerMove",null),uW([UL],vW.prototype,"onPointerUp",null);const bW="pointer-events-disabled";class CW extends E{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=ds(this.el,fs(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(x((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new Hy(this._orthogonalStartDragHandle,"mouseenter")).event((()=>CW.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Hy(this._orthogonalStartDragHandle,"mouseleave")).event((()=>CW.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=ds(this.el,fs(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(x((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new Hy(this._orthogonalEndDragHandle,"mouseenter")).event((()=>CW.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Hy(this._orthogonalEndDragHandle,"mouseleave")).event((()=>CW.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new Xh(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new U),this._onDidStart=this._register(new U),this._onDidChange=this._register(new U),this._onDidReset=this._register(new U),this._onDidEnd=this._register(new U),this.orthogonalStartSashDisposables=this._register(new N),this.orthogonalStartDragHandleDisposables=this._register(new N),this.orthogonalEndSashDisposables=this._register(new N),this.orthogonalEndDragHandleDisposables=this._register(new N),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=ds(e,fs(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),Pe&&this.el.classList.add("mac");const n=this._register(new Hy(this.el,"mousedown")).event;this._register(n((e=>this.onPointerStart(e,new fW)),this));const s=this._register(new Hy(this.el,"dblclick")).event;this._register(s(this.onPointerDoublePress,this));const o=this._register(new Hy(this.el,"mouseenter")).event;this._register(o((()=>CW.onMouseEnter(this))));const r=this._register(new Hy(this.el,"mouseleave")).event;this._register(r((()=>CW.onMouseLeave(this)))),this._register(qL.addTarget(this.el));const a=this._register(new Hy(this.el,KL.Start)).event;this._register(a((e=>this.onPointerStart(e,new _W(this.el))),this));const l=this._register(new Hy(this.el,KL.Tap)).event;let h;this._register(l((e=>{if(h)return clearTimeout(h),h=void 0,void this.onPointerDoublePress(e);clearTimeout(h),h=setTimeout((()=>h=void 0),250)}),this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(pW.event((e=>{this.size=e,this.layout()})))),this._register(mW.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",false),this.layout()}onPointerStart(e,t){as(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new vW(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new vW(t))),!this.state)return;const n=document.getElementsByTagName("iframe");for(const c of n)c.classList.add(bW);const s=e.pageX,o=e.pageY,r=e.altKey,a={startX:s,currentX:s,startY:o,currentY:o,altKey:r};this.el.classList.add("active"),this._onDidStart.fire(a);const l=Jn(this.el),h=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":Pe?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":Pe?"col-resize":"ew-resize",l.textContent=`* { cursor: ${e} !important; }`},d=new N;h(),i||this.onDidEnablementChange.event(h,null,d);t.onPointerMove((e=>{as(e,!1);const t={startX:s,currentX:e.pageX,startY:o,currentY:e.pageY,altKey:r};this._onDidChange.fire(t)}),null,d),t.onPointerUp((e=>{as(e,!1),this.el.removeChild(l),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(const t of n)t.classList.remove(bW)}),null,d),d.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&CW.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&CW.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){CW.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;const i=null!==(t=e.initialTarget)&&void 0!==t?t:e.target;if(i&&i instanceof HTMLElement)return i.classList.contains("orthogonal-drag-handle")?i.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}const wW=new rc(new nc(0,122,204)),yW={showArrow:!0,showFrame:!0,className:"",frameColor:wW,arrowColor:wW,keepEditorSelection:!1};class SW{constructor(e,t,i,n,s,o,r,a){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=r,this.ordinal=a,this._onDomNodeTop=s,this._onComputedHeight=o}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class LW{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class kW{constructor(e){this._editor=e,this._ruleName=kW._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),ns(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){ns(this._ruleName),is(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:Mh.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}kW._IdGenerator=new ak(".arrow-decoration-");class DW{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new N,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=cd(t),md(this.options,yW,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new kW(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}null===(t=this._resizeSash)||void 0===t||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=Mh.isIRange(e)?Mh.lift(e):Mh.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:xw.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),null===(e=this._arrow)||void 0===e||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){t+=2*Math.round(e/3)}if(this.options.showFrame){t+=2*Math.round(e/9)}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const o=document.createElement("div");o.style.overflow="hidden";const r=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const e=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,e)}let a=0,l=0;if(this._arrow&&this.options.showArrow&&(a=Math.round(r/3),this._arrow.height=a,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new SW(o,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e)),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new LW("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const h=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=a+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden"),this._doLayout(h,s),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const t=d.validateRange(new Mh(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new CW(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(66),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}class xW extends Ua{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new U),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=ds(e,fs(".monaco-dropdown")),this._label=ds(this._element,fs(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const s of[os.CLICK,os.MOUSE_DOWN,KL.Tap])this._register(En(this.element,s,(e=>as(e,!0))));for(const s of[os.MOUSE_DOWN,KL.Tap])this._register(En(this._label,s,(e=>{e instanceof MouseEvent&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register(En(this._label,os.KEY_UP,(e=>{const t=new St(e);(t.equals(3)||t.equals(10))&&(as(e,!0),this.visible?this.hide():this.show())})));const n=i(this._label);n&&this._register(n),this._register(qL.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class NW extends xW{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class EW extends Dx{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new U),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=ds(e,fs("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new NW(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),null!=e?e:void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;null===(e=this.dropdownMenu)||void 0===e||e.show()}updateEnabled(){var e,t;const i=!this.action.enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}var IW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},MW=function(e,t){return function(i,n){t(i,n,e)}},TW=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function RW(e,t,i,n,s,o){AW(e.getActions(t),i,!1,"string"==typeof n?e=>e===n:n,s,o)}function AW(e,t,i,n=e=>"navigation"===e,s=()=>!1,o=!1){let r,a;Array.isArray(t)?(r=t,a=t):(r=t.primary,a=t.secondary);const l=new Set;for(const[h,d]of e){let e;n(h)?(e=r,e.length>0&&o&&e.push(new Ka)):(e=a,e.length>0&&e.push(new Ka));for(let t of d){i&&(t=t instanceof nh&&t.alt?t.alt:t);const n=e.push(t);t instanceof ja&&l.add({group:h,action:t,index:n-1})}}for(const{group:h,action:d,index:c}of l){const e=n(h)?r:a,t=d.actions;s(d,h,e.length)&&e.splice(c,1,...t)}}let OW=class extends xx{constructor(e,t,i,n,s,o,r,a){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable,keybinding:null==t?void 0:t.keybinding,hoverDelegate:null==t?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=s,this._themeService=o,this._contextMenuService=r,this._accessibilityService=a,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new I),this._altKey=ks.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return TW(this,void 0,void 0,(function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}))}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{var e;const i=!!(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);i!==this._wantsAltCommand&&(this._wantsAltCommand=i,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register(En(e,"mouseleave",(e=>{t=!1,i()}))),this._register(En(e,"mouseenter",(e=>{t=!0,i()}))),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let s=i?ue(0,"{0} ({1})",n,i):n;if(!this._wantsAltCommand&&(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),n=i?ue(0,"{0} ({1})",e,i):e;s=ue(0,"{0}\n[{1}] {2}",s,Tx.modifierLabels[$e].altKey,n)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const n=this._commandAction.checked&&((s=e.toggled)&&void 0!==s.condition)&&e.toggled.icon?e.toggled.icon:e.icon;var s;if(n)if(ea.isThemeIcon(n)){const e=ea.asClassNameArray(n);i.classList.add(...e),this._itemClassDispose.value=x((()=>{i.classList.remove(...e)}))}else{const e=T_(this._themeService.getColorTheme().type)?ws(n.dark):ws(n.light),t=fs("span");t.style.webkitMask=t.style.mask=`${e} no-repeat 50% 50%`,t.style.background="var(--vscode-icon-foreground)",t.style.display="inline-block",t.style.width="100%",t.style.height="100%",i.appendChild(t),i.classList.add("icon"),this._itemClassDispose.value=D(x((()=>{i.classList.remove("icon"),us(i)})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}}};OW=IW([MW(2,PL),MW(3,uL),MW(4,Rl),MW(5,R_),MW(6,Hx),MW(7,ZR)],OW);let PW=class extends EW{constructor(e,t,i,n,s){var o,r,a;const l=Object.assign(Object.assign({},t),{menuAsChild:null!==(o=null==t?void 0:t.menuAsChild)&&void 0!==o&&o,classNames:null!==(r=null==t?void 0:t.classNames)&&void 0!==r?r:ea.isThemeIcon(e.item.icon)?ea.asClassName(e.item.icon):void 0,keybindingProvider:null!==(a=null==t?void 0:t.keybindingProvider)&&void 0!==a?a:e=>i.lookupKeybinding(e.id)});super(e,{getActions:()=>e.actions},n,l),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),jr(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!ea.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=T_(this._themeService.getColorTheme().type)?ws(i.dark):ws(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};PW=IW([MW(2,PL),MW(3,Hx),MW(4,R_)],PW);let FW=class extends Dx{constructor(e,t,i,n,s,o,r,a){var l,h,d;let c;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=o,this._instaService=r,this._storageService=a,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const u=(null==t?void 0:t.persistLastActionId)?a.get(this._storageKey,1):void 0;u&&(c=e.actions.find((e=>u===e.id))),c||(c=e.actions[0]),this._defaultAction=this._instaService.createInstance(OW,c,{keybinding:this._getDefaultActionKeybindingLabel(c)});const g=Object.assign(Object.assign({keybindingProvider:e=>this._keybindingService.lookupKeybinding(e.id)},t),{menuAsChild:null===(l=null==t?void 0:t.menuAsChild)||void 0===l||l,classNames:null!==(h=null==t?void 0:t.classNames)&&void 0!==h?h:["codicon","codicon-chevron-down"],actionRunner:null!==(d=null==t?void 0:t.actionRunner)&&void 0!==d?d:new Ua});this._dropdown=new EW(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof nh&&this.update(e.action)}))}update(e){var t;(null===(t=this._options)||void 0===t?void 0:t.persistLastActionId)&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(OW,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends Ua{runAction(e,t){return TW(this,void 0,void 0,(function*(){yield e.run(void 0)}))}},this._container&&this._defaultAction.render(cs(this._container,fs(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(null===(t=this._options)||void 0===t?void 0:t.renderKeybindingWithDefaultActionLabel){const t=this._keybindingService.lookupKeybinding(e.id);t&&(i=`(${t.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=fs(".action-container");this._defaultAction.render(ds(this._container,t)),this._register(En(t,os.KEY_DOWN,(e=>{const t=new St(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=fs(".dropdown-action-container");this._dropdown.render(ds(this._container,i)),this._register(En(i,os.KEY_DOWN,(e=>{var t;const i=new St(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};FW=IW([MW(2,PL),MW(3,uL),MW(4,Hx),MW(5,Jl),MW(6,Oa),MW(7,qN)],FW);let BW=class extends Nx{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===Ka.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":e.label,isDisabled:!e.enabled}))),0,t,Xx,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=Cp(Xp)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function WW(e,t,i){return t instanceof nh?e.createInstance(OW,t,i):t instanceof ih?t.item.isSelection?e.createInstance(BW,t):t.item.rememberDefaultAction?e.createInstance(FW,t,Object.assign(Object.assign({},i),{persistLastActionId:!0})):e.createInstance(PW,t,i):void 0}BW=IW([MW(1,Vx)],BW);var VW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},HW=function(e,t){return function(i,n){t(i,n,e)}};const zW=Pa("IPeekViewService");var UW;Cu(zW,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}},1),function(e){e.inPeekEditor=new Tl("inReferenceSearchEditor",!0,ue(0,"Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(UW||(UW={}));let KW=class{constructor(e,t){e instanceof cW&&UW.inPeekEditor.bindTo(t)}dispose(){}};KW.ID="editor.contrib.referenceController",KW=VW([HW(1,Rl)],KW),Lh(KW.ID,KW,0);const jW={headerBackgroundColor:rc.white,primaryHeadingColor:rc.fromHex("#333333"),secondaryHeadingColor:rc.fromHex("#6c6c6cb3")};let qW=class extends DW{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new U,this.onDidClose=this._onDidClose.event,md(this.options,jW,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=fs(".head"),this._bodyElement=fs(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=fs(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),Mn(this._titleElement,"click",(e=>this._onTitleClick(e)))),ds(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=fs("span.filename"),this._secondaryHeading=fs("span.dirname"),this._metaHeading=fs("span.meta"),ds(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=fs(".peekview-actions");ds(this._headElement,i);const n=this._getActionBarOptions();this._actionbarWidget=new Ix(i,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new za("peekview.close",ue(0,"Close"),ea.asClassName(Qr.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:WW.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Dn(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,_s(this._metaHeading)):vs(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(66)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};qW=VW([HW(2,Oa)],qW);const $W=Sp("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:rc.black,hcLight:rc.white},ue(0,"Background color of the peek view title area.")),GW=Sp("peekViewTitleLabel.foreground",{dark:rc.white,light:rc.black,hcDark:rc.white,hcLight:wm},ue(0,"Color of the peek view title.")),ZW=Sp("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},ue(0,"Color of the peek view title info.")),YW=Sp("peekView.border",{dark:_m,light:_m,hcDark:Np,hcLight:Np},ue(0,"Color of the peek view borders and arrow.")),XW=Sp("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:rc.black,hcLight:rc.white},ue(0,"Background color of the peek view result list.")),QW=(Sp("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:rc.white,hcLight:wm},ue(0,"Foreground color for line nodes in the peek view result list.")),Sp("peekViewResult.fileForeground",{dark:rc.white,light:"#1E1E1E",hcDark:rc.white,hcLight:wm},ue(0,"Foreground color for file nodes in the peek view result list.")),Sp("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},ue(0,"Background color of the selected entry in the peek view result list.")),Sp("peekViewResult.selectionForeground",{dark:rc.white,light:"#6C6C6C",hcDark:rc.white,hcLight:wm},ue(0,"Foreground color of the selected entry in the peek view result list.")),Sp("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:rc.black,hcLight:rc.white},ue(0,"Background color of the peek view editor.")));Sp("peekViewEditorGutter.background",{dark:QW,light:QW,hcDark:QW,hcLight:QW},ue(0,"Background color of the gutter in the peek view editor.")),Sp("peekViewEditorStickyScroll.background",{dark:QW,light:QW,hcDark:QW,hcLight:QW},ue(0,"Background color of sticky scroll in the peek view editor.")),Sp("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},ue(0,"Match highlight color in the peek view result list.")),Sp("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},ue(0,"Match highlight color in the peek view editor.")),Sp("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Match highlight border in the peek view editor."));function JW(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===sF.ICodeEditor}function eV(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===sF.IDiffEditor}function tV(e){return JW(e)?e:eV(e)?e.getModifiedEditor():function(e){return!!e&&"object"==typeof e&&"function"==typeof e.onDidChangeActiveEditor}(e)&&JW(e.activeCodeEditor)?e.activeCodeEditor:null}class iV{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:E.None}}renderElement(e,t,i,n){var s;if(null===(s=i.disposable)||void 0===s||s.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const r=new Uh,a=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class nV{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}class sV{constructor(e,t,i,n,s={}){const o=()=>this.model,r=n.map((e=>new iV(e,o)));this.list=new bx(e,t,i,r,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new nV(e,t.accessibilityProvider)})}(o,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return B.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return B.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return B.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,zd(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}const oV={separatorBorder:rc.transparent};class rV{set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){var i,n;e!==this.visible&&(e?(this.size=hD(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),null===(n=(i=this.view).setVisible)||void 0===n||n.call(i,e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return null===(e=this.view.proportionalLayout)||void 0===e||e}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){this.disposable.dispose()}}class aV extends rV{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class lV extends rV{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var hV,dV;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(hV||(hV={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Auto=function(e){return{type:"auto",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(dV||(dV={}));class cV extends E{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var i,n,s,o,r;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=hV.Idle,this._onDidSashChange=this._register(new U),this._onDidSashReset=this._register(new U),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.inverseAltBehavior=null!==(n=t.inverseAltBehavior)&&void 0!==n&&n,this.proportionalLayout=null===(s=t.proportionalLayout)||void 0===s||s,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=ds(this.el,fs(".sash-container")),this.viewContainer=fs(".split-view-container"),this.scrollable=this._register(new SD({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:An})),this.scrollableElement=this._register(new MD(this.viewContainer,{vertical:0===this.orientation?null!==(o=t.scrollbarVisibility)&&void 0!==o?o:1:2,horizontal:1===this.orientation?null!==(r=t.scrollbarVisibility)&&void 0!==r?r:1:2},this.scrollable));const a=this._register(new Hy(this.viewContainer,"scroll")).event;this._register(a((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),ds(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||oV),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=zr(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let t=0;for(let i=0;i1===this.viewItems[e].priority)),s=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.proportionalLayout?e.size/this.contentSize:void 0)))}onSashStart({sash:e,start:t,alt:i}){for(const r of this.viewItems)r.enabled=!1;const n=this.sashItems.findIndex((t=>t.sash===e)),s=D(En(document.body,"keydown",(e=>o(this.sashDragState.current,e.altKey))),En(document.body,"keyup",(()=>o(this.sashDragState.current,!1)))),o=(e,t)=>{const i=this.viewItems.map((e=>e.size));let o,r,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){if(n===this.sashItems.length-1){const e=this.viewItems[n];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[n+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}}if(!t){const e=zd(n,-1),t=zd(n+1,this.viewItems.length),s=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),a=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),l=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),h=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),d=Math.max(s,h),c=Math.min(l,a),u=this.findFirstSnapIndex(e),g=this.findFirstSnapIndex(t);if("number"==typeof u){const e=this.viewItems[u],t=Math.floor(e.viewMinimumSize/2);o={index:u,limitDelta:e.visible?d-t:d+t,size:e.size}}if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);r={index:g,limitDelta:e.visible?c+t:c-t,size:e.size}}}this.sashDragState={start:e,current:e,index:n,sizes:i,minDelta:a,maxDelta:l,alt:t,snapBefore:o,snapAfter:r,disposable:s}};o(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:o,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const h=e-i,d=this.resize(t,h,n,void 0,void 0,o,r,a,l);if(s){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,s=this.viewItems[n],o=s.size-s.maximumSize,r=s.size-s.minimumSize,a=e?t-1:t+1;this.resize(a,-d,i,void 0,void 0,o,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=hD(t="number"==typeof t?t:e.size,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==hV.Idle)throw new Error("Cant modify splitview");if(this.state=hV.Busy,e<0||e>=this.viewItems.length)return;const i=zd(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],s=i.filter((e=>2===this.viewItems[e].priority)),o=this.viewItems[e];t=hD(t=Math.round(t),o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(n,s),this.state=hV.Idle}distributeViewSizes(){const e=[];let t=0;for(const r of this.viewItems)r.maximumSize-r.minimumSize>0&&(e.push(r),t+=r.size);const i=Math.floor(t/e.length);for(const r of e)r.size=hD(i,r.minimumSize,r.maximumSize);const n=zd(this.viewItems.length),s=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));this.relayout(s,o)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==hV.Idle)throw new Error("Cant modify splitview");this.state=hV.Busy;const s=fs(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const o=e.onDidChange((e=>this.onViewChange(l,e))),r=D(o,x((()=>this.viewContainer.removeChild(s))));let a;"number"==typeof t?a=t:("auto"===t.type&&(t=this.areViewsDistributed()?{type:"distribute"}:{type:"split",index:t.index}),a="split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize);const l=0===this.orientation?new aV(s,e,a,r):new lV(s,e,a,r);if(this.viewItems.splice(i,0,l),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new CW(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new CW(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),s=B.map(t.onDidStart,n)(this.onSashStart,this),o=B.map(t.onDidChange,n)(this.onSashChange,this),r=B.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),a=r(this.onSashEnd,this),l=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=zd(e,-1),n=zd(e+1,this.viewItems.length),s=this.findFirstSnapIndex(i),o=this.findFirstSnapIndex(n);("number"!=typeof s||this.viewItems[s].visible)&&("number"!=typeof o||this.viewItems[o].visible)&&this._onDidSashReset.fire(e)})),h=D(s,o,a,l,t),d={sash:t,disposable:h};this.sashItems.splice(i-1,0,d)}let h;s.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(h=[t.index]),n||this.relayout([i],h),this.state=hV.Idle,n||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,s,o=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,a,l){if(e<0||e>=this.viewItems.length)return 0;const h=zd(e,-1),d=zd(e+1,this.viewItems.length);if(s)for(const y of s)Kd(h,y),Kd(d,y);if(n)for(const y of n)jd(h,y),jd(d,y);const c=h.map((e=>this.viewItems[e])),u=h.map((e=>i[e])),g=d.map((e=>this.viewItems[e])),p=d.map((e=>i[e])),m=h.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),f=h.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),_=0===d.length?Number.POSITIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),v=0===d.length?Number.NEGATIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),b=Math.max(m,v,o),C=Math.min(_,f,r);let w=!1;if(a){const e=this.viewItems[a.index],i=t>=a.limitDelta;w=i!==e.visible,e.setVisible(i,a.size)}if(!w&&l){const e=this.viewItems[l.index],i=te+t.size),0);let i=this.size-t;const n=zd(this.viewItems.length-1,-1),s=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));for(const r of o)Kd(n,r);for(const r of s)jd(n,r);"number"==typeof e&&jd(n,e);for(let r=0;0!==i&&re+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const s=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const o=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let a=0;a0||this.startSnappingEnabled)?e.state=1:d&&t[a]&&(r0)return;if(!e.visible&&e.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=void 0===e?i.size:Math.min(e,i.size),t=void 0===t?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){var e;null===(e=this.sashDragState)||void 0===e||e.disposable.dispose(),k(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[],super.dispose()}}class uV{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=uV.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const s of e){const e=n.get(s.templateId);if(!e)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=ds(e,fs(".monaco-table-tr")),i=[],n=[];for(let o=0;onew gV(e,t))),a={size:r.reduce(((e,t)=>e+t.column.weight),0),views:r.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new cV(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const l=new uV(n,s,(e=>this.splitview.getViewSize(e)));var h;this.list=this.disposables.add(new bx(e,this.domNode,(h=i,{getHeight:e=>h.getHeight(e),getTemplateId:()=>uV.TemplateId}),[l],o)),B.any(...r.map((e=>e.onDidLayout)))((([e,t])=>l.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=n.reduce(((e,t)=>e+t.weight),0),i=n[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=Jn(this.domNode),this.style(ux)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}pV.InstanceCount=0;class mV extends pD{constructor(e){super(),this._onChange=this._register(new U),this.onChange=this._onChange.event,this._onKeyDown=this._register(new U),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...ea.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const fV=ue(0,"Match Case"),_V=ue(0,"Match Whole Word"),vV=ue(0,"Use Regular Expression");class bV extends mV{constructor(e){super({icon:Qr.caseSensitive,title:fV+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class CV extends mV{constructor(e){super({icon:Qr.wholeWord,title:_V+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class wV extends mV{constructor(e){super({icon:Qr.regex,title:vV+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class yV{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class SV{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new yV(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}const LV=fs;class kV extends pD{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new U),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(n=this.options.tooltip)&&void 0!==n?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=ds(e,LV(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",o=ds(this.element,LV(".ibwrapper"));if(this.input=ds(o,LV(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=ds(o,LV("div.mirror")),this.mirror.innerText="\xa0",this.scrollableElement=new ID(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),ds(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new Hy(document,"selectionchange")),i=B.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===o}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this._register(this.ignoreGesture(this.input)),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new Ix(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:jn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if("open"===this.state&&fd(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Ss(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=zn(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{var n,s;if(!this.message)return null;e=ds(i,LV(".monaco-inputbox-container")),t();const o={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?QL(this.message.content,o):function(e,t={}){const i=JL(t);return i.textContent=e,i}(this.message.content,o);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=null!==(n=a.background)&&void 0!==n?n:"",r.style.color=null!==(s=a.foreground)&&void 0!==s?s:"",r.style.border=a.border?`1px solid ${a.border}`:"",ds(e,r),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?ue(0,"Error: {0}",this.message.content):2===this.message.type?ue(0,"Warning: {0}",this.message.content):ue(0,"Info: {0}",this.message.content),Os(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText="\xa0",this.layout()}applyStyles(){var e,t,i;const n=this.options.inputBoxStyles,s=null!==(e=n.inputBackground)&&void 0!==e?e:"",o=null!==(t=n.inputForeground)&&void 0!==t?t:"",r=null!==(i=n.inputBorder)&&void 0!==i?i:"";this.element.style.backgroundColor=s,this.element.style.color=o,this.input.style.backgroundColor="inherit",this.input.style.color=o,this.element.style.border=`1px solid ${Ss(r,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=jn(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;null!==i&&null!==n&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,null===(e=this.actionbar)||void 0===e||e.dispose(),super.dispose()}}class DV extends kV{constructor(e,t,i){const n=ue(0,"for history"),s=` or \u21c5 ${n}`,o=` (\u21c5 ${n})`;super(e,t,i),this._onDidFocus=this._register(new U),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new U),this.onDidBlur=this._onDidBlur.event,this.history=new SV(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?s:o,t=this.placeholder+e;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(o)||e(s)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=null!=e?e:"",Ps(this.value?this.value:ue(0,"Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,Ps(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const xV=ue(0,"input");class NV extends pD{constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new I),this.additionalToggles=[],this._onDidOptionChange=this._register(new U),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new U),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new U),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new U),this._onKeyUp=this._register(new U),this._onCaseSensitiveKeyDown=this._register(new U),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new U),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||xV,this.showCommonFindToggles=!!i.showCommonFindToggles;const n=i.appendCaseSensitiveLabel||"",s=i.appendWholeWordsLabel||"",o=i.appendRegexLabel||"",r=i.history||[],a=!!i.flexibleHeight,l=!!i.flexibleWidth,h=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new DV(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:r,showHistoryHint:i.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:h,inputBoxStyles:i.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new wV(Object.assign({appendTitle:o,isChecked:!1},i.toggleStyles))),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new CV(Object.assign({appendTitle:s,isChecked:!1},i.toggleStyles))),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new bV(Object.assign({appendTitle:n,isChecked:!1},i.toggleStyles))),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(document.activeElement);if(i>=0){let n=-1;t.equals(17)?n=(i+1)%e.length:t.equals(15)&&(n=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):n>=0&&e[n].focus(),as(t,!0)}}}))}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(null==i?void 0:i.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),null==e||e.appendChild(this.domNode),this._register(En(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(En(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,i;this.domNode.classList.remove("disabled"),this.inputBox.enable(),null===(e=this.regex)||void 0===e||e.enable(),null===(t=this.wholeWords)||void 0===t||t.enable(),null===(i=this.caseSensitive)||void 0===i||i.enable();for(const n of this.additionalToggles)n.enable()}disable(){var e,t,i;this.domNode.classList.add("disabled"),this.inputBox.disable(),null===(e=this.regex)||void 0===e||e.disable(),null===(t=this.wholeWords)||void 0===t||t.disable(),null===(i=this.caseSensitive)||void 0===i||i.disable();for(const n of this.additionalToggles)n.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new N;for(const t of null!=e?e:[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,i,n,s,o,r;this.inputBox.paddingRight=e?0:(null!==(i=null===(t=this.caseSensitive)||void 0===t?void 0:t.width())&&void 0!==i?i:0)+(null!==(s=null===(n=this.wholeWords)||void 0===n?void 0:n.width())&&void 0!==s?s:0)+(null!==(r=null===(o=this.regex)||void 0===o?void 0:o.width())&&void 0!==r?r:0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return null!==(t=null===(e=this.caseSensitive)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return null!==(t=null===(e=this.wholeWords)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return null!==(t=null===(e=this.regex)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;null===(e=this.caseSensitive)||void 0===e||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var EV,IV;!function(e){e[e.Expanded=0]="Expanded",e[e.Collapsed=1]="Collapsed",e[e.PreserveOrExpanded=2]="PreserveOrExpanded",e[e.PreserveOrCollapsed=3]="PreserveOrCollapsed"}(EV||(EV={})),function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element",e[e.Filter=3]="Filter"}(IV||(IV={}));class MV extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class TV{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function RV(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function AV(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function OV(e){return"boolean"==typeof e.collapsible}class PV{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new Z,this._onDidChangeCollapseState=new U,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new U,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new U,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new Xh(Kh),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=v.empty(),n={}){if(0===e.length)throw new MV(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,s,o){var r;void 0===n&&(n=v.empty()),void 0===o&&(o=null!==(r=s.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,s);const l=[...n],h=t[t.length-1],d=new dI({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,h),...l,...a.children.slice(h+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(d.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,s);const c=t.slice(0,-1),u=(t,i,n)=>{if(o>0)for(let r=0;rt.originalStart-e.originalStart)))u(g,p,g-(m.originalStart+m.originalLength)),g=m.originalStart,p=m.modifiedStart-h,this.spliceSimple([...c,g],m.originalLength,v.slice(l,p,p+m.modifiedLength),s);u(g,p,g)}spliceSimple(e,t,i=v.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:o}){const{parentNode:r,listIndex:a,revealed:l,visible:h}=this.getParentNodeWithListIndex(e),d=[],c=v.map(i,(e=>this.createTreeNode(e,r,r.visible?1:0,l,d,n))),u=e[e.length-1],g=r.children.length>0;let p=0;for(let v=u;v>=0&&vo.getId(e.element).toString()))):r.lastDiffIds=r.children.map((e=>o.getId(e.element).toString())):r.lastDiffIds=void 0;let C=0;for(const v of b)v.visible&&C++;if(0!==C)for(let v=u+m.length;ve+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(r,_-e),this.list.splice(a,e,d)}if(b.length>0&&s){const e=t=>{s(t),t.children.forEach(e)};b.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:b});const w=r.children.length>0;g!==w&&this.setCollapsible(e.slice(0,-1),w);let y=r;for(;y;){if(2===y.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}y=y.parent}}rerender(e){if(0===e.length)throw new MV(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,s)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),o=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&o&&!OV(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return o}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const o=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=o-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(OV(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!OV(t)&&t.recursive)for(const s of e.children)n=this._setNodeCollapseState(s,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,o){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&s.push(r);const l=e.children||v.empty(),h=n&&0!==a&&!r.collapsed;let d=0,c=1;for(const u of l){const e=this.createTreeNode(u,r,a,h,s,o);r.children.push(e),c+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=d++)}return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=d,r.visible=2===a?d>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=c):(r.renderNodeCount=0,n&&s.pop()),null==o||o(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),0===s)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const o=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===s)e.visibleChildrenCount=0;else{let t=0;for(const o of e.children)r=this._updateNodeAfterFilterChange(o,s,i,n&&!e.collapsed)||r,o.visible&&(o.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===s?r:1===s,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-o):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):RV(i)?(e.filterData=i.data,AV(i.visibility)):(e.filterData=void 0,AV(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new MV(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(e),o=e[e.length-1];if(o<0||o>t.children.length)throw new MV(this.user,"Invalid tree location");const r=t.children[o];return{node:r,listIndex:i,revealed:n,visible:s&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[o,...r]=e;if(o<0||o>t.children.length)throw new MV(this.user,"Invalid tree location");for(let a=0;ae.element))),this.data=e}}function WV(e){return e instanceof HD?new BV(e):e}class VV{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=E.None,this.disposables=new N}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,WV(e),t)}onDragOver(e,t,i,n,s=!0){const o=this.dnd.onDragOver(WV(e),t&&t.element,i,n),r=this.autoExpandNode!==t;if(r&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return o;if(r&&"boolean"!=typeof o&&o.autoExpand&&(this.autoExpandDisposable=ed((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500,this.disposables)),"boolean"==typeof o||!o.accept||void 0===o.bubble||o.feedback){if(!s){return{accept:"boolean"==typeof o?o:o.accept,effect:"boolean"==typeof o?void 0:o.effect,feedback:[i]}}return o}if(1===o.bubble){const i=this.modelProvider(),s=i.getNodeLocation(t),o=i.getParentNodeLocation(s),r=i.getNode(o),a=o&&i.getListIndex(o);return this.onDragOver(e,r,a,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),h=a.getListIndex(l),d=a.getListRenderCount(l);return Object.assign(Object.assign({},o),{feedback:zd(h,h+d)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(WV(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}class HV{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;null===(n=(i=this.delegate).setDynamicHeight)||void 0===n||n.call(i,e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(FV||(FV={}));class zV{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new N,this.onDidChange=B.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class UV{constructor(e,t,i,n,s,o={}){var r;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=UV.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=E.None,this.disposables=new N,this.templateId=e.templateId,this.updateOptions(o),B.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),null===(r=e.onDidChangeTwistieState)||void 0===r||r.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){const t=hD(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if(void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==FV.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new N;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=ds(e,fs(".monaco-tl-row")),i=ds(t,fs(".monaco-tl-indent")),n=ds(t,fs(".monaco-tl-twistie")),s=ds(t,fs(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:E.None,templateData:o}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var s,o;i.indentGuidesDisposable.dispose(),null===(o=(s=this.renderer).disposeElement)||void 0===o||o.call(s,e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=UV.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...ea.asClassNameArray(Qr.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...ea.asClassNameArray(Qr.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(Dn(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new N,n=this.modelProvider();for(;;){const s=n.getNodeLocation(e),o=n.getParentNodeLocation(s);if(!o)break;const r=n.getNode(o),a=fs(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(r)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(r,a),i.add(x((()=>this.renderedIndentGuides.delete(r,a)))),e=r}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const s=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):s&&t.add(i.getNode(s))}catch(ge){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),k(this.disposables)}}UV.DefaultIndent=8;class KV{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new N,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"==typeof n?n?1:0:RV(n)?AV(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:Ir.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),s=Array.isArray(n)?n:[n];for(const o of s){const e=o&&o.toString();if(void 0===e)return{data:Ir.Default,visibility:i};let t;if(this.tree.findMatchType===qV.Contiguous){const i=e.toLowerCase().indexOf(this._lowercasePattern);if(i>-1){t=[Number.MAX_SAFE_INTEGER,0];for(let e=this._lowercasePattern.length;e>0;e--)t.push(i+e-1)}}else t=Tr(this._pattern,this._lowercasePattern,0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(t)return this._matchCount++,1===s.length?{data:t,visibility:i}:{data:{label:e,score:t},visibility:i}}return this.tree.findMode===jV.Filter?"number"==typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:Ir.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){k(this.disposables)}}var jV,qV;!function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(jV||(jV={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(qV||(qV={}));class $V{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,s,o={}){var r,a;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=s,this.options=o,this._pattern="",this.width=0,this._onDidChangeMode=new U,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new U,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new U,this._onDidChangeOpenState=new U,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new N,this.disposables=new N,this._mode=null!==(r=e.options.defaultFindMode)&&void 0!==r?r:jV.Highlight,this._matchType=null!==(a=e.options.defaultFindMatchType)&&void 0!==a?a:qV.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){var e,t,i,n;const s=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&s?null===(e=this.tree.options.showNotFoundMessage)||void 0===e||e?null===(t=this.widget)||void 0===t||t.showMessage({type:2,content:ue(0,"No elements found.")}):null===(i=this.widget)||void 0===i||i.showMessage({type:2}):null===(n=this.widget)||void 0===n||n.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===jV.Filter||(this.filter.totalCount>0&&this.filter.matchCount<=1||!Ir.isDefault(e.filterData))}layout(e){var t;this.width=e,null===(t=this.widget)||void 0===t||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function GV(e){let t=IV.Unknown;return $n(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=IV.Twistie:$n(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=IV.Element:$n(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=IV.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function ZV(e,t){t(e),e.children.forEach((e=>ZV(e,t)))}class YV{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new U,this.onDidChange=this._onDidChange.event}set(e,t){!(null==t?void 0:t.__forceEvent)&&Id(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>ZV(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>ZV(e,n)));const s=new Map,o=e=>s.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>ZV(e,o)));const r=[];for(const a of this.nodes){const e=this.identityProvider.getId(a.element).toString();if(i.has(e)){const t=s.get(e);t&&t.visible&&r.push(t)}else r.push(a)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class XV extends dx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(ix(e.browserEvent.target)||ex(e.browserEvent.target)||tx(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let s=!1;if(s="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,s&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.getNodeLocation(t),o=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,o),s&&n)return void(e.browserEvent.isHandledByList=!0)}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}}class QV extends bx{constructor(e,t,i,n,s,o,r,a){super(e,t,i,n,a),this.focusTrait=s,this.selectionTrait=o,this.anchorTrait=r}createMouseController(e){return new XV(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],s=[];let o;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&s.push(e+i),this.anchorTrait.has(t)&&(o=e+i)})),n.length>0&&super.setFocus(Vd([...super.getFocus(),...n])),s.length>0&&super.setSelection(Vd([...super.getSelection(),...s])),"number"==typeof o&&super.setAnchor(o)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class JV{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return B.filter(B.map(this.view.onMouseDblClick,GV),(e=>e.target!==IV.Filter))}get onPointer(){return B.map(this.view.onPointer,GV)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return B.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.mode)&&void 0!==t?t:jV.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.matchType)&&void 0!==t?t:qV.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,n,s={}){var o;this._user=e,this._options=s,this.eventBufferer=new Z,this.onDidChangeFindOpenState=B.None,this.disposables=new N,this._onWillRefilter=new U,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new U;const r=new HV(i),a=new Y,l=new Y,h=this.disposables.add(new zV(l.event)),d=new qs;this.renderers=n.map((e=>new UV(e,(()=>this.model),a.event,h,d,s)));for(const m of this.renderers)this.disposables.add(m);let c;s.keyboardNavigationLabelProvider&&(c=new KV(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:c}),this.disposables.add(c)),this.focus=new YV((()=>this.view.getFocusedElements()[0]),s.identityProvider),this.selection=new YV((()=>this.view.getSelectedElements()[0]),s.identityProvider),this.anchor=new YV((()=>this.view.getAnchorElement()),s.identityProvider),this.view=new QV(e,t,r,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},function(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:e=>t.identityProvider.getId(e.element)},dnd:t.dnd&&new VV(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize(t){const i=e(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>t.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>t.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)})})}((()=>this.model),s)),{tree:this})),this.model=this.createModel(e,this.view,s),a.input=this.model.onDidChangeCollapseState;const u=B.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);u((()=>null),null,this.disposables);const g=this.disposables.add(new U),p=this.disposables.add(new Xh(0));if(this.disposables.add(B.any(u,this.focus.onDidChange,this.selection.onDidChange)((()=>{p.trigger((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);g.fire([...e.values()])}))}))),l.input=g.event,!1!==s.keyboardSupport){const e=B.chain(this.view.onKeyDown,(e=>e.filter((e=>!ex(e.target))).map((e=>new St(e)))));B.chain(e,(e=>e.filter((e=>15===e.keyCode))))(this.onLeftArrow,this,this.disposables),B.chain(e,(e=>e.filter((e=>17===e.keyCode))))(this.onRightArrow,this,this.disposables),B.chain(e,(e=>e.filter((e=>10===e.keyCode))))(this.onSpace,this,this.disposables)}if((null===(o=s.findWidgetEnabled)||void 0===o||o)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new $V(this,this.model,this.view,c,s.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=B.None,this.onDidChangeFindMatchType=B.None;this.styleElement=Jn(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===FV.Always)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e);for(const i of this.renderers)i.updateOptions(e);this.view.updateOptions(this._options),null===(t=this.findController)||void 0===t||t.updateOptions(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===FV.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),Wr(t)&&(null===(i=this.findController)||void 0===i||i.layout(t))}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){k(this.disposables),this.view.dispose()}}class eH{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new PV(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=v.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=v.empty(),i){const n=new Set,s=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null===e.element)return;const o=e;if(n.add(o.element),this.nodes.set(o.element,o),this.identityProvider){const e=this.identityProvider.getId(o.element).toString();s.add(e),this.nodesByIdentity.set(e,o)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,o)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const o=e;if(n.has(o.element)||this.nodes.delete(o.element),this.identityProvider){const e=this.identityProvider.getId(o.element).toString();s.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,o)}}))}preserveCollapseState(e=v.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),v.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t){let t;return t=void 0===e.collapsed?void 0:e.collapsed===EV.Collapsed||e.collapsed===EV.PreserveOrCollapsed||e.collapsed!==EV.Expanded&&e.collapsed!==EV.PreserveOrExpanded&&Boolean(e.collapsed),Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children),collapsed:t})}const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible;let n;return n=void 0===e.collapsed||e.collapsed===EV.PreserveOrCollapsed||e.collapsed===EV.PreserveOrExpanded?t.collapsed:e.collapsed===EV.Collapsed||e.collapsed!==EV.Expanded&&Boolean(e.collapsed),Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new MV(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new MV(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new MV(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new MV(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function tH(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:v.map(v.from(e.children),tH),collapsible:e.collapsible,collapsed:e.collapsed}}function iH(e){const t=[e.element],i=e.incompressible||!1;let n,s;for(;[s,n]=v.consume(v.from(e.children),2),1===s.length&&!s[0].incompressible;)e=s[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:v.map(v.concat(s,n),iH),collapsible:e.collapsible,collapsed:e.collapsed}}function nH(e,t=0){let i;return i=tnH(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function sH(e){return nH(e,0)}function oH(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:v.map(v.from(e.children),(e=>oH(e,t,i)))})}class rH{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new eH(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=v.empty(),i){const n=i.diffIdentityProvider&&(s=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>s.getId(e).toString())).join("\0")});var s;if(null===e){const e=v.map(t,this.enabled?iH:tH);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const o=this.nodes.get(e);if(!o)throw new MV(this.user,"Unknown compressed tree node");const r=this.model.getNode(o),a=this.model.getParentNodeLocation(o),l=this.model.getNode(a),h=oH(sH(r),e,t),d=(this.enabled?iH:tH)(h),c=i.diffIdentityProvider?(e,t)=>i.diffIdentityProvider.getId(e)===i.diffIdentityProvider.getId(t):void 0;if(Id(d.element.elements,r.element.elements,c))return void this._setChildren(o,d.children||v.empty(),{diffIdentityProvider:n,diffDepth:1});const u=l.children.map((e=>e===r?d:e));this._setChildren(l.element,u,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=v.map(t,sH),n=v.map(i,e?iH:tH);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new MV(this.user,`Tree element not found: ${e}`);return t}}const aH=e=>e[e.length-1];class lH{get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new lH(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}class hH{get onDidSplice(){return B.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return B.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return B.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||aH;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new TV((e=>new lH(n,e))),this.model=new rH(e,function(e,t){return{splice(i,n,s){t.splice(i,n,s.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(n,i))}setChildren(e,t=v.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var dH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class cH extends JV{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}setChildren(e,t=v.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new eH(e,t,i)}}class uH{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===s.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){var s,o,r,a;i.compressedTreeNode?null===(o=(s=this.renderer).disposeCompressedElements)||void 0===o||o.call(s,i.compressedTreeNode,t,i.data,n):null===(a=(r=this.renderer).disposeElement)||void 0===a||a.call(r,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}dH([UL],uH.prototype,"compressedTreeNodeProvider",null);class gH extends cH{constructor(e,t,i,n,s={}){const o=()=>this;super(e,t,i,n.map((e=>new uH(o,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(ge){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(o,s))}setChildren(e,t=v.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new hH(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var pH=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function mH(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function fH(e,t){return!!t.parent&&(t.parent===e||fH(e,t.parent))}class _H{get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new _H(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class vH{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...ea.asClassNameArray(Qr.treeItemLoading)),!0):(t.classList.remove(...ea.asClassNameArray(Qr.treeItemLoading)),!1)}disposeElement(e,t,i,n){var s,o;null===(o=(s=this.renderer).disposeElement)||void 0===o||o.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function bH(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function CH(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class wH extends HD{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function yH(e){return e instanceof HD?new wH(e):e}class SH{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,yH(e),t)}onDragOver(e,t,i,n,s=!0){return this.dnd.onDragOver(yH(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(yH(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}dispose(){this.dnd.dispose()}}function LH(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new SH(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"==typeof e.defaultFindVisibility?e.defaultFindVisibility:void 0===e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)})}function kH(e,t){t(e),e.children.forEach((e=>kH(e,t)))}class DH{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return B.map(this.tree.onDidChangeFocus,bH)}get onDidChangeSelection(){return B.map(this.tree.onDidChangeSelection,bH)}get onMouseDblClick(){return B.map(this.tree.onMouseDblClick,CH)}get onPointer(){return B.map(this.tree.onPointer,CH)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,s,o={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new U,this._onDidChangeNodeSlowState=new U,this.nodeMapper=new TV((e=>new _H(e))),this.disposables=new N,this.identityProvider=o.identityProvider,this.autoExpandSingleChildren=void 0!==o.autoExpandSingleChildren&&o.autoExpandSingleChildren,this.sorter=o.sorter,this.collapseByDefault=o.collapseByDefault,this.tree=this.createTree(e,t,i,n,o),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=mH({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,s){const o=new HV(i),r=n.map((e=>new vH(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=LH(s)||{};return new cH(e,t,o,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return pH(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,s){return pH(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new MV(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield B.toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(yield this.refreshAndRenderNode(o,t,n,s),i)try{this.tree.rerender(o)}catch(ge){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return pH(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new MV(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield B.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield B.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield B.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new MV(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return pH(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return pH(this,void 0,void 0,(function*(){let n;if(this.subTreeRefreshPromises.forEach(((s,o)=>{!n&&function(e,t){return e===t||fH(e,t)||fH(t,e)}(o,e)&&(n=s.then((()=>this.refreshNode(e,t,i))))})),n)return n;if(e!==this.root){if(this.tree.getNode(e).collapsed)return e.hasChildren=!!this.dataSource.hasChildren(e.element),void(e.stale=!0)}return this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return pH(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=yield this.doRefreshNode(e,t,i);e.stale=!1,yield ld.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return pH(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if(Vr(t))n=Promise.resolve(t);else{const i=Jh(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(v.empty());try{const s=yield n;return this.setChildren(e,s,t,i)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),d(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return Vr(i)?this.processChildren(i):(t=Gh((()=>pH(this,void 0,void 0,(function*(){return this.processChildren(yield i)})))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(r))}setChildren(e,t,i,n){const s=[...t];if(0===e.children.length&&0===s.length)return[];const o=new Map,r=new Map;for(const h of e.children)if(o.set(h.element,h),this.identityProvider){const e=this.tree.isCollapsed(h);r.set(h.id,{node:h,collapsed:e})}const a=[],l=s.map((t=>{const s=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=mH({element:t,parent:e,hasChildren:s});return s&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),h=r.get(l);if(h){const e=h.node;return o.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=s,i?h.collapsed?(e.children.forEach((e=>kH(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):s&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const d=mH({element:t,parent:e,id:l,hasChildren:s});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(d):s&&this.collapseByDefault&&!this.collapseByDefault(t)&&(d.collapsedByDefault=!1,a.push(d)),d}));for(const h of o.values())kH(h,(e=>this.nodes.delete(e.element)));for(const h of l)this.nodes.set(h.element,h);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),s=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?v.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class xH{get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new xH(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class NH{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...ea.asClassNameArray(Qr.treeItemLoading)),!0):(t.classList.remove(...ea.asClassNameArray(Qr.treeItemLoading)),!1)}disposeElement(e,t,i,n){var s,o;null===(o=(s=this.renderer).disposeElement)||void 0===o||o.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var s,o;null===(o=(s=this.renderer).disposeCompressedElements)||void 0===o||o.call(s,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=k(this.disposables)}}class EH extends DH{constructor(e,t,i,n,s,o,r={}){super(e,t,i,s,o,r),this.compressionDelegate=n,this.compressibleNodeMapper=new TV((e=>new xH(e))),this.filter=r.filter}createTree(e,t,i,n,s){const o=new HV(i),r=n.map((e=>new NH(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&LH(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(s)||{};return new gH(e,t,o,r,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},s=n(this.tree.getSelection()),o=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let h=!1;const d=e=>{const t=e.element;if(t)for(let n=0;n{const t=this.filter.filter(e,1),i="boolean"==typeof(n=t)?n?1:0:RV(n)?AV(n.visibility):AV(n);var n;if(2===i)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===i}))),super.processChildren(e)}}class IH extends JV{constructor(e,t,i,n,s,o={}){super(e,t,i,n,o),this.user=e,this.dataSource=s,this.identityProvider=o.identityProvider}createModel(e,t,i){return new eH(e,t,i)}}new Tl("isMac",Pe,ue(0,"Whether the operating system is macOS")),new Tl("isLinux",Fe,ue(0,"Whether the operating system is Linux"));const MH=new Tl("isWindows",Oe,ue(0,"Whether the operating system is Windows")),TH=new Tl("isWeb",We,ue(0,"Whether the platform is a web browser")),RH=(new Tl("isMacNative",Pe&&!We,ue(0,"Whether the operating system is macOS on a non-browser platform")),new Tl("isIOS",He,ue(0,"Whether the operating system is iOS")),new Tl("isMobile",ze,ue(0,"Whether the platform is a mobile web browser")),new Tl("isDevelopment",!1,!0),new Tl("productQualityType","",ue(0,"Quality type of VS Code")),"inputFocus");new Tl(RH,!1,ue(0,"Whether keyboard focus is inside an input box"));var AH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},OH=function(e,t){return function(i,n){t(i,n,e)}};const PH=Pa("listService");const FH=new Tl("listScrollAtBoundary","none"),BH=(ul.or(FH.isEqualTo("top"),FH.isEqualTo("both")),ul.or(FH.isEqualTo("bottom"),FH.isEqualTo("both")),new Tl("listFocus",!0)),WH=new Tl("listSupportsMultiselect",!0),VH=ul.and(BH,ul.not(RH)),HH=new Tl("listHasSelectionOrFocus",!1),zH=new Tl("listDoubleSelection",!1),UH=new Tl("listMultiSelection",!1),KH=new Tl("listSelectionNavigation",!1),jH=new Tl("listSupportsFind",!0),qH=new Tl("treeElementCanCollapse",!1),$H=new Tl("treeElementHasParent",!1),GH=new Tl("treeElementCanExpand",!1),ZH=new Tl("treeElementHasChild",!1),YH=new Tl("treeFindOpen",!1),XH="listTypeNavigationMode",QH="listAutomaticKeyboardNavigation";function JH(e,t){const i=e.createScoped(t.getHTMLElement());return BH.bindTo(i),i}function ez(e,t){const i=FH.bindTo(e),n=()=>{const e=0===t.scrollTop,n=t.scrollHeight-t.renderHeight-t.scrollTop<1;e&&n?i.set("both"):e?i.set("top"):n?i.set("bottom"):i.set("none")};return n(),t.onDidScroll(n)}const tz="workbench.list.multiSelectModifier",iz="workbench.list.openMode",nz="workbench.list.horizontalScrolling",sz="workbench.list.defaultFindMode",oz="workbench.list.typeNavigationMode",rz="workbench.list.keyboardNavigation",az="workbench.list.scrollByPage",lz="workbench.list.defaultFindMatchType",hz="workbench.tree.indent",dz="workbench.tree.renderIndentGuides",cz="workbench.list.smoothScrolling",uz="workbench.list.mouseWheelScrollSensitivity",gz="workbench.list.fastScrollSensitivity",pz="workbench.tree.expandMode";function mz(e){return"alt"===e.getValue(tz)}class fz extends E{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=mz(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(tz)&&(this.useAltAsMultipleSelectionModifier=mz(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:ax(e)}isSelectionRangeChangeEvent(e){return lx(e)}}function _z(e,t){var i;const n=e.get(uu),s=e.get(PL),o=new N;return[Object.assign(Object.assign({},t),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>s.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(n.getValue(cz)),mouseWheelScrollSensitivity:n.getValue(uz),fastScrollSensitivity:n.getValue(gz),multipleSelectionController:null!==(i=t.multipleSelectionController)&&void 0!==i?i:o.add(new fz(n)),keyboardNavigationEventFilter:kz(s),scrollByPage:Boolean(n.getValue(az))}),o]}let vz=class extends bx{constructor(e,t,i,n,s,o,r,a,l){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(a.getValue(nz)),[d,c]=l.invokeFunction(_z,s);super(e,t,i,n,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:h})),this.disposables.add(c),this.contextKeyService=JH(o,this),this.disposables.add(ez(this.contextKeyService,this)),this.listSupportsMultiSelect=WH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport);KH.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=HH.bindTo(this.contextKeyService),this.listDoubleSelection=zH.bindTo(this.contextKeyService),this.listMultiSelection=UH.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=mz(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(tz)&&(this._useAltAsMultipleSelectionModifier=mz(a));let t={};if(e.affectsConfiguration(nz)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(nz));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(az)){const e=Boolean(a.getValue(az));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(cz)){const e=Boolean(a.getValue(cz));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(uz)){const e=a.getValue(uz);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(gz)){const e=a.getValue(gz);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new yz(this,Object.assign({configurationService:a},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Yx(e):Zx)}};vz=AH([OH(5,Rl),OH(6,PH),OH(7,uu),OH(8,Oa)],vz);let bz=class extends sV{constructor(e,t,i,n,s,o,r,a,l){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(a.getValue(nz)),[d,c]=l.invokeFunction(_z,s);super(e,t,i,n,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:h})),this.disposables=new N,this.disposables.add(c),this.contextKeyService=JH(o,this),this.disposables.add(ez(this.contextKeyService,this.widget)),this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=WH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport);KH.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this._useAltAsMultipleSelectionModifier=mz(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(tz)&&(this._useAltAsMultipleSelectionModifier=mz(a));let t={};if(e.affectsConfiguration(nz)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(nz));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(az)){const e=Boolean(a.getValue(az));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(cz)){const e=Boolean(a.getValue(cz));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(uz)){const e=a.getValue(uz);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(gz)){const e=a.getValue(gz);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new yz(this,Object.assign({configurationService:a},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Yx(e):Zx)}dispose(){this.disposables.dispose(),super.dispose()}};bz=AH([OH(5,Rl),OH(6,PH),OH(7,uu),OH(8,Oa)],bz);let Cz=class extends pV{constructor(e,t,i,n,s,o,r,a,l,h){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(nz)),[c,u]=h.invokeFunction(_z,o);super(e,t,i,n,s,Object.assign(Object.assign({keyboardSupport:!1},c),{horizontalScrolling:d})),this.disposables.add(u),this.contextKeyService=JH(r,this),this.disposables.add(ez(this.contextKeyService,this)),this.listSupportsMultiSelect=WH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);KH.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=HH.bindTo(this.contextKeyService),this.listDoubleSelection=zH.bindTo(this.contextKeyService),this.listMultiSelection=UH.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=mz(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(tz)&&(this._useAltAsMultipleSelectionModifier=mz(l));let t={};if(e.affectsConfiguration(nz)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(nz));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(az)){const e=Boolean(l.getValue(az));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(cz)){const e=Boolean(l.getValue(cz));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(uz)){const e=l.getValue(uz);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(gz)){const e=l.getValue(gz);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Sz(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Yx(e):Zx)}dispose(){this.disposables.dispose(),super.dispose()}};Cz=AH([OH(6,Rl),OH(7,PH),OH(8,uu),OH(9,Oa)],Cz);class wz extends E{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new U),this.onDidOpen=this._onDidOpen.event,this._register(B.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(iz)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(iz)&&(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(iz)))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class yz extends wz{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Sz extends wz{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Lz extends wz{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function kz(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return 1===n.kind?(t=!0,!1):(t=!1,0===n.kind)}}let Dz=class extends cH{constructor(e,t,i,n,s,o,r,a,l){const{options:h,getTypeNavigationMode:d,disposable:c}=o.invokeFunction(Rz,s);super(e,t,i,n,h),this.disposables.add(c),this.internals=new Az(this,s,d,s.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};Dz=AH([OH(5,Oa),OH(6,Rl),OH(7,PH),OH(8,uu)],Dz);let xz=class extends gH{constructor(e,t,i,n,s,o,r,a,l){const{options:h,getTypeNavigationMode:d,disposable:c}=o.invokeFunction(Rz,s);super(e,t,i,n,h),this.disposables.add(c),this.internals=new Az(this,s,d,s.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};xz=AH([OH(5,Oa),OH(6,Rl),OH(7,PH),OH(8,uu)],xz);let Nz=class extends IH{constructor(e,t,i,n,s,o,r,a,l,h){const{options:d,getTypeNavigationMode:c,disposable:u}=r.invokeFunction(Rz,o);super(e,t,i,n,s,d),this.disposables.add(u),this.internals=new Az(this,o,c,o.overrideStyles,a,l,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Nz=AH([OH(6,Oa),OH(7,Rl),OH(8,PH),OH(9,uu)],Nz);let Ez=class extends DH{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,o,r,a,l,h){const{options:d,getTypeNavigationMode:c,disposable:u}=r.invokeFunction(Rz,o);super(e,t,i,n,s,d),this.disposables.add(u),this.internals=new Az(this,o,c,o.overrideStyles,a,l,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Ez=AH([OH(6,Oa),OH(7,Rl),OH(8,PH),OH(9,uu)],Ez);let Iz=class extends EH{constructor(e,t,i,n,s,o,r,a,l,h,d){const{options:c,getTypeNavigationMode:u,disposable:g}=a.invokeFunction(Rz,r);super(e,t,i,n,s,o,c),this.disposables.add(g),this.internals=new Az(this,r,u,r.overrideStyles,l,h,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function Mz(e){const t=e.getValue(sz);if("highlight"===t)return jV.Highlight;if("filter"===t)return jV.Filter;const i=e.getValue(rz);return"simple"===i||"highlight"===i?jV.Highlight:"filter"===i?jV.Filter:void 0}function Tz(e){const t=e.getValue(lz);return"fuzzy"===t?qV.Fuzzy:"contiguous"===t?qV.Contiguous:void 0}function Rz(e,t){var i;const n=e.get(uu),s=e.get(Vx),o=e.get(Rl),r=e.get(Oa),a=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(nz)),[l,h]=r.invokeFunction(_z,t),d=t.paddingBottom,c=void 0!==t.renderIndentGuides?t.renderIndentGuides:n.getValue(dz);return{getTypeNavigationMode:()=>{const e=o.getContextKeyValue(XH);if("automatic"===e)return qD.Automatic;if("trigger"===e)return qD.Trigger;if(!1===o.getContextKeyValue(QH))return qD.Trigger;const t=n.getValue(oz);return"automatic"===t?qD.Automatic:"trigger"===t?qD.Trigger:void 0},disposable:h,options:Object.assign(Object.assign({keyboardSupport:!1},l),{indent:"number"==typeof n.getValue(hz)?n.getValue(hz):void 0,renderIndentGuides:c,smoothScrolling:Boolean(n.getValue(cz)),defaultFindMode:Mz(n),defaultFindMatchType:Tz(n),horizontalScrolling:a,scrollByPage:Boolean(n.getValue(az)),paddingBottom:d,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(i=t.expandOnlyOnTwistieClick)&&void 0!==i?i:"doubleClick"===n.getValue(pz),contextViewProvider:s,findWidgetStyles:$x})}}Iz=AH([OH(7,Oa),OH(8,Rl),OH(9,PH),OH(10,uu)],Iz);let Az=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,s,o,r){var a;this.tree=e,this.disposables=[],this.contextKeyService=JH(s,e),this.disposables.push(ez(this.contextKeyService,e)),this.listSupportsMultiSelect=WH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport);KH.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=jH.bindTo(this.contextKeyService),this.listSupportFindWidget.set(null===(a=t.findWidgetEnabled)||void 0===a||a),this.hasSelectionOrFocus=HH.bindTo(this.contextKeyService),this.hasDoubleSelection=zH.bindTo(this.contextKeyService),this.hasMultiSelection=UH.bindTo(this.contextKeyService),this.treeElementCanCollapse=qH.bindTo(this.contextKeyService),this.treeElementHasParent=$H.bindTo(this.contextKeyService),this.treeElementCanExpand=GH.bindTo(this.contextKeyService),this.treeElementHasChild=ZH.bindTo(this.contextKeyService),this.treeFindOpen=YH.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=mz(r),this.updateStyleOverrides(n);const l=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},h=new Set;h.add(XH),h.add(QH),this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),l()})),e.onDidChangeCollapseState(l),e.onDidChangeModel(l),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),r.onDidChangeConfiguration((n=>{let s={};if(n.affectsConfiguration(tz)&&(this._useAltAsMultipleSelectionModifier=mz(r)),n.affectsConfiguration(hz)){const e=r.getValue(hz);s=Object.assign(Object.assign({},s),{indent:e})}if(n.affectsConfiguration(dz)&&void 0===t.renderIndentGuides){const e=r.getValue(dz);s=Object.assign(Object.assign({},s),{renderIndentGuides:e})}if(n.affectsConfiguration(cz)){const e=Boolean(r.getValue(cz));s=Object.assign(Object.assign({},s),{smoothScrolling:e})}if(n.affectsConfiguration(sz)||n.affectsConfiguration(rz)){const e=Mz(r);s=Object.assign(Object.assign({},s),{defaultFindMode:e})}if(n.affectsConfiguration(oz)||n.affectsConfiguration(rz)){const e=i();s=Object.assign(Object.assign({},s),{typeNavigationMode:e})}if(n.affectsConfiguration(lz)){const e=Tz(r);s=Object.assign(Object.assign({},s),{defaultFindMatchType:e})}if(n.affectsConfiguration(nz)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(nz));s=Object.assign(Object.assign({},s),{horizontalScrolling:e})}if(n.affectsConfiguration(az)){const e=Boolean(r.getValue(az));s=Object.assign(Object.assign({},s),{scrollByPage:e})}if(n.affectsConfiguration(pz)&&void 0===t.expandOnlyOnTwistieClick&&(s=Object.assign(Object.assign({},s),{expandOnlyOnTwistieClick:"doubleClick"===r.getValue(pz)})),n.affectsConfiguration(uz)){const e=r.getValue(uz);s=Object.assign(Object.assign({},s),{mouseWheelScrollSensitivity:e})}if(n.affectsConfiguration(gz)){const e=r.getValue(gz);s=Object.assign(Object.assign({},s),{fastScrollSensitivity:e})}Object.keys(s).length>0&&e.updateOptions(s)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(h)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new Lz(e,Object.assign({configurationService:r},t)),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?Yx(e):Zx)}dispose(){this.disposables=k(this.disposables)}};Az=AH([OH(4,Rl),OH(5,PH),OH(6,uu)],Az);Ul.as(ku).registerConfiguration({id:"workbench",order:7,title:ue(0,"Workbench"),type:"object",properties:{[tz]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[ue(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),ue(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:ue(0,"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[iz]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:ue(0,"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[nz]:{type:"boolean",default:!1,description:ue(0,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[az]:{type:"boolean",default:!1,description:ue(0,"Controls whether clicks in the scrollbar scroll page by page.")},[hz]:{type:"number",default:8,minimum:4,maximum:40,description:ue(0,"Controls tree indentation in pixels.")},[dz]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:ue(0,"Controls whether the tree should render indent guides.")},[cz]:{type:"boolean",default:!1,description:ue(0,"Controls whether lists and trees have smooth scrolling.")},[uz]:{type:"number",default:1,markdownDescription:ue(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[gz]:{type:"number",default:5,markdownDescription:ue(0,"Scrolling speed multiplier when pressing `Alt`.")},[sz]:{type:"string",enum:["highlight","filter"],enumDescriptions:[ue(0,"Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),ue(0,"Filter elements when searching.")],default:"highlight",description:ue(0,"Controls the default find mode for lists and trees in the workbench.")},[rz]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[ue(0,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),ue(0,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),ue(0,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:ue(0,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:ue(0,"Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[lz]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[ue(0,"Use fuzzy matching when searching."),ue(0,"Use contiguous matching when searching.")],default:"fuzzy",description:ue(0,"Controls the type of matching used when searching lists and trees in the workbench.")},[pz]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:ue(0,"Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[oz]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:ue(0,"Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});var Oz=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Pz{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=lk.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?ue(0,"{0} in {1} on line {2} at column {3}",t.value,ba(this.uri),this.range.startLineNumber,this.range.startColumn):ue(0,"in {0} on line {1} at column {2}",ba(this.uri),this.range.startLineNumber,this.range.startColumn)}}class Fz{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:o,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:s-t}),l=new Mh(n,a.startColumn,n,s),h=new Mh(o,r,o,1073741824),d=i.getValueInRange(l).replace(/^\s+/,""),c=i.getValueInRange(e);return{value:d+c+i.getValueInRange(h).replace(/\s+$/,""),highlight:{start:d.length,end:d.length+c.length}}}}class Bz{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new zs}dispose(){k(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?ue(0,"1 symbol in {0}, full path {1}",ba(this.uri),this.uri.fsPath):ue(0,"{0} symbols in {1}, full path {2}",e,ba(this.uri),this.uri.fsPath)}resolve(e){return Oz(this,void 0,void 0,(function*(){if(0!==this._previews.size)return this;for(const i of this.children)if(!this._previews.has(i.uri))try{const t=yield e.createModelReference(i.uri);this._previews.set(i.uri,new Fz(t))}catch(t){r(t)}return this}))}}class Wz{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new U,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(Wz._compareReferences);for(const s of e)if(n&&fa.isEqual(n.uri,s.uri,!0)||(n=new Bz(this,s.uri),this.groups.push(n)),0===n.children.length||0!==Wz._compareReferences(s,n.children[n.children.length-1])){const e=new Pz(i===s,n,s,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){k(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new Wz(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?ue(0,"No results found"):1===this.references.length?ue(0,"Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?ue(0,"Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):ue(0,"Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,o=i.parent.groups.length;return 1===o||t&&n+10?(n=t?(n+1)%s:(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%o,i.parent.groups[n].children[0]):(n=(n+o-1)%o,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:vo(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&Mh.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return fa.compare(e.uri,t.uri)||Mh.compareRangesUsingStarts(e.range,t.range)}}class Vz{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=ds(e,fs(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=Xs(this.countFormat,this.count),this.element.title=Xs(this.titleFormat,this.count),this.element.style.backgroundColor=null!==(e=this.styles.badgeBackground)&&void 0!==e?e:"",this.element.style.color=null!==(t=this.styles.badgeForeground)&&void 0!==t?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}class Hz{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=null!==(i=null==t?void 0:t.supportIcons)&&void 0!==i&&i,this.domNode=ds(e,fs("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=Hz.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&fd(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,s+=i;for(const i of t)i.end<=s||(i.start>=s&&(i.start+=n),i.end>=s&&(i.end+=n));return i+=n,"\u23ce"}))}}class zz{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class Uz extends E{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new zz(ds(e,fs(".monaco-icon-label")))),this.labelContainer=ds(this.domNode.element,fs(".monaco-icon-label-container"));const i=ds(this.labelContainer,fs("span.monaco-icon-name-container"));(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new jz(i,!!t.supportIcons):this.nameNode=new Kz(i),this.hoverDelegate=null==t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"],s=["monaco-icon-label-container"];let o="";if(i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough"),i.disabledCommand&&s.push("disabled"),i.title&&(o+=i.title)),this.domNode.className=n.join(" "),this.domNode.element.setAttribute("aria-label",o),this.labelContainer.className=s.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof Hz?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,null==i?void 0:i.labelEscapeNewLines),this.setupHover(e.element,null==i?void 0:i.descriptionTitle)):(e.textContent=t&&(null==i?void 0:i.labelEscapeNewLines)?Hz.escapeNewLines(t,[]):t||"",this.setupHover(e.element,(null==i?void 0:i.descriptionTitle)||""),e.empty=!t)}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=aD(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){Pr(t)?e.title=oa(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new zz(ds(this.labelContainer,fs("span.monaco-icon-description-container"))));(null===(e=this.creationOptions)||void 0===e?void 0:e.supportDescriptionHighlights)?this.descriptionNode=new Hz(ds(t.element,fs("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new zz(ds(t.element,fs("span.label-description"))))}return this.descriptionNode}}class Kz{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!fd(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=ds(this.container,fs("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const s={start:n,end:n+e.length},o=i.map((e=>RD.intersect(s,e))).filter((e=>!RD.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=s.end+t.length,o}))}(e,i,null==t?void 0:t.matches);for(let s=0;s=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Zz=function(e,t){return function(i,n){t(i,n,e)}};let Yz=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Wz||e instanceof Bz}getChildren(e){if(e instanceof Wz)return e.groups;if(e instanceof Bz)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};Yz=Gz([Zz(0,Va)],Yz);class Xz{getHeight(){return 23}getTemplateId(e){return e instanceof Bz?tU.id:nU.id}}let Qz=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Pz){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return ba(e.uri)}};Qz=Gz([Zz(0,PL)],Qz);class Jz{getId(e){return e instanceof Pz?e.id:e.uri}}let eU=class extends E{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new Uz(i,{supportHighlights:!0})),this.badge=new Vz(ds(i,fs(".count")),{},Gx),e.appendChild(i)}set(e,t){const i=wa(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(ue(0,"{0} references",n)):this.badge.setTitleFormat(ue(0,"{0} reference",n))}};eU=Gz([Zz(1,qz)],eU);let tU=$z=class{constructor(e){this._instantiationService=e,this.templateId=$z.id}renderTemplate(e){return this._instantiationService.createInstance(eU,e)}renderElement(e,t,i){i.set(e.element,fr(e.filterData))}disposeTemplate(e){e.dispose()}};tU.id="FileReferencesRenderer",tU=$z=Gz([Zz(0,Oa)],tU);class iU{constructor(e){this.label=new Hz(e)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!Ir.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,fr(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${ba(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class nU{constructor(){this.templateId=nU.id}renderTemplate(e){return new iU(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}nU.id="OneReferenceRenderer";class sU{getWidgetAriaLabel(){return ue(0,"References")}getAriaLabel(e){return e.ariaMessage}}var oU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},rU=function(e,t){return function(i,n){t(i,n,e)}},aU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class lU{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new N,this._callOnModelChange=new N,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(const t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,s=e.children.length;n{const s=n.deltaDecorations([],t);for(let t=0;t{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(dU,"ReferencesWidget",this._treeContainer,new Xz,[this._instantiationService.createInstance(tU),this._instantiationService.createInstance(nU)],this._instantiationService.createInstance(Yz),t),this._splitView.addView({onDidChange:B.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},dV.Distribute),this._splitView.addView({onDidChange:B.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},dV.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const i=(e,t)=>{e instanceof Pz&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),vs(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Wn(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=ue(0,"No results"),_s(this._messageContainer),Promise.resolve(void 0)):(vs(this._messageContainer),this._decorationsManager=new lU(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),_s(this._treeContainer),_s(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof Pz?e:e instanceof Bz&&e.children.length>0?e.children[0]:void 0}revealReference(e){return aU(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return aU(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==vn.inMemory?this.setTitle(va(e.uri),this._uriLabel.getUriLabel(wa(e.uri))):this.setTitle(ue(0,"References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const n=yield i;if(!this._model)return void n.dispose();k(this._previewModelReference);const s=n.object;if(s){const t=this._preview.getModel()===s.textEditorModel?0:1,i=Mh.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}))}};cU=oU([rU(3,R_),rU(4,Va),rU(5,Oa),rU(6,zW),rU(7,qz),rU(8,rw),rU(9,PL),rU(10,yc),rU(11,Xu)],cU);var uU,gU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},pU=function(e,t){return function(i,n){t(i,n,e)}},mU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const fU=new Tl("referenceSearchVisible",!1,ue(0,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let _U=uU=class{static get(e){return e.getContribution(uU.ID)}constructor(e,t,i,n,s,o,r,a){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=o,this._storageService=r,this._configurationService=a,this._disposables=new N,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=fU.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const s="peekViewLayout",o=hU.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(cU,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(ue(0,"Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{var i;if(r===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(ue(0,"{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new Ba(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(86)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return mU(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),o=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n,!1),s?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return mU(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var i;null===(i=this._widget)||void 0===i||i.hide(),this._ignoreModelChangeEvent=!0;const n=Mh.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then((e=>{var t;if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(n),this._widget.focusOnReferenceTree();else{const i=uU.get(e),s=this._model.clone();this.closeWidget(),e.focus(),null==i||i.toggleWidget(n,Gh((e=>Promise.resolve(s))),null!==(t=this._peekMode)&&void 0!==t&&t)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,r(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function vU(e,t){const i=function(e){const t=e.get(Fa).getFocusedCodeEditor();return t instanceof cW?t.getParentEditor():t}(e);if(!i)return;const n=_U.get(i);n&&t(n)}_U.ID="editor.contrib.referencesController",_U=uU=gU([pU(2,Rl),pU(3,Fa),pU(4,uL),pU(5,Oa),pU(6,qN),pU(7,uu)],_U),jl.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:pt(2089,60),when:ul.or(fU,UW.inPeekEditor),handler(e){vU(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),jl.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:ul.or(fU,UW.inPeekEditor),handler(e){vU(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),jl.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:ul.or(fU,UW.inPeekEditor),handler(e){vU(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),Za.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),Za.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),Za.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),Za.registerCommand("closeReferenceSearch",(e=>vU(e,(e=>e.closeWidget())))),jl.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:ul.and(UW.inPeekEditor,ul.not("config.editor.stablePeek"))}),jl.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:ul.and(fU,ul.not("config.editor.stablePeek"))}),jl.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ul.and(fU,VH,qH.negate(),GH.negate()),handler(e){var t;const i=null===(t=e.get(PH).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof Pz&&vU(e,(e=>e.revealReference(i[0])))}}),jl.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ul.and(fU,VH,qH.negate(),GH.negate()),handler(e){var t;const i=null===(t=e.get(PH).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof Pz&&vU(e,(e=>e.openReference(i[0],!0,!0)))}}),Za.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(PH).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof Pz&&vU(e,(e=>e.openReference(i[0],!1,!0)))}));var bU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},CU=function(e,t){return function(i,n){t(i,n,e)}};const wU=new Tl("hasSymbols",!1,ue(0,"Whether there are symbol locations that can be navigated via keyboard-only.")),yU=Pa("ISymbolNavigationService");let SU=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=wU.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new LU(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),s=i.getPosition();if(!n||!s)return;let o=!1,r=!1;for(const a of t.references)if(_a(a.uri,n.uri))o=!0,r=r||Mh.containsPosition(a.range,s);else if(o)break;o&&r||this.reset()}));this._currentState=D(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:Mh.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?ue(0,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):ue(0,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};SU=bU([CU(0,Rl),CU(1,Fa),CU(2,uL),CU(3,PL)],SU),Cu(yU,SU,1),wh(new class extends fh{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:wU,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(yU).revealNext(t)}}),jl.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:wU,primary:9,handler(e){e.get(yU).reset()}});let LU=class{constructor(e){this._listener=new Map,this._disposables=new N,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),k(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,D(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};LU=bU([CU(0,Fa)],LU);var kU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function DU(e,t,i,n){return kU(this,void 0,void 0,(function*(){const s=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{a(e)}))));return Pd((yield Promise.all(s)).flat())}))}function xU(e,t,i,n){return DU(t,i,e,((e,t,i)=>e.provideDefinition(t,i,n)))}function NU(e,t,i,n){return DU(t,i,e,((e,t,i)=>e.provideDeclaration(t,i,n)))}function EU(e,t,i,n){return DU(t,i,e,((e,t,i)=>e.provideImplementation(t,i,n)))}function IU(e,t,i,n){return DU(t,i,e,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function MU(e,t,i,n,s){return DU(t,i,e,((e,t,i)=>kU(this,void 0,void 0,(function*(){const o=yield e.provideReferences(t,i,{includeDeclaration:!0},s);if(!n||!o||2!==o.length)return o;const r=yield e.provideReferences(t,i,{includeDeclaration:!1},s);return r&&1===r.length?r:o}))))}function TU(e){return kU(this,void 0,void 0,(function*(){const t=yield e(),i=new Wz(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}Ch("_executeDefinitionProvider",((e,t,i)=>{const n=xU(e.get(iL).definitionProvider,t,i,Hh.None);return TU((()=>n))})),Ch("_executeTypeDefinitionProvider",((e,t,i)=>{const n=IU(e.get(iL).typeDefinitionProvider,t,i,Hh.None);return TU((()=>n))})),Ch("_executeDeclarationProvider",((e,t,i)=>{const n=NU(e.get(iL).declarationProvider,t,i,Hh.None);return TU((()=>n))})),Ch("_executeReferenceProvider",((e,t,i)=>{const n=MU(e.get(iL).referenceProvider,t,i,!1,Hh.None);return TU((()=>n))})),Ch("_executeImplementationProvider",((e,t,i)=>{const n=EU(e.get(iL).implementationProvider,t,i,Hh.None);return TU((()=>n))}));var RU,AU,OU,PU,FU,BU,WU,VU,HU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};th.appendMenuItem(Ql.EditorContext,{submenu:Ql.EditorContextPeek,title:ue(0,"Peek"),group:"navigation",order:100});class zU{static is(e){return!(!e||"object"!=typeof e)&&(e instanceof zU||!(!Ba.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class UU extends bh{static all(){return UU._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const i of v.wrap(t.menu))i.id!==Ql.EditorContext&&i.id!==Ql.EditorContextPeek||(i.when=ul.and(e.precondition,i.when));return t}constructor(e,t){super(UU._patchConfig(t)),this.configuration=e,UU._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const s=e.get(uL),o=e.get(Fa),r=e.get(mL),a=e.get(yU),l=e.get(iL),h=e.get(Oa),d=t.getModel(),c=t.getPosition(),u=zU.is(i)?i:new zU(d,c),g=new aL(t,5),p=Zh(this._getLocationModel(l,u.model,u.position,g.token),g.token).then((e=>HU(this,void 0,void 0,(function*(){var s;if(!e||g.token.isCancellationRequested)return;let r;if(Os(e.ariaMessage),e.referenceAt(d.uri,c)){const e=this._getAlternativeCommand(t);!UU._activeAlternativeCommands.has(e)&&UU._allSymbolNavigationCommands.has(e)&&(r=UU._allSymbolNavigationCommands.get(e))}const l=e.references.length;if(0===l){if(!this.configuration.muteMessage){const e=d.getWordAtPosition(c);null===(s=iD.get(t))||void 0===s||s.showMessage(this._getNoResultFoundMessage(e),c)}}else{if(1!==l||!r)return this._onResult(o,a,t,e,n);UU._activeAlternativeCommands.add(this.desc.id),h.invokeFunction((e=>r.runEditorCommand(e,t,i,n).finally((()=>{UU._activeAlternativeCommands.delete(this.desc.id)}))))}}))),(e=>{s.error(e)})).finally((()=>{g.dispose()}));return r.showWhile(p,250),p}_onResult(e,t,i,n,s){return HU(this,void 0,void 0,(function*(){const o=this._getGoToPreference(i);if(i instanceof cW||!(this.configuration.openInPeek||"peek"===o&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===o,l=yield this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,s):n.dispose(),"goto"===o&&t.put(r)}else this._openInPeek(i,n,s)}))}_openReference(e,t,i,n,s){return HU(this,void 0,void 0,(function*(){let o;var r;if((r=i)&&an.isUri(r.uri)&&Mh.isIRange(r.range)&&(Mh.isIRange(r.originSelectionRange)||Mh.isIRange(r.targetSelectionRange))&&(o=i.targetSelectionRange),o||(o=i.range),!o)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:Mh.collapseToStart(o),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(a){if(s){const e=a.getModel(),t=a.createDecorationsCollection([{range:o,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{a.getModel()===e&&t.clear()}),350)}return a}}))}_openInPeek(e,t,i){const n=_U.get(e);n&&e.hasModel()?n.toggleWidget(null!=i?i:e.getSelection(),Gh((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}UU._allSymbolNavigationCommands=new Map,UU._activeAlternativeCommands=new Set;class KU extends UU{_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield xU(e.definitionProvider,t,i,n),ue(0,"Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No definition found for '{0}'",e.word):ue(0,"No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}oh(((RU=class extends KU{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:RU.id,title:{value:ue(0,"Go to Definition"),original:"Go to Definition",mnemonicTitle:ue(0,"Go to &&Definition")},precondition:ul.and(Rh.hasDefinitionProvider,Rh.isInWalkThroughSnippet.toNegated()),keybinding:[{when:Rh.editorTextFocus,primary:70,weight:100},{when:ul.and(Rh.editorTextFocus,TH),primary:2118,weight:100}],menu:[{id:Ql.EditorContext,group:"navigation",order:1.1},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Za.registerCommandAlias("editor.action.goToDeclaration",RU.id)}}).id="editor.action.revealDefinition",RU)),oh(((AU=class extends KU{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:AU.id,title:{value:ue(0,"Open Definition to the Side"),original:"Open Definition to the Side"},precondition:ul.and(Rh.hasDefinitionProvider,Rh.isInWalkThroughSnippet.toNegated()),keybinding:[{when:Rh.editorTextFocus,primary:pt(2089,70),weight:100},{when:ul.and(Rh.editorTextFocus,TH),primary:pt(2089,2118),weight:100}]}),Za.registerCommandAlias("editor.action.openDeclarationToTheSide",AU.id)}}).id="editor.action.revealDefinitionAside",AU)),oh(((OU=class extends KU{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:OU.id,title:{value:ue(0,"Peek Definition"),original:"Peek Definition"},precondition:ul.and(Rh.hasDefinitionProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:Ql.EditorContextPeek,group:"peek",order:2}}),Za.registerCommandAlias("editor.action.previewDeclaration",OU.id)}}).id="editor.action.peekDefinition",OU));class jU extends UU{_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield NU(e.declarationProvider,t,i,n),ue(0,"Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No declaration found for '{0}'",e.word):ue(0,"No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}oh(((PU=class extends jU{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:PU.id,title:{value:ue(0,"Go to Declaration"),original:"Go to Declaration",mnemonicTitle:ue(0,"Go to &&Declaration")},precondition:ul.and(Rh.hasDeclarationProvider,Rh.isInWalkThroughSnippet.toNegated()),menu:[{id:Ql.EditorContext,group:"navigation",order:1.3},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No declaration found for '{0}'",e.word):ue(0,"No declaration found")}}).id="editor.action.revealDeclaration",PU)),oh(class extends jU{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:ue(0,"Peek Declaration"),original:"Peek Declaration"},precondition:ul.and(Rh.hasDeclarationProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),menu:{id:Ql.EditorContextPeek,group:"peek",order:3}})}});class qU extends UU{_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield IU(e.typeDefinitionProvider,t,i,n),ue(0,"Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No type definition found for '{0}'",e.word):ue(0,"No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}oh(((FU=class extends qU{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:FU.ID,title:{value:ue(0,"Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:ue(0,"Go to &&Type Definition")},precondition:ul.and(Rh.hasTypeDefinitionProvider,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:0,weight:100},menu:[{id:Ql.EditorContext,group:"navigation",order:1.4},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}).ID="editor.action.goToTypeDefinition",FU)),oh(((BU=class extends qU{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:BU.ID,title:{value:ue(0,"Peek Type Definition"),original:"Peek Type Definition"},precondition:ul.and(Rh.hasTypeDefinitionProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),menu:{id:Ql.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",BU));class $U extends UU{_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield EU(e.implementationProvider,t,i,n),ue(0,"Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No implementation found for '{0}'",e.word):ue(0,"No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}oh(((WU=class extends $U{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:WU.ID,title:{value:ue(0,"Go to Implementations"),original:"Go to Implementations",mnemonicTitle:ue(0,"Go to &&Implementations")},precondition:ul.and(Rh.hasImplementationProvider,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:2118,weight:100},menu:[{id:Ql.EditorContext,group:"navigation",order:1.45},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}).ID="editor.action.goToImplementation",WU)),oh(((VU=class extends $U{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:VU.ID,title:{value:ue(0,"Peek Implementations"),original:"Peek Implementations"},precondition:ul.and(Rh.hasImplementationProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:3142,weight:100},menu:{id:Ql.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",VU));class GU extends UU{_getNoResultFoundMessage(e){return e?ue(0,"No references found for '{0}'",e.word):ue(0,"No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}oh(class extends GU{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:ue(0,"Go to References"),original:"Go to References",mnemonicTitle:ue(0,"Go to &&References")},precondition:ul.and(Rh.hasReferenceProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:1094,weight:100},menu:[{id:Ql.EditorContext,group:"navigation",order:1.45},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield MU(e.referenceProvider,t,i,!0,n),ue(0,"References"))}))}}),oh(class extends GU{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:ue(0,"Peek References"),original:"Peek References"},precondition:ul.and(Rh.hasReferenceProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),menu:{id:Ql.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield MU(e.referenceProvider,t,i,!1,n),ue(0,"References"))}))}});class ZU extends UU{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:ue(0,"Go to Any Symbol"),original:"Go to Any Symbol"},precondition:ul.and(UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(this._references,ue(0,"Locations"))}))}_getNoResultFoundMessage(e){return e&&ue(0,"No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}Za.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:an},{name:"position",description:"The position at which to start",constraint:Ba.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,i,n,s,o,r)=>HU(void 0,void 0,void 0,(function*(){jr(an.isUri(t)),jr(Ba.isIPosition(i)),jr(Array.isArray(n)),jr(void 0===s||"string"==typeof s),jr(void 0===r||"boolean"==typeof r);const a=e.get(Fa),l=yield a.openCodeEditor({resource:t},a.getFocusedCodeEditor());if(JW(l))return l.setPosition(i),l.revealPositionInCenterIfOutsideViewport(i,0),l.invokeWithinContext((e=>{const t=new class extends ZU{_getNoResultFoundMessage(e){return o||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(o),openInPeek:Boolean(r),openToSide:!1},n,s);e.get(Oa).invokeFunction(t.run.bind(t),l)}))}))}),Za.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:an},{name:"position",description:"The position at which to start",constraint:Ba.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,i,n,s)=>HU(void 0,void 0,void 0,(function*(){e.get(Ga).executeCommand("editor.action.goToLocations",t,i,n,s,void 0,!0)}))}),Za.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{jr(an.isUri(t)),jr(Ba.isIPosition(i));const n=e.get(iL),s=e.get(Fa);return s.openCodeEditor({resource:t},s.getFocusedCodeEditor()).then((e=>{if(!JW(e)||!e.hasModel())return;const t=_U.get(e);if(!t)return;const s=Gh((t=>MU(n.referenceProvider,e.getModel(),Ba.lift(i),!1,t).then((e=>new Wz(e,ue(0,"References")))))),o=new Mh(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(o,s,!1))}))}}),Za.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var YU,XU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},QU=function(e,t){return function(i,n){t(i,n,e)}},JU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let eK=YU=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new N,this.toUnhookForKeyboard=new N,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new IR(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,null!=t?t:void 0)}))),this.toUnhook.add(s.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{r(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(s.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(YU.ID)}startFindDefinitionFromCursor(e){return JU(this,void 0,void 0,(function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;return JU(this,void 0,void 0,(function*(){this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const n=new rL(this.editor,15);let s;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Gh((t=>this.findDefinition(e,t)));try{s=yield this.previousPromise}catch(a){return void r(a)}if(!s||!s.length||!n.validate(this.editor))return void this.removeLinkDecorations();const o=s[0].originSelectionRange?Mh.lift(s[0].originSelectionRange):new Mh(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(s.length>1){let e=o;for(const{originSelectionRange:t}of s)t&&(e=Mh.plusRange(e,t));this.addDecoration(e,(new Ia).appendText(ue(0,"Click to show {0} definitions.",s.length)))}else{const e=s[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const s=this.getPreviewValue(i,n,e),r=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(o,s?(new Ia).appendCodeblock(r||"",s):void 0),t.dispose()}))}}))}getPreviewValue(e,t,i){let n=i.range;n.endLineNumber-n.startLineNumber>=YU.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t));return this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let s=t+1;s{const i=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(e);return new KU({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)}))}isInPeekEditor(e){const t=e.get(Rl);return UW.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};eK.ID="editor.contrib.gotodefinitionatposition",eK.MAX_SOURCE_PREVIEW_LINES=8,eK=YU=XU([QU(1,Va),QU(2,yc),QU(3,iL)],eK),Lh(eK.ID,eK,2);const tK=fs;class iK extends E{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new TD(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class nK extends E{static render(e,t,i){return new nK(e,t,i)}constructor(e,t,i){super(),this.actionContainer=ds(e,tK("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=ds(this.actionContainer,tK("a.action")),this.action.setAttribute("role","button"),t.iconClass&&ds(this.action,tK(`span.icon.${t.iconClass}`));ds(this.action,tK("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(En(this.actionContainer,os.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this._register(En(this.actionContainer,os.KEY_DOWN,(e=>{const i=new St(e);(i.equals(3)||i.equals(10))&&(e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer))}))),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var sK=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},oK=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,s){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,s,(t=e[i](t)).done,t.value)}))}}};class rK{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class aK extends E{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new U),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new sd((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new sd((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new sd((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=function(e){const t=new Uh,i=e(t.token);return new dd(t,(e=>jh(this,void 0,void 0,(function*(){var n,s,o,r;const a=t.token.onCancellationRequested((()=>{a.dispose(),t.dispose(),e.reject(new c)}));try{try{for(var l,h=!0,d=qh(i);!(n=(l=yield d.next()).done);h=!0){r=l.value,h=!1;const i=r;if(t.token.isCancellationRequested)return;e.emitOne(i)}}catch(u){s={error:u}}finally{try{h||n||!(o=d.return)||(yield o.call(d))}finally{if(s)throw s.error}}a.dispose(),t.dispose()}catch(g){a.dispose(),t.dispose(),e.reject(g)}}))))}((e=>this._computer.computeAsync(e))),(()=>{sK(this,void 0,void 0,(function*(){var e,t,i,n;try{try{for(var s,o=!0,a=oK(this._asyncIterable);!(e=(s=yield a.next()).done);o=!0){n=s.value,o=!1;const e=n;e&&(this._result.push(e),this._fireResult())}}catch(l){t={error:l}}finally{try{o||e||!(i=a.return)||(yield i.call(a))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(Dre){r(Dre)}}))})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new rK(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class lK{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class hK{constructor(e,t,i,n,s,o){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=o,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}const dK=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class cK{constructor(){let e;this._onDidWillResize=new U,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new U,this.onDidResize=this._onDidResize.event,this._sashListener=new N,this._size=new Wn(0,0),this._minSize=new Wn(0,0),this._maxSize=new Wn(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new CW(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new CW(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new CW(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:gW.North}),this._southSash=new CW(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:gW.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(B.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(B.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(B.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(B.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:s,width:o}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(o,t));const r=new Wn(t,e);Wn.equals(r,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=r,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}class uK extends E{constructor(e,t=new Wn(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new cK),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Wn.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize((e=>{this._resize(new Wn(e.dimension.width,e.dimension.height)),e.done&&(this._isResizing=!1)}))),this._register(this._resizableNode.onDidWillResize((()=>{this._isResizing=!0})))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return(null===(e=this._contentPosition)||void 0===e?void 0:e.position)?Ba.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;return Hn(t).top+i.top-30}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=Hn(t),s=Fn(t.ownerDocument.body),o=n.top+i.top+i.height;return s.height-o-24}_findPositionPreference(e,t){var i,n;const s=Math.min(null!==(i=this._availableVerticalSpaceBelow(t))&&void 0!==i?i:1/0,e),o=Math.min(null!==(n=this._availableVerticalSpaceAbove(t))&&void 0!==n?n:1/0,e),r=Math.min(Math.max(o,s),e),a=Math.min(e,r);let l;return l=this._editor.getOption(60).above?a<=o?1:2:a<=s?2:1,1===l?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var gK,pK,mK=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fK=function(e,t){return function(i,n){t(i,n,e)}};const _K=fs;let vK=gK=class extends E{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(yK,this._editor)),this._participants=[];for(const n of dK.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new LK(this._editor,this._participants),this._hoverOperation=this._register(new aK(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new bK(this._computer.anchor,t,e.isComplete))}))),this._register(Mn(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(DC.onDidChange((()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const n of this._participants)if(n.suggestHoverAnchor){const i=n.suggestHoverAnchor(e);i&&t.push(i)}const i=e.target;if(6===i.type&&t.push(new lK(0,i.range,e.event.posx,e.event.posy)),7===i.type){const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"==typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToTextt.priority-e.priority)),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new lK(0,e,void 0,void 0),t,i,n,null)}_startShowingOrUpdateHover(e,t,i,n,s){if(!this._widget.position||!this._currentResult)return!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0);return this._editor.getOption(60).sticky&&s&&this._widget.isMouseGettingCloser(s.event.posx,s.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?!(!e||!this._currentResult.anchor.equals(e))||(e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,n,s){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=s,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&0===e.messages.length&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return!!e&&this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor)for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){if(this._widget.position&&this._currentResult&&this._currentResult.isComplete){if(!e.isComplete)return;if(this._computer.insistOnKeepingHoverVisible&&0===e.messages.length)return}this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:s}=gK.computeHoverRanges(this._editor,e.range,t),o=new N,r=o.add(new SK(this._keybindingService)),a=document.createDocumentFragment();let l=null;const h={fragment:a,statusBar:r,setColorPicker:e=>l=e,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:e=>this._widget.setMinimumDimensions(e),hide:()=>this.hide()};for(const c of this._participants){const e=t.filter((e=>e.owner===c));e.length>0&&o.add(c.renderHoverParts(h,e))}const d=t.some((e=>e.isBeforeContent));if(r.hasContent&&a.appendChild(r.hoverElement),a.hasChildNodes()){if(s){const e=this._editor.createDecorationsCollection();e.set([{range:s,options:gK._DECORATION_OPTIONS}]),o.add(x((()=>{e.clear()})))}this._widget.showAt(a,new wK(l,i,n,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,o))}else o.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),s=i.coordinatesConverter,o=s.convertModelRangeToViewRange(t),r=new Ba(o.startLineNumber,i.getLineMinColumn(o.startLineNumber));n=s.convertViewPositionToModelPosition(r).column}const s=t.startLineNumber;let o=t.startColumn,r=i[0].range,a=null;for(const l of i)r=Mh.plusRange(r,l.range),l.range.startLineNumber===s&&l.range.endLineNumber===s&&(o=Math.max(Math.min(o,l.range.startColumn),n)),l.forceShowAtRange&&(a=l.range);return{showAtPosition:a?a.getStartPosition():new Ba(s,t.startColumn),showAtSecondaryPosition:a?a.getStartPosition():new Ba(s,o),highlightRange:r}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};vK._DECORATION_OPTIONS=xw.register({description:"content-hover-highlight",className:"hoverHighlight"}),vK=gK=mK([fK(1,Oa),fK(2,PL)],vK);class bK{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.messages.length?this:new CK(this,this.anchor,t,this.isComplete)}}class CK extends bK{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class wK{constructor(e,t,i,n,s,o,r,a,l,h){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=n,this.stoleFocus=s,this.source=o,this.isBeforeContent=r,this.initialMousePosX=a,this.initialMousePosY=l,this.disposables=h,this.closestMouseDistance=void 0}}let yK=pK=class extends uK{get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}get isVisibleFromKeyboard(){var e;return 1===(null===(e=this._visibleData)||void 0===e?void 0:e.source)}get isVisible(){var e;return null!==(e=this._hoverVisibleKey.get())&&void 0!==e&&e}get isFocused(){var e;return null!==(e=this._hoverFocusedKey.get())&&void 0!==e&&e}constructor(e,t,i,n,s){const o=e.getOption(66)+8,r=new Wn(150,o);super(e,r),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new iK),this._minimumSize=r,this._hoverVisibleKey=Rh.hoverVisible.bindTo(t),this._hoverFocusedKey=Rh.hoverFocused.bindTo(t),ds(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange((()=>this._layout()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()})));const a=this._register(hs(this._resizableNode.domNode));this._register(a.onDidFocus((()=>{this._hoverFocusedKey.set(!0)}))),this._register(a.onDidBlur((()=>{this._hoverFocusedKey.set(!1)}))),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),null===(e=this._visibleData)||void 0===e||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return pK.ID}static _applyDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,s="number"==typeof i?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return pK._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return pK._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,s="number"==typeof i?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){pK._applyMaxDimensions(this._hover.contentsDomNode,e,t),pK._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth","number"==typeof e?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,i-10))}_updateResizableNodeMaxDimensions(){var e,t;const i=null!==(e=this._findMaximumRenderingWidth())&&void 0!==e?e:1/0,n=null!==(t=this._findMaximumRenderingHeight())&&void 0!==t?t:1/0;this._resizableNode.maxSize=new Wn(i,n),this._setHoverWidgetMaxDimensions(i,n)}_resize(e){var t,i;pK._lastDimensions=new Wn(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),null===(i=null===(t=this._visibleData)||void 0===t?void 0:t.colorPicker)||void 0===i||i.layout()}_findAvailableSpaceVertically(){var e;const t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition;if(t)return 1===this._positionPreference?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=6;return Array.from(this._hover.contentsDomNode.children).forEach((e=>{t+=e.clientHeight})),this._hasHorizontalScrollbar()&&(t+=10),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some((e=>e.scrollWidth>e.clientWidth));return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=void 0===this._contentWidth?0:this._contentWidth-2;if(e||this._hover.containerDomNode.clientWidththis._visibleData.closestMouseDistance+4)&&(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),!0)}_setHoverData(e){var t;null===(t=this._visibleData)||void 0===t||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=""+t/e,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,pK._lastDimensions.height),t=Math.max(.66*this._editor.getLayoutInfo().width,500,pK._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[null!==(e=this._positionPreference)&&void 0!==e?e:1]}:null}showAt(e,t){var i,n,s,o;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const r=jn(this._hover.containerDomNode),a=t.showAtPosition;this._positionPreference=null!==(i=this._findPositionPreference(r,a))&&void 0!==i?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),null===(n=t.colorPicker)||void 0===n||n.layout();const l=(h=!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),d=null!==(o=null===(s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))||void 0===s?void 0:s.getAriaLabel())&&void 0!==o?o:"",h&&d?ue(0,"Inspect this in the accessible view with {0}.",d):h?ue(0,"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):"");var h,d;l&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+l)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Wn(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const i=this._hover.containerDomNode,n=this._hover.contentsDomNode,s=null!==(t=this._findMaximumRenderingHeight())&&void 0!==t?t:1/0;this._setContainerDomNodeDimensions(zn(i),Math.min(s,e)),this._setContentsDomNodeDimensions(zn(n),Math.min(s,e-10))}setMinimumDimensions(e){this._minimumSize=new Wn(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=void 0===this._contentWidth?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Wn(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=jn(t),n=zn(t);if(this._resizableNode.layout(i,n),this._setHoverWidgetDimensions(n,i),i=jn(t),n=zn(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(i,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(i)),null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition){const e=jn(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-30})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+30})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};yK.ID="editor.contrib.resizableContentHoverWidget",yK._lastDimensions=new Wn(0,0),yK=pK=mK([fK(1,Rl),fK(2,uu),fK(3,ZR),fK(4,PL)],yK);let SK=class extends E{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=_K("div.hover-row.status-bar"),this.actionsElement=ds(this.hoverElement,_K("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(nK.render(this.actionsElement,e,i))}append(e){const t=ds(this.actionsElement,e);return this._hasContent=!0,t}};SK=mK([fK(0,PL)],SK);class LK{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,o=e.range.endLineNumber===n?e.range.endColumn:s;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>o)return!1}else if(i>t.range.startColumn||t.range.endColumn>o)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return hd.EMPTY;const i=LK._getLineDecorations(this._editor,t);return hd.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):hd.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=LK._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Pd(t)}}function kK(e,t,i,n,s,o){const r=i+s/2,a=n+o/2,l=Math.max(Math.abs(e-r)-s/2,0),h=Math.max(Math.abs(t-a)-o/2,0);return Math.sqrt(l*l+h*h)}const DK=fs;class xK extends E{constructor(e,t,i){super(),this._renderDisposeables=this._register(new N),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new iK),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Yk({editor:this._editor},t,i)),this._computer=new NK(this._editor),this._hoverOperation=this._register(new aK(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return xK.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const e=DK("div.hover-row.markdown-hover"),t=ds(e,DK("div.hover-contents")),s=this._renderDisposeables.add(this._markdownRenderer.render(n.value));t.appendChild(s.element),i.appendChild(e)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),s=this._editor.getOption(66),o=i-n-(this._hover.containerDomNode.clientHeight-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}}xK.ID="editor.contrib.modesGlyphHoverWidget";class NK{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const t=n.options.glyphMarginHoverMessage;t&&!Ma(t)&&i.push(...$d(t).map(e))}return i}}var EK=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class IK{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function MK(e,t,i,n){const s=e.ordered(t).map(((e,s)=>function(e,t,i,n,s){return EK(this,void 0,void 0,(function*(){try{const o=yield Promise.resolve(e.provideHover(i,n,s));if(o&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(o))return new IK(e,o,t)}catch(o){a(o)}}))}(e,s,t,i,n)));return hd.fromPromises(s).coalesce()}Ch("_executeHoverProvider",((e,t,i)=>function(e,t,i,n){return MK(e,t,i,n).map((e=>e.hover)).toPromise()}(e.get(iL).hoverProvider,t,i,Hh.None)));var TK=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},RK=function(e,t){return function(i,n){t(i,n,e)}};const AK=fs;class OK{constructor(e,t,i,n,s){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let PK=class{constructor(e,t,i,n,s){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this.hoverOrdinal=3}createLoadingMessage(e){return new OK(this,e.range,[(new Ia).appendText(ue(0,"Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];let r=1e3;const a=i.getLineLength(n),l=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),h=this._editor.getOption(116),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:l});let c=!1;h>=0&&a>h&&e.range.startColumn>=h&&(c=!0,o.push(new OK(this,e.range,[{value:ue(0,"Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,r++))),!c&&"number"==typeof d&&a>=d&&o.push(new OK(this,e.range,[{value:ue(0,"Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,r++));let u=!1;for(const g of t){const t=g.range.startLineNumber===n?g.range.startColumn:1,i=g.range.endLineNumber===n?g.range.endColumn:s,a=g.options.hoverMessage;if(!a||Ma(a))continue;g.options.beforeContentClassName&&(u=!0);const l=new Mh(e.range.startLineNumber,t,e.range.startLineNumber,i);o.push(new OK(this,l,$d(a),u,r++))}return o}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return hd.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return hd.EMPTY;const s=new Ba(e.range.startLineNumber,e.range.startColumn);return MK(this._languageFeaturesService.hoverProvider,n,s,i).filter((e=>!Ma(e.hover.contents))).map((t=>{const i=t.hover.range?Mh.lift(t.hover.range):e.range;return new OK(this,i,t.hover.contents,!1,t.ordinal)}))}renderHoverParts(e,t){return FK(e,t,this._editor,this._languageService,this._openerService)}};function FK(e,t,i,n,s){t.sort(((e,t)=>e.ordinal-t.ordinal));const o=new N;for(const r of t)for(const t of r.contents){if(Ma(t))continue;const r=AK("div.hover-row.markdown-hover"),a=ds(r,AK("div.hover-contents")),l=o.add(new Yk({editor:i},n,s));o.add(l.onDidRenderAsync((()=>{a.className="hover-contents code-hover-contents",e.onContentsChanged()})));const h=o.add(l.render(t));a.appendChild(h.element),e.fragment.appendChild(r)}return o}PK=TK([RK(1,yc),RK(2,Uk),RK(3,uu),RK(4,iL)],PK);var BK=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},WK=function(e,t){return function(i,n){t(i,n,e)}};class VK{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let HK=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._dispoables=new N,this._markers=[],this._nextIdx=-1,an.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=lo(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?Mh.compareRangesUsingStarts(e,t)||bN.compare(e.severity,t.severity):bN.compare(e.severity,t.severity)||Mh.compareRangesUsingStarts(e,t)),i},o=()=>{this._markers=this._markerService.read({resource:an.isUri(e)?e:void 0,severities:bN.Error|bN.Warning|bN.Info}),"function"==typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(s)};o(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(o(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new VK(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));s<0&&(s=Md(this._markers,{resource:e.uri},((e,t)=>lo(e.resource.toString(),t.resource.toString()))),s<0&&(s=~s));for(let o=s;ot.resource.toString()===e.toString()));if(!(i<0))for(;i=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},$K=function(e,t){return function(i,n){t(i,n,e)}};class GK{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new N,this._editor=t;const o=document.createElement("div");o.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),o.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),o.appendChild(this._relatedBlock),this._disposables.add(Mn(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new ID(o,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{o.style.left=`-${e.scrollLeft}px`,o.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){k(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let o=((null==t?void 0:t.length)||0)+2;s&&(o+="string"==typeof s?s.length:s.value.length);const r=so(i);this._lines=r.length,this._longestLineLength=0;for(const c of r)this._longestLineLength=Math.max(c.length+o,this._longestLineLength);Dn(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const c of r)a=document.createElement("div"),a.innerText=c,""===c&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||s){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(s)if("string"==typeof s){const t=document.createElement("span");t.innerText=`(${s})`,t.classList.add("code"),e.appendChild(t)}else{this._codeLink=fs("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()};ds(this._codeLink,fs("span")).innerText=s.value,e.appendChild(this._codeLink)}}if(Dn(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Wd(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(66))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const s=document.createElement("span");s.innerText=t.message,i.appendChild(n),i.appendChild(s),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(50),h=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:h,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case bN.Error:t=ue(0,"Error");break;case bN.Warning:t=ue(0,"Warning");break;case bN.Info:t=ue(0,"Info");break;case bN.Hint:t=ue(0,"Hint")}let i=ue(0,"{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();if(n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1){i=`${n.getLineContent(e.startLineNumber)}, ${i}`}return i}}let ZK=jK=class extends qW{constructor(e,t,i,n,s,o,r){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=o,this._labelService=r,this._callOnDispose=new N,this._onDidSelectRelatedInformation=new U,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=bN.Warning,this._backgroundColor=rc.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(oj);let t=JK,i=ej;this._severity===bN.Warning?(t=tj,i=ij):this._severity===bN.Info&&(t=nj,i=sj);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(GW),secondaryHeadingColor:e.getColor(ZW)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e=>this.editor.focus())));const t=[],i=this._menuService.createMenu(jK.TitleMenu,this._contextKeyService);RW(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=ds(e,fs(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new GK(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=Mh.lift(e),s=this.editor.getPosition(),o=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(o,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=ue(0,i>1?"{0} of {1} problems":"{0} of {1} problem",t,i);this.setTitle(ba(r.uri),e)}this._icon.className=`codicon ${KK.className(bN.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(o,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};ZK.TitleMenu=new Ql("gotoErrorTitleMenu"),ZK=jK=qK([$K(1,R_),$K(2,Uk),$K(3,Jl),$K(4,Oa),$K(5,Rl),$K(6,qz)],ZK);const YK=L_(gm,pm),XK=L_(mm,fm),QK=L_(_m,vm),JK=Sp("editorMarkerNavigationError.background",{dark:YK,light:YK,hcDark:Np,hcLight:Np},ue(0,"Editor marker navigation widget error color.")),ej=Sp("editorMarkerNavigationError.headerBackground",{dark:S_(JK,.1),light:S_(JK,.1),hcDark:null,hcLight:null},ue(0,"Editor marker navigation widget error heading background.")),tj=Sp("editorMarkerNavigationWarning.background",{dark:XK,light:XK,hcDark:Np,hcLight:Np},ue(0,"Editor marker navigation widget warning color.")),ij=Sp("editorMarkerNavigationWarning.headerBackground",{dark:S_(tj,.1),light:S_(tj,.1),hcDark:"#0C141F",hcLight:S_(tj,.2)},ue(0,"Editor marker navigation widget warning heading background.")),nj=Sp("editorMarkerNavigationInfo.background",{dark:QK,light:QK,hcDark:Np,hcLight:Np},ue(0,"Editor marker navigation widget info color.")),sj=Sp("editorMarkerNavigationInfo.headerBackground",{dark:S_(nj,.1),light:S_(nj,.1),hcDark:null,hcLight:null},ue(0,"Editor marker navigation widget info heading background.")),oj=Sp("editorMarkerNavigation.background",{dark:Cm,light:Cm,hcDark:Cm,hcLight:Cm},ue(0,"Editor marker navigation widget background."));var rj,aj=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},lj=function(e,t){return function(i,n){t(i,n,e)}},hj=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let dj=rj=class{static get(e){return e.getContribution(rj.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new N,this._editor=e,this._widgetVisible=pj.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(ZK,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&Mh.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:Mh.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new Ba(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var i,n;return hj(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const s=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(s.move(e,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const o=yield this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);o&&(null===(i=rj.get(o))||void 0===i||i.close(),null===(n=rj.get(o))||void 0===n||n.nagivate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}}))}};dj.ID="editor.contrib.markerController",dj=rj=aj([lj(1,zK),lj(2,Rl),lj(3,Fa),lj(4,Oa)],dj);class cj extends _h{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return hj(this,void 0,void 0,(function*(){t.hasModel()&&(null===(i=dj.get(t))||void 0===i||i.nagivate(this._next,this._multiFile))}))}}class uj extends cj{constructor(){super(!0,!1,{id:uj.ID,label:uj.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:578,weight:100},menuOpts:{menuId:ZK.TitleMenu,title:uj.LABEL,icon:QT("marker-navigation-next",Qr.arrowDown,ue(0,"Icon for goto next marker.")),group:"navigation",order:1}})}}uj.ID="editor.action.marker.next",uj.LABEL=ue(0,"Go to Next Problem (Error, Warning, Info)");class gj extends cj{constructor(){super(!1,!1,{id:gj.ID,label:gj.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:1602,weight:100},menuOpts:{menuId:ZK.TitleMenu,title:gj.LABEL,icon:QT("marker-navigation-previous",Qr.arrowUp,ue(0,"Icon for goto previous marker.")),group:"navigation",order:2}})}}gj.ID="editor.action.marker.prev",gj.LABEL=ue(0,"Go to Previous Problem (Error, Warning, Info)");Lh(dj.ID,dj,4),yh(uj),yh(gj),yh(class extends cj{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:ue(0,"Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:66,weight:100},menuOpts:{menuId:Ql.MenubarGoMenu,title:ue(0,"Next &&Problem"),group:"6_problem_nav",order:1}})}}),yh(class extends cj{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:ue(0,"Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:1090,weight:100},menuOpts:{menuId:Ql.MenubarGoMenu,title:ue(0,"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const pj=new Tl("markersNavigationVisible",!1);wh(new(fh.bindToContribution(dj.get))({id:"closeMarkersNavigation",precondition:pj,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:Rh.focus,primary:9,secondary:[1033]}}));var mj=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fj=function(e,t){return function(i,n){t(i,n,e)}};const _j=fs;class vj{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const bj={type:1,filter:{include:vL.QuickFix},triggerAction:fL.QuickFixHover};let Cj,wj,yj=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];for(const r of t){const t=r.range.startLineNumber===n?r.range.startColumn:1,a=r.range.endLineNumber===n?r.range.endColumn:s,l=this._markerDecorationsService.getMarker(i.uri,r);if(!l)continue;const h=new Mh(e.range.startLineNumber,t,e.range.startLineNumber,a);o.push(new vj(this,h,l))}return o}renderHoverParts(e,t){if(!t.length)return E.None;const i=new N;t.forEach((t=>e.fragment.appendChild(this.renderMarkerHover(t,i))));const n=1===t.length?t[0]:t.sort(((e,t)=>bN.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=_j("div.hover-row"),n=ds(i,_j("div.marker.hover-contents")),{source:s,message:o,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const h=ds(n,_j("span"));if(h.style.whiteSpace="pre-wrap",h.innerText=o,s||a)if(a&&"string"!=typeof a){const e=_j("span");if(s){ds(e,_j("span")).innerText=s}const i=ds(e,_j("a.code-link"));i.setAttribute("href",a.target.toString()),t.add(En(i,"click",(e=>{this._openerService.open(a.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()})));ds(i,_j("span")).innerText=a.value;const o=ds(n,e);o.style.opacity="0.6",o.style.paddingLeft="6px"}else{const e=ds(n,_j("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(Wd(l))for(const{message:d,resource:c,startLineNumber:u,startColumn:g}of l){const e=ds(n,_j("div"));e.style.marginTop="8px";const i=ds(e,_j("a"));i.innerText=`${ba(c)}(${u}, ${g}): `,i.style.cursor="pointer",t.add(En(i,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(c,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:u,startColumn:g}}}).catch(r)})));const s=ds(e,_j("span"));s.innerText=d,this._editor.applyFontInfo(s)}return i}renderMarkerStatusbar(e,t,i){if(t.marker.severity!==bN.Error&&t.marker.severity!==bN.Warning&&t.marker.severity!==bN.Info||e.statusBar.addAction({label:ue(0,"View Problem"),commandId:uj.ID,run:()=>{var i;e.hide(),null===(i=dj.get(this._editor))||void 0===i||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const n=e.statusBar.append(_j("div"));this.recentMarkerCodeActionsInfo&&(CN.makeKey(this.recentMarkerCodeActionsInfo.marker)===CN.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=ue(0,"No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?E.None:i.add(ed((()=>n.textContent=ue(0,"Checking for quick fixes...")),200));n.textContent||(n.textContent=String.fromCharCode(160));const o=this.getCodeActions(t.marker);i.add(x((()=>o.cancel()))),o.then((o=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return o.dispose(),void(n.textContent=ue(0,"No quick fixes available"));n.style.display="none";let r=!1;i.add(x((()=>{r||o.dispose()}))),e.statusBar.addAction({label:ue(0,"Quick Fix..."),commandId:LL,run:t=>{r=!0;const i=TN.get(this._editor),n=Hn(t);e.hide(),null==i||i.showCodeActions(bj,o,{x:n.left,y:n.top,width:n.width,height:n.height})}})}),r)}}getCodeActions(e){return Gh((t=>TL(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new Mh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),bj,pL.None,t)))}};function Sj(){return Cj}yj=mj([fj(1,MR),fj(2,Uk),fj(3,iL)],yj);class Lj{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=void 0===t?void 0:e,n=void 0===t?e:t;return wj({owner:i,debugName:()=>{const e=Ij(n);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(n.toString());return t?`${this.debugName}.${t[2]}`:i?void 0:`${this.debugName} (mapped)`}},(e=>n(this.read(e),e)))}}class kj extends Lj{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function Dj(e,t){const i=new Nj(e,t);try{e(i)}finally{i.finish()}}function xj(e,t,i){e?t(e):Dj(t,i)}class Nj{constructor(e,t){var i;this._fn=e,this._getDebugName=t,this.updatingObservers=[],null===(i=Sj())||void 0===i||i.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():Ij(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;const t=this.updatingObservers;this.updatingObservers=null;for(const{observer:i,observable:n}of t)i.endUpdate(n);null===(e=Sj())||void 0===e||e.handleEndTransaction()}}function Ej(e,t,i,n){let s;if(void 0!==e){if("function"!=typeof e)return e;if(s=e(),void 0!==s)return s}if(void 0!==t&&(s=Ij(t),void 0!==s))return s;if(void 0!==i)for(const o in i)if(i[o]===n)return o}function Ij(e){const t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),n=i?i[1]:void 0;return null==n?void 0:n.trim()}function Mj(e,t){return"string"==typeof e?new Tj(void 0,e,t):new Tj(e,void 0,t)}class Tj extends kj{get debugName(){var e;return null!==(e=Ej(this._debugName,void 0,this._owner,this))&&void 0!==e?e:"ObservableValue"}constructor(e,t,i){super(),this._owner=e,this._debugName=t,this._value=i}get(){return this._value}set(e,t,i){var n;if(this._value===e)return;let s;t||(t=s=new Nj((()=>{}),(()=>`Setting ${this.debugName}`)));try{const s=this._value;this._setValue(e),null===(n=Sj())||void 0===n||n.handleObservableChanged(this,{oldValue:s,newValue:e,change:i,didChange:!0,hadValue:!0});for(const e of this.observers)t.updateObserver(e,this),e.handleChange(this,i)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function Rj(e,t){return"string"==typeof e?new Aj(void 0,e,t):new Aj(e,void 0,t)}class Aj extends Tj{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;null===(e=this._value)||void 0===e||e.dispose()}}const Oj=(e,t)=>e===t;function Pj(e,t){return void 0!==t?new Wj(e,void 0,t,void 0,void 0,void 0,Oj):new Wj(void 0,void 0,e,void 0,void 0,void 0,Oj)}function Fj(e,t){var i;return new Wj(e.owner,e.debugName,t,void 0,void 0,void 0,null!==(i=e.equalityComparer)&&void 0!==i?i:Oj)}function Bj(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const s=new N;return new Wj(n,(()=>{var e;return null!==(e=Ij(i))&&void 0!==e?e:"(anonymous)"}),(e=>(s.clear(),i(e,s))),void 0,void 0,(()=>s.dispose()),Oj)}!function(e){wj=e}(Pj);class Wj extends kj{get debugName(){var e;return null!==(e=Ej(this._debugName,this._computeFn,this._owner,this))&&void 0!==e?e:"(anonymous)"}constructor(e,t,i,n,s,o=void 0,r){var a,l;super(),this._owner=e,this._debugName=t,this._computeFn=i,this.createChangeSummary=n,this._handleChange=s,this._handleLastObserverRemoved=o,this._equalityComparator=r,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=null===(a=this.createChangeSummary)||void 0===a?void 0:a.call(this),null===(l=Sj())||void 0===l||l.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),null===(e=this._handleLastObserverRemoved)||void 0===e||e.call(this)}get(){var e;if(0===this.observers.size){const t=this._computeFn(this,null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this));return this.onLastObserverRemoved(),t}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){var e,t;if(3===this.state)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const n=0!==this.state,s=this.value;this.state=3;const o=this.changeSummary;this.changeSummary=null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this);try{this.value=this._computeFn(this,o)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const r=n&&!this._equalityComparator(s,this.value);if(null===(t=Sj())||void 0===t||t.handleDerivedRecomputed(this,{oldValue:s,newValue:this.value,change:void 0,didChange:r,hadValue:n}),r)for(const a of this.observers)a.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const i of this.observers)i.handlePossibleChange(this);if(t)for(const i of this.observers)i.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}if(this.updateCount<0)throw new f}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),n=3===this.state;if(i&&(1===this.state||n)&&(this.state=2,n))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function Vj(e,t){return new Kj(e.debugName,t,void 0,void 0)}function Hj(e){return new Kj(void 0,e,void 0,void 0)}function zj(e,t){return new Kj(e.debugName,t,e.createEmptyChangeSummary,e.handleChange)}function Uj(e){const t=new N,i=Vj({debugName:()=>Ij(e)||"(anonymous)"},(i=>{t.clear(),e(i,t)}));return x((()=>{i.dispose(),t.dispose()}))}class Kj{get debugName(){if("string"==typeof this._debugName)return this._debugName;if("function"==typeof this._debugName){const e=this._debugName();if(void 0!==e)return e}const e=Ij(this._runFn);return void 0!==e?e:"(anonymous)"}constructor(e,t,i,n){var s,o;this._debugName=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=null===(s=this.createChangeSummary)||void 0===s?void 0:s.call(this),null===(o=Sj())||void 0===o||o.handleAutorunCreated(this),this._runIfNeeded(),C(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),w(this)}_runIfNeeded(){var e,t,i;if(3===this.state)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3;try{if(!this.disposed){null===(e=Sj())||void 0===e||e.handleAutorunTriggered(this);const i=this.changeSummary;this.changeSummary=null===(t=this.createChangeSummary)||void 0===t?void 0:t.call(this),this._runFn(this,i)}}finally{null===(i=Sj())||void 0===i||i.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,Hl((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary))&&(this.state=2)}}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}function jj(e){return new qj(e)}!function(e){e.Observer=Kj}(Hj||(Hj={}));class qj extends Lj{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function $j(e,t){return new Gj(e,t)}class Gj extends kj{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=e=>{var t;const i=this._getValue(e),n=!this.hasValue||this.value!==i;null===(t=Sj())||void 0===t||t.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:i,change:void 0,didChange:n,hadValue:this.hasValue}),n&&(this.value=i,this.hasValue&&Dj((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")})),this.hasValue=!0)}}getDebugName(){return Ij(this._getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}function Zj(e,t){return new Yj(e,t)}!function(e){e.Observer=Gj}($j||($j={}));class Yj extends kj{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{Dj((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function Xj(e){return"string"==typeof e?new Qj(e):new Qj(void 0,e)}class Qj extends kj{get debugName(){var e;return null!==(e=Ej(this._debugName,void 0,this._owner,this))&&void 0!==e?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(e)for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t);else Dj((e=>{this.trigger(e,t)}),(()=>`Trigger signal ${this.debugName}`))}get(){}}function Jj(e){const t=new eq(!0);return e.addObserver(t),e.reportChanges(),x((()=>{e.removeObserver(t)}))}class eq{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,0===this.counter&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}}const tq="editor.action.inlineSuggest.commit",iq="editor.action.inlineSuggest.showPrevious",nq="editor.action.inlineSuggest.showNext";var sq=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class oq extends E{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new G),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new N),this.options=i,this.lookupKeybindings="function"==typeof this.options.getKeyBinding,this.toggleMenuAction=this._register(new rq((()=>{var e;return null===(e=this.toggleMenuActionViewItem)||void 0===e?void 0:e.show()}),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Ix(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,actionViewItemProvider:(e,n)=>{var s;if(e.id===rq.ID)return this.toggleMenuActionViewItem=new EW(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:ea.asClassNameArray(null!==(s=i.moreIcon)&&void 0!==s?s:Qr.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof ja){const i=new EW(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach((e=>{this.actionBar.push(e,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){var t,i,n;const s=this.lookupKeybindings?null===(i=(t=this.options).getKeyBinding)||void 0===i?void 0:i.call(t,e):void 0;return null!==(n=null==s?void 0:s.getLabel())&&void 0!==n?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class rq extends za{constructor(e,t){t=t||ue(0,"More Actions..."),super(rq.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return sq(this,void 0,void 0,(function*(){this.toggleDropdownMenu()}))}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}rq.ID="toolbar.toggle.more";var aq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},lq=function(e,t){return function(i,n){t(i,n,e)}};let hq=class extends oq{constructor(e,t,i,n,s,o,r){super(e,s,Object.assign(Object.assign({getKeyBinding:e=>{var t;return null!==(t=o.lookupKeybinding(e.id))&&void 0!==t?t:void 0}},t),{allowContextMenu:!0,skipTelemetry:"string"==typeof(null==t?void 0:t.telemetrySource)})),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._sessionDisposables=this._store.add(new N);const a=null==t?void 0:t.telemetrySource;a&&this._store.add(this.actionBar.onDidRun((e=>r.publicLog2("workbenchActionExecuted",{id:e.action.id,from:a}))))}setActions(e,t=[],i){var n,s,o;this._sessionDisposables.clear();const r=e.slice(),a=t.slice(),l=[];let h=0;const d=[];let c=!1;if(-1!==(null===(n=this._options)||void 0===n?void 0:n.hiddenItemStrategy))for(let u=0;unull==e?void 0:e.id))),t=this._options.overflowBehavior.maxItems-e.size;let i=0;for(let n=0;n=t&&(r[n]=void 0,d[n]=s))}}Fd(r),Fd(d),super.setActions(r,Ka.join(d,a)),l.length>0&&this._sessionDisposables.add(En(this.getElement(),"contextmenu",(e=>{var t,n,s,o,r;const a=new Nt(e),d=this.getItemAction(a.target);if(!d)return;a.preventDefault(),a.stopPropagation();let u,g=!1;if(1===h&&0===(null===(t=this._options)||void 0===t?void 0:t.hiddenItemStrategy)){g=!0;for(let e=0;ethis._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>a,getActions:()=>p,menuId:null===(s=this._options)||void 0===s?void 0:s.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},null===(o=this._options)||void 0===o?void 0:o.menuOptions),skipTelemetry:"string"==typeof(null===(r=this._options)||void 0===r?void 0:r.telemetrySource),contextKeyService:this._contextKeyService})})))}};hq=aq([lq(2,Jl),lq(3,Rl),lq(4,Hx),lq(5,PL),lq(6,rh)],hq);var dq,cq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},uq=function(e,t){return function(i,n){t(i,n,e)}};let gq=class extends E{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=$j(this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(62).showToolbar)),this.sessionPosition=void 0,this.position=Pj(this,(e=>{var t,i,n;const s=null===(t=this.model.read(e))||void 0===t?void 0:t.ghostText.read(e);if(!this.alwaysShowToolbar.read(e)||!s||0===s.parts.length)return this.sessionPosition=void 0,null;const o=s.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==s.lineNumber&&(this.sessionPosition=void 0);const r=new Ba(s.lineNumber,Math.min(o,null!==(n=null===(i=this.sessionPosition)||void 0===i?void 0:i.column)&&void 0!==n?n:Number.MAX_SAFE_INTEGER));return this.sessionPosition=r,r})),this._register(Uj(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const s=i.add(this.instantiationService.createInstance(fq,this.editor,!0,this.position,n.selectedInlineCompletionIndex,n.inlineCompletionsCount,n.selectedInlineCompletion.map((e=>{var t;return null!==(t=null==e?void 0:e.inlineCompletion.source.inlineCompletions.commands)&&void 0!==t?t:[]}))));e.addContentWidget(s),i.add(x((()=>e.removeContentWidget(s)))),i.add(Hj((e=>{this.position.read(e)&&n.lastTriggerKind.read(e)!==cC.Explicit&&n.triggerExplicitly()})))})))}};gq=cq([uq(2,Oa)],gq);const pq=QT("inline-suggestion-hints-next",Qr.chevronRight,ue(0,"Icon for show next parameter hint.")),mq=QT("inline-suggestion-hints-previous",Qr.chevronLeft,ue(0,"Icon for show previous parameter hint."));let fq=dq=class extends E{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new za(e,t,i,!0,(()=>this._commandService.executeCommand(e))),s=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let o=t;return s&&(o=ue(0,"{0} ({1})",t,s.getLabel())),n.tooltip=o,n}constructor(e,t,i,n,s,o,r,a,l,h,d){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=n,this._suggestionCount=s,this._extraCommands=o,this._commandService=r,this.keybindingService=l,this._contextKeyService=h,this._menuService=d,this.id="InlineSuggestionHintsContentWidget"+dq.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Ns("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Ns("div@toolBar")]),this.previousAction=this.createCommandAction(iq,ue(0,"Previous"),ea.asClassName(mq)),this.availableSuggestionCountAction=new za("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(nq,ue(0,"Next"),ea.asClassName(pq)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Ql.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new sd((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new sd((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100)),this.lastCommands=[],this.toolBar=this._register(a.createInstance(bq,this.nodes.toolBar,Ql.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof nh)return a.createInstance(vq,e,void 0);if(e===this.availableSuggestionCountAction){const t=new _q(void 0,e,{label:!0,icon:!1});return t.setClass("availableSuggestionCount"),t}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{dq._dropDownVisible=e}))),this._register(Hj((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register(Hj((e=>{const t=this._suggestionCount.read(e),i=this._currentSuggestionIdx.read(e);void 0!==t?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${t}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),void 0!==t&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()}))),this._register(Hj((e=>{const t=this._extraCommands.read(e);if(Id(this.lastCommands,t))return;this.lastCommands=t;const i=t.map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[n,s]of this.inlineCompletionsActionsMenus.getActions())for(const e of s)e instanceof nh&&i.push(e);i.length>0&&i.unshift(new Ka),this.toolBar.setAdditionalSecondaryActions(i)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};fq._dropDownVisible=!1,fq.id=0,fq=dq=cq([uq(6,Ga),uq(7,Oa),uq(8,PL),uq(9,Rl),uq(10,Jl)],fq);class _q extends xx{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}class vq extends OW{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=Ns("div.keybinding").root;new Wx(t,$e,Object.assign({disableTitle:!0},Bx)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let bq=class extends hq{constructor(e,t,i,n,s,o,r,a){super(e,Object.assign({resetMenu:t},i),n,s,o,r,a),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){var e,t,i,n,s,o,r;const a=[],l=[];RW(this.menu,null===(e=this.options2)||void 0===e?void 0:e.menuOptions,{primary:a,secondary:l},null===(i=null===(t=this.options2)||void 0===t?void 0:t.toolbarOptions)||void 0===i?void 0:i.primaryGroup,null===(s=null===(n=this.options2)||void 0===n?void 0:n.toolbarOptions)||void 0===s?void 0:s.shouldInlineSubmenu,null===(r=null===(o=this.options2)||void 0===o?void 0:o.toolbarOptions)||void 0===r?void 0:r.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),a.unshift(...this.prependedPrimaryActions),this.setActions(a,l)}setPrependedPrimaryActions(e){Id(this.prependedPrimaryActions,e,((e,t)=>e===t))||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Id(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};bq=cq([uq(3,Jl),uq(4,Rl),uq(5,Hx),uq(6,PL),uq(7,rh)],bq);var Cq,wq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},yq=function(e,t){return function(i,n){t(i,n,e)}};const Sq=!1;let Lq=Cq=class extends E{static get(e){return e.getContribution(Cq.ID)}constructor(e,t,i,n,s){super(),this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._keybindingService=s,this._toUnhook=new N,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new sd((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())}))),this._register(this._editor.onMouseLeave((()=>{this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()})))}_hookEvents(){const e=this._editor.getOption(60);this._isHoverEnabled=e.enabled,this._isHoverSticky=e.sticky,this._hidingDelay=e.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._toUnhook.add(this._editor.onDidChangeModel((()=>this._hideWidgets()))),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const i=e.target;9!==i.type||i.detail!==yK.ID?12===i.type&&i.detail===xK.ID||(12!==i.type&&(this._hoverClicked=!1),(null===(t=this._contentWidget)||void 0===t?void 0:t.widget.isResizing)||this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,i;const n=e.event.browserEvent.relatedTarget;(null===(t=this._contentWidget)||void 0===t?void 0:t.widget.isResizing)||(null===(i=this._contentWidget)||void 0===i?void 0:i.containsNode(n))||this._hideWidgets()}_isMouseOverWidget(e){var t,i,n,s,o;const r=e.target;return!(!this._isHoverSticky||9!==r.type||r.detail!==yK.ID)||(!(!this._isHoverSticky||!(null===(t=this._contentWidget)||void 0===t?void 0:t.containsNode(null===(i=e.event.browserEvent.view)||void 0===i?void 0:i.document.activeElement))||(null===(s=null===(n=e.event.browserEvent.view)||void 0===n?void 0:n.getSelection())||void 0===s?void 0:s.isCollapsed))||(!(this._isHoverSticky||9!==r.type||r.detail!==yK.ID||!(null===(o=this._contentWidget)||void 0===o?void 0:o.isColorPickerVisible))||!(!this._isHoverSticky||12!==r.type||r.detail!==xK.ID)))}_onEditorMouseMove(e){var t,i,n,s;if(this._mouseMoveEvent=e,(null===(t=this._contentWidget)||void 0===t?void 0:t.isFocused)||(null===(i=this._contentWidget)||void 0===i?void 0:i.isResizing))return;if(this._isMouseDown&&this._hoverClicked)return;if(this._isHoverSticky&&(null===(n=this._contentWidget)||void 0===n?void 0:n.isVisibleFromKeyboard))return;this._isMouseOverWidget(e)?this._reactToEditorMouseMoveRunner.cancel():(null===(s=this._contentWidget)||void 0===s?void 0:s.isVisible)&&this._isHoverSticky&&this._hidingDelay>0?this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay):this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,i,n;if(!e)return;const s=e.target,o=null===(t=s.element)||void 0===t?void 0:t.classList.contains("colorpicker-color-decoration"),r=this._editor.getOption(146);if(o&&("click"===r&&!this._hoverActivatedByColorDecoratorClick||"hover"===r&&!this._isHoverEnabled||"clickAndHover"===r&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!o&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)return void this._hideWidgets();if(this._getOrCreateContentWidget().maybeShowAt(e))null===(i=this._glyphWidget)||void 0===i||i.hide();else{if(2===s.type&&s.position)return null===(n=this._contentWidget)||void 0===n||n.hide(),this._glyphWidget||(this._glyphWidget=new xK(this._editor,this._languageService,this._openerService)),void this._glyphWidget.startShowingAt(s.position.lineNumber);Sq,this._hideWidgets()}}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=1===i.kind||2===i.kind&&"editor.action.showHover"===i.commandId&&(null===(t=this._contentWidget)||void 0===t?void 0:t.isVisible);5===e.keyCode||6===e.keyCode||57===e.keyCode||4===e.keyCode||n||this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible)||fq.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(vK,this._editor)),this._contentWidget}showContentHover(e,t,i,n,s=!1){this._hoverActivatedByColorDecoratorClick=s,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}focus(){var e;null===(e=this._contentWidget)||void 0===e||e.focus()}scrollUp(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollUp()}scrollDown(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollDown()}scrollLeft(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollLeft()}scrollRight(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollRight()}pageUp(){var e;null===(e=this._contentWidget)||void 0===e||e.pageUp()}pageDown(){var e;null===(e=this._contentWidget)||void 0===e||e.pageDown()}goToTop(){var e;null===(e=this._contentWidget)||void 0===e||e.goToTop()}goToBottom(){var e;null===(e=this._contentWidget)||void 0===e||e.goToBottom()}get isColorPickerVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};Lq.ID="editor.contrib.hover",Lq=Cq=wq([yq(1,Oa),yq(2,Uk),yq(3,yc),yq(4,PL)],Lq);Lh(Lq.ID,Lq,2),yh(class extends _h{constructor(){super({id:"editor.action.showHover",label:ue(0,"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=Lq.get(t);if(!n)return;const s=t.getPosition(),o=new Mh(s.lineNumber,s.column,s.lineNumber,s.column),r=2===t.getOption(2)||!!(null==i?void 0:i.focus);n.isHoverVisible?n.focus():n.showContentHover(o,1,1,r)}}),yh(class extends _h{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:ue(0,"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=Lq.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new Mh(n.lineNumber,n.column,n.lineNumber,n.column),o=eK.get(t);if(!o)return;o.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(s,1,1,!0)}))}}),yh(class extends _h{constructor(){super({id:"editor.action.scrollUpHover",label:ue(0,"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:16,weight:100}})}run(e,t){const i=Lq.get(t);i&&i.scrollUp()}}),yh(class extends _h{constructor(){super({id:"editor.action.scrollDownHover",label:ue(0,"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:18,weight:100}})}run(e,t){const i=Lq.get(t);i&&i.scrollDown()}}),yh(class extends _h{constructor(){super({id:"editor.action.scrollLeftHover",label:ue(0,"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:15,weight:100}})}run(e,t){const i=Lq.get(t);i&&i.scrollLeft()}}),yh(class extends _h{constructor(){super({id:"editor.action.scrollRightHover",label:ue(0,"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:17,weight:100}})}run(e,t){const i=Lq.get(t);i&&i.scrollRight()}}),yh(class extends _h{constructor(){super({id:"editor.action.pageUpHover",label:ue(0,"Page Up Hover"),alias:"Page Up Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=Lq.get(t);i&&i.pageUp()}}),yh(class extends _h{constructor(){super({id:"editor.action.pageDownHover",label:ue(0,"Page Down Hover"),alias:"Page Down Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=Lq.get(t);i&&i.pageDown()}}),yh(class extends _h{constructor(){super({id:"editor.action.goToTopHover",label:ue(0,"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=Lq.get(t);i&&i.goToTop()}}),yh(class extends _h{constructor(){super({id:"editor.action.goToBottomHover",label:ue(0,"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=Lq.get(t);i&&i.goToBottom()}}),dK.register(PK),dK.register(yj),B_(((e,t)=>{const i=e.getColor(qm);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))}));class kq extends E{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if("click"!==t&&"clickAndHover"!==t)return;const i=e.target;if(6!==i.type)return;if(!i.detail.injectedText)return;if(i.detail.injectedText.options.attachedData!==jT)return;if(!i.range)return;const n=this._editor.getContribution(Lq.ID);if(n&&!n.isColorPickerVisible){const e=new Mh(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(e,1,0,!1,!0)}}}kq.ID="editor.contrib.colorContribution",Lh(kq.ID,kq,2),dK.register(vR);var Dq,xq,Nq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Eq=function(e,t){return function(i,n){t(i,n,e)}},Iq=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Mq=Dq=class extends E{constructor(e,t,i,n,s,o,r){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=s,this._languageFeatureService=o,this._languageConfigurationService=r,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=Rh.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=Rh.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||null===(e=this._standaloneColorPickerWidget)||void 0===e||e.focus():this._standaloneColorPickerWidget=new Tq(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),null===(e=this._standaloneColorPickerWidget)||void 0===e||e.hide(),this._editor.focus()}insertColor(){var e;null===(e=this._standaloneColorPickerWidget)||void 0===e||e.updateEditor(),this.hide()}static get(e){return e.getContribution(Dq.ID)}};Mq.ID="editor.contrib.standaloneColorPickerController",Mq=Dq=Nq([Eq(1,Rl),Eq(2,Wa),Eq(3,PL),Eq(4,Oa),Eq(5,iL),Eq(6,Xu)],Mq),Lh(Mq.ID,Mq,1);let Tq=xq=class extends E{constructor(e,t,i,n,s,o,r,a){var l;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=s,this._keybindingService=o,this._languageFeaturesService=r,this._languageConfigurationService=a,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new U),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(CR,this._editor),this._position=null===(l=this._editor._getViewModel())||void 0===l?void 0:l.getPrimaryCursorState().modelState.position;const h=this._editor.getSelection(),d=h?{startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},c=this._register(hs(this._body));this._register(c.onDidBlur((e=>{this.hide()}))),this._register(c.onDidFocus((e=>{this.focus()}))),this._register(this._editor.onDidChangeCursorPosition((()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()}))),this._register(this._editor.onMouseMove((e=>{var t;const i=null===(t=e.target.element)||void 0===t?void 0:t.classList;i&&i.contains("colorpicker-color-decoration")&&this.hide()}))),this._register(this.onResult((e=>{this._render(e.value,e.foundInEditor)}))),this._start(d),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return xq.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}_start(e){return Iq(this,void 0,void 0,(function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new Rq(t.result,t.foundInEditor))}))}_computeAsync(e){return Iq(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=yield this._standaloneColorPickerParticipant.createColorHover(t,new MT(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}))}_render(e,t){const i=document.createDocumentFragment();let n;const s={fragment:i,statusBar:this._register(new SK(this._keybindingService)),setColorPicker:e=>n=e,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(s,[e])),void 0===n)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(.66*this._editor.getLayoutInfo().width,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),n.layout();const o=n.body,r=o.saturationBox.domNode.clientWidth,a=o.domNode.clientWidth-r-22-8,l=n.body.enterButton;null==l||l.onClicked((()=>{this.updateEditor(),this.hide()}));const h=n.header;h.pickedColorNode.style.width=r+8+"px";h.originalColorNode.style.width=a+"px";const d=n.header.closeButton;null==d||d.onClicked((()=>{this.hide()})),t&&(l&&(l.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Tq.ID="editor.contrib.standaloneColorPickerWidget",Tq=xq=Nq([Eq(3,Oa),Eq(4,Wa),Eq(5,PL),Eq(6,iL),Eq(7,Xu)],Tq);class Rq{constructor(e,t){this.value=e,this.foundInEditor=t}}yh(class extends _h{constructor(){super({id:"editor.action.hideColorPicker",label:ue(0,"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:Rh.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;null===(i=Mq.get(t))||void 0===i||i.hide()}}),yh(class extends _h{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:ue(0,"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:Rh.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;null===(i=Mq.get(t))||void 0===i||i.insertColor()}}),oh(class extends bh{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:ue(0,"Show or Focus Standalone Color Picker"),mnemonicTitle:ue(0,"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:Ql.CommandPalette}]})}runEditorCommand(e,t){var i;null===(i=Mq.get(t))||void 0===i||i.showOrFocus()}});class Aq{static insert(e,t){return{range:new Mh(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}class Oq{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let s=0;s=65&&n<=90&&n+32===o||o>=65&&o<=90&&o+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,o){const r=e.startLineNumber,a=e.startColumn,l=e.endLineNumber,h=e.endColumn,d=s.getLineContent(r),c=s.getLineContent(l);let u,g=d.lastIndexOf(t,a-1+t.length),p=c.indexOf(i,h-1-i.length);if(-1!==g&&-1!==p)if(r===l){d.substring(g+t.length,p).indexOf(i)>=0&&(g=-1,p=-1)}else{const e=d.substring(g+t.length),n=c.substring(0,p);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(g=-1,p=-1)}-1!==g&&-1!==p?(n&&g+t.length0&&32===c.charCodeAt(p-1)&&(i=" "+i,p-=1),u=Oq._createRemoveBlockCommentOperations(new Mh(r,g+t.length+1,l,p+1),t,i)):(u=Oq._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===u.length?i:null);for(const m of u)o.addTrackedEditOperation(m.range,m.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return Mh.isEmpty(e)?n.push(Aq.delete(new Mh(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(Aq.delete(new Mh(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(Aq.delete(new Mh(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return Mh.isEmpty(e)?s.push(Aq.replace(new Mh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(Aq.insert(new Ba(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(Aq.insert(new Ba(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),o=this.languageConfigurationService.getLanguageConfiguration(s).comments;o&&o.blockCommentStartToken&&o.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,o.blockCommentStartToken,o.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new Th(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new Th(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}class Pq{constructor(e,t,i,n,s,o,r){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),o=n.getLanguageConfiguration(s).comments,r=o?o.lineCommentToken:null;if(!r)return null;const a=[];for(let l=0,h=i-t+1;lr?s-1:s}}}class Fq extends _h{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(Xu);if(!t.hasModel())return;const n=[],s=t.getModel().getOptions(),o=t.getOption(23),r=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));r.sort(((e,t)=>Mh.compareRangesUsingStarts(e.selection,t.selection)));let a=r[0];for(let l=1;l=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new Uq(new Hq(e,t))}static forStrings(){return new Uq(new Bq)}static forConfigKeys(){return new Uq(new Wq)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new zq,this._root.segment=i.value());const s=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new zq,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new zq,n.right.segment=i.value()),s.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new zq,n.mid.segment=i.value()),s.push([0,n]),n=n.mid}}const o=n.value;n.value=t,n.key=e;for(let r=s.length-1;r>=0;r--){const e=s[r][1];e.updateHeight();const t=e.balanceFactor();if(t<-1||t>1){const t=s[r][0],i=s[r+1][0];if(1===t&&1===i)s[r][1]=e.rotateLeft();else if(-1===t&&-1===i)s[r][1]=e.rotateRight();else if(1===t&&-1===i)e.right=s[r+1][1]=s[r+1][1].rotateRight(),s[r][1]=e.rotateLeft();else{if(-1!==t||1!==i)throw new Error;e.left=s[r+1][1]=s[r+1][1].rotateLeft(),s[r][1]=e.rotateRight()}if(r>0)switch(s[r-1][0]){case-1:s[r-1][1].left=s[r][1];break;case 1:s[r-1][1].right=s[r][1];break;case 0:s[r-1][1].mid=s[r][1]}else this._root=s[0][1]}}return o}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),s=[];let o=this._root;for(;o;){const e=n.cmp(o.segment);if(e>0)s.push([-1,o]),o=o.left;else if(e<0)s.push([1,o]),o=o.right;else{if(!n.hasNext())break;n.next(),s.push([0,o]),o=o.mid}}if(o){if(t?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){const e=this._min(o.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),o.key=t,o.value=i,o.segment=n}}else{const e=null!==(i=o.left)&&void 0!==i?i:o.right;if(s.length>0){const[t,i]=s[s.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=s.length-1;e>=0;e--){const t=s[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),s[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),s[e][1]=t.rotateRight()),e>0)switch(s[e-1][0]){case-1:s[e-1][1].left=s[e][1];break;case 1:s[e-1][1].right=s[e][1];break;case 0:s[e-1][1].mid=s[e][1]}else this._root=s[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}const Kq=Pa("contextService");function jq(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&an.isUri(t.uri)}function qq(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&!jq(e)&&!function(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&an.isUri(t.configPath)}(e)}const $q={id:"ext-dev"},Gq={id:"empty-window"};class Zq{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const Yq="code-workspace",Xq=(ue(0,"Code Workspace"),"4064f6ec-cb38-4ad0-af64-ee6467e63c82");var Qq,Jq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},e$=function(e,t){return function(i,n){t(i,n,e)}};let t$,i$=Qq=class{static get(e){return e.getContribution(Qq.ID)}constructor(e,t,i,n,s,o,r,a){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=o,this._configurationService=r,this._workspaceContextService=a,this._toDispose=new N,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&Yn(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(24)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu(e.event);if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?Ql.SimpleEditorContext:Ql.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),s=n.getActions({arg:e.uri});n.dispose();for(const o of s){const[,t]=o;let n=0;for(const s of t)if(s instanceof ih){const t=this._getMenuActions(e,s.item.submenu);t.length>0&&(i.push(new ja(s.id,s.label,t)),n++)}else i.push(s),n++;n&&i.push(new Ka)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),t=Hn(this._editor.getDomNode()),i=t.left+e.left,s=t.top+e.top+e.height;n={x:i,y:s}}const s=this._editor.getOption(126)&&!He;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new xx(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new xx(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;if(this._workspaceContextService.getWorkspace().id===Xq)return;const t=this._editor.getOption(72);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:void 0===e.enabled||e.enabled,checked:e.checked,run:e.run}),s=(e,t,s,o,r)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const a=e=>()=>{this._configurationService.updateValue(s,e)},l=[];for(const i of r)l.push(n({label:i.label,checked:o===i.value,run:a(i.value)}));return((e,t)=>new ja("menu-action-"+ ++i,e,t,void 0))(e,l)},o=[];o.push(n({label:ue(0,"Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),o.push(new Ka),o.push(n({label:ue(0,"Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),o.push(s(ue(0,"Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:ue(0,"Proportional"),value:"proportional"},{label:ue(0,"Fill"),value:"fill"},{label:ue(0,"Fit"),value:"fit"}])),o.push(s(ue(0,"Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:ue(0,"Mouse Over"),value:"mouseover"},{label:ue(0,"Always"),value:"always"}]));const r=this._editor.getOption(126)&&!He;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>o,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};i$.ID="editor.contrib.contextmenu",i$=Qq=Jq([e$(1,Hx),e$(2,Vx),e$(3,Rl),e$(4,PL),e$(5,Jl),e$(6,uu),e$(7,Kq)],i$);Lh(i$.ID,i$,2),yh(class extends _h{constructor(){super({id:"editor.action.showContextMenu",label:ue(0,"Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;null===(i=i$.get(t))||void 0===i||i.showContextMenu()}});class n${constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new n$(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new s$(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new s$(new n$(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new s$(new n$(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}o$.ID="editor.contrib.cursorUndoRedoController";function r$(){return!!Ii.VSCODE_DEV}function a$(e){if(r$()){const t=function(){t$||(t$=new Set);const e=globalThis;e.$hotReload_applyNewExports||(e.$hotReload_applyNewExports=e=>{for(const t of t$){const i=t(e);if(i)return i}});return t$}();return t.add(e),{dispose(){t.delete(e)}}}return{dispose(){}}}function l$(e,t){const i=new N,n=e.createDecorationsCollection();return i.add(Vj({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function h$(e,t){return e.appendChild(t),x((()=>{e.removeChild(t)}))}Lh(o$.ID,o$,0),yh(class extends _h{constructor(){super({id:"cursorUndo",label:ue(0,"Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;null===(n=o$.get(t))||void 0===n||n.cursorUndo()}}),yh(class extends _h{constructor(){super({id:"cursorRedo",label:ue(0,"Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;null===(n=o$.get(t))||void 0===n||n.cursorRedo()}});class d$ extends E{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new OR(e,t)),this._width=Mj(this,this.elementSizeObserver.getWidth()),this._height=Mj(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange((e=>Dj((e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function c$(e,t){let i=e.get(),n=i,s=i;const o=Mj("animatedValue",i);let r=-1;let a;function l(){const e=Date.now()-r;var t,h,d,c;s=Math.floor((h=n,d=i-n,(t=e)===(c=300)?h+d:d*(1-Math.pow(2,-10*t/c))+h)),e<300?a=requestAnimationFrame(l):s=i,o.set(s,void 0)}return t.add(zj({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(t,i)=>(t.didChange(e)&&(i.animate=i.animate||t.change),!0)},((t,o)=>{void 0!==a&&(cancelAnimationFrame(a),a=void 0),n=s,i=e.read(t),r=Date.now()-(o.animate?0:300),l()}))),o}class u$ extends E{constructor(e,t,i){super(),this._register(new p$(e,i)),this._register(m$(i,{height:t.actualHeight,top:t.actualTop}))}}class g${get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=Mj(this,void 0),this._actualHeight=Mj(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class p${constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId="managedOverlayWidget-"+p$._counter++,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function m$(e,t){return Hj((i=>{for(let[n,s]of Object.entries(t))s&&"object"==typeof s&&"read"in s&&(s=s.read(i)),"number"==typeof s&&(s=`${s}px`),n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e.style[n]=s}))}function f$(e,t){return function(e,t){if(r$()){Zj("reload",(t=>a$((i=>{if([...Object.values(i)].some((t=>e.includes(t))))return e=>(t(void 0),!0)})))).read(t)}}([e],t),e}function _$(e,t,i){const n=new N,s=[];return n.add(Hj((o=>{const r=t.read(o),a=new Map,l=new Map;i&&i(!0),e.changeViewZones((e=>{for(const t of s)e.removeZone(t);s.length=0;for(const t of r){const i=e.addZone(t);s.push(i),a.set(t,i)}})),i&&i(!1),n.add(zj({createEmptyChangeSummary:()=>[],handleChange(e,t){const i=l.get(e.changedObservable);return void 0!==i&&t.push(i),!0}},((t,n)=>{for(const e of r)e.onChange&&(l.set(e.onChange,a.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones((e=>{for(const t of n)e.layoutZone(t)})),i&&i(!1)})))}))),n.add({dispose(){i&&i(!0),e.changeViewZones((e=>{for(const t of s)e.removeZone(t)})),i&&i(!1)}}),n}p$._counter=0;class v$ extends Uh{dispose(){super.dispose(!0)}}const b$=Pa("audioCue");class C${static register(e){return new C$(e.fileName)}constructor(e){this.fileName=e}}C$.error=C$.register({fileName:"error.mp3"}),C$.warning=C$.register({fileName:"warning.mp3"}),C$.foldedArea=C$.register({fileName:"foldedAreas.mp3"}),C$.break=C$.register({fileName:"break.mp3"}),C$.quickFixes=C$.register({fileName:"quickFixes.mp3"}),C$.taskCompleted=C$.register({fileName:"taskCompleted.mp3"}),C$.taskFailed=C$.register({fileName:"taskFailed.mp3"}),C$.terminalBell=C$.register({fileName:"terminalBell.mp3"}),C$.diffLineInserted=C$.register({fileName:"diffLineInserted.mp3"}),C$.diffLineDeleted=C$.register({fileName:"diffLineDeleted.mp3"}),C$.diffLineModified=C$.register({fileName:"diffLineModified.mp3"}),C$.chatRequestSent=C$.register({fileName:"chatRequestSent.mp3"}),C$.chatResponsePending=C$.register({fileName:"chatResponsePending.mp3"}),C$.chatResponseReceived1=C$.register({fileName:"chatResponseReceived1.mp3"}),C$.chatResponseReceived2=C$.register({fileName:"chatResponseReceived2.mp3"}),C$.chatResponseReceived3=C$.register({fileName:"chatResponseReceived3.mp3"}),C$.chatResponseReceived4=C$.register({fileName:"chatResponseReceived4.mp3"});class w${constructor(e){this.randomOneOf=e}}class y${static register(e){const t=new w$("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new y$(t,e.name,e.settingsKey);return y$._audioCues.add(i),i}constructor(e,t,i){this.sound=e,this.name=t,this.settingsKey=i}}y$._audioCues=new Set,y$.error=y$.register({name:ue(0,"Error on Line"),sound:C$.error,settingsKey:"audioCues.lineHasError"}),y$.warning=y$.register({name:ue(0,"Warning on Line"),sound:C$.warning,settingsKey:"audioCues.lineHasWarning"}),y$.foldedArea=y$.register({name:ue(0,"Folded Area on Line"),sound:C$.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),y$.break=y$.register({name:ue(0,"Breakpoint on Line"),sound:C$.break,settingsKey:"audioCues.lineHasBreakpoint"}),y$.inlineSuggestion=y$.register({name:ue(0,"Inline Suggestion on Line"),sound:C$.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),y$.terminalQuickFix=y$.register({name:ue(0,"Terminal Quick Fix"),sound:C$.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),y$.onDebugBreak=y$.register({name:ue(0,"Debugger Stopped on Breakpoint"),sound:C$.break,settingsKey:"audioCues.onDebugBreak"}),y$.noInlayHints=y$.register({name:ue(0,"No Inlay Hints on Line"),sound:C$.error,settingsKey:"audioCues.noInlayHints"}),y$.taskCompleted=y$.register({name:ue(0,"Task Completed"),sound:C$.taskCompleted,settingsKey:"audioCues.taskCompleted"}),y$.taskFailed=y$.register({name:ue(0,"Task Failed"),sound:C$.taskFailed,settingsKey:"audioCues.taskFailed"}),y$.terminalCommandFailed=y$.register({name:ue(0,"Terminal Command Failed"),sound:C$.error,settingsKey:"audioCues.terminalCommandFailed"}),y$.terminalBell=y$.register({name:ue(0,"Terminal Bell"),sound:C$.terminalBell,settingsKey:"audioCues.terminalBell"}),y$.notebookCellCompleted=y$.register({name:ue(0,"Notebook Cell Completed"),sound:C$.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"}),y$.notebookCellFailed=y$.register({name:ue(0,"Notebook Cell Failed"),sound:C$.taskFailed,settingsKey:"audioCues.notebookCellFailed"}),y$.diffLineInserted=y$.register({name:ue(0,"Diff Line Inserted"),sound:C$.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),y$.diffLineDeleted=y$.register({name:ue(0,"Diff Line Deleted"),sound:C$.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),y$.diffLineModified=y$.register({name:ue(0,"Diff Line Modified"),sound:C$.diffLineModified,settingsKey:"audioCues.diffLineModified"}),y$.chatRequestSent=y$.register({name:ue(0,"Chat Request Sent"),sound:C$.chatRequestSent,settingsKey:"audioCues.chatRequestSent"}),y$.chatResponseReceived=y$.register({name:ue(0,"Chat Response Received"),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[C$.chatResponseReceived1,C$.chatResponseReceived2,C$.chatResponseReceived3,C$.chatResponseReceived4]}}),y$.chatResponsePending=y$.register({name:ue(0,"Chat Response Pending"),sound:C$.chatResponsePending,settingsKey:"audioCues.chatResponsePending"});var S$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},L$=function(e,t){return function(i,n){t(i,n,e)}},k$=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const D$=QT("diff-review-insert",Qr.add,ue(0,"Icon for 'Insert' in accessible diff viewer.")),x$=QT("diff-review-remove",Qr.remove,ue(0,"Icon for 'Remove' in accessible diff viewer.")),N$=QT("diff-review-close",Qr.close,ue(0,"Icon for 'Close' in accessible diff viewer."));let E$=class extends E{constructor(e,t,i,n,s,o,r,a,l){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=o,this._diffs=r,this._editors=a,this._instantiationService=l,this.model=Bj(this,((e,t)=>{const i=this._visible.read(e);if(this._parentNode.style.visibility=i?"visible":"hidden",!i)return null;const n=t.add(this._instantiationService.createInstance(I$,this._diffs,this._editors,this._setVisible,this._canClose));return{model:n,view:t.add(this._instantiationService.createInstance(B$,this._parentNode,n,this._width,this._height,this._editors))}})),this._register(Jj(this.model))}next(){Dj((e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this.model.get().model.nextGroup(e)}))}prev(){Dj((e=>{this._setVisible(!0,e),this.model.get().model.previousGroup(e)}))}close(){Dj((e=>{this._setVisible(!1,e)}))}};E$._ttPolicy=Ak("diffReview",{createHTML:e=>e}),E$=S$([L$(8,Oa)],E$);let I$=class extends E{constructor(e,t,i,n,s){super(),this._diffs=e,this._editors=t,this._setVisible=i,this.canClose=n,this._audioCueService=s,this._groups=Mj(this,[]),this._currentGroupIdx=Mj(this,0),this._currentElementIdx=Mj(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map(((e,t)=>this._groups.read(t)[e])),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map(((e,t)=>{var i;return null===(i=this.currentGroup.read(t))||void 0===i?void 0:i.lines[e]})),this._register(Hj((e=>{const t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);const i=function(e,t,i){const n=[];for(const s of Ad(e,((e,t)=>t.modified.startLineNumber-e.modified.endLineNumberExclusive<2*M$))){const e=[];e.push(new A$);const o=new bc(Math.max(1,s[0].original.startLineNumber-M$),Math.min(s[s.length-1].original.endLineNumberExclusive+M$,t+1)),r=new bc(Math.max(1,s[0].modified.startLineNumber-M$),Math.min(s[s.length-1].modified.endLineNumberExclusive+M$,i+1));Od(s,((t,i)=>{const n=new bc(t?t.original.endLineNumberExclusive:o.startLineNumber,i?i.original.startLineNumber:o.endLineNumberExclusive),s=new bc(t?t.modified.endLineNumberExclusive:r.startLineNumber,i?i.modified.startLineNumber:r.endLineNumberExclusive);n.forEach((t=>{e.push(new F$(t,s.startLineNumber+(t-n.startLineNumber)))})),i&&(i.original.forEach((t=>{e.push(new O$(i,t))})),i.modified.forEach((t=>{e.push(new P$(i,t))})))}));const a=s[0].modified.join(s[s.length-1].modified),l=s[0].original.join(s[s.length-1].original);n.push(new R$(new gM(a,l),e))}return n}(t,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());Dj((e=>{const t=this._editors.modified.getPosition();if(t){const n=i.findIndex((e=>(null==t?void 0:t.lineNumber){const t=this.currentElement.read(e);(null==t?void 0:t.type)===T$.Deleted?this._audioCueService.playAudioCue(y$.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(null==t?void 0:t.type)===T$.Added&&this._audioCueService.playAudioCue(y$.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}))),this._register(Hj((e=>{var t;const i=this.currentElement.read(e);if(i&&i.type!==T$.Header){const e=null!==(t=i.modifiedLineNumber)&&void 0!==t?t:i.diff.modified.startLineNumber;this._editors.modified.setSelection(Mh.fromPositions(new Ba(e,1)))}})))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||xj(t,(t=>{this._currentGroupIdx.set(dc.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)}))}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||Dj((i=>{this._currentElementIdx.set(dc.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)}))}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);-1!==i&&Dj((e=>{this._currentElementIdx.set(i,e)}))}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===T$.Deleted?(this._editors.original.setSelection(Mh.fromPositions(new Ba(e.originalLineNumber,1))),this._editors.original.revealLine(e.originalLineNumber),this._editors.original.focus()):(e.type!==T$.Header&&(this._editors.modified.setSelection(Mh.fromPositions(new Ba(e.modifiedLineNumber,1))),this._editors.modified.revealLine(e.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};I$=S$([L$(4,b$)],I$);const M$=3;var T$;!function(e){e[e.Header=0]="Header",e[e.Unchanged=1]="Unchanged",e[e.Deleted=2]="Deleted",e[e.Added=3]="Added"}(T$||(T$={}));class R${constructor(e,t){this.range=e,this.lines=t}}class A${constructor(){this.type=T$.Header}}class O${constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=T$.Deleted,this.modifiedLineNumber=void 0}}class P${constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=T$.Added,this.originalLineNumber=void 0}}class F${constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=T$.Unchanged}}let B$=class extends E{constructor(e,t,i,n,s,o){super(),this._element=e,this._model=t,this._width=i,this._height=n,this._editors=s,this._languageService=o,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const r=document.createElement("div");r.className="diff-review-actions",this._actionBar=this._register(new Ix(r)),this._register(Hj((e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push(new za("diffreview.close",ue(0,"Close"),"close-diff-review "+ea.asClassName(N$),!0,(()=>k$(this,void 0,void 0,(function*(){return t.close()})))),{label:!1,icon:!0})}))),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new TD(this._content,{})),us(this.domNode,this._scrollbar.getDomNode(),r),this._register(x((()=>{us(this.domNode)}))),this._register(m$(this.domNode,{width:this._width,height:this._height})),this._register(m$(this._content,{width:this._width,height:this._height})),this._register(Uj(((e,t)=>{this._model.currentGroup.read(e),this._render(t)}))),this._register(Mn(this.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())})))}_render(e){const t=this._editors.original.getOptions(),i=this._editors.modified.getOptions(),n=document.createElement("div");n.className="diff-review-table",n.setAttribute("role","list"),n.setAttribute("aria-label",ue(0,"Accessible Diff Viewer. Use arrow up and down to navigate.")),Bk(n,i.get(50)),us(this._content,n);const s=this._editors.original.getModel(),o=this._editors.modified.getModel();if(!s||!o)return;const r=s.getOptions(),a=o.getOptions(),l=i.get(66),h=this._model.currentGroup.get();for(const d of(null==h?void 0:h.lines)||[]){if(!h)break;let c;if(d.type===T$.Header){const e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");const t=h.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,s=e=>0===e?ue(0,"no lines changed"):1===e?ue(0,"1 line changed"):ue(0,"{0} lines changed",e),o=s(t.original.length),r=s(t.modified.length);e.setAttribute("aria-label",ue(0,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,o,t.modified.startLineNumber,r));const a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),c=e}else c=this._createRow(d,l,this._width.get(),t,s,r,i,o,a);n.appendChild(c);const u=Pj((e=>this._model.currentElement.read(e)===d));e.add(Hj((e=>{const t=u.read(e);c.tabIndex=t?0:-1,t&&c.focus()}))),e.add(En(c,"focus",(()=>{this._model.goToLine(d)})))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,s,o,r,a,l){const h=n.get(143),d=h.glyphMarginWidth+h.lineNumbersWidth,c=r.get(143),u=10+c.glyphMarginWidth+c.lineNumbersWidth;let g="diff-review-row",p="";let m=null;switch(e.type){case T$.Added:g="diff-review-row line-insert",p=" char-insert",m=D$;break;case T$.Deleted:g="diff-review-row line-delete",p=" char-delete",m=x$}const f=document.createElement("div");f.style.minWidth=i+"px",f.className=g,f.setAttribute("role","listitem"),f.ariaLevel="";const _=document.createElement("div");_.className="diff-review-cell",_.style.height=`${t}px`,f.appendChild(_);const v=document.createElement("span");v.style.width=d+"px",v.style.minWidth=d+"px",v.className="diff-review-line-number"+p,void 0!==e.originalLineNumber?v.appendChild(document.createTextNode(String(e.originalLineNumber))):v.innerText="\xa0",_.appendChild(v);const b=document.createElement("span");b.style.width=u+"px",b.style.minWidth=u+"px",b.style.paddingRight="10px",b.className="diff-review-line-number"+p,void 0!==e.modifiedLineNumber?b.appendChild(document.createTextNode(String(e.modifiedLineNumber))):b.innerText="\xa0",_.appendChild(b);const C=document.createElement("span");if(C.className="diff-review-spacer",m){const e=document.createElement("span");e.className=ea.asClassName(m),e.innerText="\xa0\xa0",C.appendChild(e)}else C.innerText="\xa0\xa0";let w;if(_.appendChild(C),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(a,r,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);E$._ttPolicy&&(t=E$._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),w=a.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(s,n,o.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);E$._ttPolicy&&(t=E$._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),w=s.getLineContent(e.originalLineNumber)}0===w.length&&(w=ue(0,"blank"));let y="";switch(e.type){case T$.Unchanged:y=e.originalLineNumber===e.modifiedLineNumber?ue(0,"{0} unchanged line {1}",w,e.originalLineNumber):ue(0,"{0} original line {1} modified line {2}",w,e.originalLineNumber,e.modifiedLineNumber);break;case T$.Added:y=ue(0,"+ {0} modified line {1}",w,e.modifiedLineNumber);break;case T$.Deleted:y=ue(0,"- {0} original line {1}",w,e.originalLineNumber)}return f.setAttribute("aria-label",y),f}_getLineHtml(e,t,i,n,s){const o=e.getLineContent(n),r=t.get(50),a=RC.createEmpty(o,s),l=lP.isBasicASCII(o,e.mightContainNonBasicASCII()),h=lP.containsRTL(o,l,e.mightContainRTL());return NA(new yA(r.isMonospace&&!t.get(33),r.canUseHalfwidthRightwardsArrow,o,!1,l,h,0,a,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(116),t.get(98),t.get(93),t.get(51)!==NS.OFF,null)).html}};B$=S$([L$(5,yc)],B$);const W$=QT("diff-insert",Qr.add,ue(0,"Line decoration for inserts in the diff editor.")),V$=QT("diff-remove",Qr.remove,ue(0,"Line decoration for removals in the diff editor.")),H$=xw.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+ea.asClassName(W$),marginClassName:"gutter-insert"}),z$=xw.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+ea.asClassName(V$),marginClassName:"gutter-delete"}),U$=xw.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),K$=xw.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),j$=xw.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),q$=xw.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),$$=xw.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),G$=xw.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),Z$=xw.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),Y$=xw.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"}),X$=xw.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new Ia(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(ue(0,"Click to revert change")),glyphMarginClassName:"arrow-revert-change "+ea.asClassName(Qr.arrowRight),zIndex:10001});class Q$ extends E{constructor(e,t,i,n,s){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=s,this._originalScrollTop=$j(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=$j(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._viewZonesChanged=Zj("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=Mj(this,0),this._modifiedViewZonesChangedSignal=Zj("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Zj("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=Bj(((e,t)=>{var i;this._element.replaceChildren();const n=this._diffModel.read(e),s=null===(i=null==n?void 0:n.diff.read(e))||void 0===i?void 0:i.movedTexts;if(!s||0===s.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);const o=this._originalEditorLayoutInfo.read(e),r=this._modifiedEditorLayoutInfo.read(e);if(!o||!r)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);const a=s.map((t=>{function i(e,t){return(t.getTopForLineNumber(e.startLineNumber,!0)+t.getTopForLineNumber(e.endLineNumberExclusive,!0))/2}const n=i(t.lineRangeMapping.original,this._editors.original),s=this._originalScrollTop.read(e),o=i(t.lineRangeMapping.modified,this._editors.modified),r=n-s,a=o-this._modifiedScrollTop.read(e),l=Math.min(n,o),h=Math.max(n,o);return{range:new dc(l,h),from:r,to:a,fromWithoutScroll:n,toWithoutScroll:o,move:t}}));a.sort(function(...e){return(t,i)=>{for(const n of e){const e=n(t,i);if(!yd.isNeitherLessOrGreaterThan(e))return e}return yd.neitherLessOrGreaterThan}}(Yd((e=>e.fromWithoutScroll>e.toWithoutScroll),Qd),Yd((e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll),Xd)));const l=J$.compute(a.map((e=>e.range))),h=o.verticalScrollbarWidth,d=10*(l.getTrackCount()-1)+20,c=h+d+(r.contentLeft-Q$.movedCodeBlockPadding);let u=0;for(const g of a){const e=h+10+10*l.getTrack(u),i=15,s=15,o=c,a=r.glyphMarginWidth+r.lineNumbersWidth,d=18,p=document.createElementNS("http://www.w3.org/2000/svg","rect");p.classList.add("arrow-rectangle"),p.setAttribute("x",""+(o-a)),p.setAttribute("y",""+(g.to-d/2)),p.setAttribute("width",`${a}`),p.setAttribute("height",`${d}`),this._element.appendChild(p);const m=document.createElementNS("http://www.w3.org/2000/svg","g"),f=document.createElementNS("http://www.w3.org/2000/svg","path");f.setAttribute("d",`M 0 ${g.from} L ${e} ${g.from} L ${e} ${g.to} L ${o-s} ${g.to}`),f.setAttribute("fill","none"),m.appendChild(f);const _=document.createElementNS("http://www.w3.org/2000/svg","polygon");_.classList.add("arrow"),t.add(Hj((e=>{f.classList.toggle("currentMove",g.move===n.activeMovedText.read(e)),_.classList.toggle("currentMove",g.move===n.activeMovedText.read(e))}))),_.setAttribute("points",`${o-s},${g.to-i/2} ${o},${g.to} ${o-s},${g.to+i/2}`),m.appendChild(_),this._element.appendChild(m),u++}this.width.set(d,void 0)})),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(x((()=>this._element.remove()))),this._register(Hj((e=>{const t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=t.width-t.verticalScrollbarWidth+"px",this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-Q$.movedCodeBlockPadding+this.width.read(e)}px`)}))),this._register(Jj(this._state));const o=Pj((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);return i?i.movedTexts.map((e=>({move:e,original:new g$(jj(e.lineRangeMapping.original.startLineNumber-1),18),modified:new g$(jj(e.lineRangeMapping.modified.startLineNumber-1),18)}))):[]}));this._register(_$(this._editors.original,o.map((e=>e.map((e=>e.original)))))),this._register(_$(this._editors.modified,o.map((e=>e.map((e=>e.modified)))))),this._register(Uj(((e,t)=>{const i=o.read(e);for(const n of i)t.add(new eG(this._editors.original,n.original,n.move,"original",this._diffModel.get())),t.add(new eG(this._editors.modified,n.modified,n.move,"modified",this._diffModel.get()))})));const r=$j(this._editors.original.onDidChangeCursorPosition,(()=>this._editors.original.getPosition())),a=$j(this._editors.modified.onDidChangeCursorPosition,(()=>this._editors.modified.getPosition())),l=Zj("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0))))),h=Zj("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let d="modified";this._register(zj({createEmptyChangeSummary:()=>{},handleChange:(e,t)=>(e.didChange(l)&&(d="original"),e.didChange(h)&&(d="modified"),!0)},(e=>{l.read(e),h.read(e);const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e);let n;if(i&&"original"===d){const t=r.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.original.contains(t.lineNumber))))}if(i&&"modified"===d){const t=a.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.modified.contains(t.lineNumber))))}n!==t.movedTextToCompare.get()&&t.movedTextToCompare.set(void 0,void 0),t.setActiveMovedText(n)})))}}Q$.movedCodeBlockPadding=4;class J${static compute(e){const t=[],i=[];for(const n of e){let e=t.findIndex((e=>!e.intersectsStrict(n)));if(-1===e){const i=6;t.length>=i?e=vc(t,Yd((e=>e.intersectWithRangeLength(n)),Xd)):(e=t.length,t.push(new cc))}t[e].addRange(n),i.push(e)}return new J$(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class eG extends u${constructor(e,t,i,n,s){const o=Ns("div.diff-hidden-lines-widget");super(e,t,o.root),this._editor=e,this._move=i,this._kind=n,this._diffModel=s,this._nodes=Ns("div.diff-moved-code-block",{style:{marginRight:"4px"}},[Ns("div.text-content@textContent"),Ns("div.action-bar@actionBar")]),o.root.appendChild(this._nodes.root);const r=$j(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));let a;this._register(m$(this._nodes.root,{paddingRight:r.map((e=>e.verticalScrollbarWidth))})),a=i.changes.length>0?"original"===this._kind?ue(0,"Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):ue(0,"Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):"original"===this._kind?ue(0,"Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):ue(0,"Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const l=this._register(new Ix(this._nodes.actionBar,{highlightToggledItems:!0})),h=new za("",a,"",!1);l.push(h,{icon:!1,label:!0});const d=new za("","Compare",ea.asClassName(Qr.compareChanges),!0,(()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)}));this._register(Hj((e=>{const t=this._diffModel.movedTextToCompare.read(e)===i;d.checked=t}))),l.push(d,{icon:!1,label:!0})}}class tG extends E{constructor(e,t,i){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=Pj(this,(e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e);if(!i)return null;const n=this._diffModel.read(e).movedTextToCompare.read(e),s=this._options.renderIndicators.read(e),o=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(const h of i.mappings){if(h.lineRangeMapping.original.isEmpty||r.push({range:h.lineRangeMapping.original.toInclusiveRange(),options:s?z$:K$}),h.lineRangeMapping.modified.isEmpty||a.push({range:h.lineRangeMapping.modified.toInclusiveRange(),options:s?H$:U$}),h.lineRangeMapping.modified.isEmpty||h.lineRangeMapping.original.isEmpty)h.lineRangeMapping.original.isEmpty||r.push({range:h.lineRangeMapping.original.toInclusiveRange(),options:Z$}),h.lineRangeMapping.modified.isEmpty||a.push({range:h.lineRangeMapping.modified.toInclusiveRange(),options:q$});else for(const e of h.lineRangeMapping.innerChanges||[])h.lineRangeMapping.original.contains(e.originalRange.startLineNumber)&&r.push({range:e.originalRange,options:e.originalRange.isEmpty()&&o?Y$:G$}),h.lineRangeMapping.modified.contains(e.modifiedRange.startLineNumber)&&a.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()&&o?$$:j$});h.lineRangeMapping.modified.isEmpty||!this._options.shouldRenderRevertArrows.read(e)||n||a.push({range:Mh.fromPositions(new Ba(h.lineRangeMapping.modified.startLineNumber,1)),options:X$})}if(n)for(const h of n.changes){const e=h.original.toInclusiveRange();e&&r.push({range:e,options:s?z$:K$});const t=h.modified.toInclusiveRange();t&&a.push({range:t,options:s?H$:U$});for(const i of h.innerChanges||[])r.push({range:i.originalRange,options:G$}),a.push({range:i.modifiedRange,options:j$})}const l=this._diffModel.read(e).activeMovedText.read(e);for(const h of i.movedTexts)r.push({range:h.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(h===l?" currentMove":""),blockPadding:[Q$.movedCodeBlockPadding,0,Q$.movedCodeBlockPadding,Q$.movedCodeBlockPadding]}}),a.push({range:h.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(h===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}})),this._register(l$(this._editors.original,this._decorations.map((e=>(null==e?void 0:e.originalDecorations)||[])))),this._register(l$(this._editors.modified,this._decorations.map((e=>(null==e?void 0:e.modifiedDecorations)||[]))))}}class iG extends E{constructor(e,t,i){super(),this._options=e,this._domNode=t,this._dimensions=i,this._sashRatio=Mj(this,void 0),this.sashLeft=Pj(this,(e=>{var t;const i=null!==(t=this._sashRatio.read(e))&&void 0!==t?t:this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(i,e)})),this._sash=this._register(new CW(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart((()=>{this._startSashPosition=this.sashLeft.get()}))),this._register(this._sash.onDidChange((e=>{const t=this._dimensions.width.get(),i=this._computeSashLeft((this._startSashPosition+(e.currentX-e.startX))/t,void 0);this._sashRatio.set(i/t,void 0)}))),this._register(this._sash.onDidEnd((()=>this._sash.layout()))),this._register(this._sash.onDidReset((()=>this._sashRatio.set(void 0,void 0)))),this._register(Hj((e=>{const t=this._options.enableSplitViewResizing.read(e);this._sash.state=t?3:0,this.sashLeft.read(e),this._dimensions.height.read(e),this._sash.layout()})))}setBoundarySashes(e){this._sash.orthogonalEndSash=e.bottom}_computeSashLeft(e,t){const i=this._dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),s=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,o=100;return i<=200?n:si-o?i-o:s}}class nG{remove(){var e;null===(e=this.parent)||void 0===e||e.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;void 0!==t.children.get(n);s++)n=`${i}_${s}`;return n}static empty(e){return 0===e.children.size}}class sG extends nG{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class oG extends nG{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class rG extends nG{static create(e,t,i){const n=new Uh(i),s=new rG(t.uri),o=e.ordered(t),r=o.map(((e,i)=>{var o;const r=nG.findId(`provider_${i}`,s),l=new oG(r,s,null!==(o=e.displayName)&&void 0!==o?o:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,n.token)).then((e=>{for(const t of e||[])rG._makeOutlineElement(t,l);return l}),(e=>(a(e),l))).then((e=>{nG.empty(e)?e.remove():s._groups.set(r,e)}))})),l=e.onDidChange((()=>{Id(e.ordered(t),o)||n.cancel()}));return Promise.all(r).then((()=>n.token.isCancellationRequested&&!i.isCancellationRequested?rG.create(e,t,i):s._compact())).finally((()=>{n.dispose(),l.dispose()}))}static _makeOutlineElement(e,t){const i=nG.findId(e,t),n=new sG(i,t,e);if(e.children)for(const s of e.children)rG._makeOutlineElement(s,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=v.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof sG?e.push(t.symbol):e.push(...v.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>Mh.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return rG._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>Ba.compare(Mh.getStartPosition(e.range),Mh.getStartPosition(t.range))||Ba.compare(Mh.getEndPosition(t.range),Mh.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&rG._flattenDocumentSymbols(e,n.children,n.name)}}var aG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},lG=function(e,t){return function(i,n){t(i,n,e)}},hG=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let dG=class extends E{get isUpdatingViewZones(){return this._isUpdatingViewZones}constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._languageFeaturesService=n,this._isUpdatingViewZones=!1,this._modifiedOutlineSource=Bj(this,((e,t)=>{const i=this._editors.modifiedModel.read(e);if(i)return t.add(new cG(this._languageFeaturesService,i))})),this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(3===e.reason){const e=this._diffModel.get();Dj((t=>{for(const i of this._editors.original.getSelections()||[])null==e||e.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,t),null==e||e.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,t)}))}}))),this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(3===e.reason){const e=this._diffModel.get();Dj((t=>{for(const i of this._editors.modified.getSelections()||[])null==e||e.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,t),null==e||e.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,t)}))}})));const s=this._diffModel.map(((e,t)=>{var i,n;return 0===(null===(i=null==e?void 0:e.diff.read(t))||void 0===i?void 0:i.mappings.length)?[]:null!==(n=null==e?void 0:e.unchangedRegions.read(t))&&void 0!==n?n:[]})),o=Bj(this,((e,t)=>{const i=this._modifiedOutlineSource.read(e);if(!i)return{origViewZones:[],modViewZones:[]};const n=[],o=[],r=this._options.renderSideBySide.read(e),a=s.read(e);for(const s of a)if(!s.shouldHideControls(e)){{const e=Pj((e=>s.getHiddenOriginalRange(e).startLineNumber-1)),o=new g$(e,24);n.push(o),t.add(new uG(this._editors.original,o,s,s.originalUnchangedRange,!r,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,void 0)),this._options))}{const e=Pj((e=>s.getHiddenModifiedRange(e).startLineNumber-1)),n=new g$(e,24);o.push(n),t.add(new uG(this._editors.modified,n,s,s.modifiedUnchangedRange,!1,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,void 0)),this._options))}}return{origViewZones:n,modViewZones:o}})),r={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new Ia(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(ue(0,"Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+ea.asClassName(Qr.fold),zIndex:10001};this._register(l$(this._editors.original,Pj((e=>{const t=s.read(e),i=t.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:r})));for(const n of t)n.shouldHideControls(e)&&i.push({range:Mh.fromPositions(new Ba(n.originalLineNumber,1)),options:a});return i})))),this._register(l$(this._editors.modified,Pj((e=>{const t=s.read(e),i=t.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:r})));for(const n of t)n.shouldHideControls(e)&&i.push({range:bc.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:a});return i})))),this._register(_$(this._editors.original,o.map((e=>e.origViewZones)),(e=>this._isUpdatingViewZones=e))),this._register(_$(this._editors.modified,o.map((e=>e.modViewZones)),(e=>this._isUpdatingViewZones=e))),this._register(Hj((e=>{const t=s.read(e);this._editors.original.setHiddenAreas(t.map((t=>t.getHiddenOriginalRange(e).toInclusiveRange())).filter(Ur)),this._editors.modified.setHiddenAreas(t.map((t=>t.getHiddenModifiedRange(e).toInclusiveRange())).filter(Ur))}))),this._register(this._editors.modified.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.modifiedUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}}))),this._register(this._editors.original.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.originalUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}})))}};dG=aG([lG(3,iL)],dG);let cG=class extends E{constructor(e,t){super(),this._languageFeaturesService=e,this._textModel=t,this._currentModel=Mj(this,void 0);const i=Zj("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),n=Zj("_textModel.onDidChangeContent",B.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>{}),100));this._register(Uj(((e,t)=>hG(this,void 0,void 0,(function*(){i.read(e),n.read(e);const s=t.add(new v$),o=yield rG.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,s.token);t.isDisposed||this._currentModel.set(o,void 0)})))))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter((t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber)));return n.sort(Jd(Yd((e=>e.range.endLineNumber-e.range.startLineNumber),Xd))),n.map((e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber})))}};cG=aG([lG(0,iL)],cG);class uG extends u${constructor(e,t,i,n,s,o,r,a){const l=Ns("div.diff-hidden-lines-widget");super(e,t,l.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this.hide=s,this._modifiedOutlineSource=o,this._revealModifiedHiddenLine=r,this._options=a,this._nodes=Ns("div.diff-hidden-lines",[Ns("div.top@top",{title:ue(0,"Click or drag to show more above")}),Ns("div.center@content",{style:{display:"flex"}},[Ns("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[fs("a",{title:ue(0,"Show all"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...ok("$(unfold)"))]),Ns("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),Ns("div.bottom@bottom",{title:ue(0,"Click or drag to show more below"),role:"button"})]),l.root.appendChild(this._nodes.root);const h=$j(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));this.hide?us(this._nodes.first):this._register(m$(this._nodes.first,{width:h.map((e=>e.contentLeft))}));const d=this._editor;this._register(En(this._nodes.top,"mousedown",(e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set(!0,void 0);const s=En(window,"mousemove",(e=>{const s=e.clientY-t;i=i||Math.abs(s)>2;const o=Math.round(s/d.getOption(66)),r=Math.max(0,Math.min(n+o,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(r,void 0)})),o=En(window,"mouseup",(e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(!1,void 0),s.dispose(),o.dispose()}))}))),this._register(En(this._nodes.bottom,"mousedown",(e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set(!0,void 0);const s=En(window,"mousemove",(e=>{const s=e.clientY-t;i=i||Math.abs(s)>2;const o=Math.round(s/d.getOption(66)),r=Math.max(0,Math.min(n-o,this._unchangedRegion.getMaxVisibleLineCountBottom())),a=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(r,void 0);const l=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(l-a))})),o=En(window,"mouseup",(e=>{if(this._unchangedRegion.isDragged.set(!1,void 0),!i){const e=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const t=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),s.dispose(),o.dispose()}))}))),this._register(Hj((e=>{const t=[];if(!this.hide){const n=ue(0,"{0} hidden lines",i.getHiddenModifiedRange(e).length),s=fs("span",{title:ue(0,"Double click to unfold")},n);s.addEventListener("dblclick",(e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))})),t.push(s);const o=this._unchangedRegion.getHiddenModifiedRange(e),r=this._modifiedOutlineSource.getBreadcrumbItems(o,e);if(r.length>0){t.push(fs("span",void 0,"\xa0\xa0|\xa0\xa0"));for(let e=0;e{this._revealModifiedHiddenLine(i.startLineNumber)}}}}us(this._nodes.others,...t)})))}}const gG=Pa("editorWorkerService");var pG,mG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fG=function(e,t){return function(i,n){t(i,n,e)}},_G=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let vG=pG=class{constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new U,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;null===(e=this.diffAlgorithmOnDidChangeSubscription)||void 0===e||e.dispose()}computeDiff(e,t,i,n){var s,o;return _G(this,void 0,void 0,(function*(){if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,n);if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new pM(new bc(1,2),new bc(1,t.getLineCount()+1),[new mM(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const r=JSON.stringify([e.uri.toString(),t.uri.toString()]),a=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),l=pG.diffCache.get(r);if(l&&l.context===a)return l.result;const h=F.create(),d=yield this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),c=h.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:c,timedOut:null===(s=null==d?void 0:d.quitEarly)||void 0===s||s,detectedMoves:i.computeMoves?null!==(o=null==d?void 0:d.moves.length)&&void 0!==o?o:0:-1}),n.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!d)throw new Error("no diff result available");return pG.diffCache.size>10&&pG.diffCache.delete(pG.diffCache.keys().next().value),pG.diffCache.set(r,{result:d,context:a}),d}))}setOptions(e){var t;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(null===(t=this.diffAlgorithmOnDidChangeSubscription)||void 0===t||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),i=!0),i&&this.onDidChangeEventEmitter.fire()}};vG.diffCache=new Map,vG=pG=mG([fG(1,gG),fG(2,rh)],vG);var bG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},CG=function(e,t){return function(i,n){t(i,n,e)}};const wG=Pa("diffProviderFactoryService");let yG=class{constructor(e){this.instantiationService=e}createDiffProvider(e,t){return this.instantiationService.createInstance(vG,t)}};yG=bG([CG(0,Oa)],yG),Cu(wG,yG,1);var SG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},LG=function(e,t){return function(i,n){t(i,n,e)}},kG=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let DG=class extends E{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i,n){super(),this.model=e,this._options=t,this._editor=i,this._diffProviderFactoryService=n,this._isDiffUpToDate=Mj(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=Mj(this,void 0),this.diff=this._diff,this._unchangedRegions=Mj(this,{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=Pj(this,(e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e).regions:(Dj((e=>{for(const t of this._unchangedRegions.get().regions)t.collapseAll(e)})),[]))),this.movedTextToCompare=Mj(this,void 0),this._activeMovedText=Mj(this,void 0),this._hoveredMovedText=Mj(this,void 0),this.activeMovedText=Pj(this,(e=>{var t,i;return null!==(i=null!==(t=this.movedTextToCompare.read(e))&&void 0!==t?t:this._hoveredMovedText.read(e))&&void 0!==i?i:this._activeMovedText.read(e)})),this._cancellationTokenSource=new Uh,this._diffProvider=Pj(this,(e=>{const t=this._diffProviderFactoryService.createDiffProvider(this._editor,{diffAlgorithm:this._options.diffAlgorithm.read(e)});return{diffProvider:t,onChangeSignal:Zj("onDidChange",t.onDidChange)}})),this._register(x((()=>this._cancellationTokenSource.cancel())));const s=Xj("contentChangedSignal"),o=this._register(new sd((()=>s.trigger(void 0)),200)),r=(t,i,n)=>{const s=EG.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n)),o=this._unchangedRegions.get(),r=o.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).filter((e=>!!e)).map((e=>bc.fromRange(e))),a=o.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).filter((e=>!!e)).map((e=>bc.fromRange(e))),l=e.original.deltaDecorations(o.originalDecorationIds,s.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),h=e.modified.deltaDecorations(o.modifiedDecorationIds,s.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));for(const e of s)for(let t=0;t{if(this._diff.get()){const i=Dg.fromModelContentChanges(t.changes),n=MG(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,Dj((e=>{this._diff.set(xG.fromDiffResult(this._lastDiff),e),r(n,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}o.schedule()}))),this._register(e.original.onDidChangeContent((t=>{if(this._diff.get()){const i=Dg.fromModelContentChanges(t.changes),n=IG(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,Dj((e=>{this._diff.set(xG.fromDiffResult(this._lastDiff),e),r(n,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}o.schedule()}))),this._register(Uj(((t,i)=>kG(this,void 0,void 0,(function*(){var n,a;this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),o.cancel(),s.read(t);const l=this._diffProvider.read(t);l.onChangeSignal.read(t),f$(YM,t),f$(qM,t),this._isDiffUpToDate.set(!1,void 0);let h=[];i.add(e.original.onDidChangeContent((e=>{const t=Dg.fromModelContentChanges(e.changes);h=rp(h,t)})));let d=[];i.add(e.modified.onDidChangeContent((e=>{const t=Dg.fromModelContentChanges(e.changes);d=rp(d,t)})));let c=yield l.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);var u,g,p;this._cancellationTokenSource.token.isCancellationRequested||(u=c,g=e.original,p=e.modified,c={changes:u.changes.map((e=>new pM(e.original,e.modified,e.innerChanges?e.innerChanges.map((e=>function(e,t,i){let n=e.originalRange,s=e.modifiedRange;return(1!==n.endColumn||1!==s.endColumn)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&s.endColumn===i.getLineMaxColumn(s.endLineNumber)&&n.endLineNumber{r(c,e),this._lastDiff=c;const t=xG.fromDiffResult(c);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);const i=this.movedTextToCompare.get();this.movedTextToCompare.set(i?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified))):void 0,e)})))})))))}ensureModifiedLineIsVisible(e,t){var i;if(0===(null===(i=this.diff.get())||void 0===i?void 0:i.mappings.length))return;const n=this._unchangedRegions.get().regions;for(const s of n)if(s.getHiddenModifiedRange(void 0).contains(e))return void s.showModifiedLine(e,t)}ensureOriginalLineIsVisible(e,t){var i;if(0===(null===(i=this.diff.get())||void 0===i?void 0:i.mappings.length))return;const n=this._unchangedRegions.get().regions;for(const s of n)if(s.getHiddenOriginalRange(void 0).contains(e))return void s.showOriginalLine(e,t)}waitForDiff(){return kG(this,void 0,void 0,(function*(){var e,t;yield(e=this.isDiffUpToDate,t=e=>e,new Promise((i=>{let n=!1,s=!1;const o=Hj((r=>{const a=e.read(r);t(a)&&(n?o.dispose():s=!0,i(a))}));n=!0,s&&o.dispose()})))}))}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map((e=>({range:e.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(e){const t=e.collapsedRegions.map((e=>bc.deserialize(e.range))),i=this._unchangedRegions.get();Dj((e=>{for(const n of i.regions)for(const i of t)if(n.modifiedUnchangedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}}))}};DG=SG([LG(3,wG)],DG);class xG{static fromDiffResult(e){return new xG(e.changes.map((e=>new NG(e))),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class NG{constructor(e){this.lineRangeMapping=e}}class EG{static fromDiffs(e,t,i,n,s){const o=pM.inverse(e,t,i),r=[];for(const a of o){let e=a.original.startLineNumber,o=a.modified.startLineNumber,l=a.original.length;const h=1===e&&1===o,d=e+l===t+1&&o+l===i+1;(h||d)&&l>=s+n?(h&&!d&&(l-=s),d&&!h&&(e+=s,o+=s,l-=s),r.push(new EG(e,o,l,0,0))):l>=2*s+n&&(e+=s,o+=s,l-=2*s,r.push(new EG(e,o,l,0,0)))}return r}get originalUnchangedRange(){return bc.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return bc.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=Mj(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=Mj(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=Pj(this,(e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e))),this.isDragged=Mj(this,!1),this._visibleLineCountTop.set(n,void 0),this._visibleLineCountBottom.set(s,void 0)}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return bc.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return bc.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t){const i=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),n=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;i{var s;this._contextMenuService.showContextMenu({domForShadowRoot:c&&null!==(s=i.getDomNode())&&void 0!==s?s:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>{const e=[],t=n.modified.isEmpty;e.push(new za("diff.clipboard.copyDeletedContent",t?n.original.length>1?ue(0,"Copy deleted lines"):ue(0,"Copy deleted line"):n.original.length>1?ue(0,"Copy changed lines"):ue(0,"Copy changed line"),void 0,!0,(()=>TG(this,void 0,void 0,(function*(){const e=this._originalTextModel.getValueInRange(n.original.toExclusiveRange());yield this._clipboardService.writeText(e)}))))),n.original.length>1&&e.push(new za("diff.clipboard.copyDeletedLineContent",ue(0,t?"Copy deleted line ({0})":"Copy changed line ({0})",n.original.startLineNumber+d),void 0,!0,(()=>TG(this,void 0,void 0,(function*(){let e=this._originalTextModel.getLineContent(n.original.startLineNumber+d);if(""===e){e=0===this._originalTextModel.getEndOfLineSequence()?"\n":"\r\n"}yield this._clipboardService.writeText(e)})))));return i.getOption(90)||e.push(new za("diff.inline.revertChange",ue(0,"Revert this change"),void 0,!0,(()=>TG(this,void 0,void 0,(function*(){this._editor.revert(this._diff)}))))),e},autoSelectFirstItem:!0})};this._register(Mn(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=Hn(this._diffActions),n=Math.floor(h/3);e.preventDefault(),u(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId!==this._getViewZoneId()?this.visibility=!1:(d=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,h),this.visibility=!0)}))),this._register(i.onMouseDown((e=>{if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){e.target.detail.viewZoneId===this._getViewZoneId()&&(e.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,h),u(e.event.posx,e.event.posy+h))}})))}_updateLightBulbPosition(e,t,i){const{top:n}=Hn(e),s=t-n,o=Math.floor(s/i),r=o*i;if(this._diffActions.style.top=`${r}px`,this._viewLineCounts){let e=0;for(let t=0;te});function OG(e,t,i,n){Bk(n,t.fontInfo);const s=i.length>0,o=new Qc(1e4);let r=0,a=0;const l=[];for(let c=0;c');const l=t.getLineContent(),h=lP.isBasicASCII(l,s),d=lP.containsRTL(l,h,o),c=DA(new yA(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,h,d,0,t,i,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==NS.OFF,null),a);return a.appendString(""),c.characterMapping.getHorizontalOffset(c.characterMapping.length)}var WG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},VG=function(e,t){return function(i,n){t(i,n,e)}};let HG=class extends E{constructor(e,t,i,n,s,o,r){super(),this._editors=e,this._diffModel=t,this._options=i,this._diffEditorWidget=n,this._canIgnoreViewZoneUpdateEvent=s,this._clipboardService=o,this._contextMenuService=r,this._originalTopPadding=Mj(this,0),this._originalScrollOffset=Mj(this,0),this._originalScrollOffsetAnimated=c$(this._originalScrollOffset,this._store),this._modifiedTopPadding=Mj(this,0),this._modifiedScrollOffset=Mj(this,0),this._modifiedScrollOffsetAnimated=c$(this._modifiedScrollOffset,this._store);let a=!1;const l=Mj("state",0),h=this._register(new sd((()=>{l.set(l.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((e=>{a||this._canIgnoreViewZoneUpdateEvent()||h.schedule()}))),this._register(this._editors.modified.onDidChangeViewZones((e=>{a||this._canIgnoreViewZoneUpdateEvent()||h.schedule()}))),this._register(this._editors.original.onDidChangeConfiguration((e=>{(e.hasChanged(144)||e.hasChanged(66))&&h.schedule()}))),this._register(this._editors.modified.onDidChangeConfiguration((e=>{(e.hasChanged(144)||e.hasChanged(66))&&h.schedule()})));const d=this._diffModel.map((e=>e?$j(e.model.original.onDidChangeTokens,(()=>2===e.model.original.tokenization.backgroundTokenizationState)):void 0)).map(((e,t)=>null==e?void 0:e.read(t))),c=new Set,u=new Set,g=Pj((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);if(!t||!i)return null;l.read(e);const n=this._options.renderSideBySide.read(e);return zG(this._editors.original,this._editors.modified,i.mappings,c,u,n)})),p=Pj((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);if(!i)return null;l.read(e);const n=i.changes.map((e=>new NG(e)));return zG(this._editors.original,this._editors.modified,n,c,u,!0)}));function m(){const e=document.createElement("div");return e.className="diagonal-fill",e}const f=this._register(new N),_=Pj((e=>{var t,i,n,s,o,r,a,l;f.clear();const h=g.read(e)||[],c=[],u=[],_=this._modifiedTopPadding.read(e);_>0&&u.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:_,showInHiddenAreas:!0,suppressMouseDown:!0});const v=this._originalTopPadding.read(e);v>0&&c.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:v,showInHiddenAreas:!0,suppressMouseDown:!0});const b=this._options.renderSideBySide.read(e),C=b||null===(t=this._editors.modified._getViewModel())||void 0===t?void 0:t.createLineBreaksComputer();if(C)for(const N of h)if(N.diff)for(let E=N.originalRange.startLineNumber;Ethis._editors.original.getModel().tokenization.getLineTokens(e))),I.originalRange.mapToLineArray((e=>w[y++])),k,D),A=[];for(const B of I.diff.innerChanges||[])A.push(new hP(B.originalRange.delta(-(I.diff.original.startLineNumber-1)),G$.className,0));const O=OG(R,x,A,T),P=document.createElement("div");if(P.className="inline-deleted-margin-view-zone",Bk(P,x.fontInfo),this._options.renderIndicators.read(e))for(let W=0;Wqr(F)),P,this._editors.modified,I.diff,this._diffEditorWidget,O.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let H=0;H1&&c.push({afterLineNumber:I.originalRange.startLineNumber+H,domNode:m(),heightInPx:(z-1)*S,showInHiddenAreas:!0,suppressMouseDown:!0})}u.push({afterLineNumber:I.modifiedRange.startLineNumber-1,domNode:T,heightInPx:O.heightInLines*S,minWidthInPx:O.minWidthInPx,marginDomNode:P,setZoneId(e){F=e},showInHiddenAreas:!0,suppressMouseDown:!0})}const M=document.createElement("div");M.className="gutter-delete",c.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:I.modifiedHeightInPx,marginDomNode:M,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const U=I.modifiedHeightInPx-I.originalHeightInPx;if(U>0){if(null==L?void 0:L.lineRangeMapping.original.delta(-1).deltaLength(2).contains(I.originalRange.endLineNumberExclusive-1))continue;c.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:U,showInHiddenAreas:!0,suppressMouseDown:!0})}else{if(null==L?void 0:L.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(I.modifiedRange.endLineNumberExclusive-1))continue;function K(){const e=document.createElement("div");return e.className="arrow-revert-change "+ea.asClassName(Qr.arrowRight),fs("div",{},e)}let j;I.diff&&I.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(e)&&(j=K()),u.push({afterLineNumber:I.modifiedRange.endLineNumberExclusive-1,domNode:m(),heightInPx:-U,marginDomNode:j,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const q of null!==(l=p.read(e))&&void 0!==l?l:[]){if(!(null==L?void 0:L.lineRangeMapping.original.intersect(q.originalRange))||!(null==L?void 0:L.lineRangeMapping.modified.intersect(q.modifiedRange)))continue;const $=q.modifiedHeightInPx-q.originalHeightInPx;$>0?c.push({afterLineNumber:q.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:$,showInHiddenAreas:!0,suppressMouseDown:!0}):u.push({afterLineNumber:q.modifiedRange.endLineNumberExclusive-1,domNode:m(),heightInPx:-$,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:c,mod:u}}));this._register(Uj((e=>{const t=PN.capture(this._editors.modified),i=_.read(e);a=!0,this._editors.original.changeViewZones((e=>{for(const t of c)e.removeZone(t);c.clear();for(const t of i.orig){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),c.add(i)}})),this._editors.modified.changeViewZones((e=>{for(const t of u)e.removeZone(t);u.clear();for(const t of i.mod){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),u.add(i)}})),a=!1,t.restore(this._editors.modified)}))),this._register(x((()=>{this._editors.original.changeViewZones((e=>{for(const t of c)e.removeZone(t);c.clear()})),this._editors.modified.changeViewZones((e=>{for(const t of u)e.removeZone(t);u.clear()}))})));let v=!1;this._register(this._editors.original.onDidScrollChange((e=>{e.scrollLeftChanged&&!v&&(v=!0,this._editors.modified.setScrollLeft(e.scrollLeft),v=!1)}))),this._register(this._editors.modified.onDidScrollChange((e=>{e.scrollLeftChanged&&!v&&(v=!0,this._editors.original.setScrollLeft(e.scrollLeft),v=!1)}))),this._originalScrollTop=$j(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=$j(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._register(Hj((e=>{const t=this._originalScrollTop.read(e)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(e))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(e));t!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(t,1)}))),this._register(Hj((e=>{const t=this._modifiedScrollTop.read(e)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(e))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(e));t!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(t,1)}))),this._register(Hj((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);let n=0;if(i){const e=this._editors.original.getTopForLineNumber(i.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();n=this._editors.modified.getTopForLineNumber(i.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-e}n>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(n,void 0)):n<0?(this._modifiedTopPadding.set(-n,void 0),this._originalTopPadding.set(0,void 0)):setTimeout((()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)}),400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-n,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+n,void 0,!0)})))}};function zG(e,t,i,n,s,o){const r=new ec(UG(e,n)),a=new ec(UG(t,s)),l=e.getOption(66),h=t.getOption(66),d=[];let c=0,u=0;function g(e,t){for(;;){let i=r.peek(),n=a.peek();if(i&&i.lineNumber>=e&&(i=void 0),n&&n.lineNumber>=t&&(n=void 0),!i&&!n)break;const s=i?i.lineNumber-c:Number.MAX_VALUE,o=n?n.lineNumber-u:Number.MAX_VALUE;so?(a.dequeue(),i={lineNumber:n.lineNumber-u+c,heightInPx:0}):(r.dequeue(),a.dequeue()),d.push({originalRange:bc.ofLength(i.lineNumber,1),modifiedRange:bc.ofLength(n.lineNumber,1),originalHeightInPx:l+i.heightInPx,modifiedHeightInPx:h+n.heightInPx,diff:void 0})}}for(const p of i){const m=p.lineRangeMapping;g(m.original.startLineNumber,m.modified.startLineNumber);let f=!0,_=m.modified.startLineNumber,v=m.original.startLineNumber;function b(e,t){var i,n,s,o;if(et.lineNumbere+t.heightInPx),0))&&void 0!==n?n:0,m=null!==(o=null===(s=a.takeWhile((e=>e.lineNumbere+t.heightInPx),0))&&void 0!==o?o:0;d.push({originalRange:c,modifiedRange:u,originalHeightInPx:c.length*l+g,modifiedHeightInPx:u.length*h+m,diff:p.lineRangeMapping}),v=e,_=t}if(o)for(const C of m.innerChanges||[])C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&b(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber),C.originalRange.endColumn1&&n.push({lineNumber:a,heightInPx:r*(e-1)})}for(const a of e.getWhitespaces()){if(t.has(a.id))continue;const e=0===a.afterLineNumber?0:o.convertViewPositionToModelPosition(new Ba(a.afterLineNumber,1)).lineNumber;i.push({lineNumber:e,heightInPx:a.height})}return function(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;const s=[];let o=0,r=0;for(;od?(s.push(l),r++):(s.push(n(a,l)),o++,r++)}for(;oe.lineNumber),((e,t)=>({lineNumber:e.lineNumber,heightInPx:e.heightInPx+t.heightInPx})))}HG=WG([VG(5,Xy),VG(6,Hx)],HG);var KG,jG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},qG=function(e,t){return function(i,n){t(i,n,e)}};let $G=KG=class extends E{constructor(e,t,i,n,s,o,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=s,this._modifiedEditorLayoutInfo=o,this._options=r,this._themeService=a;const l=$j(this._themeService.onDidColorThemeChange,(()=>this._themeService.getColorTheme())),h=Pj((e=>{const t=l.read(e);return{insertColor:t.getColor(of)||(t.getColor(nf)||ef).transparent(2),removeColor:t.getColor(rf)||(t.getColor(sf)||tf).transparent(2)}})),d=$j(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),c=$j(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollHeight()));this._register(Uj(((e,t)=>{if(!this._options.renderOverviewRuler.read(e))return;const i=Fk(document.createElement("div"));i.setClassName("diffViewport"),i.setPosition("absolute");const n=Ns("div.diffOverview",{style:{position:"absolute",top:"0px",width:KG.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;t.add(h$(n,i.domNode)),t.add(Mn(n,os.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)}))),t.add(En(n,os.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),t.add(h$(this._rootElement,n)),t.add(Uj(((e,t)=>{const s=this._diffModel.read(e),o=this._editors.original.createOverviewRuler("original diffOverviewRuler");o&&(t.add(o),t.add(h$(n,o.getDomNode())));const r=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(r&&(t.add(r),t.add(h$(n,r.getDomNode()))),!o||!r)return;const a=Zj("viewZoneChanged",this._editors.original.onDidChangeViewZones),l=Zj("viewZoneChanged",this._editors.modified.onDidChangeViewZones),u=Zj("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),g=Zj("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add(Hj((e=>{var t;a.read(e),l.read(e),u.read(e),g.read(e);const i=h.read(e),n=null===(t=null==s?void 0:s.diff.read(e))||void 0===t?void 0:t.mappings;function d(e,t,i){const n=i._getViewModel();return n?e.filter((e=>e.length>0)).map((e=>{const i=n.coordinatesConverter.convertModelPositionToViewPosition(new Ba(e.startLineNumber,1)),s=n.coordinatesConverter.convertModelPositionToViewPosition(new Ba(e.endLineNumberExclusive,1)),o=s.lineNumber-i.lineNumber;return new TP(i.lineNumber,s.lineNumber,o,t.toString())})):[]}const c=d((n||[]).map((e=>e.lineRangeMapping.original)),i.removeColor,this._editors.original),p=d((n||[]).map((e=>e.lineRangeMapping.modified)),i.insertColor,this._editors.modified);null==o||o.setZones(c),null==r||r.setZones(p)}))),t.add(Hj((e=>{const t=this._rootHeight.read(e),s=this._rootWidth.read(e),a=this._modifiedEditorLayoutInfo.read(e);if(a){const n=KG.ENTIRE_DIFF_OVERVIEW_WIDTH-2*KG.ONE_OVERVIEW_WIDTH;o.setLayout({top:0,height:t,right:n+KG.ONE_OVERVIEW_WIDTH,width:KG.ONE_OVERVIEW_WIDTH}),r.setLayout({top:0,height:t,right:0,width:KG.ONE_OVERVIEW_WIDTH});const s=d.read(e),l=c.read(e),h=this._editors.modified.getOption(102),u=new bD(h.verticalHasArrows?h.arrowSize:0,h.verticalScrollbarSize,0,a.height,l,s);i.setTop(u.getSliderPosition()),i.setHeight(u.getSliderSize())}else i.setTop(0),i.setHeight(0);n.style.height=t+"px",n.style.left=s-KG.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",i.setWidth(KG.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))})))}};$G.ONE_OVERVIEW_WIDTH=15,$G.ENTIRE_DIFF_OVERVIEW_WIDTH=2*KG.ONE_OVERVIEW_WIDTH,$G=KG=jG([qG(7,R_)],$G);Sp("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},ue(0,"The border color for text that got moved in the diff editor.")),Sp("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},ue(0,"The active border color for text that got moved in the diff editor."));class GG extends E{constructor(){super(...arguments),this._id=++GG.idCounter,this._onDidDispose=this._register(new U),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}GG.idCounter=0;var ZG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},YG=function(e,t){return function(i,n){t(i,n,e)}};let XG=class extends E{constructor(e,t,i,n,s,o,r){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._createInnerEditor=s,this._instantiationService=o,this._keybindingService=r,this._onDidContentSizeChange=this._register(new U),this.original=this._register(this._createLeftHandSideEditor(i.editorOptions.get(),n.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(i.editorOptions.get(),n.modifiedEditor||{})),this.modifiedModel=$j(this.modified.onDidChangeModel,(()=>this.modified.getModel())),this._register(zj({createEmptyChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)},((e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))})))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange((e=>{const t=this.original.getContentWidth()+this.modified.getContentWidth()+$G.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),s}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=qS.revealHorizontalRightPadding.defaultValue+$G.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t=Object.assign(Object.assign({},e),{dimension:{height:0,width:0}});return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");const i=ue(0," use {0} to open the accessibility help.",null===(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))||void 0===t?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+i:e?e.replaceAll(i,""):""}};XG=ZG([YG(5,Oa),YG(6,PL)],XG);class QG{get editorOptions(){return this._options}constructor(e,t){this.diffEditorWidth=t,this.couldShowInlineViewBecauseOfSize=Pj(this,(e=>this._options.read(e).renderSideBySide&&this.diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint)),this.renderOverviewRuler=Pj(this,(e=>this._options.read(e).renderOverviewRuler)),this.renderSideBySide=Pj(this,(e=>this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)))),this.readOnly=Pj(this,(e=>this._options.read(e).readOnly)),this.shouldRenderRevertArrows=Pj(this,(e=>!!this._options.read(e).renderMarginRevertIcon&&(!!this.renderSideBySide.read(e)&&!this.readOnly.read(e)))),this.renderIndicators=Pj(this,(e=>this._options.read(e).renderIndicators)),this.enableSplitViewResizing=Pj(this,(e=>this._options.read(e).enableSplitViewResizing)),this.splitViewDefaultRatio=Pj(this,(e=>this._options.read(e).splitViewDefaultRatio)),this.ignoreTrimWhitespace=Pj(this,(e=>this._options.read(e).ignoreTrimWhitespace)),this.maxComputationTimeMs=Pj(this,(e=>this._options.read(e).maxComputationTime)),this.showMoves=Pj(this,(e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e))),this.isInEmbeddedEditor=Pj(this,(e=>this._options.read(e).isInEmbeddedEditor)),this.diffWordWrap=Pj(this,(e=>this._options.read(e).diffWordWrap)),this.originalEditable=Pj(this,(e=>this._options.read(e).originalEditable)),this.diffCodeLens=Pj(this,(e=>this._options.read(e).diffCodeLens)),this.accessibilityVerbose=Pj(this,(e=>this._options.read(e).accessibilityVerbose)),this.diffAlgorithm=Pj(this,(e=>this._options.read(e).diffAlgorithm)),this.showEmptyDecorations=Pj(this,(e=>this._options.read(e).experimental.showEmptyDecorations)),this.onlyShowAccessibleDiffViewer=Pj(this,(e=>this._options.read(e).onlyShowAccessibleDiffViewer)),this.hideUnchangedRegions=Pj(this,(e=>this._options.read(e).hideUnchangedRegions.enabled)),this.hideUnchangedRegionsRevealLineCount=Pj(this,(e=>this._options.read(e).hideUnchangedRegions.revealLineCount)),this.hideUnchangedRegionsContextLineCount=Pj(this,(e=>this._options.read(e).hideUnchangedRegions.contextLineCount)),this.hideUnchangedRegionsMinimumLineCount=Pj(this,(e=>this._options.read(e).hideUnchangedRegions.minimumLineCount));const i=Object.assign(Object.assign({},e),JG(e,hS));this._options=Mj(this,i)}updateOptions(e){const t=JG(e,this._options.get()),i=Object.assign(Object.assign(Object.assign({},this._options.get()),e),t);this._options.set(i,void 0,{changedOptions:e})}}function JG(e,t){var i,n,s,o,r,a,l,h;return{enableSplitViewResizing:_S(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:wS(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:_S(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:_S(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:bS(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:bS(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:_S(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:_S(e.renderIndicators,t.renderIndicators),originalEditable:_S(e.originalEditable,t.originalEditable),diffCodeLens:_S(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:_S(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:LS(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:LS(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:_S(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:_S(null===(i=e.experimental)||void 0===i?void 0:i.showMoves,t.experimental.showMoves),showEmptyDecorations:_S(null===(n=e.experimental)||void 0===n?void 0:n.showEmptyDecorations,t.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:_S(null!==(o=null===(s=e.hideUnchangedRegions)||void 0===s?void 0:s.enabled)&&void 0!==o?o:null===(r=e.experimental)||void 0===r?void 0:r.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:bS(null===(a=e.hideUnchangedRegions)||void 0===a?void 0:a.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:bS(null===(l=e.hideUnchangedRegions)||void 0===l?void 0:l.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:bS(null===(h=e.hideUnchangedRegions)||void 0===h?void 0:h.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:_S(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:_S(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:bS(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:_S(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited)}}var eZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},tZ=function(e,t){return function(i,n){t(i,n,e)}};let iZ=class extends GG{constructor(e,t,i,n,s,o,r,a){var l;super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=s,this._audioCueService=r,this._editorProgressService=a,this.elements=Ns("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[Ns("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[fs("span",{},"No Changes")]),Ns("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),Ns("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),Ns("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=this._register(Rj("diffModel",void 0)),this.onDidChangeModel=B.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new SB([Rl,this._contextKeyService])),this._boundarySashes=Mj(this,void 0),this._accessibleDiffViewerShouldBeVisible=Mj(this,!1),this._accessibleDiffViewerVisible=Pj(this,(e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e))),this.movedBlocksLinesPart=Mj(this,void 0),this._layoutInfo=Pj(this,(e=>{var t,i,n;const s=this._rootSizeObserver.width.read(e),o=this._rootSizeObserver.height.read(e),r=null===(t=this._sash.read(e))||void 0===t?void 0:t.sashLeft.read(e),a=null!=r?r:Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),l=s-a-(this._options.renderOverviewRuler.read(e)?$G.ENTIRE_DIFF_OVERVIEW_WIDTH:0),h=a-(null!==(n=null===(i=this.movedBlocksLinesPart.read(e))||void 0===i?void 0:i.width.read(e))&&void 0!==n?n:0);return this.elements.original.style.width=h+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=l+"px",this.elements.modified.style.left=a+"px",this._editors.original.layout({width:h,height:o}),this._editors.modified.layout({width:l,height:o}),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}})),this._diffValue=this._diffModel.map(((e,t)=>null==e?void 0:e.diff.read(t))),this.onDidUpdateDiff=B.fromObservableLight(this._diffValue),o.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(x((()=>this._domElement.removeChild(this.elements.root)))),this._rootSizeObserver=this._register(new d$(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(null!==(l=t.automaticLayout)&&void 0!==l&&l),this._options=new QG(t,this._rootSizeObserver.width),this._contextKeyService.createKey(Rh.isEmbeddedDiffEditor.key,!1);const h=Rh.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this._register(Hj((e=>{h.set(this._options.isInEmbeddedEditor.read(e))})));const d=Rh.comparingMovedCode.bindTo(this._contextKeyService);this._register(Hj((e=>{var t;d.set(!!(null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e)))})));const c=Rh.diffEditorRenderSideBySideInlineBreakpointReached.bindTo(this._contextKeyService);this._register(Hj((e=>{c.set(this._options.couldShowInlineViewBecauseOfSize.read(e))}))),this._editors=this._register(this._instantiationService.createInstance(XG,this.elements.original,this.elements.modified,this._options,i,((e,t,i,n)=>this._createInnerEditor(e,t,i,n)))),this._sash=Bj(this,((e,t)=>{const i=this._options.renderSideBySide.read(e);if(this.elements.root.classList.toggle("side-by-side",i),!i)return;const n=t.add(new iG(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((e,t)=>e-(this._options.renderOverviewRuler.read(t)?$G.ENTIRE_DIFF_OVERVIEW_WIDTH:0)))}));return t.add(Hj((e=>{const t=this._boundarySashes.read(e);t&&n.setBoundarySashes(t)}))),n})),this._register(Jj(this._sash)),this._register(Uj(((e,t)=>{this.unchangedRangesFeature=t.add(this._instantiationService.createInstance(f$(dG,e),this._editors,this._diffModel,this._options))}))),this._register(Uj(((e,t)=>{t.add(new(f$(tG,e))(this._editors,this._diffModel,this._options))}))),this._register(Uj(((e,t)=>{t.add(this._instantiationService.createInstance(f$(HG,e),this._editors,this._diffModel,this._options,this,(()=>this.unchangedRangesFeature.isUpdatingViewZones)))}))),this._register(Uj(((e,t)=>{t.add(this._instantiationService.createInstance(f$($G,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((e=>e.modifiedEditor)),this._options))}))),this._register(Uj(((e,t)=>{this._accessibleDiffViewer=t.add(this._register(this._instantiationService.createInstance(f$(E$,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t)),this._options.onlyShowAccessibleDiffViewer.map((e=>!e)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((e,t)=>{var i;return null===(i=null==e?void 0:e.diff.read(t))||void 0===i?void 0:i.mappings.map((e=>e.lineRangeMapping))})),this._editors)))})));const u=this._accessibleDiffViewerVisible.map((e=>e?"hidden":"visible"));this._register(m$(this.elements.modified,{visibility:u})),this._register(m$(this.elements.original,{visibility:u})),this._createDiffEditorContributions(),o.addDiffEditor(this),this._register(Jj(this._layoutInfo)),this._register(Uj(((e,t)=>{this.movedBlocksLinesPart.set(t.add(new(f$(Q$,e))(this.elements.root,this._diffModel,this._layoutInfo.map((e=>e.originalEditor)),this._layoutInfo.map((e=>e.modifiedEditor)),this._editors)),void 0)}))),this._register(m$(this.elements.overlay,{width:this._layoutInfo.map(((e,t)=>e.originalEditor.width+(this._options.renderSideBySide.read(t)?0:e.modifiedEditor.width))),visibility:Pj((e=>{var t,i;return this._options.hideUnchangedRegions.read(e)&&0===(null===(i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e))||void 0===i?void 0:i.mappings.length)?"visible":"hidden"}))})),this._register(this._editors.modified.onMouseDown((e=>{var t,i;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("arrow-revert-change"))){const t=e.target.position.lineNumber,n=e.target,s=this._diffModel.get();if(!s)return;const o=null===(i=s.diff.get())||void 0===i?void 0:i.mappings;if(!o)return;const r=o.find((e=>(null==n?void 0:n.detail.afterLineNumber)===e.lineRangeMapping.modified.startLineNumber-1||e.lineRangeMapping.modified.startLineNumber===t));if(!r)return;this.revert(r.lineRangeMapping),e.event.stopPropagation()}}))),this._register(B.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>{var t,i;if(3===(null==e?void 0:e.reason)){const n=null===(i=null===(t=this._diffModel.get())||void 0===t?void 0:t.diff.get())||void 0===i?void 0:i.mappings.find((t=>t.lineRangeMapping.modified.contains(e.position.lineNumber)));(null==n?void 0:n.lineRangeMapping.modified.isEmpty)?this._audioCueService.playAudioCue(y$.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):(null==n?void 0:n.lineRangeMapping.original.isEmpty)?this._audioCueService.playAudioCue(y$.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):n&&this._audioCueService.playAudioCue(y$.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}})));const g=this._diffModel.map(((e,t)=>null==e?void 0:e.isDiffUpToDate.read(t)));this._register(Uj(((e,t)=>{if(!1===g.read(e)){const e=this._editorProgressService.show(!0,1e3);t.add(x((()=>e.done())))}})))}_createInnerEditor(e,t,i,n){return e.createInstance(XB,t,i,n)}_createDiffEditorContributions(){const e=kh.getDiffEditorContributions();for(const i of e)try{this._register(this._instantiationService.createInstance(i.ctor,this))}catch(t){r(t)}}get _targetEditor(){return this._editors.modified}getEditorType(){return sF.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;return{original:this._editors.original.saveViewState(),modified:this._editors.modified.saveViewState(),modelState:null===(e=this._diffModel.get())||void 0===e?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const i=e;this._editors.original.restoreViewState(i.original),this._editors.modified.restoreViewState(i.modified),i.modelState&&(null===(t=this._diffModel.get())||void 0===t||t.restoreSerializedState(i.modelState))}}createViewModel(e){return this._instantiationService.createInstance(DG,e,this._options,this)}getModel(){var e,t;return null!==(t=null===(e=this._diffModel.get())||void 0===e?void 0:e.model)&&void 0!==t?t:null}setModel(e){!e&&this._diffModel.get()&&this._accessibleDiffViewer.close();const t=e?"model"in e?e:this.createViewModel(e):void 0;this._editors.original.setModel(t?t.model.original:null),this._editors.modified.setModel(t?t.model.modified:null),Dj((e=>{this._diffModel.set(t,e)}))}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.diff.get();return t?t.mappings.map((e=>{const t=e.lineRangeMapping;let i,n,s,o,r=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,r=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(s=t.modified.startLineNumber-1,o=0,r=void 0):(s=t.modified.startLineNumber,o=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:s,modifiedEndLineNumber:o,charChanges:null==r?void 0:r.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}})):null}revert(e){var t;const i=null===(t=this._diffModel.get())||void 0===t?void 0:t.model;if(!i)return;const n=e.innerChanges?e.innerChanges.map((e=>({range:e.modifiedRange,text:i.original.getValueInRange(e.originalRange)}))):[{range:e.modified.toExclusiveRange(),text:i.original.getValueInRange(e.original.toExclusiveRange())}];this._editors.modified.executeEdits("diffEditor",n)}accessibleDiffViewerNext(){this._accessibleDiffViewer.next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.prev()}mapToOtherSide(){var e,t;const i=this._editors.modified.hasWidgetFocus(),n=i?this._editors.modified:this._editors.original,s=i?this._editors.original:this._editors.modified;let o;const r=n.getSelection();if(r){const n=null===(t=null===(e=this._diffModel.get())||void 0===e?void 0:e.diff.get())||void 0===t?void 0:t.mappings.map((e=>i?e.lineRangeMapping.flip():e.lineRangeMapping));if(n){const e=nZ(r.getStartPosition(),n),t=nZ(r.getEndPosition(),n);o=Mh.plusRange(e,t)}}return{destination:s,destinationSelection:o}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.unchangedRegions.get();t&&Dj((e=>{for(const i of t)i.collapseAll(e)}))}showAllUnchangedRegions(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.unchangedRegions.get();t&&Dj((e=>{for(const i of t)i.showAll(e)}))}};function nZ(e,t){const i=uc(t,(t=>t.original.startLineNumber<=e.lineNumber));if(!i)return Mh.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){const t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return Mh.fromPositions(new Ba(t,e.column))}if(!i.innerChanges)return Mh.fromPositions(new Ba(i.modified.startLineNumber,1));const n=uc(i.innerChanges,(t=>t.originalRange.getStartPosition().isBeforeOrEqual(e)));if(!n){const t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return Mh.fromPositions(new Ba(t,e.column))}if(n.originalRange.containsPosition(e))return n.modifiedRange;{const t=(r=n.originalRange.getEndPosition(),a=e,r.lineNumber===a.lineNumber?new ug(0,a.column-r.column):new ug(a.lineNumber-r.lineNumber,a.column-1));return Mh.fromPositions((s=n.modifiedRange.getEndPosition(),0===(o=t).lineCount?new Ba(s.lineNumber,s.column+o.columnCount):new Ba(s.lineNumber+o.lineCount,o.columnCount+1)))}var s,o,r,a}iZ=eZ([tZ(3,Rl),tZ(4,Oa),tZ(5,Fa),tZ(6,b$),tZ(7,mL)],iZ);oh(class extends sh{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:ue(0,"Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:Qr.map,toggled:ul.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:ul.has("isInDiffEditor"),menu:{when:ul.has("isInDiffEditor"),id:Ql.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(uu),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}});class sZ extends sh{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:ue(0,"Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:ul.has("isInDiffEditor")})}run(e,...t){const i=e.get(uu),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}oh(sZ);class oZ extends sh{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:ue(0,"Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:ul.has("isInDiffEditor")})}run(e,...t){const i=e.get(uu),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}oh(oZ),th.appendMenuItem(Ql.EditorTitle,{command:{id:(new oZ).desc.id,title:ue(0,"Use Inline View When Space Is Limited"),toggled:ul.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:ul.has("isInDiffEditor")},order:11,group:"1_diff",when:ul.and(Rh.diffEditorRenderSideBySideInlineBreakpointReached,ul.has("isInDiffEditor"))}),th.appendMenuItem(Ql.EditorTitle,{command:{id:(new sZ).desc.id,title:ue(0,"Show Moved Code Blocks"),icon:Qr.move,toggled:_l.create("config.diffEditor.experimental.showMoves",!0),precondition:ul.has("isInDiffEditor")},order:10,group:"1_diff",when:ul.has("isInDiffEditor")});const rZ={value:ue(0,"Diff Editor"),original:"Diff Editor"};oh(class extends bh{constructor(){super({id:"diffEditor.switchSide",title:{value:ue(0,"Switch Side"),original:"Switch Side"},icon:Qr.arrowSwap,precondition:ul.has("isInDiffEditor"),f1:!0,category:rZ})}runEditorCommand(e,t,i){const n=dZ(e);if(n instanceof iZ){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}});oh(class extends bh{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:ue(0,"Exit Compare Move"),original:"Exit Compare Move"},icon:Qr.close,precondition:Rh.comparingMovedCode,f1:!1,category:rZ,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=dZ(e);n instanceof iZ&&n.exitCompareMove()}});oh(class extends bh{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:ue(0,"Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:Qr.fold,precondition:ul.has("isInDiffEditor"),f1:!0,category:rZ})}runEditorCommand(e,t,...i){const n=dZ(e);n instanceof iZ&&n.collapseAllUnchangedRegions()}});oh(class extends bh{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:ue(0,"Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:Qr.unfold,precondition:ul.has("isInDiffEditor"),f1:!0,category:rZ})}runEditorCommand(e,t,...i){const n=dZ(e);n instanceof iZ&&n.showAllUnchangedRegions()}});const aZ={value:ue(0,"Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class lZ extends sh{constructor(){super({id:lZ.id,title:{value:ue(0,"Go to Next Difference"),original:"Go to Next Difference"},category:aZ,precondition:ul.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=dZ(e);null==t||t.accessibleDiffViewerNext()}}lZ.id="editor.action.accessibleDiffViewer.next",th.appendMenuItem(Ql.EditorTitle,{command:{id:lZ.id,title:ue(0,"Open Accessible Diff Viewer"),precondition:ul.has("isInDiffEditor")},order:10,group:"2_diff",when:ul.and(Rh.accessibleDiffViewerVisible.negate(),ul.has("isInDiffEditor"))});class hZ extends sh{constructor(){super({id:hZ.id,title:{value:ue(0,"Go to Previous Difference"),original:"Go to Previous Difference"},category:aZ,precondition:ul.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=dZ(e);null==t||t.accessibleDiffViewerPrev()}}function dZ(e){var t;const i=e.get(Fa),n=i.listDiffEditors(),s=null!==(t=i.getFocusedCodeEditor())&&void 0!==t?t:i.getActiveCodeEditor();if(!s)return null;for(let r=0,a=n.length;rthis.selection.endLineNumber?this.targetSelection=new Th(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(gZ(e)&&(this._modifierPressed=!0),this._mouseDown&&gZ(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(gZ(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===pZ.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(null===this._dragSelection){const e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}gZ(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new Ba(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:s}=e;i=[new Th(n,s,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new Th(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(gZ(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(pZ.ID,new uZ(this._dragSelection,t,gZ(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new Mh(e.lineNumber,e.column,e.lineNumber,e.column),options:pZ._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}pZ.ID="editor.contrib.dragAndDrop",pZ.TRIGGER_KEY_VALUE=Pe?6:5,pZ._DECORATION_OPTIONS=xw.register({description:"dnd-target",className:"dnd-target"}),Lh(pZ.ID,pZ,2);var mZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fZ=function(e,t){return function(i,n){t(i,n,e)}},_Z=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class vZ{remove(){var e;null===(e=this.parent)||void 0===e||e.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;void 0!==t.children.get(n);s++)n=`${i}_${s}`;return n}static empty(e){return 0===e.children.size}}class bZ extends vZ{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class CZ extends vZ{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class wZ extends vZ{static create(e,t,i){const n=new Uh(i),s=new wZ(t.uri),o=e.ordered(t),r=o.map(((e,i)=>{var o;const r=vZ.findId(`provider_${i}`,s),l=new CZ(r,s,null!==(o=e.displayName)&&void 0!==o?o:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,n.token)).then((e=>{for(const t of e||[])wZ._makeOutlineElement(t,l);return l}),(e=>(a(e),l))).then((e=>{vZ.empty(e)?e.remove():s._groups.set(r,e)}))})),l=e.onDidChange((()=>{Id(e.ordered(t),o)||n.cancel()}));return Promise.all(r).then((()=>n.token.isCancellationRequested&&!i.isCancellationRequested?wZ.create(e,t,i):s._compact())).finally((()=>{n.dispose(),l.dispose(),n.dispose()}))}static _makeOutlineElement(e,t){const i=vZ.findId(e,t),n=new bZ(i,t,e);if(e.children)for(const s of e.children)wZ._makeOutlineElement(s,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=v.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof bZ?e.push(t.symbol):e.push(...v.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>Mh.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return wZ._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>Ba.compare(Mh.getStartPosition(e.range),Mh.getStartPosition(t.range))||Ba.compare(Mh.getEndPosition(t.range),Mh.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&wZ._flattenDocumentSymbols(e,n.children,n.name)}}const yZ=Pa("IOutlineModelService");let SZ=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new N,this._cache=new Ks(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return _Z(this,void 0,void 0,(function*(){const i=this._languageFeaturesService.documentSymbolProvider,n=i.ordered(e);let s=this._cache.get(e.id);if(!s||s.versionId!==e.getVersionId()||!Id(s.provider,n)){const t=new Uh;s={versionId:e.getVersionId(),provider:n,promiseCnt:0,source:t,promise:wZ.create(i,e,t.token),model:void 0},this._cache.set(e.id,s);const o=Date.now();s.promise.then((t=>{s.model=t,this._debounceInformation.update(e,Date.now()-o)})).catch((t=>{this._cache.delete(e.id)}))}if(s.model)return s.model;s.promiseCnt+=1;const o=t.onCancellationRequested((()=>{0==--s.promiseCnt&&(s.source.cancel(),this._cache.delete(e.id))}));try{return yield s.promise}finally{o.dispose()}}))}};SZ=mZ([fZ(0,iL),fZ(1,CE),fZ(2,Wa)],SZ),Cu(yZ,SZ,1);var LZ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};Za.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return LZ(this,void 0,void 0,(function*(){const[i]=t;jr(an.isUri(i));const n=e.get(yZ),s=e.get(Va),o=yield s.createModelReference(i);try{return(yield n.getOrCreate(o.object.textEditorModel,Hh.None)).getTopLevelSymbols()}finally{o.dispose()}}))}));const kZ=function(){if("object"==typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;tDZ(this,void 0,void 0,(function*(){return e})),asFile:()=>{},value:"string"==typeof e?e:void 0}}class NZ{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return v.some(this,(([e,t])=>t.asFile()))&&t.push("files"),MZ(EZ(e),t)}get(e){var t;return null===(t=this._entries.get(this.toKey(e)))||void 0===t?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return EZ(e)}}function EZ(e){return e.toLowerCase()}function IZ(e,t){return MZ(EZ(e),t.map(EZ))}function MZ(e,t){if("*/*"===e)return t.length>0;if(t.includes(e))return!0;const i=e.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,s,o]=i;return"*"===o&&t.some((e=>e.startsWith(s+"/")))}const TZ=Object.freeze({create:e=>Vd(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>TZ.split(e).filter((e=>!e.startsWith("#")))}),RZ="CodeEditors",AZ="CodeFiles";Ul.add("workbench.contributions.dragAndDrop",new class{});class OZ{constructor(){}static getInstance(){return OZ.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}OZ.INSTANCE=new OZ;var PZ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function FZ(e){const t=new NZ;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,xZ(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,BZ(n))}}return t}function BZ(e){const t=e.path?an.parse(e.path):void 0;return function(e,t,i){const n={id:kZ(),name:e,uri:t,data:i};return{asString:()=>DZ(this,void 0,void 0,(function*(){return""})),asFile:()=>n,value:void 0}}(e.name,t,(()=>PZ(this,void 0,void 0,(function*(){return new Uint8Array(yield e.arrayBuffer())}))))}const WZ=Object.freeze([RZ,AZ,sD.RESOURCES,sD.INTERNAL_URI_LIST]);function VZ(e,t=!1){const i=FZ(e),n=i.get(sD.INTERNAL_URI_LIST);if(n)i.replace(yu.uriList,n);else if(t||!i.has(yu.uriList)){const t=[];for(const i of e.items){const e=i.getAsFile();if(e){const i=e.path;try{i?t.push(an.file(i).toString()):t.push(an.parse(e.name,!0).toString())}catch(ge){}}}t.length&&i.replace(yu.uriList,xZ(TZ.create(t)))}for(const s of WZ)i.delete(s);return i}function HZ(e){var t;function i(e,t){return"providerId"in e&&e.providerId===t.providerId||"mimeType"in e&&e.mimeType===t.handledMimeType}const n=new Map;for(const r of e)for(const s of null!==(t=r.yieldTo)&&void 0!==t?t:[])for(const t of e)if(t!==r&&i(s,t)){let e=n.get(r);e||(e=[],n.set(r,e)),e.push(t)}if(!n.size)return Array.from(e);const s=new Set,o=[];return function e(t){if(!t.length)return[];const i=t[0];if(o.includes(i))return console.warn(`Yield to cycle detected for ${i.providerId}`),t;if(s.has(i))return e(t.slice(1));let r=[];const a=n.get(i);return a&&(o.push(i),r=e(a),o.pop()),s.add(i),[...r,i,...e(t.slice(1))]}(Array.from(e))}var zZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},UZ=function(e,t){return function(i,n){t(i,n,e)}},KZ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const jZ=xw.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:"\xa0",inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class qZ extends E{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=fs(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=fs("span.icon");this.domNode.append(t),t.classList.add(...ea.asClassNameArray(Qr.loading),"codicon-modifier-spin");const i=()=>{const e=this.editor.getOption(66);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};i(),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(52)||e.hasChanged(66))&&i()}))),this._register(En(this.domNode,os.CLICK,(e=>{this.delegate.cancel()})))}getId(){return qZ.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}qZ.baseId="editor.widget.inlineProgressWidget";let $Z=class extends E{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new I),this._currentWidget=new I,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,i){return KZ(this,void 0,void 0,(function*(){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=ed((()=>{const n=Mh.fromPositions(e);this._currentDecorations.set([{range:n,options:jZ}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(qZ,this.id,this._editor,n,t,i))}),this._showDelay);try{return yield i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}}))}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};$Z=zZ([UZ(2,Oa)],$Z);rc.white.toString(),rc.white.toString();class GZ extends E{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new U),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,n=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=n||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),e.appendChild(this._element),this._register(qL.addTarget(this._element)),[os.CLICK,KL.Tap].forEach((e=>{this._register(En(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):as(e)})))})),this._register(En(this._element,os.KEY_DOWN,(e=>{const t=new St(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&as(t,!0)}))),this._register(En(this._element,os.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register(En(this._element,os.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register(hs(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of ok(e))if("string"==typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t,i,n;if(this._label===e)return;if(Ta(this._label)&&Ta(e)&&((i=this._label)===(n=e)||i&&n&&i.value===n.value&&i.isTrusted===n.isTrusted&&i.supportThemeIcons===n.supportThemeIcons&&i.supportHtml===n.supportHtml&&(i.baseUri===n.baseUri||i.baseUri&&n.baseUri&&_a(an.from(i.baseUri),an.from(n.baseUri)))))return;this._element.classList.add("monaco-text-button");const s=this.options.supportShortLabel?this._labelElement:this._element;if(Ta(e)){const i=mk(e,{inline:!0});i.dispose();const n=null===(t=i.element.querySelector("p"))||void 0===t?void 0:t.innerHTML;if(n){const e=ki(n,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});s.innerHTML=e}else us(s)}else this.options.supportIcons?us(s,...this.getContentElements(e)):s.textContent=e;"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=Ck(e)),this._label=e}get label(){return this._label}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var ZZ,YZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},XZ=function(e,t){return function(i,n){t(i,n,e)}},QZ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let JZ=ZZ=class extends E{constructor(e,t,i,n,s,o,r,a,l,h){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=o,this.onSelectNewEdit=r,this._contextMenuService=a,this._keybindingService=h,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(l),this.visibleContext.set(!0),this._register(x((()=>this.visibleContext.reset()))),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(x((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition((e=>{s.containsPosition(e.position)||this.dispose()}))),this._register(B.runAndSubscribe(h.onDidUpdateKeybindings,(()=>{this._updateButtonTitle()})))}_updateButtonTitle(){var e;const t=null===(e=this._keybindingService.lookupKeybinding(this.showCommand.id))||void 0===e?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=fs(".post-edit-widget"),this.button=this._register(new GZ(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(En(this.domNode,os.CLICK,(()=>this.showSelector())))}getId(){return ZZ.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Hn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map(((e,t)=>$a({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}})))})}};JZ.baseId="editor.widget.postEditWidget",JZ=ZZ=YZ([XZ(7,Hx),XZ(8,Rl),XZ(9,PL)],JZ);let eY=class extends E{constructor(e,t,i,n,s,o){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=o,this._currentWidget=this._register(new I),this._register(B.any(t.onDidChangeModel,t.onDidChangeModelContent)((()=>this.clear())))}applyEditAndShowIfNeeded(e,t,i,n){var s,o;return QZ(this,void 0,void 0,(function*(){const r=this._editor.getModel();if(!r||!e.length)return;const a=t.allEdits[t.activeEditIndex];if(!a)return;let l=[];l=("string"==typeof a.insertText?""===a.insertText:""===a.insertText.snippet)?[]:e.map((e=>new eL(r.uri,"string"==typeof a.insertText?{range:e,text:a.insertText,insertAsSnippet:!1}:{range:e,text:a.insertText.snippet,insertAsSnippet:!0})));const h={edits:[...l,...null!==(o=null===(s=a.additionalEdit)||void 0===s?void 0:s.edits)&&void 0!==o?o:[]]},d=e[0],c=r.deltaDecorations([],[{range:d,options:{description:"paste-line-suffix",stickiness:0}}]);let u,g;try{u=yield this._bulkEditService.apply(h,{editor:this._editor,token:n}),g=r.getDecorationRange(c[0])}finally{r.deltaDecorations(c,[])}i&&u.isApplied&&t.allEdits.length>1&&this.show(null!=g?g:d,t,(s=>QZ(this,void 0,void 0,(function*(){const o=this._editor.getModel();o&&(yield o.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:s,allEdits:t.allEdits},i,n))}))))}))}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(JZ,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;null===(e=this._currentWidget.value)||void 0===e||e.showSelector()}};eY=YZ([XZ(4,Oa),XZ(5,QS)],eY);var tY,iY=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},nY=function(e,t){return function(i,n){t(i,n,e)}},sY=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const oY="editor.changePasteType",rY=new Tl("pasteWidgetVisible",!1,ue(0,"Whether the paste widget is showing")),aY="application/vnd.code.copyMetadata";let lY=tY=class extends E{static get(e){return e.getContribution(tY.ID)}constructor(e,t,i,n,s,o,r){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=s,this._quickInputService=o,this._progressService=r,this._editor=e;const a=e.getContainerDomNode();this._register(En(a,"copy",(e=>this.handleCopy(e)))),this._register(En(a,"cut",(e=>this.handleCopy(e)))),this._register(En(a,"paste",(e=>this.handlePaste(e)),!0)),this._pasteProgressManager=this._register(new $Z("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(eY,"pasteIntoEditor",e,rY,{id:oY,label:ue(0,"Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},Qn().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(e){var t,i;if(!this._editor.hasTextFocus())return;if(We&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled())return;const n=this._editor.getModel(),s=this._editor.getSelections();if(!n||!(null==s?void 0:s.length))return;const o=this._editor.getOption(37);let r=s;const a=1===s.length&&s[0].isEmpty();if(a){if(!o)return;r=[new Mh(r[0].startLineNumber,1,r[0].startLineNumber,1+n.getLineLength(r[0].startLineNumber))]}const l=null===(t=this._editor._getViewModel())||void 0===t?void 0:t.getPlainTextToCopy(s,o,Oe),h={multicursorText:Array.isArray(l)?l:null,pasteOnNewLine:a,mode:null},d=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter((e=>!!e.prepareDocumentPaste));if(!d.length)return void this.setCopyMetadata(e.clipboardData,{defaultPastePayload:h});const c=FZ(e.clipboardData),u=d.flatMap((e=>{var t;return null!==(t=e.copyMimeTypes)&&void 0!==t?t:[]})),g=kZ();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:u,defaultPastePayload:h});const p=Gh((e=>sY(this,void 0,void 0,(function*(){const t=Pd(yield Promise.all(d.map((t=>sY(this,void 0,void 0,(function*(){try{return yield t.prepareDocumentPaste(n,r,c,e)}catch(i){return void console.error(i)}}))))));t.reverse();for(const e of t)for(const[t,i]of e)c.replace(t,i);return c}))));null===(i=this._currentCopyOperation)||void 0===i||i.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:p}}handlePaste(e){var t,i;return sY(this,void 0,void 0,(function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;null===(t=this._currentPasteOperation)||void 0===t||t.cancel(),this._currentPasteOperation=void 0;const n=this._editor.getModel(),s=this._editor.getSelections();if(!(null==s?void 0:s.length)||!n)return;if(!this.isPasteAsEnabled())return;const o=this.fetchCopyMetadata(e),r=VZ(e.clipboardData);r.delete(aY);const a=[...e.clipboardData.types,...null!==(i=null==o?void 0:o.providerCopyMimeTypes)&&void 0!==i?i:[],yu.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter((e=>{var t;return null===(t=e.pasteMimeTypes)||void 0===t?void 0:t.some((e=>IZ(e,a)))}));l.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,l,s,r,o):this.doPasteInline(l,s,r,o))}))}doPasteInline(e,t,i,n){const s=Gh((o=>sY(this,void 0,void 0,(function*(){const r=this._editor;if(!r.hasModel())return;const a=r.getModel(),l=new aL(r,3,void 0,o);try{if(yield this.mergeInDataFromCopy(i,n,l.token),l.token.isCancellationRequested)return;const s=e.filter((e=>hY(e,i)));if(!s.length||1===s.length&&"text"===s[0].id)return void(yield this.applyDefaultPasteHandler(i,n,l.token));const o=yield this.getPasteEdits(s,i,a,t,l.token);if(l.token.isCancellationRequested)return;if(1===o.length&&"text"===o[0].providerId)return void(yield this.applyDefaultPasteHandler(i,n,l.token));if(o.length){const e="afterPaste"===r.getOption(84).showPasteSelector;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:o},e,l.token)}yield this.applyDefaultPasteHandler(i,n,l.token)}finally{l.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}))));this._pasteProgressManager.showWhile(t[0].getEndPosition(),ue(0,"Running paste handlers. Click to cancel"),s),this._currentPasteOperation=s}showPasteAsPick(e,t,i,n,s){const o=Gh((r=>sY(this,void 0,void 0,(function*(){const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),h=new aL(a,3,void 0,r);try{if(yield this.mergeInDataFromCopy(n,s,h.token),h.token.isCancellationRequested)return;let o=t.filter((e=>hY(e,n)));e&&(o=o.filter((t=>t.id===e)));const r=yield this.getPasteEdits(o,n,l,i,h.token);if(h.token.isCancellationRequested)return;if(!r.length)return;let a;if(e)a=r.at(0);else{const e=yield this._quickInputService.pick(r.map((e=>({label:e.label,description:e.providerId,detail:e.detail,edit:e}))),{placeHolder:ue(0,"Select Paste Action")});a=null==e?void 0:e.edit}if(!a)return;const d=function(e,t,i){var n,s;return{edits:[...t.map((t=>new eL(e,"string"==typeof i.insertText?{range:t,text:i.insertText,insertAsSnippet:!1}:{range:t,text:i.insertText.snippet,insertAsSnippet:!0}))),...null!==(s=null===(n=i.additionalEdit)||void 0===n?void 0:n.edits)&&void 0!==s?s:[]]}}(l.uri,i,a);yield this._bulkEditService.apply(d,{editor:this._editor})}finally{h.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}))));this._progressService.withProgress({location:10,title:ue(0,"Running paste handlers")},(()=>o))}setCopyMetadata(e,t){e.setData(aY,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const i=e.clipboardData.getData(aY);if(i)try{return JSON.parse(i)}catch(Ws){return}const[n,s]=Zy.getTextData(e.clipboardData);return s?{defaultPastePayload:{mode:s.mode,multicursorText:null!==(t=s.multicursorText)&&void 0!==t?t:null,pasteOnNewLine:!!s.isFromEmptySelection}}:void 0}mergeInDataFromCopy(e,t,i){var n;return sY(this,void 0,void 0,(function*(){if((null==t?void 0:t.id)&&(null===(n=this._currentCopyOperation)||void 0===n?void 0:n.handle)===t.id){const t=yield this._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[i,n]of t)e.replace(i,n)}if(!e.has(yu.uriList)){const t=yield this._clipboardService.readResources();if(i.isCancellationRequested)return;t.length&&e.append(yu.uriList,xZ(TZ.create(t)))}}))}getPasteEdits(e,t,i,n,s){return sY(this,void 0,void 0,(function*(){const o=yield Zh(Promise.all(e.map((e=>sY(this,void 0,void 0,(function*(){var o;try{const r=yield null===(o=e.provideDocumentPasteEdits)||void 0===o?void 0:o.call(e,i,n,t,s);if(r)return Object.assign(Object.assign({},r),{providerId:e.id})}catch(r){console.error(r)}}))))),s);return HZ(Pd(null!=o?o:[]))}))}applyDefaultPasteHandler(e,t,i){var n,s,o;return sY(this,void 0,void 0,(function*(){const r=null!==(n=e.get(yu.text))&&void 0!==n?n:e.get("text");if(!r)return;const a=yield r.asString();if(i.isCancellationRequested)return;const l={text:a,pasteOnNewLine:null!==(s=null==t?void 0:t.defaultPastePayload.pasteOnNewLine)&&void 0!==s&&s,multicursorText:null!==(o=null==t?void 0:t.defaultPastePayload.multicursorText)&&void 0!==o?o:null,mode:null};this._editor.trigger("keyboard","paste",l)}))}};function hY(e,t){var i;return Boolean(null===(i=e.pasteMimeTypes)||void 0===i?void 0:i.some((e=>t.matches(e))))}lY.ID="editor.contrib.copyPasteActionController",lY=tY=iY([nY(1,Oa),nY(2,QS),nY(3,Xy),nY(4,iL),nY(5,lE),nY(6,gL)],lY);var dY=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cY=function(e,t){return function(i,n){t(i,n,e)}},uY=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const gY=ue(0,"Built-in");class pY{provideDocumentPasteEdits(e,t,i,n){return uY(this,void 0,void 0,(function*(){const e=yield this.getEdit(i,n);return e?{insertText:e.insertText,label:e.label,detail:e.detail,handledMimeType:e.handledMimeType,yieldTo:e.yieldTo}:void 0}))}provideDocumentOnDropEdits(e,t,i,n){return uY(this,void 0,void 0,(function*(){const e=yield this.getEdit(i,n);return e?{insertText:e.insertText,label:e.label,handledMimeType:e.handledMimeType,yieldTo:e.yieldTo}:void 0}))}}class mY extends pY{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[yu.text],this.pasteMimeTypes=[yu.text]}getEdit(e,t){return uY(this,void 0,void 0,(function*(){const t=e.get(yu.text);if(!t)return;if(e.has(yu.uriList))return;const i=yield t.asString();return{handledMimeType:yu.text,label:ue(0,"Insert Plain Text"),detail:gY,insertText:i}}))}}class fY extends pY{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[yu.uriList],this.pasteMimeTypes=[yu.uriList]}getEdit(e,t){return uY(this,void 0,void 0,(function*(){const i=yield vY(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map((({uri:e,originalText:t})=>e.scheme===vn.file?e.fsPath:(n++,t))).join(" ");let o;return o=n>0?i.length>1?ue(0,"Insert Uris"):ue(0,"Insert Uri"):i.length>1?ue(0,"Insert Paths"):ue(0,"Insert Path"),{handledMimeType:yu.uriList,insertText:s,label:o,detail:gY}}))}}let _Y=class extends pY{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[yu.uriList],this.pasteMimeTypes=[yu.uriList]}getEdit(e,t){return uY(this,void 0,void 0,(function*(){const i=yield vY(e);if(!i.length||t.isCancellationRequested)return;const n=Pd(i.map((({uri:e})=>{const t=this._workspaceContextService.getWorkspaceFolder(e);return t?La(t.uri,e):void 0})));return n.length?{handledMimeType:yu.uriList,insertText:n.join(" "),label:i.length>1?ue(0,"Insert Relative Paths"):ue(0,"Insert Relative Path"),detail:gY}:void 0}))}};function vY(e){return uY(this,void 0,void 0,(function*(){const t=e.get(yu.uriList);if(!t)return[];const i=yield t.asString(),n=[];for(const e of TZ.parse(i))try{n.push({uri:an.parse(e),originalText:e})}catch(ge){}return n}))}_Y=dY([cY(0,Kq)],_Y);let bY=class extends E{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new mY)),this._register(e.documentOnDropEditProvider.register("*",new fY)),this._register(e.documentOnDropEditProvider.register("*",new _Y(t)))}};bY=dY([cY(0,iL),cY(1,Kq)],bY);let CY=class extends E{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new mY)),this._register(e.documentPasteEditProvider.register("*",new fY)),this._register(e.documentPasteEditProvider.register("*",new _Y(t)))}};CY=dY([cY(0,iL),cY(1,Kq)],CY),Lh(lY.ID,lY,0),DT(CY),wh(new class extends fh{constructor(){super({id:oY,precondition:rY,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){var n;return null===(n=lY.get(t))||void 0===n?void 0:n.changePasteType()}}),yh(class extends _h{constructor(){super({id:"editor.action.pasteAs",label:ue(0,"Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:ue(0,"The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(e,t,i){var n;const s="string"==typeof(null==i?void 0:i.id)?i.id:void 0;return null===(n=lY.get(t))||void 0===n?void 0:n.pasteAs(s)}});class wY{constructor(e){this.identifier=e}}const yY=Pa("treeViewsDndService");Cu(yY,class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}},1);var SY,LY=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},kY=function(e,t){return function(i,n){t(i,n,e)}},DY=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const xY="editor.experimental.dropIntoEditor.defaultProvider",NY="editor.changeDropType",EY=new Tl("dropWidgetVisible",!1,ue(0,"Whether the drop widget is showing"));let IY=SY=class extends E{static get(e){return e.getContribution(SY.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=OZ.getInstance(),this._dropProgressManager=this._register(t.createInstance($Z,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(eY,"dropIntoEditor",e,EY,{id:NY,label:ue(0,"Show drop options...")})),this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event))))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,i){var n;return DY(this,void 0,void 0,(function*(){if(!i.dataTransfer||!e.hasModel())return;null===(n=this._currentOperation)||void 0===n||n.cancel(),e.focus(),e.setPosition(t);const s=Gh((n=>DY(this,void 0,void 0,(function*(){const o=new aL(e,1,void 0,n);try{const s=yield this.extractDataTransferData(i);if(0===s.size||o.token.isCancellationRequested)return;const r=e.getModel();if(!r)return;const a=this._languageFeaturesService.documentOnDropEditProvider.ordered(r).filter((e=>!e.dropMimeTypes||e.dropMimeTypes.some((e=>s.matches(e))))),l=yield this.getDropEdits(a,r,t,s,o);if(o.token.isCancellationRequested)return;if(l.length){const i=this.getInitialActiveEditIndex(r,l),s="afterDrop"===e.getOption(36).showDropSelector;yield this._postDropWidgetManager.applyEditAndShowIfNeeded([Mh.fromPositions(t)],{activeEditIndex:i,allEdits:l},s,n)}}finally{o.dispose(),this._currentOperation===s&&(this._currentOperation=void 0)}}))));this._dropProgressManager.showWhile(t,ue(0,"Running drop handlers. Click to cancel"),s),this._currentOperation=s}))}getDropEdits(e,t,i,n,s){return DY(this,void 0,void 0,(function*(){const o=yield Zh(Promise.all(e.map((e=>DY(this,void 0,void 0,(function*(){try{const o=yield e.provideDocumentOnDropEdits(t,i,n,s.token);if(o)return Object.assign(Object.assign({},o),{providerId:e.id})}catch(o){console.error(o)}}))))),s.token);return HZ(Pd(null!=o?o:[]))}))}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(xY,{resource:e.uri});for(const[n,s]of Object.entries(i)){const e=t.findIndex((e=>s===e.providerId&&e.handledMimeType&&IZ(n,[e.handledMimeType])));if(e>=0)return e}return 0}extractDataTransferData(e){return DY(this,void 0,void 0,(function*(){if(!e.dataTransfer)return new NZ;const t=VZ(e.dataTransfer);if(this.treeItemsTransfer.hasData(wY.prototype)){const e=this.treeItemsTransfer.getData(wY.prototype);if(Array.isArray(e))for(const i of e){const e=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(e)for(const[i,n]of e)t.replace(i,n)}}return t}))}};IY.ID="editor.contrib.dropIntoEditorController",IY=SY=LY([kY(1,Oa),kY(2,uu),kY(3,iL),kY(4,yY)],IY),Lh(IY.ID,IY,2),wh(new class extends fh{constructor(){super({id:NY,precondition:EY,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){var n;null===(n=IY.get(t))||void 0===n||n.changeDropType()}}),DT(bY),Ul.as(ku).registerConfiguration(Object.assign(Object.assign({},$S),{properties:{[xY]:{type:"object",scope:5,description:ue(0,"Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}));class MY{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,MY._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,MY._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new Mh(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,MY._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=MY._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=MY._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,o=Math.max(2,Math.ceil(3/i));let r=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let n=1,l=e.length;n=t.startLineNumber?t.endLineNumber>a&&(a=t.endLineNumber):(s.push({range:new Mh(r,1,a,1),options:MY._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),r=t.startLineNumber,a=t.endLineNumber)}s.push({range:new Mh(r,1,a,1),options:MY._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const o=new Array(e.length);for(let t=0,r=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,MY._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){const e=[];for(let t=0;tMh.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function AY(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function OY(e,t,i){const n=t.split(i),s=e[0].split(i);let o="";return n.forEach(((e,t)=>{o+=RY([s[t]],e)+i})),o.slice(0,-1)}class PY{constructor(e){this.staticValue=e,this.kind=0}}class FY{constructor(e){this.pieces=e,this.kind=1}}class BY{static fromStaticValue(e){return new BY([WY.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new PY(e[0].staticValue):this._state=new FY(e):this._state=new PY("")}buildReplaceString(e,t){if(0===this._state.kind)return t?RY(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n0){const e=[],i=t.caseOps.length;let n=0;for(let o=0,r=s.length;o=i){e.push(s.slice(o));break}switch(t.caseOps[n]){case"U":e.push(s[o].toUpperCase());break;case"u":e.push(s[o].toUpperCase()),n++;break;case"L":e.push(s[o].toLowerCase());break;case"l":e.push(s[o].toLowerCase()),n++;break;default:e.push(s[o])}}s=e.join("")}i+=s}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(ethis.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,k(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){if(!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)){this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new Mh(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,gX);this._decorations.set(n,i);const s=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(s);if(0===o&&n.length>0){const e=mc(n.map((e=>e.range)),(e=>Mh.compareRangesUsingStarts(e,s)>=0));o=e>0?e-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||1===n?(1===i?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new Ba(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new Ba(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=s)break;const o=e.charCodeAt(n);if(36===o){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===o||38===o){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=o&&o<=57){let r=o-48;if(n+1=s)break;const o=e.charCodeAt(n);switch(o){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(o))}}}return i.finalize()}(this._state.replaceString):BY.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){const n=e.buildReplaceString(i.matches,this._state.preserveCase),s=new Gw(t,n);this._executeEditorCommand("replace",s),this._decorations.setStartPosition(new Ba(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>pX._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=gX?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new qb(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),s=i.getFullModelRange(),o=this._getReplacePattern();let r;const a=this._state.preserveCase;r=o.hasReplacementPatterns||a?n.replace(t,(function(){return o.buildReplaceString(arguments,a)})):n.replace(t,o.buildReplaceString(null,a));const l=new Qw(s,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let o=0,r=i.length;oe.range)),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let t=this._findMatches(e,!1,1073741824).map((e=>new Th(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const i=this._editor.getSelection();for(let n=0,s=t.length;nthis._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const n={inputActiveOptionBorder:Cp(Pp),inputActiveOptionForeground:Cp(Bp),inputActiveOptionBackground:Cp(Fp)};this.caseSensitive=this._register(new bV(Object.assign({appendTitle:this._keybindingLabelFor(oX),isChecked:this._state.matchCase},n))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new CV(Object.assign({appendTitle:this._keybindingLabelFor(rX),isChecked:this._state.wholeWord},n))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new wV(Object.assign({appendTitle:this._keybindingLabelFor(aX),isChecked:this._state.isRegex},n))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(En(this._domNode,os.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(En(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return mX.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}function fX(e,t){return 1===e||2!==e&&t}mX.ID="editor.contrib.findOptionsWidget";class _X extends E{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return fX(this._isRegexOverride,this._isRegex)}get wholeWord(){return fX(this._wholeWordOverride,this._wholeWord)}get matchCase(){return fX(this._matchCaseOverride,this._matchCase)}get preserveCase(){return fX(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new U),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),void 0!==i&&(Mh.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const s={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;const r=this.isRegex,a=this.wholeWord,l=this.matchCase,h=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,o=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,o=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,o=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,o=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!Mh.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,s.searchScope=!0,o=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,o=!0),void 0!==e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,s.isSearching=!0,o=!0),void 0!==e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,s.filters=!0,o=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(o=!0,s.isRegex=!0),a!==this.wholeWord&&(o=!0,s.wholeWord=!0),l!==this.matchCase&&(o=!0,s.matchCase=!0),h!==this.preserveCase&&(o=!0,s.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=gX}}const vX=ue(0,"input"),bX=ue(0,"Preserve Case");class CX extends mV{constructor(e){super({icon:Qr.preserveCase,title:bX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class wX extends pD{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new U),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new U),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new U),this._onInput=this._register(new U),this._onKeyUp=this._register(new U),this._onPreserveCaseKeyDown=this._register(new U),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||vX;const s=n.appendPreserveCaseLabel||"",o=n.history||[],r=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new DV(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:o,showHistoryHint:n.showHistoryHint,flexibleHeight:r,flexibleWidth:a,flexibleMaxHeight:l,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new CX(Object.assign({appendTitle:s,isChecked:!1},n.toggleStyles))),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const h=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=h.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%h.length:e.equals(15)&&(i=0===t?h.length-1:t-1),e.equals(9)?(h[t].blur(),this.inputBox.focus()):i>=0&&h[i].focus(),as(e,!0)}}}));const d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),null==e||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;null===(e=this.inputBox)||void 0===e||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var yX=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},SX=function(e,t){return function(i,n){t(i,n,e)}};const LX=new Tl("suggestWidgetVisible",!1,ue(0,"Whether suggestion are visible")),kX="historyNavigationWidgetFocus",DX="historyNavigationForwardsEnabled",xX="historyNavigationBackwardsEnabled";let NX;const EX=[];function IX(e,t){if(EX.includes(t))throw new Error("Cannot register the same widget multiple times");EX.push(t);const i=new N,n=new Tl(kX,!1).bindTo(e),s=new Tl(DX,!0).bindTo(e),o=new Tl(xX,!0).bindTo(e),r=()=>{n.set(!0),NX=t},a=()=>{n.set(!1),NX===t&&(NX=void 0)};return t.element===document.activeElement&&r(),i.add(t.onDidFocus((()=>r()))),i.add(t.onDidBlur((()=>a()))),i.add(x((()=>{EX.splice(EX.indexOf(t),1),a()}))),{historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:o,dispose(){i.dispose()}}}let MX=class extends NV{constructor(e,t,i,n){super(e,t,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(IX(s,this.inputBox))}};MX=yX([SX(3,Rl)],MX);let TX=class extends wX{constructor(e,t,i,n,s=!1){super(e,t,s,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(IX(o,this.inputBox))}};function RX(e){var t,i;return"Up"===(null===(t=e.lookupKeybinding("history.showPrevious"))||void 0===t?void 0:t.getElectronAccelerator())&&"Down"===(null===(i=e.lookupKeybinding("history.showNext"))||void 0===i?void 0:i.getElectronAccelerator())}TX=yX([SX(3,Rl)],TX),jl.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ul.and(ul.has(kX),ul.equals(xX,!0),ul.not("isComposing"),LX.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{null==NX||NX.showPreviousValue()}}),jl.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ul.and(ul.has(kX),ul.equals(DX,!0),ul.not("isComposing"),LX.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{null==NX||NX.showNextValue()}});var AX=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const OX=QT("find-selection",Qr.selection,ue(0,"Icon for 'Find in Selection' in the editor find widget.")),PX=QT("find-collapsed",Qr.chevronRight,ue(0,"Icon to indicate that the editor find widget is collapsed.")),FX=QT("find-expanded",Qr.chevronDown,ue(0,"Icon to indicate that the editor find widget is expanded.")),BX=QT("find-replace",Qr.replace,ue(0,"Icon for 'Replace' in the editor find widget.")),WX=QT("find-replace-all",Qr.replaceAll,ue(0,"Icon for 'Replace All' in the editor find widget.")),VX=QT("find-previous-match",Qr.arrowUp,ue(0,"Icon for 'Find Previous' in the editor find widget.")),HX=QT("find-next-match",Qr.arrowDown,ue(0,"Icon for 'Find Next' in the editor find widget.")),zX=ue(0,"Find / Replace"),UX=ue(0,"Find"),KX=ue(0,"Find"),jX=ue(0,"Previous Match"),qX=ue(0,"Next Match"),$X=ue(0,"Find in Selection"),GX=ue(0,"Close"),ZX=ue(0,"Replace"),YX=ue(0,"Replace"),XX=ue(0,"Replace"),QX=ue(0,"Replace All"),JX=ue(0,"Toggle Replace"),eQ=ue(0,"Only the first {0} results are highlighted, but all find operations work on the entire text.",gX),tQ=ue(0,"{0} of {1}"),iQ=ue(0,"No results"),nQ=419;let sQ=69;const oQ="ctrlEnterReplaceAll.windows.donotask",rQ=Pe?256:2048;class aQ{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function lQ(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function hQ(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(90)&&(this._codeEditor.getOption(90)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(143)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(41)){const e=this._codeEditor.getOption(41).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new aQ(0),this._showViewZone()),!t&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((()=>AX(this,void 0,void 0,(function*(){if(this._isVisible){const e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}}))))),this._findInputFocused=zY.bindTo(o),this._findFocusTracker=this._register(hs(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=UY.bindTo(o),this._replaceFocusTracker=this._register(hs(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new aQ(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return dQ.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(90)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=zn(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,r)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=sQ+"px",this._state.matchesCount>=gX?this._matchesCount.title=eQ:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=gX&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=Xs(tQ,i,t)}else e=iQ;this._matchesCount.appendChild(document.createTextNode(e)),Os(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),sQ=Math.max(sQ,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===iQ)return""===i?ue(0,"{0} found",e):ue(0,"{0} found for '{1}'",e,i);if(t){const n=ue(0,"{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();if(s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1){return`${s.getLineContent(t.startLineNumber)}, ${n}`}return n}return ue(0,"{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(90);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Hn(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=n.left+(s?s.left:0),r=s?s.top:0;if(this._viewZone&&re.startLineNumber&&(t=!1);const i=Vn(this._domNode).left;o>i&&(t=!1);const s=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(s?s.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new aQ(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;const s=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(83).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!xn(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,s=!1,o=!1;if(this._resized){if(zn(this._domNode)>nQ)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=zn(this._findInput.domNode))}if(447+i>=t&&(s=!0),447+i-sQ>=t&&(o=!0),447+i-sQ>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",o),this._domNode.classList.toggle("reduced-find-widget",s),o||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._findInput.layout({collapsedFindWidget:n,narrowFindWidget:o,reducedFindWidget:s}),this._resized){const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=zn(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||Mh.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|rQ)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?lQ(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?hQ(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|rQ)?(this._keybindingService.dispatchEvent(e,e.target)||(Oe&&Be&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(ue(0,"Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(oQ,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?lQ(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?hQ(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const e=!0,t=!0;this._findInput=this._register(new MX(null,this._contextViewProvider,{width:221,label:UX,placeholder:KX,appendCaseSensitiveLabel:this._keybindingLabelFor(oX),appendWholeWordsLabel:this._keybindingLabelFor(rX),appendRegexLabel:this._keybindingLabelFor(aX),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(Dre){return{content:Dre.message}}},flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>RX(this._keybindingService),inputBoxStyles:qx,toggleStyles:jx},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),Fe&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new cQ({label:jX+this._keybindingLabelFor(JY),icon:VX,onTrigger:()=>{qr(this._codeEditor.getAction(JY)).run().then(void 0,r)}})),this._nextBtn=this._register(new cQ({label:qX+this._keybindingLabelFor(QY),icon:HX,onTrigger:()=>{qr(this._codeEditor.getAction(QY)).run().then(void 0,r)}}));const i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const n=document.createElement("div");n.className="find-actions",i.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new mV({icon:OX,title:$X+this._keybindingLabelFor(lX),isChecked:!1,inputActiveOptionBackground:Cp(Fp),inputActiveOptionBorder:Cp(Pp),inputActiveOptionForeground:Cp(Bp)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const e=this._codeEditor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new cQ({label:GX+this._keybindingLabelFor(sX),icon:nR,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),this._replaceInput=this._register(new TX(null,void 0,{label:ZX,placeholder:YX,appendPreserveCaseLabel:this._keybindingLabelFor(hX),history:[],flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showHistoryHint:()=>RX(this._keybindingService),inputBoxStyles:qx,toggleStyles:jx},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())}))),this._replaceBtn=this._register(new cQ({label:XX+this._keybindingLabelFor(dX),icon:BX,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new cQ({label:QX+this._keybindingLabelFor(cX),icon:WX,onTrigger:()=>{this._controller.replaceAll()}}));const s=document.createElement("div");s.className="replace-part",s.appendChild(this._replaceInput.domNode);const o=document.createElement("div");o.className="replace-actions",s.appendChild(o),o.appendChild(this._replaceBtn.domNode),o.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new cQ({label:JX,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=zn(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=zX,this._domNode.role="dialog",this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(s),this._resizeSash=new CW(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=nQ;this._register(this._resizeSash.onDidStart((()=>{a=zn(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=a+e.startX-e.currentX;if(t(parseFloat(Pn(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=zn(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=zn(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{var t,i;if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();null===(i=(t=this._opts).onKeyDown)||void 0===i||i.call(t,e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...ea.asClassNameArray(PX)),this._domNode.classList.add(...ea.asClassNameArray(FX))):(this._domNode.classList.remove(...ea.asClassNameArray(FX)),this._domNode.classList.add(...ea.asClassNameArray(PX)))}}B_(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(Vm)),i(".currentFindMatch",e.getColor(Wm)),i(".findScope",e.getColor(Hm));i(".find-widget",e.getColor(ym));const n=e.getColor(Mp);n&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const s=e.getColor(Tp);s&&t.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${s}; border-right: 1px solid ${s}; border-bottom: 1px solid ${s}; }`);const o=e.getColor(Um);o&&t.addRule(`.monaco-editor .findMatch { border: 1px ${M_(e.type)?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const r=e.getColor(zm);r&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const a=e.getColor(Km);a&&t.addRule(`.monaco-editor .findScope { border: 1px ${M_(e.type)?"dashed":"solid"} ${a}; }`);const l=e.getColor(Np);l&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const h=e.getColor(Sm);h&&t.addRule(`.monaco-editor .find-widget { color: ${h}; }`);const d=e.getColor(kp);d&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${d}; }`);const c=e.getColor(km);if(c)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${c}; }`);else{const i=e.getColor(Lm);i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const u=e.getColor(Zf);u&&t.addRule(`\n\t\t.monaco-editor .find-widget .button:not(.disabled):hover,\n\t\t.monaco-editor .find-widget .codicon-find-selection:hover {\n\t\t\tbackground-color: ${u} !important;\n\t\t}\n\t`);const g=e.getColor(xp);g&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${g}; }`)}));var uQ,gQ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},pQ=function(e,t){return function(i,n){t(i,n,e)}},mQ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function fQ(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let _Q=uQ=class extends E{get editor(){return this._editor}static get(e){return e.getContribution(uQ.ID)}constructor(e,t,i,n,s){super(),this._editor=e,this._findWidgetVisible=HY.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._notificationService=s,this._updateHistoryDelayer=new Xh(500),this._state=this._register(new _X),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})})))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!zY.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const e=this._editor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Js(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return mQ(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;const i=Object.assign(Object.assign({},t),{isRevealed:!0});if("single"===e.seedSearchStringFromSelection){const t=fQ(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=Js(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=fQ(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new pX(this._editor,this._state))}))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){var e;return!!this._model&&((null===(e=this._editor.getModel())||void 0===e?void 0:e.isTooLargeForHeapOperation())?(this._notificationService.warn(ue(0,"The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0))}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return mQ(this,void 0,void 0,(function*(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};_Q.ID="editor.contrib.findController",_Q=uQ=gQ([pQ(1,Rl),pQ(2,qN),pQ(3,Xy),pQ(4,uL)],_Q);let vQ=class extends _Q{constructor(e,t,i,n,s,o,r,a){super(e,i,r,a,o),this._contextViewService=t,this._keybindingService=n,this._themeService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){const i=Object.create(null,{_start:{get:()=>super._start}});return mQ(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const n=this._editor.getSelection();let s=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":s=!0;break;case"never":s=!1;break;case"multiline":s=!!n&&n.startLineNumber!==n.endLineNumber;break}e.updateSearchScope=e.updateSearchScope||s,yield i._start.call(this,e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new dQ(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new mX(this._editor,this._state,this._keybindingService))}};vQ=gQ([pQ(1,Vx),pQ(2,Rl),pQ(3,PL),pQ(4,R_),pQ(5,uL),pQ(6,qN),pQ(7,Xy)],vQ);Sh(new vh({id:ZY,label:ue(0,"Find"),alias:"Find",precondition:ul.or(Rh.focus,ul.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Ql.MenubarEditMenu,group:"3_find",title:ue(0,"&&Find"),order:1}})).addImplementation(0,((e,t,i)=>{const n=_Q.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})}));const bQ={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:ue(0,'Overrides "Use Regular Expression" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:ue(0,'Overrides "Match Whole Word" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:ue(0,'Overrides "Math Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:ue(0,'Overrides "Preserve Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},findInSelection:{type:"boolean"}}}}]};class CQ extends _h{run(e,t){return mQ(this,void 0,void 0,(function*(){const e=_Q.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(e))}))}}class wQ extends _h{run(e,t){return mQ(this,void 0,void 0,(function*(){const e=_Q.get(t);if(!e)return;const i=fQ(t,"single",!1);i&&e.setSearchString(i),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(e))}))}}Sh(new vh({id:nX,label:ue(0,"Replace"),alias:"Replace",precondition:ul.or(Rh.focus,ul.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Ql.MenubarEditMenu,group:"3_find",title:ue(0,"&&Replace"),order:2}})).addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(90))return!1;const n=_Q.get(t);if(!n)return!1;const s=t.getSelection(),o=n.isFindInputFocused(),r=!s.isEmpty()&&s.startLineNumber===s.endLineNumber&&"never"!==t.getOption(41).seedSearchStringFromSelection&&!o,a=o||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(41).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})})),Lh(_Q.ID,vQ,0),yh(class extends _h{constructor(){super({id:XY,label:ue(0,"Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:bQ})}run(e,t,i){return mQ(this,void 0,void 0,(function*(){const e=_Q.get(t);if(e){const n=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(null==i?void 0:i.findInSelection)||!1,loop:t.getOption(41).loop},n),e.setGlobalBufferTerm(e.getState().searchString)}}))}}),yh(class extends _h{constructor(){super({id:YY,label:ue(0,"Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return mQ(this,void 0,void 0,(function*(){const e=_Q.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}),yh(class extends CQ{constructor(){super({id:QY,label:ue(0,"Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:Rh.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ul.and(Rh.focus,zY),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}),yh(class extends CQ{constructor(){super({id:JY,label:ue(0,"Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:Rh.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ul.and(Rh.focus,zY),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}),yh(class extends _h{constructor(){super({id:eX,label:ue(0,"Go to Match..."),alias:"Go to Match...",precondition:HY}),this._highlightDecorations=[]}run(e,t,i){const n=_Q.get(t);if(!n)return;const s=n.getState().matchesCount;if(s<1){return void e.get(uL).notify({severity:cL.Warning,message:ue(0,"No matches. Try searching for something else.")})}const o=e.get(lE).createInputBox();o.placeholder=ue(0,"Type a number to go to a specific match (between 1 and {0})",s);const r=e=>{const t=parseInt(e);if(isNaN(t))return;const i=n.getState().matchesCount;return t>0&&t<=i?t-1:t<0&&t>=-i?i+t:void 0},a=e=>{const i=r(e);if("number"==typeof i){o.validationMessage=void 0,n.goToMatch(i);const e=n.getState().currentMatch;e&&this.addDecorations(t,e)}else o.validationMessage=ue(0,"Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};o.onDidChangeValue((e=>{a(e)})),o.onDidAccept((()=>{const e=r(o.value);"number"==typeof e?(n.goToMatch(e),o.hide()):o.validationMessage=ue(0,"Please type a number between 1 and {0}",n.getState().matchesCount)})),o.onDidHide((()=>{this.clearDecorations(t),o.dispose()})),o.show()}clearDecorations(e){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[])}))}addDecorations(e,t){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:A_(uv),position:vd.Full}}}])}))}}),yh(class extends wQ{constructor(){super({id:tX,label:ue(0,"Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}),yh(class extends wQ{constructor(){super({id:iX,label:ue(0,"Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}});const yQ=fh.bindToContribution(_Q.get);wh(new yQ({id:sX,precondition:HY,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:ul.and(Rh.focus,ul.not("isComposing")),primary:9,secondary:[1033]}})),wh(new yQ({id:oX,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:KY.primary,mac:KY.mac,win:KY.win,linux:KY.linux}})),wh(new yQ({id:rX,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:jY.primary,mac:jY.mac,win:jY.win,linux:jY.linux}})),wh(new yQ({id:aX,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:qY.primary,mac:qY.mac,win:qY.win,linux:qY.linux}})),wh(new yQ({id:lX,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:$Y.primary,mac:$Y.mac,win:$Y.win,linux:$Y.linux}})),wh(new yQ({id:hX,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:GY.primary,mac:GY.mac,win:GY.win,linux:GY.linux}})),wh(new yQ({id:dX,precondition:HY,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:3094}})),wh(new yQ({id:dX,precondition:HY,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:ul.and(Rh.focus,UY),primary:3}})),wh(new yQ({id:cX,precondition:HY,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:2563}})),wh(new yQ({id:cX,precondition:HY,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:ul.and(Rh.focus,UY),primary:void 0,mac:{primary:2051}}})),wh(new yQ({id:uX,precondition:HY,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:515}}));const SQ={0:" ",1:"u",2:"r"},LQ=16777215,kQ=4278190080;class DQ{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return!!(this._states[t]&1<65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new DQ(e.length),this._userDefinedStates=new DQ(e.length),this._recoveredStates=new DQ(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;iLQ||s>LQ)throw new Error("startLineNumber or endLineNumber must not exceed "+LQ);for(;e.length>0&&!t(n,s);)e.pop();const o=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&o)<<24),this._endIndexes[i]=s+((65280&o)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&LQ}getEndLineNumber(e){return this._endIndexes[e]&LQ}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&kQ)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(e)?i=>ii=h.startLineNumber))l&&l.startLineNumber===h.startLineNumber?(1===h.source?e=h:(e=l,e.isCollapsed=h.isCollapsed&&l.endLineNumber===h.endLineNumber,e.source=0),l=s(++r)):(e=h,h.isCollapsed&&0===h.source&&(e.source=2)),h=o(++a);else{let t=a,i=h;for(;;){if(!i||i.startLineNumber>l.endLineNumber){e=l;break}if(1===i.source&&i.endLineNumber>l.endLineNumber)break;i=o(++t)}l=s(++r)}if(e){for(;c&&c.endLineNumbere.startLineNumber&&e.startLineNumber>u&&e.endLineNumber<=i&&(!c||c.endLineNumber>=e.endLineNumber)&&(g.push(e),u=e.startLineNumber,c&&d.push(c),c=e)}}return g}}class NQ{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class EQ{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new U,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new xQ(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,s=-1,o=-1;const r=e=>{for(;no&&(o=e),n++}};for(const a of e){const e=a.regionIndex,i=this._editorDecorationIds[e];if(i&&!t[i]){t[i]=!0,r(e);const n=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,n),s=Math.max(s,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let n=0;ni&&(i=o)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(t,i)=>{for(const n of e)if(t=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>i)continue;const o=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:o})}return t.length>0?t:void 0}applyMemento(e){var t,i;if(!Array.isArray(e))return;const n=[],s=this._textModel.getLineCount();for(const r of e){if(r.startLineNumber>=r.endLineNumber||r.startLineNumber<1||r.endLineNumber>s)continue;const e=this._getLinesChecksum(r.startLineNumber+1,r.endLineNumber);r.checksum&&e!==r.checksum||n.push({startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,type:void 0,isCollapsed:null===(t=r.isCollapsed)||void 0===t||t,source:null!==(i=r.source)&&void 0!==i?i:0})}const o=xQ.sanitizeAndMerge(this._regions,n,s);this.updatePost(xQ.fromFoldRanges(o))}_getLinesChecksum(e,t){return hE(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),s=1;for(;n>=0;){const e=this._regions.toRegion(n);t&&!t(e,s)||i.push(e),s++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let o=n,r=this._regions.length;o0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let o=n,r=this._regions.length;o1){const o=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==s&&i0)for(const o of n){const n=e.getRegionAtLine(o);if(n&&(n.isCollapsed!==t&&s.push(n),i>1)){const o=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));s.push(...n)}e.toggleCollapseState(s)}function RQ(e,t,i){const n=[];for(const o of i){const t=e.getAllRegionsAtLine(o,void 0);t.length>0&&n.push(t[0])}const s=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(s)}function AQ(e,t,i){const n=e.textModel,s=e.regions,o=[];for(let r=s.length-1;r>=0;r--)if(i!==s.isCollapsed(r)){const e=s.getStartLineNumber(r);t.test(n.getLineContent(e))&&o.push(s.toRegion(r))}e.toggleCollapseState(o)}function OQ(e,t,i){const n=e.regions,s=[];for(let o=n.length-1;o>=0;o--)i!==n.isCollapsed(o)&&t===n.getType(o)&&s.push(n.toRegion(o));e.toggleCollapseState(s)}class PQ{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new U,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==ac(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,s=Number.MAX_VALUE,o=-1;const r=this._foldingModel.regions;for(;i0}isHidden(e){return null!==FQ(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const s=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=FQ(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let o=0,r=e.length;o0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function FQ(e,t){const i=mc(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}class BQ{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id="indent"}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(function(e,t,i,n=VQ){const s=e.getOptions().tabSize,o=new WQ(n);let r;i&&(r=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const a=[],l=e.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let h=e.getLineCount();h>0;h--){const i=e.getLineContent(h),n=Gv(i,s);let l,d=a[a.length-1];if(-1!==n){if(r&&(l=i.match(r))){if(!l[1]){a.push({indent:-2,endAbove:h,line:h});continue}{let e=a.length-1;for(;e>0&&-2!==a[e].indent;)e--;if(e>0){a.length=e+1,d=a[e],o.insertFirst(h,d.line,n),d.line=h,d.indent=n,d.endAbove=h;continue}}}if(d.indent>n){do{a.pop(),d=a[a.length-1]}while(d.indent>n);const e=d.endAbove-1;e-h>=1&&o.insertFirst(h,e,n)}d.indent===n?d.endAbove=h:a.push({indent:n,endAbove:h,line:h})}else t&&(d.endAbove=h)}return o.toIndentRanges(e)}(this.editorModel,i,n,this.foldingRangesLimit))}}class WQ{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>LQ||t>LQ)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new xQ(e,t)}{this._foldingRangesLimit.update(this._length,t);let i=0,n=this._indentOccurrences.length;for(let e=0;et){n=e;break}i+=s}}const s=e.getOptions().tabSize,o=new Uint32Array(t),r=new Uint32Array(t);for(let a=this._length-1,l=0;a>=0;a--){const h=this._startIndexes[a],d=Gv(e.getLineContent(h),s);(d{}};const HQ=Sp("editor.foldBackground",{light:S_(Om,.3),dark:S_(Om,.3),hcDark:null,hcLight:null},ue(0,"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);Sp("editorGutter.foldingControlForeground",{dark:Dp,light:Dp,hcDark:Dp,hcLight:Dp},ue(0,"Color of the folding control in the editor gutter."));const zQ=QT("folding-expanded",Qr.chevronDown,ue(0,"Icon for expanded ranges in the editor glyph margin.")),UQ=QT("folding-collapsed",Qr.chevronRight,ue(0,"Icon for collapsed ranges in the editor glyph margin.")),KQ=QT("folding-manual-collapsed",UQ,ue(0,"Icon for manually collapsed ranges in the editor glyph margin.")),jQ=QT("folding-manual-expanded",zQ,ue(0,"Icon for manually expanded ranges in the editor glyph margin.")),qQ={color:A_(HQ),position:Cd.Inline};class $Q{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?$Q.HIDDEN_RANGE_DECORATION:"never"===this.showFoldingControls?e?this.showFoldingHighlights?$Q.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:$Q.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:$Q.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?$Q.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:$Q.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?$Q.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:$Q.COLLAPSED_VISUAL_DECORATION:"mouseover"===this.showFoldingControls?i?$Q.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:$Q.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?$Q.MANUALLY_EXPANDED_VISUAL_DECORATION:$Q.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}$Q.COLLAPSED_VISUAL_DECORATION=xw.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(UQ)}),$Q.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=xw.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:qQ,isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(UQ)}),$Q.MANUALLY_COLLAPSED_VISUAL_DECORATION=xw.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(KQ)}),$Q.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=xw.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:qQ,isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(KQ)}),$Q.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=xw.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),$Q.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=xw.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:qQ,isWholeLine:!0}),$Q.EXPANDED_VISUAL_DECORATION=xw.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ea.asClassName(zQ)}),$Q.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=xw.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(zQ)}),$Q.MANUALLY_EXPANDED_VISUAL_DECORATION=xw.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ea.asClassName(jQ)}),$Q.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=xw.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(jQ)}),$Q.NO_CONTROLS_EXPANDED_RANGE_DECORATION=xw.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),$Q.HIDDEN_RANGE_DECORATION=xw.register({description:"folding-hidden-range-decoration",stickiness:1});const GQ={};class ZQ{constructor(e,t,i,n,s){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=s,this.id="syntax",this.disposables=new N,s&&this.disposables.add(s);for(const o of t)"function"==typeof o.onDidChange&&this.disposables.add(o.onDidChange(i))}compute(e){return function(e,t,i){let n=null;const s=e.map(((e,s)=>Promise.resolve(e.provideFoldingRanges(t,GQ,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(n)||(n=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&n.push({start:t.start,end:t.end,rank:s,kind:t.kind})}}),a)));return Promise.all(s).then((e=>n))}(this.providers,this.editorModel,e).then((t=>{var i,n;if(t){return function(e,t){const i=e.sort(((e,t)=>{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new YQ(t);let s;const o=[];for(const r of i)if(s){if(r.start>s.start)if(r.end<=s.end)o.push(s),s=r,n.add(r.start,r.end,r.kind&&r.kind.value,o.length);else{if(r.start>s.end){do{s=o.pop()}while(s&&r.start>s.end);s&&o.push(s),s=r}n.add(r.start,r.end,r.kind&&r.kind.value,o.length)}}else s=r,n.add(r.start,r.end,r.kind&&r.kind.value,o.length);return n.toIndentRanges()}(t,this.foldingRangesLimit)}return null!==(n=null===(i=this.fallbackRangeProvider)||void 0===i?void 0:i.compute(e))&&void 0!==n?n:null}))}dispose(){this.disposables.dispose()}}class YQ{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>LQ||t>LQ)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._nestingLevels[s]=n,this._types[s]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ie){i=r;break}t+=n}}const n=new Uint32Array(e),s=new Uint32Array(e),o=[];for(let r=0,a=0;r=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},JQ=function(e,t){return function(i,n){t(i,n,e)}},eJ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const tJ=new Tl("foldingEnabled",!1);let iJ=XQ=class extends E{static get(e){return e.getContribution(XQ.ID)}static getFoldingRangeProviders(e,t){var i,n;const s=e.foldingRangeProvider.ordered(t);return null!==(n=null===(i=XQ._foldingRangeSelector)||void 0===i?void 0:i.call(XQ,s,t))&&void 0!==n?n:s}constructor(e,t,i,n,s,o){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=o,this.localToDispose=this._register(new N),this.editor=e,this._foldingLimitReporter=new nJ(e);const r=this.editor.getOptions();this._isEnabled=r.get(43),this._useFoldingProviders="indentation"!==r.get(44),this._unfoldOnClickAfterEndOfLine=r.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=r.get(46),this.updateDebounceInfo=s.for(o.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new $Q(e),this.foldingDecorationProvider.showFoldingControls=r.get(109),this.foldingDecorationProvider.showFoldingHighlights=r.get(45),this.foldingEnabled=tJ.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(47)&&this.onModelChanged(),e.hasChanged(109)||e.hasChanged(45)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(109),this.foldingDecorationProvider.showFoldingHighlights=e.get(45),this.triggerFoldingModelChanged()}e.hasChanged(44)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(44),this.onFoldingStrategyChanged()),e.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),e.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))}))),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new EQ(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new PQ(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new Xh(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new sd((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{var e,t;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),null===(e=this.updateScheduler)||void 0===e||e.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,null===(t=this.rangeProvider)||void 0===t||t.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;null===(e=this.rangeProvider)||void 0===e||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new BQ(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=XQ.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new ZQ(e,i,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;null===(t=this.hiddenRangeModel)||void 0===t||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new F,i=this.getRangeProvider(e.textModel),n=this.foldingRegionPromise=Gh((e=>i.compute(e)));return n.then((i=>{if(i&&n===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(LC.Imports.value,!0);e&&(n=PN.capture(this.editor),this._currentModelHasFoldedImports=e)}const s=this.editor.getSelections(),o=s?s.map((e=>e.startLineNumber)):[];e.update(i,o),null==n||n.restore(this.editor);const r=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=r)}return e}))})).then(void 0,(e=>(r(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,r)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft;if(t.offsetX-n<4)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()){if(!e.target.detail.isAfterLines)break}return;case 6:if(this.hiddenRangeModel.hasRanges()){const e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,s=e.target.range;if(!s||s.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||s.startColumn!==e.getLineMaxColumn(i))return}const o=t.getRegionAtLine(i);if(o&&o.startLineNumber===i){const s=o.isCollapsed;if(n||s){let n=[];if(e.event.altKey){const e=e=>!e.containedBy(o)&&!o.containedBy(e),i=t.getRegionsInside(null,e);for(const t of i)t.isCollapsed&&n.push(t);0===n.length&&(n=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(o))e.isCollapsed===s&&n.push(e);!s&&i&&0!==n.length||n.push(o)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};iJ.ID="editor.contrib.folding",iJ=XQ=QQ([JQ(1,Rl),JQ(2,Xu),JQ(3,uL),JQ(4,CE),JQ(5,iL)],iJ);class nJ{constructor(e){this.editor=e,this._onDidChange=new U,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}class sJ extends _h{runEditorCommand(e,t,i){const n=e.get(Xu),s=iJ.get(t);if(!s)return;const o=s.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((e=>{if(e){this.invoke(s,e,t,i,n);const o=t.getSelection();o&&s.reveal(o.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function oJ(e){if(!zr(e)){if(!Fr(e))return!1;const t=e;if(!zr(t.levels)&&!Wr(t.levels))return!1;if(!zr(t.direction)&&!Pr(t.direction))return!1;if(!(zr(t.selectionLines)||Array.isArray(t.selectionLines)&&t.selectionLines.every(Wr)))return!1}return!0}class rJ extends sJ{getFoldingLevel(){return parseInt(this.id.substr(rJ.ID_PREFIX.length))}invoke(e,t,i){!function(e,t,i,n){const s=e.getRegionsInside(null,((e,s)=>s===t&&e.isCollapsed!==i&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(s)}(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}rJ.ID_PREFIX="editor.foldLevel",rJ.ID=e=>rJ.ID_PREFIX+e;Lh(iJ.ID,iJ,0),yh(class extends sJ{constructor(){super({id:"editor.unfold",label:ue(0,"Unfold"),alias:"Unfold",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:oJ,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=n&&n.levels||1,o=this.getLineNumbers(n,i);n&&"up"===n.direction?TQ(t,!1,s,o):MQ(t,!1,s,o)}}),yh(class extends sJ{constructor(){super({id:"editor.unfoldRecursively",label:ue(0,"Unfold Recursively"),alias:"Unfold Recursively",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2142),weight:100}})}invoke(e,t,i,n){MQ(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),yh(class extends sJ{constructor(){super({id:"editor.fold",label:ue(0,"Fold"),alias:"Fold",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:oJ,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=this.getLineNumbers(n,i),o=n&&n.levels,r=n&&n.direction;"number"!=typeof o&&"string"!=typeof r?function(e,t,i){const n=[];for(const s of i){const i=e.getAllRegionsAtLine(s,(e=>e.isCollapsed!==t));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}(t,!0,s):"up"===r?TQ(t,!0,o||1,s):MQ(t,!0,o||1,s)}}),yh(class extends sJ{constructor(){super({id:"editor.foldRecursively",label:ue(0,"Fold Recursively"),alias:"Fold Recursively",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);MQ(t,!0,Number.MAX_VALUE,n)}}),yh(class extends sJ{constructor(){super({id:"editor.foldAll",label:ue(0,"Fold All"),alias:"Fold All",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2069),weight:100}})}invoke(e,t,i){MQ(t,!0)}}),yh(class extends sJ{constructor(){super({id:"editor.unfoldAll",label:ue(0,"Unfold All"),alias:"Unfold All",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2088),weight:100}})}invoke(e,t,i){MQ(t,!1)}}),yh(class extends sJ{constructor(){super({id:"editor.foldAllBlockComments",label:ue(0,"Fold All Block Comments"),alias:"Fold All Block Comments",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2138),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())OQ(t,LC.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).comments;if(n&&n.blockCommentStartToken){AQ(t,new RegExp("^\\s*"+Js(n.blockCommentStartToken)),!0)}}}}),yh(class extends sJ{constructor(){super({id:"editor.foldAllMarkerRegions",label:ue(0,"Fold All Regions"),alias:"Fold All Regions",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())OQ(t,LC.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){AQ(t,new RegExp(n.markers.start),!0)}}}}),yh(class extends sJ{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:ue(0,"Unfold All Regions"),alias:"Unfold All Regions",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())OQ(t,LC.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){AQ(t,new RegExp(n.markers.start),!1)}}}}),yh(class extends sJ{constructor(){super({id:"editor.foldAllExcept",label:ue(0,"Fold All Except Selected"),alias:"Fold All Except Selected",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2136),weight:100}})}invoke(e,t,i){RQ(t,!0,this.getSelectedLines(i))}}),yh(class extends sJ{constructor(){super({id:"editor.unfoldAllExcept",label:ue(0,"Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2134),weight:100}})}invoke(e,t,i){RQ(t,!1,this.getSelectedLines(i))}}),yh(class extends sJ{constructor(){super({id:"editor.toggleFold",label:ue(0,"Toggle Fold"),alias:"Toggle Fold",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2090),weight:100}})}invoke(e,t,i){IQ(t,1,this.getSelectedLines(i))}}),yh(class extends sJ{constructor(){super({id:"editor.gotoParentFold",label:ue(0,"Go to Parent Fold"),alias:"Go to Parent Fold",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),yh(class extends sJ{constructor(){super({id:"editor.gotoPreviousFold",label:ue(0,"Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber0?t.regions.toRegion(i.regionIndex-1):null}return null}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),yh(class extends sJ{constructor(){super({id:"editor.gotoNextFold",label:ue(0,"Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndexe.startLineNumber&&(s.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(s.length>0){s.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=xQ.sanitizeAndMerge(t.regions,s,null===(n=i.getModel())||void 0===n?void 0:n.getLineCount());t.updatePost(xQ.fromFoldRanges(e))}}}}),yh(class extends sJ{constructor(){super({id:"editor.removeManualFoldingRanges",label:ue(0,"Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}});for(let xre=1;xre<=7;xre++)aJ=new rJ({id:rJ.ID(xre),label:ue(0,"Fold Level {0}",xre),alias:`Fold Level ${xre}`,precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2048|21+xre),weight:100}}),Dh.INSTANCE.registerEditorAction(aJ);var aJ;Za.registerCommand("_executeFoldingRangeProvider",(function(e,...t){return eJ(this,void 0,void 0,(function*(){const[i]=t;if(!(i instanceof an))throw u();const n=e.get(iL),s=e.get(Wa).getModel(i);if(!s)throw u();const o=e.get(uu);if(!o.getValue("editor.folding",{resource:i}))return[];const r=e.get(Xu),a=o.getValue("editor.foldingStrategy",{resource:i}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:i})},update:(e,t)=>{}},h=new BQ(s,r,l);let d=h;if("indentation"!==a){const e=iJ.getFoldingRangeProviders(n,s);e.length&&(d=new ZQ(s,e,(()=>{}),l,h))}const c=yield d.compute(Hh.None),g=[];try{if(c)for(let e=0;eAq.replace(Mh.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",s.map((e=>Aq.replaceMove(Mh.lift(e.range),e.text)))),i&&e.pushUndoStop(),n.restoreRelativeVerticalPositionOfCursor(e)}}class hJ{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}class dJ{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(hJ.toKey(e))}has(e){return this._set.has(hJ.toKey(e))}}var cJ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function uJ(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let s=1;sa.provideDocumentRangeFormattingEdits(e,e.getFullModelRange(),t,i)})}return n}class pJ{static setFormatterSelector(e){return{dispose:pJ._selectors.unshift(e)}}static select(e,t,i){return cJ(this,void 0,void 0,(function*(){if(0===e.length)return;const n=v.first(pJ._selectors);return n?yield n(e,t,i):void 0}))}}function mJ(e,t,i,n,s,o){return cJ(this,void 0,void 0,(function*(){const r=e.get(Oa),{documentRangeFormattingEditProvider:a}=e.get(iL),l=JW(t)?t.getModel():t,h=a.ordered(l),d=yield pJ.select(h,l,n);d&&(s.report(d),yield r.invokeFunction(fJ,d,t,i,o))}))}function fJ(e,t,i,n,s){var o,r;return cJ(this,void 0,void 0,(function*(){const a=e.get(gG),l=e.get(ah);let h,d;JW(i)?(h=i.getModel(),d=new aL(i,5,void 0,s)):(h=i,d=new lL(i,s));const c=[];let u=0;for(const e of $d(n).sort(Mh.compareRangesUsingStarts))u>0&&Mh.areIntersectingOrTouching(c[u-1],e)?c[u-1]=Mh.fromPositions(c[u-1].getStartPosition(),e.getEndPosition()):u=c.push(e);const g=e=>cJ(this,void 0,void 0,(function*(){var i,n;l.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(i=t.extensionId)||void 0===i?void 0:i.value,e);const s=(yield t.provideDocumentRangeFormattingEdits(h,e,h.getFormattingOptions(),d.token))||[];return l.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(n=t.extensionId)||void 0===n?void 0:n.value,s),s})),p=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>Mh.plusRange(e,t.range)),e[0].range);if(!t.some((e=>Mh.intersectRanges(i,e.range))))return!1;for(const n of e)for(const e of t)if(Mh.intersectRanges(n.range,e.range))return!0;return!1},m=[],f=[];try{if("function"==typeof t.provideDocumentRangesFormattingEdits){l.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(o=t.extensionId)||void 0===o?void 0:o.value,c);const e=(yield t.provideDocumentRangesFormattingEdits(h,c,h.getFormattingOptions(),d.token))||[];l.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(r=t.extensionId)||void 0===r?void 0:r.value,e),f.push(e)}else{for(const e of c){if(d.token.isCancellationRequested)return!0;f.push(yield g(e))}for(let e=0;e({text:e.text,range:Mh.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(Mh.areIntersectingOrTouching(i,t))return[new Th(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function _J(e,t,i,n,s){return cJ(this,void 0,void 0,(function*(){const o=e.get(Oa),r=e.get(iL),a=JW(t)?t.getModel():t,l=gJ(r.documentFormattingEditProvider,r.documentRangeFormattingEditProvider,a),h=yield pJ.select(l,a,i);h&&(n.report(h),yield o.invokeFunction(vJ,h,t,i,s))}))}function vJ(e,t,i,n,s){return cJ(this,void 0,void 0,(function*(){const o=e.get(gG);let r,a,l;JW(i)?(r=i.getModel(),a=new aL(i,5,void 0,s)):(r=i,a=new lL(i,s));try{const e=yield t.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield o.computeMoreMinimalEdits(r.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||0===l.length)return!1;if(JW(i))lJ.execute(i,l,2!==n),2!==n&&(uJ(l),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=l,t=new Th(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);r.pushEditOperations([t],l.map((e=>({text:e.text,range:Mh.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(Mh.areIntersectingOrTouching(i,t))return[new Th(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function bJ(e,t,i,n,s,o,r){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(s)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,s,o,r)).catch(a).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}pJ._selectors=new O,Za.registerCommand("_executeFormatRangeProvider",(function(e,...t){return cJ(this,void 0,void 0,(function*(){const[i,n,s]=t;jr(an.isUri(i)),jr(Mh.isIRange(n));const o=e.get(Va),r=e.get(gG),l=e.get(iL),h=yield o.createModelReference(i);try{return function(e,t,i,n,s,o){return cJ(this,void 0,void 0,(function*(){const r=t.documentRangeFormattingEditProvider.ordered(i);for(const t of r){const r=yield Promise.resolve(t.provideDocumentRangeFormattingEdits(i,n,s,o)).catch(a);if(Wd(r))return yield e.computeMoreMinimalEdits(i.uri,r)}}))}(r,l,h.object.textEditorModel,Mh.lift(n),s,Hh.None)}finally{h.dispose()}}))})),Za.registerCommand("_executeFormatDocumentProvider",(function(e,...t){return cJ(this,void 0,void 0,(function*(){const[i,n]=t;jr(an.isUri(i));const s=e.get(Va),o=e.get(gG),r=e.get(iL),l=yield s.createModelReference(i);try{return function(e,t,i,n,s){return cJ(this,void 0,void 0,(function*(){const o=gJ(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of o){const o=yield Promise.resolve(t.provideDocumentFormattingEdits(i,n,s)).catch(a);if(Wd(o))return yield e.computeMoreMinimalEdits(i.uri,o)}}))}(o,r,l.object.textEditorModel,n,Hh.None)}finally{l.dispose()}}))})),Za.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){return cJ(this,void 0,void 0,(function*(){const[i,n,s,o]=t;jr(an.isUri(i)),jr(Ba.isIPosition(n)),jr("string"==typeof s);const r=e.get(Va),a=e.get(gG),l=e.get(iL),h=yield r.createModelReference(i);try{return bJ(a,l,h.object.textEditorModel,Ba.lift(n),s,o,Hh.None)}finally{h.dispose()}}))}));var CJ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},wJ=function(e,t){return function(i,n){t(i,n,e)}},yJ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let SJ=class{constructor(e,t,i){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._disposables=new N,this._sessionDisposables=new N,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(56)&&this._update()}))),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new Ub;for(const n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=new Uh,s=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return n.cancel(),void s.dispose();for(let t=0,o=e.changes.length;t{n.token.isCancellationRequested||Wd(e)&&(lJ.execute(this._editor,e,!0),uJ(e))})).finally((()=>{s.dispose()}))}};SJ.ID="editor.contrib.autoFormat",SJ=CJ([wJ(1,iL),wJ(2,gG)],SJ);let LJ=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new N,this._callOnModel=new N,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(mJ,this.editor,e,2,pL.None,Hh.None).catch(r))}};LJ.ID="editor.contrib.formatOnPaste",LJ=CJ([wJ(1,iL),wJ(2,Oa)],LJ);Lh(SJ.ID,SJ,2),Lh(LJ.ID,LJ,2),yh(class extends _h{constructor(){super({id:"editor.action.formatDocument",label:ue(0,"Format Document"),alias:"Format Document",precondition:ul.and(Rh.notInCompositeEditor,Rh.writable,Rh.hasDocumentFormattingProvider),kbOpts:{kbExpr:Rh.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return yJ(this,void 0,void 0,(function*(){if(t.hasModel()){const i=e.get(Oa),n=e.get(mL);yield n.showWhile(i.invokeFunction(_J,t,1,pL.None,Hh.None),250)}}))}}),yh(class extends _h{constructor(){super({id:"editor.action.formatSelection",label:ue(0,"Format Selection"),alias:"Format Selection",precondition:ul.and(Rh.writable,Rh.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2084),weight:100},contextMenuOpts:{when:Rh.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return yJ(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(Oa),n=t.getModel(),s=t.getSelections().map((e=>e.isEmpty()?new Mh(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),o=e.get(mL);yield o.showWhile(i.invokeFunction(mJ,t,s,1,pL.None,Hh.None),250)}))}}),Za.registerCommand("editor.action.format",(e=>yJ(void 0,void 0,void 0,(function*(){const t=e.get(Fa).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(Ga);t.getSelection().isEmpty()?yield i.executeCommand("editor.action.formatDocument"):yield i.executeCommand("editor.action.formatSelection")}))));class kJ{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new N;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new I);return s.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange((()=>{s.value=void 0,s.value=this.doProvide(e,t)}))),n}doProvide(e,t){var i;const n=new N,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const o={editor:s},r=tV(s);if(r){let e=null!==(i=s.saveViewState())&&void 0!==i?i:void 0;n.add(r.onDidChangeCursorPosition((()=>{var t;e=null!==(t=s.saveViewState())&&void 0!==t?t:void 0}))),o.restoreViewState=()=>{e&&s===this.activeTextEditorControl&&s.restoreViewState(e)},n.add(_(t.onCancellationRequested)((()=>{var e;return null===(e=o.restoreViewState)||void 0===e?void 0:e.call(o)})))}n.add(x((()=>this.clearDecorations(s)))),n.add(this.provideWithTextEditor(o,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&Ps(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return eV(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:A_(uv),position:vd.Full}}}],[s,o]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:o}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}class DJ extends kJ{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=ue(0,"Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,E.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new N;s.add(t.onDidAccept((i=>{const[s]=t.selectedItems;if(s){if(!this.isValidLineNumber(n,s.lineNumber))return;this.gotoLocation(e,{range:this.toRange(s.lineNumber,s.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const o=()=>{const e=this.parsePosition(n,t.value.trim().substr(DJ.PREFIX.length)),i=this.getPickLabel(n,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(n,e.lineNumber))return void this.clearDecorations(n);const s=this.toRange(e.lineNumber,e.column);n.revealRangeInCenter(s,0),this.addDecorations(n,s)};o(),s.add(t.onDidChangeValue((()=>o())));const r=tV(n);if(r){2===r.getOptions().get(67).renderType&&(r.updateOptions({lineNumbers:"on"}),s.add(x((()=>r.updateOptions({lineNumbers:"relative"})))))}return s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?ue(0,"Go to line {0} and character {1}.",t,i):ue(0,"Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?ue(0,"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):ue(0,"Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&(t>0&&t<=this.lineCount(e))}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){var t,i;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}var xJ;DJ.PREFIX=":",function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(xJ||(xJ={}));const NJ="workbench.contributions.quickaccess";var EJ,IJ,MJ,TJ,RJ,AJ,OJ,PJ;Ul.add(NJ,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),x((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return Pd([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||void 0||this.defaultProvider}}),function(e){e.inspectTokensAction=ue(0,"Developer: Inspect Tokens")}(EJ||(EJ={})),function(e){e.gotoLineActionLabel=ue(0,"Go to Line/Column...")}(IJ||(IJ={})),function(e){e.helpQuickAccessActionLabel=ue(0,"Show all Quick Access Providers")}(MJ||(MJ={})),function(e){e.quickCommandActionLabel=ue(0,"Command Palette"),e.quickCommandHelp=ue(0,"Show And Run Commands")}(TJ||(TJ={})),function(e){e.quickOutlineActionLabel=ue(0,"Go to Symbol..."),e.quickOutlineByCategoryActionLabel=ue(0,"Go to Symbol by Category...")}(RJ||(RJ={})),function(e){e.editorViewAccessibleLabel=ue(0,"Editor content"),e.accessibilityHelpMessage=ue(0,"Press Alt+F1 for Accessibility Options.")}(AJ||(AJ={})),function(e){e.toggleHighContrast=ue(0,"Toggle High Contrast Theme")}(OJ||(OJ={})),function(e){e.bulkEditServiceSummary=ue(0,"Made {0} edits in {1} files")}(PJ||(PJ={}));var FJ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},BJ=function(e,t){return function(i,n){t(i,n,e)}};let WJ=class extends DJ{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=B.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};WJ=FJ([BJ(0,Fa)],WJ);class VJ extends _h{constructor(){super({id:VJ.ID,label:IJ.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(lE).quickAccess.show(WJ.PREFIX)}}VJ.ID="editor.action.gotoLine",yh(VJ),Ul.as(NJ).registerQuickAccessProvider({ctor:WJ,prefix:WJ.PREFIX,helpEntries:[{description:IJ.gotoLineActionLabel,commandId:VJ.ID}]});class HJ extends E{constructor(e){super(),this.editor=e,this.widget=null,He&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(90);!this.widget&&e?this.widget=new zJ(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}HJ.ID="editor.contrib.iPadShowKeyboard";class zJ extends E{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(En(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(En(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return zJ.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}zJ.ID="editor.contrib.ShowKeyboardWidget",Lh(HJ.ID,HJ,3);class UJ{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Th(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new Th(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var KJ,jJ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},qJ=function(e,t){return function(i,n){t(i,n,e)}};let $J=KJ=class{static get(e){return e.getContribution(KJ.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var i;null===(i=this.currentRequest)||void 0===i||i.cancel();const n=this.editor.getSelection(),s=this.editor.getModel();if(!s||!n)return;let o=n;if(o.startLineNumber!==o.endLineNumber)return;const a=new rL(this.editor,5),l=s.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Gh((e=>this.editorWorkerService.navigateValueSet(l,o,t))),this.currentRequest.then((t=>{var i;if(!t||!t.range||!t.value)return;if(!a.validate(this.editor))return;const n=Mh.lift(t.range);let s=t.range;const l=t.value.length-(o.endColumn-o.startColumn);s={startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.startColumn+t.value.length},l>1&&(o=new Th(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+l-1));const h=new UJ(n,o,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,h),this.editor.pushUndoStop(),this.decorations.set([{range:s,options:KJ.DECORATION}]),null===(i=this.decorationRemover)||void 0===i||i.cancel(),this.decorationRemover=Jh(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(r)})).catch(r)):Promise.resolve(void 0)}};$J.ID="editor.contrib.inPlaceReplaceController",$J.DECORATION=xw.register({description:"in-place-replace",className:"valueSetReplacement"}),$J=KJ=jJ([qJ(1,gG)],$J);function GJ(e,t){let i=0;for(let n=0;n=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},XJ=function(e,t){return function(i,n){t(i,n,e)}};function QJ(e,t,i,n,s){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const o=t.getLanguageConfiguration(e.getLanguageId()).indentationRules;if(!o)return[];for(n=Math.min(n,e.getLineCount());i<=n&&o.unIndentedLinePattern;){const t=e.getLineContent(i);if(!o.unIndentedLinePattern.test(t))break;i++}if(i>n-1)return[];const{tabSize:r,indentSize:a,insertSpaces:l}=e.getOptions(),h=(e,t)=>(t=t||1,py.shiftIndent(e,e.length+t,r,a,l)),d=(e,t)=>(t=t||1,py.unshiftIndent(e,e.length+t,r,a,l)),c=[];let u;const g=e.getLineContent(i);let p=g;if(null!=s){u=s;const e=ro(g);p=u+g.substring(e.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(p)&&(u=d(u),p=u+g.substring(e.length)),g!==p&&c.push(Aq.replaceMove(new Th(i,1,i,e.length+1),hc(u,a,l)))}else u=ro(g);let m=u;o.increaseIndentPattern&&o.increaseIndentPattern.test(p)?(m=h(m),u=h(u)):o.indentNextLinePattern&&o.indentNextLinePattern.test(p)&&(m=h(m));for(let f=++i;f<=n;f++){const t=e.getLineContent(f),i=ro(t),n=m+t.substring(i.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(n)&&(m=d(m),u=d(u)),i!==m&&c.push(Aq.replaceMove(new Th(f,1,f,i.length+1),hc(m,a,l))),o.unIndentedLinePattern&&o.unIndentedLinePattern.test(t)||(o.increaseIndentPattern&&o.increaseIndentPattern.test(n)?(u=h(u),m=u):m=o.indentNextLinePattern&&o.indentNextLinePattern.test(n)?h(m):u)}return c}class JJ extends _h{constructor(){super({id:JJ.ID,label:ue(0,"Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:Rh.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new h0(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}JJ.ID="editor.action.indentationToSpaces";class e0 extends _h{constructor(){super({id:e0.ID,label:ue(0,"Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:Rh.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new d0(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}e0.ID="editor.action.indentationToTabs";class t0 extends _h{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(lE),n=e.get(Wa),s=t.getModel();if(!s)return;const o=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),r=s.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===o.tabSize&&e===r.tabSize?ue(0,"Configured Tab Size"):e===o.tabSize?ue(0,"Default Tab Size"):e===r.tabSize?ue(0,"Current Tab Size"):void 0}))),l=Math.min(s.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:ue(0,"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&s&&!s.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?s.updateOptions({tabSize:t}):s.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class i0 extends t0{constructor(){super(!1,!1,{id:i0.ID,label:ue(0,"Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}i0.ID="editor.action.indentUsingTabs";class n0 extends t0{constructor(){super(!0,!1,{id:n0.ID,label:ue(0,"Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}n0.ID="editor.action.indentUsingSpaces";class s0 extends t0{constructor(){super(!0,!0,{id:s0.ID,label:ue(0,"Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}}s0.ID="editor.action.changeTabDisplaySize";class o0 extends _h{constructor(){super({id:o0.ID,label:ue(0,"Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(Wa),n=t.getModel();if(!n)return;const s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}o0.ID="editor.action.detectIndentation";class r0{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&"string"==typeof i.text&&this._edits.push(i)}getEditOperations(e,t){for(const n of this._edits)t.addEditOperation(Mh.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let a0=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new N,this.callOnModel=new N,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(12)<4||this.editor.getOption(55)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(12),{tabSize:s,indentSize:o,insertSpaces:r}=i.getOptions(),a=[],l={shiftIndent:e=>py.shiftIndent(e,e.length+1,s,o,r),unshiftIndent:e=>py.unshiftIndent(e,e.length+1,s,o,r)};let h=e.startLineNumber;for(;h<=e.endLineNumber&&this.shouldIgnoreLine(i,h);)h++;if(h>e.endLineNumber)return;let d=i.getLineContent(h);if(!/\S/.test(d.substring(0,e.startColumn-1))){const e=vy(n,i,i.getLanguageId(),h,l,this._languageConfigurationService);if(null!==e){const t=ro(d),n=GJ(e,s);if(n!==GJ(t,s)){const e=ZJ(n,s,r);a.push({range:new Mh(h,1,h,t.length+1),text:e}),d=e+d.substr(t.length)}else{const e=by(i,h,this._languageConfigurationService);if(0===e||8===e)return}}}const c=h;for(;hi.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===c?d:i.getLineContent(e)},i.getLanguageId(),h+1,l,this._languageConfigurationService);if(null!==t){const n=GJ(t,s),o=GJ(ro(i.getLineContent(h+1)),s);if(n!==o){const t=n-o;for(let n=h+1;n<=e.endLineNumber;n++){const e=ro(i.getLineContent(n)),o=ZJ(GJ(e,s)+t,s,r);o!==e&&a.push({range:new Mh(n,1,n,e.length+1),text:o})}}}}if(a.length>0){this.editor.pushUndoStop();const e=new r0(a,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function l0(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let s="";for(let r=0;r0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}),yh(class extends _h{constructor(){super({id:"editor.action.reindentselectedlines",label:ue(0,"Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:Rh.writable})}run(e,t){const i=e.get(Xu),n=t.getModel();if(!n)return;const s=t.getSelections();if(null===s)return;const o=[];for(const r of s){let e=r.startLineNumber,t=r.endLineNumber;if(e!==t&&1===r.endColumn&&t--,1===e){if(e===t)continue}else e--;const s=QJ(n,i,e,t);o.push(...s)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}});var c0=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class u0{constructor(e,t){this.range=e,this.direction=t}}class g0{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new g0(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return c0(this,void 0,void 0,(function*(){if("function"==typeof this.provider.resolveInlayHint){if(this._currentResolve){if(yield this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),yield this._currentResolve}}))}_doResolve(e){var t,i;return c0(this,void 0,void 0,(function*(){try{const n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=null!==(t=null==n?void 0:n.tooltip)&&void 0!==t?t:this.hint.tooltip,this.hint.label=null!==(i=null==n?void 0:n.label)&&void 0!==i?i:this.hint.label,this._isResolved=!0}catch(n){a(n),this._isResolved=!1}}))}}class p0{static create(e,t,i,n){return c0(this,void 0,void 0,(function*(){const s=[],o=e.ordered(t).reverse().map((e=>i.map((i=>c0(this,void 0,void 0,(function*(){try{const o=yield e.provideInlayHints(t,i,n);(null==o?void 0:o.hints.length)&&s.push([o,e])}catch(o){a(o)}}))))));if(yield Promise.all(o.flat()),n.isCancellationRequested||t.isDisposed())throw new c;return new p0(i,s,t)}))}constructor(e,t,i){this._disposables=new N,this.ranges=e,this.provider=new Set;const n=[];for(const[s,o]of t){this._disposables.add(s),this.provider.add(o);for(const e of s.hints){const t=i.validatePosition(e.position);let s="before";const r=p0._getRangeAtPosition(i,t);let a;r.getStartPosition().isBefore(t)?(a=Mh.fromPositions(r.getStartPosition(),t),s="after"):(a=Mh.fromPositions(t,r.getEndPosition()),s="before"),n.push(new g0(e,new u0(a,s),o))}}this.items=n.sort(((e,t)=>Ba.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new Mh(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const s=e.tokenization.getLineTokens(i),o=t.column-1,r=s.findTokenIndexAtOffset(o);let a=s.getStartOffset(r),l=s.getEndOffset(r);return l-a==1&&(a===o&&r>1?(a=s.getStartOffset(r-1),l=s.getEndOffset(r-1)):l===o&&rXl(e)?e.command.id:kZ())));for(const e of UU.all())u.has(e.desc.id)&&c.push(new za(e.desc.id,nh.label(e.desc,{renderShortTitle:!0}),void 0,!0,(()=>m0(this,void 0,void 0,(function*(){const i=yield o.createModelReference(d.uri);try{const s=new zU(i.object.textEditorModel,Mh.getStartPosition(d.range)),o=n.item.anchor.range;yield l.invokeFunction(e.runEditorCommand.bind(e),t,s,o)}finally{i.dispose()}})))));if(n.part.command){const{command:e}=n.part;c.push(new Ka),c.push(new za(e.id,e.title,void 0,!0,(()=>m0(this,void 0,void 0,(function*(){var t;try{yield a.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}catch(i){h.notify({severity:cL.Error,source:n.item.provider.displayName,message:i})}})))))}const g=t.getOption(126);r.showContextMenu({domForShadowRoot:g&&null!==(s=t.getDomNode())&&void 0!==s?s:void 0,getAnchor:()=>{const e=Hn(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>c,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}))}function _0(e,t,i,n){return m0(this,void 0,void 0,(function*(){const s=e.get(Va),o=yield s.createModelReference(n.uri);yield i.invokeWithinContext((e=>m0(this,void 0,void 0,(function*(){const s=t.hasSideBySideModifier,r=e.get(Rl),a=UW.inPeekEditor.getValue(r),l=!s&&i.getOption(87)&&!a;return new KU({openToSide:s,openInPeek:l,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e,new zU(o.object.textEditorModel,Mh.getStartPosition(n.range)),Mh.lift(n.range))})))),o.dispose()}))}var v0,b0=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},C0=function(e,t){return function(i,n){t(i,n,e)}},w0=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class y0{constructor(){this._entries=new Ks(50)}get(e){const t=y0._key(e);return this._entries.get(t)}set(e,t){const i=y0._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const S0=Pa("IInlayHintsCache");Cu(S0,y0,1);class L0{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return"string"==typeof e?{label:e}:e[this.index]}}class k0{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let D0=v0=class{static get(e){var t;return null!==(t=e.getContribution(v0.ID))&&void 0!==t?t:void 0}constructor(e,t,i,n,s,o,r){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=s,this._notificationService=o,this._instaService=r,this._disposables=new N,this._sessionDisposables=new N,this._decorationsMetadata=new Map,this._ruleFactory=new WE(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(139)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(139);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add(x((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const s=new Set,o=new sd((()=>w0(this,void 0,void 0,(function*(){const e=Date.now();null==n||n.dispose(!0),n=new Uh;const i=t.onWillDispose((()=>null==n?void 0:n.cancel()));try{const i=n.token,r=yield p0.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(o.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void r.dispose();for(const e of r.provider)"function"!=typeof e.onDidChangeInlayHints||s.has(e)||(s.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{o.isScheduled()||o.schedule()}))));this._sessionDisposables.add(r),this._updateHintsDecorators(r.ranges,r.items),this._cacheHintsForFastRestore(t)}catch(a){r(a)}finally{n.dispose(),i.dispose()}}))),this._debounceInfo.get(t));if(this._sessionDisposables.add(o),this._sessionDisposables.add(x((()=>null==n?void 0:n.dispose(!0)))),o.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&o.isScheduled()||o.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{const t=Math.max(o.delay,1250);o.schedule(t)}))),"on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(ks.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),o.schedule(0)}})))}this._sessionDisposables.add(this._installDblClickGesture((()=>o.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new N,t=e.add(new IR(this._editor)),i=new N;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),s=this._editor.getModel();if(!n||!s)return void i.clear();const o=new Uh;i.add(x((()=>o.dispose(!0)))),n.item.resolve(o.token),this._activeInlayHintPart=n.part.command||n.part.location?new k0(n,t.hasTriggerModifier):void 0;const r=s.validatePosition(n.item.hint.position).lineNumber,a=new Mh(r,1,r,s.getLineMaxColumn(r)),l=this._getInlineHintsForRange(a);this._updateHintsDecorators([a],l),i.add(x((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([a],l)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((e=>w0(this,void 0,void 0,(function*(){const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(_0,e,this._editor,i.location):yC.is(i.command)&&(yield this._invokeCommand(i.command,t.item))}}))))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((t=>w0(this,void 0,void 0,(function*(){if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),yield i.item.resolve(Hh.None),Wd(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>Aq.replace(Mh.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))))}_installContextMenu(){return this._editor.onContextMenu((e=>w0(this,void 0,void 0,(function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(f0,this._editor,e.event.target,t))}))))}_getInlayHintLabelPart(e){var t;if(6!==e.target.type)return;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof Dw&&(null==i?void 0:i.attachedData)instanceof L0?i.attachedData:void 0}_invokeCommand(e,t){var i;return w0(this,void 0,void 0,(function*(){try{yield this._commandService.executeCommand(e.id,...null!==(i=e.arguments)&&void 0!==i?i:[])}catch(n){this._notificationService.notify({severity:cL.Error,source:t.provider.displayName,message:n})}}))}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const s=e.getDecorationRange(i);if(s){const e=new u0(s,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(Mh.compareRangesUsingStarts)){const t=e.validateRange(new Mh(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&Mh.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=Mh.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(e,t){var i,n;const s=[],o=(e,t,i,n,o)=>{const r={content:i,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:n,attachedData:o};s.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},r=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(a/3|0)+"px",display:"inline-block"});o(e,i,"\u200a",t?wd.Right:wd.None)},{fontSize:a,fontFamily:l,padding:h,isUniform:d}=this._getLayoutInfo(),c="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(c,l);for(const p of t){p.hint.paddingLeft&&r(p,!1);const e="string"==typeof p.hint.label?[{label:p.hint.label}]:p.hint.label;for(let t=0;tv0._MAX_DECORATORS)break}const u=[];for(const p of e)for(const{id:e}of null!==(n=this._editor.getDecorationsInRange(p))&&void 0!==n?n:[]){const t=this._decorationsMetadata.get(e);t&&(u.push(e),t.classNameRef.dispose(),this._decorationsMetadata.delete(e))}const g=PN.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(u,s.map((e=>e.decoration)));for(let i=0;ii)&&(s=i);const o=e.fontFamily||n;return{fontSize:s,fontFamily:o,padding:t,isUniform:!t&&o===n&&s===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};function x0(e){return e.replace(/[ \t]/g,"\xa0")}D0.ID="editor.contrib.InlayHints",D0._MAX_DECORATORS=1500,D0=v0=b0([C0(1,iL),C0(2,CE),C0(3,S0),C0(4,Ga),C0(5,uL),C0(6,Oa)],D0),Za.registerCommand("_executeInlayHintProvider",((e,...t)=>w0(void 0,void 0,void 0,(function*(){const[i,n]=t;jr(an.isUri(i)),jr(Mh.isIRange(n));const{inlayHintsProvider:s}=e.get(iL),o=yield e.get(Va).createModelReference(i);try{const e=yield p0.create(s,o.object.textEditorModel,[Mh.lift(n)],Hh.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{o.dispose()}}))));var N0=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},E0=function(e,t){return function(i,n){t(i,n,e)}},I0=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},M0=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,s){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,s,(t=e[i](t)).done,t.value)}))}}};class T0 extends hK{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let R0=class extends PK{constructor(e,t,i,n,s,o){super(e,t,i,n,o),this._resolverService=s,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!D0.get(this._editor))return null;if(6!==e.target.type)return null;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof Dw&&i.attachedData instanceof L0?new T0(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof T0?new hd((t=>I0(this,void 0,void 0,(function*(){var n,s,o,r;const{part:a}=e;if(yield a.item.resolve(i),i.isCancellationRequested)return;let l,h;if("string"==typeof a.item.hint.tooltip?l=(new Ia).appendText(a.item.hint.tooltip):a.item.hint.tooltip&&(l=a.item.hint.tooltip),l&&t.emitOne(new OK(this,e.range,[l],!1,0)),Wd(a.item.hint.textEdits)&&t.emitOne(new OK(this,e.range,[(new Ia).appendText(ue(0,"Double-click to insert"))],!1,10001)),"string"==typeof a.part.tooltip?h=(new Ia).appendText(a.part.tooltip):a.part.tooltip&&(h=a.part.tooltip),h&&t.emitOne(new OK(this,e.range,[h],!1,1)),a.part.location||a.part.command){let i;const n=ue(0,"altKey"===this._editor.getOption(77)?Pe?"cmd + click":"ctrl + click":Pe?"option + click":"alt + click");a.part.location&&a.part.command?i=(new Ia).appendText(ue(0,"Go to Definition ({0}), right click for more",n)):a.part.location?i=(new Ia).appendText(ue(0,"Go to Definition ({0})",n)):a.part.command&&(i=new Ia(`[${ue(0,"Execute Command")}](${d=a.part.command,an.from({scheme:vn.command,path:d.id,query:d.arguments&&encodeURIComponent(JSON.stringify(d.arguments))}).toString()} "${a.part.command.title}") (${n})`,{isTrusted:!0})),i&&t.emitOne(new OK(this,e.range,[i],!1,1e4))}var d;const c=yield this._resolveInlayHintLabelPartHover(a,i);try{for(var u,g=!0,p=M0(c);!(n=(u=yield p.next()).done);g=!0){r=u.value,g=!1;const e=r;t.emitOne(e)}}catch(m){s={error:m}}finally{try{g||n||!(o=p.return)||(yield o.call(p))}finally{if(s)throw s.error}}})))):hd.EMPTY}_resolveInlayHintLabelPartHover(e,t){return I0(this,void 0,void 0,(function*(){if(!e.part.location)return hd.EMPTY;const{uri:i,range:n}=e.part.location,s=yield this._resolverService.createModelReference(i);try{const i=s.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?MK(this._languageFeaturesService.hoverProvider,i,new Ba(n.startLineNumber,n.startColumn),t).filter((e=>!Ma(e.hover.contents))).map((t=>new OK(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):hd.EMPTY}finally{s.dispose()}}))}};R0=N0([E0(1,yc),E0(2,Uk),E0(3,uu),E0(4,Va),E0(5,iL)],R0),Lh(D0.ID,D0,1),dK.register(R0);class A0 extends E{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=A0.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=A0.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=A0.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=A0.suppressSuggestions.bindTo(this.contextKeyService),this._register(Hj((e=>{const t=this.model.read(e),i=null==t?void 0:t.state.read(e),n=!!(null==i?void 0:i.inlineCompletion)&&void 0!==(null==i?void 0:i.ghostText)&&!(null==i?void 0:i.ghostText.isEmpty());this.inlineCompletionVisible.set(n),(null==i?void 0:i.ghostText)&&(null==i?void 0:i.inlineCompletion)&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)}))),this._register(Hj((e=>{const t=this.model.read(e);let i=!1,n=!0;const s=null==t?void 0:t.ghostText.read(e);if((null==t?void 0:t.selectedSuggestItem)&&s&&s.parts.length>0){const{column:e,lines:o}=s.parts[0],r=o[0];if(e<=t.textModel.getLineIndentColumn(s.lineNumber)){let e=oo(r);-1===e&&(e=r.length-1),i=e>0;const s=t.textModel.getOptions().tabSize;n=lc.visibleColumnFromColumn(r,e+1,s)t)throw new f(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new Mh(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function B0(e,t){return new Ba(e.lineNumber+t.lineNumber-1,1===t.lineNumber?e.column+t.column-1:t.column)}function W0(e){let t=1,i=1;for(const n of e)"\n"===n?(t++,i=1):i++;return new Ba(t,i)}class V0{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every(((t,i)=>t.equals(e.parts[i])))}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1],i=function(e,t){const i=new O0(e),n=t.map((e=>{const t=Mh.lift(e.range);return{startOffset:i.getOffset(t.getStartPosition()),endOffset:i.getOffset(t.getEndPosition()),text:e.text}}));n.sort(((e,t)=>t.startOffset-e.startOffset));for(const s of n)e=e.substring(0,s.startOffset)+s.text+e.substring(s.endOffset);return e}(e.substr(0,t.column-1),this.parts.map((e=>({range:{startLineNumber:1,endLineNumber:1,startColumn:e.column,endColumn:e.column},text:e.lines.join("\n")}))));return i.substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}get lineCount(){return 1+this.parts.reduce(((e,t)=>e+t.lines.length-1),0)}}class H0{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,i)=>t===e.lines[i]))}}class z0{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.newLines=i,this.additionalReservedLineCount=n,this.parts=[new H0(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join("\n")}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every((e=>0===e.lines.length))}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every(((t,i)=>t===e.newLines[i]))&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function U0(e,t){return e===t||!(!e||!t)&&((e instanceof V0&&t instanceof V0||e instanceof z0&&t instanceof z0)&&e.equals(t))}var K0=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},j0=function(e,t){return function(i,n){t(i,n,e)}};const q0="ghost-text";let $0=class extends E{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=Mj(this,!1),this.currentTextModel=$j(this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=Pj(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;const n=i instanceof z0?i.columnRange:void 0,s=[],o=[];function r(e,t){if(o.length>0){const i=o[o.length-1];t&&i.decorations.push(new fA(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)o.push({content:i,decorations:t?[new fA(1,i.length+1,t,0)]:[]})}const a=t.getLineContent(i.lineNumber);let l,h=0;for(const c of i.parts){let e=c.lines;void 0===l?(s.push({column:c.column,text:e[0],preview:c.preview}),e=e.slice(1)):r([a.substring(h,c.column-1)],void 0),e.length>0&&(r(e,q0),void 0===l&&c.column<=a.length&&(l=c.column)),h=c.column-1}void 0!==l&&r([a.substring(h)],void 0);const d=void 0!==l?new F0(l,a.length+1):void 0;return{replacedRange:n,inlineTexts:s,additionalLines:o,hiddenRange:d,lineNumber:i.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t}})),this.decorations=Pj(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];t.replacedRange&&i.push({range:t.replacedRange.toRange(t.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const n of t.inlineTexts)i.push({range:Mh.fromPositions(new Ba(t.lineNumber,n.column)),options:{description:q0,after:{content:n.text,inlineClassName:n.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:wd.Left},showIfCollapsed:!0}});return i})),this.additionalLinesWidget=this._register(new G0(this.editor,this.languageService.languageIdCodec,Pj((e=>{const t=this.uiState.read(e);return t?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register(x((()=>{this.isDisposed.set(!0,void 0)}))),this._register(function(e,t){const i=new N,n=e.createDecorationsCollection();return i.add(Vj({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};$0=K0([j0(2,yc)],$0);class G0 extends E{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=Zj("editorOptionChanged",B.filter(this.editor.onDidChangeConfiguration,(e=>e.hasChanged(33)||e.hasChanged(116)||e.hasChanged(98)||e.hasChanged(93)||e.hasChanged(51)||e.hasChanged(50)||e.hasChanged(66)))),this._register(Hj((e=>{const t=this.lines.read(e);this.editorOptionsChanged.read(e),t?this.updateLines(t.lineNumber,t.additionalLines,t.minReservedLineCount):this.clear()})))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:s}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const o=Math.max(t.length,i);if(o>0){const i=document.createElement("div");!function(e,t,i,n,s){const o=n.get(33),r=n.get(116),a="none",l=n.get(93),h=n.get(51),d=n.get(50),c=n.get(66),u=new Qc(1e4);u.appendString('
    ');for(let m=0,f=i.length;m');const g=Mo(n),p=Eo(n),f=RC.createEmpty(n,s);DA(new yA(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,n,!1,g,p,0,f,e.decorations,t,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,r,a,l,h!==NS.OFF,null),u),u.appendString("
    ")}u.appendString(""),Bk(e,d);const g=u.build(),p=Z0?Z0.createHTML(g):g;e.innerHTML=p}(i,s,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:o,domNode:i,afterColumnAffinity:1})}}))}}const Z0=Ak("editorGhostText",{createHTML:e=>e});class Y0{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}class X0{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t,i=0,n=this.value.charCodeAt(e);if(t=X0._table[n],"number"==typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(X0.isDigitCharacter(n)){t=8;do{i+=1,n=this.value.charCodeAt(e+i)}while(X0.isDigitCharacter(n));return this.pos+=i,{type:t,pos:e,len:i}}if(X0.isVariableCharacter(n)){t=9;do{n=this.value.charCodeAt(e+ ++i)}while(X0.isVariableCharacter(n)||X0.isDigitCharacter(n));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,n=this.value.charCodeAt(e+i)}while(!isNaN(n)&&void 0===X0._table[n]&&!X0.isDigitCharacter(n)&&!X0.isVariableCharacter(n));return this.pos+=i,{type:t,pos:e,len:i}}}X0._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class Q0{constructor(){this._children=[]}appendChild(e){return e instanceof J0&&this._children[this._children.length-1]instanceof J0?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof a1)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class J0 extends Q0{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new J0(this.value)}}class e1 extends Q0{}class t1 extends e1{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof i1?this._children[0]:void 0}clone(){const e=new t1(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class i1 extends Q0{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof J0&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new i1;return this.options.forEach(e.appendChild,e),e}}class n1 extends Q0{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof s1&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof s1){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new n1;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class s1 extends Q0{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){return new s1(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class o1 extends e1{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new J0(t)],!0)}clone(){const e=new o1(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function r1(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class a1 extends Q0{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof t1&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return r1([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof t1&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof o1&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new a1;return this._children=this.children.map((e=>e.clone())),e}walk(e){r1(this.children,e)}}class l1{constructor(){this._scanner=new X0,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new a1;return this.parseFragment(e,n),this.ensureFinalTabstop(n,null!=i&&i,null!=t&&t),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk((e=>(e instanceof t1&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):s.push(e)),!0)));const o=(e,i)=>{const s=n.get(e.index);if(!s)return;const r=new t1(e.index);r.transform=e.transform;for(const t of s){const e=t.clone();r.appendChild(e),e instanceof t1&&n.has(e.index)&&!i.has(e.index)&&(i.add(e.index),o(e,i),i.delete(e.index))}t.replace(e,[r])},r=new Set;for(const a of s)o(a,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){if(t||i&&e.placeholders.length>0){e.placeholders.find((e=>0===e.index))||e.appendChild(new t1(0))}}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new J0(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new t1(Number(t)):new o1(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new t1(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new J0("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new i1;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new J0(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new o1(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new J0("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new n1;let i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new J0(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(Dre){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new s1(Number(n))),!0;if(this._accept(4))return e.appendChild(new s1(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new s1(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new s1(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new s1(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new s1(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new s1(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new J0(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}var h1=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function d1(e,t,i,n,s=Hh.None,o){return h1(this,void 0,void 0,(function*(){const r=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new Mh(e.lineNumber,i.startColumn,e.lineNumber,n):Mh.fromPositions(e,e.with(void 0,n))}(t,i),l=e.all(i),h=new qs;for(const e of l)e.groupId&&h.add(e.groupId,e);function d(e){if(!e.yieldsToGroupIds)return[];const t=[];for(const i of e.yieldsToGroupIds||[]){const e=h.get(i);for(const i of e)t.push(i)}return t}const c=new Map,u=new Set;function g(e,t){if(t=[...t,e],u.has(e))return t;u.add(e);try{const i=d(e);for(const e of i){const i=g(e,t);if(i)return i}}finally{u.delete(e)}}function p(e){const o=c.get(e);if(o)return o;const r=g(e,[]);r&&a(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${r.map((e=>e.toString?e.toString():""+e)).join(" -> ")}`));const l=new ad;return c.set(e,l.p),(()=>h1(this,void 0,void 0,(function*(){if(!r){const t=d(e);for(const e of t){const t=yield p(e);if(t&&t.items.length>0)return}}try{return yield e.provideInlineCompletions(i,t,n,s)}catch(Dre){return void a(Dre)}})))().then((e=>l.complete(e)),(e=>l.error(e))),l.p}const m=yield Promise.all(l.map((e=>h1(this,void 0,void 0,(function*(){return{provider:e,completions:yield p(e)}}))))),f=new Map,_=[];for(const e of m){const t=e.completions;if(!t)continue;const n=new u1(t,e.provider);_.push(n);for(const e of t.items){const t=g1.from(e,n,r,i,o);f.set(t.hash(),t)}}return new c1(Array.from(f.values()),new Set(f.keys()),_)}))}class c1{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class u1{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,0===this.refCount&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class g1{static from(e,t,i,n,s){let o,r,a=e.range?Mh.lift(e.range):i;if("string"==typeof e.insertText){if(o=e.insertText,s&&e.completeBracketPairs){o=p1(o,a.getStartPosition(),n,s);const t=o.length-e.insertText.length;0!==t&&(a=new Mh(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+t))}r=void 0}else if("snippet"in e.insertText){const t=e.insertText.snippet.length;if(s&&e.completeBracketPairs){e.insertText.snippet=p1(e.insertText.snippet,a.getStartPosition(),n,s);const i=e.insertText.snippet.length-t;0!==i&&(a=new Mh(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+i))}const i=(new l1).parse(e.insertText.snippet);1===i.children.length&&i.children[0]instanceof J0?(o=i.children[0].value,r=void 0):(o=i.toString(),r={snippet:e.insertText.snippet,range:a})}else Vl(e.insertText);return new g1(o,e.command,a,o,r,e.additionalTextEdits||P0,e,t)}constructor(e,t,i,n,s,o,r,a){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=s,this.additionalTextEdits=o,this.sourceInlineCompletion=r,this.source=a,n=(e=e.replace(/\r\n|\r/g,"\n")).replace(/\r\n|\r/g,"\n")}withRange(e){return new g1(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function p1(e,t,i,n){const s=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,o=i.tokenization.tokenizeLineWithEdit(t,s.length-(t.column-1),e),r=null==o?void 0:o.sliceAndInflate(t.column-1,s.length,0);if(!r)return e;const a=function(e,t){const i=new Tg,n=new Xg(i,(e=>t.getLanguageConfiguration(e))),s=sp(new $g(new Y0([e]),n),[],void 0,!0);let o="";const r=e.getLineContent();return function e(t,i){if(2===t.kind)if(e(t.openingBracket,i),i=_g(i,t.openingBracket.length),t.child&&(e(t.child,i),i=_g(i,t.child.length)),t.closingBracket)e(t.closingBracket,i),i=_g(i,t.closingBracket.length);else{const e=n.getSingleLanguageBracketTokens(t.openingBracket.languageId).findClosingTokenText(t.openingBracket.bracketIds);o+=e}else if(3===t.kind);else if(0===t.kind||1===t.kind)o+=r.substring(i,_g(i,t.length));else if(4===t.kind)for(const n of t.children)e(n,i),i=_g(i,n.length)}(s,0),o}(r,n);return a}class m1{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){const i=t?this.range.intersectRanges(t):this.range;if(!i)return this;const n=e.getValueInRange(i,1),s=vo(n,this.text),o=B0(this.range.getStartPosition(),W0(n.substring(0,s))),r=this.text.substring(s),a=Mh.fromPositions(o,this.range.getEndPosition());return new m1(a,r)}augments(e){return this.text.startsWith(e.text)&&(t=this.range,(i=e.range).getStartPosition().equals(t.getStartPosition())&&i.getEndPosition().isBeforeOrEqual(t.getEndPosition()));var t,i}computeGhostText(e,t,i,n=0){let s=this.removeCommonPrefix(e);if(s.range.endLineNumber!==s.range.startLineNumber)return;const o=e.getLineContent(s.range.startLineNumber),r=ro(o).length;if(s.range.startColumn-1<=r){const e=ro(s.text).length,t=o.substring(s.range.startColumn-1,r),[i,n]=[s.range.getStartPosition(),s.range.getEndPosition()],a=i.column+t.length<=n.column?i.delta(0,t.length):n,l=Mh.fromPositions(a,n),h=s.text.startsWith(t)?s.text.substring(t.length):s.text.substring(e);s=new m1(l,h)}const a=e.getValueInRange(s.range),l=function(e,t){if((null==f1?void 0:f1.originalValue)===e&&(null==f1?void 0:f1.newValue)===t)return null==f1?void 0:f1.changes;{let i=v1(e,t,!0);if(i){const n=_1(i);if(n>0){const s=v1(e,t,!1);s&&_1(s)0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==a.length)return}const c=s.text.length-n;for(const u of l){const e=s.range.startColumn+u.originalStart+u.originalLength;if("subwordSmart"===t&&i&&i.lineNumber===s.range.startLineNumber&&e0)return;if(0===u.modifiedLength)continue;const n=u.modifiedStart+u.modifiedLength,o=Math.max(u.modifiedStart,Math.min(n,c)),r=s.text.substring(u.modifiedStart,o),a=s.text.substring(o,Math.max(u.modifiedStart,n));if(r.length>0){const t=so(r);d.push(new H0(e,t,!1))}if(a.length>0){const t=so(a);d.push(new H0(e,t,!0))}}return new V0(h,d)}}let f1;function _1(e){let t=0;for(const i of e)t+=i.originalLength;return t}function v1(e,t,i){if(e.length>5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;it&&(t=n)}return t}const s=Math.max(n(e),n(t));function o(e){if(e<0)throw new Error("unexpected");return s+e+1}function r(e){let t=0,n=0;const s=new Int32Array(e.length);for(let r=0,a=e.length;ra},{getElements:()=>l}).ComputeDiff(!1).changes}var b1=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},C1=function(e,t){return function(i,n){t(i,n,e)}},w1=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let y1=class extends E{constructor(e,t,i,n,s){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=s,this._updateOperation=this._register(new I),this.inlineCompletions=Rj("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=Rj("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent((()=>{this._updateOperation.clear()})))}fetch(e,t,i){var n,s;const o=new S1(e,t,this.textModel.getVersionId()),r=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(null===(n=this._updateOperation.value)||void 0===n?void 0:n.request.satisfies(o))return this._updateOperation.value.promise;if(null===(s=r.get())||void 0===s?void 0:s.request.satisfies(o))return Promise.resolve(!0);const a=!!this._updateOperation.value;this._updateOperation.clear();const l=new Uh,h=(()=>w1(this,void 0,void 0,(function*(){var n,s;if((a||t.triggerKind===cC.Automatic)&&(yield(n=this._debounceValue.get(this.textModel),new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),n);s&&(t=s.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))})))),l.token.isCancellationRequested||this.textModel.getVersionId()!==o.versionId)return!1;const h=new Date,d=yield d1(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,l.token,this.languageConfigurationService);if(l.token.isCancellationRequested||this.textModel.getVersionId()!==o.versionId)return!1;const c=new Date;this._debounceValue.update(this.textModel,c.getTime()-h.getTime());const u=new k1(d,o,this.textModel,this.versionId);if(i){const t=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!d.has(t)&&u.prepend(i.inlineCompletion,t.range,!0)}return this._updateOperation.clear(),Dj((e=>{r.set(u,e)})),!0})))(),d=new L1(o,l,h);return this._updateOperation.value=d,h}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;(null===(t=this._updateOperation.value)||void 0===t?void 0:t.request.context.selectedSuggestionInfo)&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};y1=b1([C1(3,iL),C1(4,Xu)],y1);class S1{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&function(e,t,i){if(!e||!t)return e===t;return i(e,t)}(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,((e,t)=>e.equals(t)))&&(e.context.triggerKind===cC.Automatic||this.context.triggerKind===cC.Explicit)&&this.versionId===e.versionId}}class L1{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class k1{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=i,this.versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=Pj(this,(e=>{this.versionId.read(e);let t=!1;for(const i of this._inlineCompletions)t=t||i._updateRange(this.textModel);return t&&this._rangeVersionIdValue++,this._rangeVersionIdValue}));const s=i.deltaDecorations([],e.completions.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._inlineCompletions=e.completions.map(((e,t)=>new D1(e,s[t],this._rangeVersionId)))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,0===this._refCount){setTimeout((()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map((e=>e.decorationId)),[])}),0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new D1(e,n,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}}class D1{get forwardStable(){var e;return null!==(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)&&void 0!==e&&e}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=i,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=null!=n?n:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new m1(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,i){const n=this._toFilterTextReplacement(i).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(i).getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const s=e.getValueInRange(n.range,1).toLowerCase(),o=n.text.toLowerCase(),r=Math.max(0,t.column-n.range.startColumn);let a=o.substring(0,r),l=o.substring(r),h=s.substring(0,r),d=s.substring(r);const c=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=c&&(h=h.trimStart(),0===h.length&&(d=d.trimStart()),a=a.trimStart(),0===a.length&&(l=l.trimStart())),a.startsWith(h)&&!!Zo(d,l)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new m1(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return x1(this._getUpdatedRange(e)).isBefore(x1(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){const t=e.getDecorationRange(this.decorationId);return t?!this._updatedRange.equalsRange(t)&&(this._updatedRange=t,!0):(this._isValid=!1,!0)}}function x1(e){return e.startLineNumber===e.endLineNumber?new Ba(1,1+e.endColumn-e.startColumn):new Ba(1+e.endLineNumber-e.startLineNumber,e.endColumn)}var N1=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const E1={Visible:LX,HasFocusedSuggestion:new Tl("suggestWidgetHasFocusedSuggestion",!1,ue(0,"Whether any suggestion is focused")),DetailsVisible:new Tl("suggestWidgetDetailsVisible",!1,ue(0,"Whether suggestion details are visible")),MultipleSuggestions:new Tl("suggestWidgetMultipleSuggestions",!1,ue(0,"Whether there are multiple suggestions to pick from")),MakesTextEdit:new Tl("suggestionMakesTextEdit",!0,ue(0,"Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Tl("acceptSuggestionOnEnter",!0,ue(0,"Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Tl("suggestionHasInsertAndReplaceRange",!1,ue(0,"Whether the current suggestion has insert and replace behaviour")),InsertMode:new Tl("suggestionInsertMode",void 0,{type:"string",description:ue(0,"Whether the default behaviour is to insert or replace")}),CanResolve:new Tl("suggestionCanResolve",!1,ue(0,"Whether the current suggestion supports to resolve further details"))},I1=new Ql("suggestWidgetStatusBar");class M1{constructor(e,t,i,n){var s;this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=Ir.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:null===(s=t.label)||void 0===s?void 0:s.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,Mh.isIRange(t.range)?(this.editStart=new Ba(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new Ba(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new Ba(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||Mh.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new Ba(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new Ba(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new Ba(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||Mh.spansMultipleLines(t.range.insert)||Mh.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return void 0!==this._resolveDuration}get resolveDuration(){return void 0!==this._resolveDuration?this._resolveDuration:-1}resolve(e){return N1(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._resolveDuration=void 0})),i=new F(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._resolveDuration=i.elapsed()}),(e=>{d(e)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})).finally((()=>{t.dispose()}))}return this._resolveCache}))}}class T1{constructor(e=2,t=new Set,i=new Set,n=new Map,s=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=s}}let R1;T1.default=new T1;class A1{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function O1(e,t,i,n=T1.default,s={triggerKind:0},o=Hh.None){return N1(this,void 0,void 0,(function*(){const r=new F;i=i.clone();const l=t.getWordAtPosition(i),h=l?new Mh(i.lineNumber,l.startColumn,i.lineNumber,l.endColumn):Mh.fromPositions(i),d={replace:h,insert:h.setEndPosition(i.lineNumber,i.column)},u=[],g=new N,p=[];let m=!1;const f=(e,t,s)=>{var o,r,a;let l=!1;if(!t)return l;for(const h of t.suggestions)if(!n.kindFilter.has(h.kind)){if(!n.showDeprecated&&(null===(o=null==h?void 0:h.tags)||void 0===o?void 0:o.includes(1)))continue;h.range||(h.range=d),h.sortText||(h.sortText="string"==typeof h.label?h.label:h.label.label),!m&&h.insertTextRules&&4&h.insertTextRules&&(m=l1.guessNeedsClipboard(h.insertText)),u.push(new M1(i,h,t,e)),l=!0}return L(t)&&g.add(t),p.push({providerName:null!==(r=e._debugDisplayName)&&void 0!==r?r:"unknown_provider",elapsedProvider:null!==(a=t.duration)&&void 0!==a?a:-1,elapsedOverall:s.elapsed()}),l},_=(()=>N1(this,void 0,void 0,(function*(){})))();for(const c of e.orderedGroups(t)){let e=!1;if(yield Promise.all(c.map((r=>N1(this,void 0,void 0,(function*(){if(n.providerItemsToReuse.has(r)){const t=n.providerItemsToReuse.get(r);return t.forEach((e=>u.push(e))),void(e=e||t.length>0)}if(!(n.providerFilter.size>0)||n.providerFilter.has(r))try{const n=new F,a=yield r.provideCompletionItems(t,i,s,o);e=f(r,a,n)||e}catch(l){a(l)}}))))),e||o.isCancellationRequested)break}return yield _,o.isCancellationRequested?(g.dispose(),Promise.reject(new c)):new A1(u.sort((v=n.snippetSortOrder,F1.get(v))),m,{entries:p,elapsed:r.elapsed()},g);var v}))}function P1(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.textLabelt.textLabel?1:e.completion.kind-t.completion.kind}const F1=new Map;F1.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return P1(e,t)})),F1.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return P1(e,t)})),F1.set(1,P1),Za.registerCommand("_executeCompletionItemProvider",((e,...t)=>N1(void 0,void 0,void 0,(function*(){const[i,n,s,o]=t;jr(an.isUri(i)),jr(Ba.isIPosition(n)),jr("string"==typeof s||!s),jr("number"==typeof o||!o);const{completionProvider:r}=e.get(iL),a=yield e.get(Va).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=a.object.textEditorModel.validatePosition(n),l=yield O1(r,a.object.textEditorModel,i,void 0,{triggerCharacter:null!=s?s:void 0,triggerKind:s?1:0});for(const n of l.items)t.length<(null!=o?o:0)&&t.push(n.resolve(Hh.None)),e.incomplete=e.incomplete||n.container.incomplete,e.suggestions.push(n.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>l.disposable.dispose()),100)}}finally{a.dispose()}}))));class B1{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}function W1(e,t=Oe){return function(e,t=Oe){return!!t&&ga(e.charCodeAt(0))&&58===e.charCodeAt(1)}(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);var V1=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},H1=function(e,t){return function(i,n){t(i,n,e)}};Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class z1{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class U1{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=ro(this._model.getLineContent(this._selection.startLineNumber),0,this._selection.startColumn-1);let n=i;e.snippet.walk((t=>t!==e&&(t instanceof J0&&(n=ro(so(t.value).pop())),!0)));const s=vo(n,i);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${n.substr(s)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class K1{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return Xi(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=Xi(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===Yi(this._model.uri.fsPath)?"":this._labelService.getUriLabel(wa(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class j1{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!Zs(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let q1=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};q1=V1([H1(2,Xu)],q1);class $1{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if("CURRENT_YEAR"===t)return String(this._date.getFullYear());if("CURRENT_YEAR_SHORT"===t)return String(this._date.getFullYear()).slice(-2);if("CURRENT_MONTH"===t)return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if("CURRENT_DATE"===t)return String(this._date.getDate().valueOf()).padStart(2,"0");if("CURRENT_HOUR"===t)return String(this._date.getHours().valueOf()).padStart(2,"0");if("CURRENT_MINUTE"===t)return String(this._date.getMinutes().valueOf()).padStart(2,"0");if("CURRENT_SECOND"===t)return String(this._date.getSeconds().valueOf()).padStart(2,"0");if("CURRENT_DAY_NAME"===t)return $1.dayNames[this._date.getDay()];if("CURRENT_DAY_NAME_SHORT"===t)return $1.dayNamesShort[this._date.getDay()];if("CURRENT_MONTH_NAME"===t)return $1.monthNames[this._date.getMonth()];if("CURRENT_MONTH_NAME_SHORT"===t)return $1.monthNamesShort[this._date.getMonth()];if("CURRENT_SECONDS_UNIX"===t)return String(Math.floor(this._date.getTime()/1e3));if("CURRENT_TIMEZONE_OFFSET"===t){const e=this._date.getTimezoneOffset(),t=e>0?"-":"+",i=Math.trunc(Math.abs(e/60)),n=i<10?"0"+i:i,s=Math.abs(e)-60*i;return t+n+":"+(s<10?"0"+s:s)}}}$1.dayNames=[ue(0,"Sunday"),ue(0,"Monday"),ue(0,"Tuesday"),ue(0,"Wednesday"),ue(0,"Thursday"),ue(0,"Friday"),ue(0,"Saturday")],$1.dayNamesShort=[ue(0,"Sun"),ue(0,"Mon"),ue(0,"Tue"),ue(0,"Wed"),ue(0,"Thu"),ue(0,"Fri"),ue(0,"Sat")],$1.monthNames=[ue(0,"January"),ue(0,"February"),ue(0,"March"),ue(0,"April"),ue(0,"May"),ue(0,"June"),ue(0,"July"),ue(0,"August"),ue(0,"September"),ue(0,"October"),ue(0,"November"),ue(0,"December")],$1.monthNamesShort=[ue(0,"Jan"),ue(0,"Feb"),ue(0,"Mar"),ue(0,"Apr"),ue(0,"May"),ue(0,"Jun"),ue(0,"Jul"),ue(0,"Aug"),ue(0,"Sep"),ue(0,"Oct"),ue(0,"Nov"),ue(0,"Dec")];class G1{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=function(e,t){if("string"==typeof e||void 0===e)return"string"==typeof e?{id:Xi(e)}:t?$q:Gq;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}(this._workspaceService.getWorkspace());return qq(t)?void 0:"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0}_resolveWorkspaceName(e){if(jq(e))return Xi(e.uri.path);let t=Xi(e.configPath.path);return t.endsWith(Yq)&&(t=t.substr(0,t.length-14-1)),t}_resoveWorkspacePath(e){if(jq(e))return W1(e.uri.fsPath);const t=Xi(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?W1(i):"/"}}class Z1{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?kZ():void 0}}var Y1,X1=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Q1=function(e,t){return function(i,n){t(i,n,e)}};class J1{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=Rd(t.placeholders,t1.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(-1===this._offset)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),s=this._snippet.fullLen(i),o=Mh.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),r=i.isFinalTabstop?J1._decor.inactiveFinal:J1._decor.inactive,a=t.addDecoration(o,r);this._placeholderDecorations.set(i,a)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),s=this._editor.getModel().getValueInRange(n),o=t.transform.resolve(s).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx]){const o=this._placeholderDecorations.get(s),r=this._editor.getModel().getDecorationRange(o);n.push(new Th(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(s),e.changeDecorationOptions(o,s.isFinalTabstop?J1._decor.activeFinal:J1._decor.active),i.add(s);for(const t of this._snippet.enclosingPlaceholders(s)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?J1._decor.activeFinal:J1._decor.active),i.add(t)}}for(const[t,s]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(s,t.isFinalTabstop?J1._decor.inactiveFinal:J1._decor.inactive);return n}));return t?this.move(e):null!=i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof t1){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),s=this._editor.getModel().getDecorationRange(t);if(!s){e.delete(n.index);break}i.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(null==e?void 0:e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof i1,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const s=e.shift();console.assert(-1!==s._offset),console.assert(!s._placeholderDecorations);const o=s._snippet.placeholderInfo.last.index;for(const e of s._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(o+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of s._snippet.placeholders){const n=s._snippet.offset(e),o=s._snippet.fullLen(e),r=Mh.fromPositions(t.getPositionAt(s._offset+n),t.getPositionAt(s._offset+n+o)),a=i.addDecoration(r,J1._decor.inactive);this._placeholderDecorations.set(e,a)}}this._placeholderGroups=Rd(this._snippet.placeholders,t1.compareByIndex)}))}}J1._decor={active:xw.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:xw.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:xw.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:xw.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const e2={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let t2=Y1=class{static adjustWhitespace(e,t,i,n,s){const o=ro(e.getLineContent(t.lineNumber),0,t.column-1);let r;return n.walk((t=>{if(!(t instanceof J0)||t.parent instanceof i1)return!0;if(s&&!s.has(t))return!0;const a=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)a[0]=e.normalizeIndentation(a[0]);else{r=null!=r?r:n.toString();const t=r.charCodeAt(i-1);10!==t&&13!==t||(a[0]=e.normalizeIndentation(o+a[0]))}for(let t=1;te.get(Kq))),g=e.invokeWithinContext((e=>new K1(e.get(qz),c))),p=()=>r,m=c.getValueInRange(Y1.adjustSelection(c,e.getSelection(),i,0)),f=c.getValueInRange(Y1.adjustSelection(c,e.getSelection(),0,n)),_=c.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),v=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>Mh.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:b,idx:C}of v){let r=Y1.adjustSelection(c,b,i,0),w=Y1.adjustSelection(c,b,0,n);m!==c.getValueInRange(r)&&(r=b),f!==c.getValueInRange(w)&&(w=b);const y=b.setStartPosition(r.startLineNumber,r.startColumn).setEndPosition(w.endLineNumber,w.endColumn),S=(new l1).parse(t,!0,s),L=y.getStartPosition(),k=Y1.adjustWhitespace(c,L,o||C>0&&_!==c.getLineFirstNonWhitespaceColumn(b.positionLineNumber),S);S.resolveVariables(new z1([g,new j1(p,C,v.length,"spread"===e.getOption(78)),new U1(c,b,C,a),new q1(c,b,l),new $1,new G1(u),new Z1])),h[C]=Aq.replace(y,S.toString()),h[C].identifier={major:C,minor:0},h[C]._isTracked=!0,d[C]=new J1(e,S,k)}return{edits:h,snippets:d}}static createEditsAndSnippetsFromEdits(e,t,i,n,s,o,r){if(!e.hasModel()||0===t.length)return{edits:[],snippets:[]};const a=[],l=e.getModel(),h=new l1,d=new a1,c=new z1([e.invokeWithinContext((e=>new K1(e.get(qz),l))),new j1((()=>s),0,e.getSelections().length,"spread"===e.getOption(78)),new U1(l,e.getSelection(),0,o),new q1(l,e.getSelection(),r),new $1,new G1(e.invokeWithinContext((e=>e.get(Kq)))),new Z1]);t=t.sort(((e,t)=>Mh.compareRangesUsingStarts(e.range,t.range)));let u=0;for(let g=0;g0){const i=t[g-1].range,n=Mh.fromPositions(i.getEndPosition(),e.getStartPosition()),s=new J0(l.getValueInRange(n));d.appendChild(s),u+=s.value.length}const n=h.parseFragment(i,d);Y1.adjustWhitespace(l,e.getStartPosition(),!0,d,new Set(n)),d.resolveVariables(c);const s=d.toString(),o=s.slice(u);u=s.length;const r=Aq.replace(e,o);r.identifier={major:g,minor:0},r._isTracked=!0,a.push(r)}return h.ensureFinalTabstop(d,i,!0),{edits:a,snippets:[new J1(e,d,"")]}}constructor(e,t,i=e2,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){k(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}="string"==typeof this._template?Y1.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):Y1.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>{const i=e.filter((e=>!!e.identifier));for(let n=0;nTh.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=e2){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=Y1.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,(e=>{const t=e.filter((e=>!!e.identifier));for(let s=0;sTh.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))}))}e.sort(Mh.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(Mh.compareRangesUsingStarts);for(let s=0;s0}};t2=Y1=X1([Q1(3,Xu)],t2);var i2,n2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},s2=function(e,t){return function(i,n){t(i,n,e)}};const o2={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let r2=i2=class{static get(e){return e.getContribution(i2.ID)}constructor(e,t,i,n,s){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=s,this._snippetListener=new N,this._modelVersionId=-1,this._inSnippet=i2.InSnippetMode.bindTo(n),this._hasNextTabstop=i2.HasNextTabstop.bindTo(n),this._hasPrevTabstop=i2.HasPrevTabstop.bindTo(n)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?o2:Object.assign(Object.assign({},o2),t))}catch(Dre){this.cancel(),this._logService.error(Dre),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!=typeof e&&this.cancel(),this._session?(jr("string"==typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new t2(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),null===(i=this._session)||void 0===i?void 0:i.hasChoice){const e={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!Ba.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),s=Boolean(i.choice.options.find((e=>e.value===n))),o=[];for(let r=0;r{null==i||i.dispose(),n=!1},o=()=>{n||(i=this._languageFeaturesService.completionProvider.register({language:t.getLanguageId(),pattern:t.uri.fsPath,scheme:t.uri.scheme,exclusive:!0},e),this._snippetListener.add(i),n=!0)};this._choiceCompletions={provider:e,enable:o,disable:s}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState())))}}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:t}=this._session;if(!t||!this._choiceCompletions)return null===(e=this._choiceCompletions)||void 0===e||e.disable(),void(this._currentChoice=void 0);this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask((()=>{!function(e,t){var i;null===(i=e.getContribution("editor.contrib.suggestController"))||void 0===i||i.triggerSuggest((new Set).add(t),void 0,!0)}(this._editor,this._choiceCompletions.provider)})))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;null===(e=this._session)||void 0===e||e.prev(),this._updateState()}next(){var e;null===(e=this._session)||void 0===e||e.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};r2.ID="snippetController2",r2.InSnippetMode=new Tl("inSnippetMode",!1,ue(0,"Whether the editor in current in snippet mode")),r2.HasNextTabstop=new Tl("hasNextTabstop",!1,ue(0,"Whether there is a next tab stop when in snippet mode")),r2.HasPrevTabstop=new Tl("hasPrevTabstop",!1,ue(0,"Whether there is a previous tab stop when in snippet mode")),r2=i2=n2([s2(1,ah),s2(2,iL),s2(3,Rl),s2(4,Xu)],r2),Lh(r2.ID,r2,4);const a2=fh.bindToContribution(r2.get);wh(new a2({id:"jumpToNextSnippetPlaceholder",precondition:ul.and(r2.InSnippetMode,r2.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:Rh.editorTextFocus,primary:2}})),wh(new a2({id:"jumpToPrevSnippetPlaceholder",precondition:ul.and(r2.InSnippetMode,r2.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:Rh.editorTextFocus,primary:1026}})),wh(new a2({id:"leaveSnippet",precondition:r2.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:Rh.editorTextFocus,primary:9,secondary:[1033]}})),wh(new a2({id:"acceptSnippet",precondition:r2.InSnippetMode,handler:e=>e.finish()}));var l2,h2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},d2=function(e,t){return function(i,n){t(i,n,e)}},c2=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.Undo=0]="Undo",e[e.Redo=1]="Redo",e[e.AcceptWord=2]="AcceptWord",e[e.Other=3]="Other"}(l2||(l2={}));let u2=class extends E{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,s,o,r,a,l,h,d,c){let u;super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=i,this.textModelVersionId=n,this._debounceValue=s,this._suggestPreviewEnabled=o,this._suggestPreviewMode=r,this._inlineSuggestMode=a,this._enabled=l,this._instantiationService=h,this._commandService=d,this._languageConfigurationService=c,this._source=this._register(this._instantiationService.createInstance(y1,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Mj(this,!1),this._forceUpdate=Xj("forceUpdate"),this._selectedInlineCompletionId=Mj(this,void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([l2.Redo,l2.Undo,l2.AcceptWord]),this._fetchInlineCompletions=function(e,t){var i;return new Wj(e.owner,e.debugName,t,e.createEmptyChangeSummary,e.handleChange,void 0,null!==(i=e.equalityComparer)&&void 0!==i?i:Oj)}({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:cC.Automatic}),handleChange:(e,t)=>(e.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(e.change)?t.preserveCurrentCompletion=!0:e.didChange(this._forceUpdate)&&(t.inlineCompletionTriggerKind=e.change),!0)},((e,t)=>{this._forceUpdate.read(e);if(!(this._enabled.read(e)&&this.selectedSuggestItem.read(e)||this._isActive.read(e)))return void this._source.cancelUpdate();this.textModelVersionId.read(e);const i=this.selectedInlineCompletion.get(),n=t.preserveCurrentCompletion||(null==i?void 0:i.forwardStable)?i:void 0,s=this._source.suggestWidgetInlineCompletions.get(),o=this.selectedSuggestItem.read(e);if(s&&!o){const e=this._source.inlineCompletions.get();Dj((t=>{e&&s.request.versionId>e.request.versionId&&this._source.inlineCompletions.set(s.clone(),t),this._source.clearSuggestWidgetInlineCompletions(t)}))}const r=this.cursorPosition.read(e),a={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:null==o?void 0:o.toSelectedSuggestionInfo()};return this._source.fetch(r,a,n)})),this._filteredInlineCompletionItems=Pj(this,(e=>{const t=this._source.inlineCompletions.read(e);if(!t)return[];const i=this.cursorPosition.read(e),n=t.inlineCompletions.filter((t=>t.isVisible(this.textModel,i,e)));return n})),this.selectedInlineCompletionIndex=Pj(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineCompletionItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineCompletion=Pj(this,(e=>this._filteredInlineCompletionItems.read(e)[this.selectedInlineCompletionIndex.read(e)])),this.lastTriggerKind=this._source.inlineCompletions.map((e=>null==e?void 0:e.request.context.triggerKind)),this.inlineCompletionsCount=Pj(this,(e=>this.lastTriggerKind.read(e)===cC.Explicit?this._filteredInlineCompletionItems.read(e).length:void 0)),this.state=Fj({owner:this,equalityComparer:(e,t)=>e&&t?U0(e.ghostText,t.ghostText)&&e.inlineCompletion===t.inlineCompletion&&e.suggestItem===t.suggestItem:e===t},(e=>{var t;const i=this.textModel,n=this.selectedSuggestItem.read(e);if(n){const s=n.toSingleTextEdit().removeCommonPrefix(i),o=this._computeAugmentedCompletion(s,e);if(!this._suggestPreviewEnabled.read(e)&&!o)return;const r=null!==(t=null==o?void 0:o.edit)&&void 0!==t?t:s,a=o?o.edit.text.length-s.text.length:0,l=this._suggestPreviewMode.read(e),h=this.cursorPosition.read(e),d=r.computeGhostText(i,l,h,a);return{ghostText:null!=d?d:new V0(r.range.endLineNumber,[]),inlineCompletion:null==o?void 0:o.completion,suggestItem:n}}{if(!this._isActive.read(e))return;const t=this.selectedInlineCompletion.read(e);if(!t)return;const n=t.toSingleTextEdit(e),s=this._inlineSuggestMode.read(e),o=this.cursorPosition.read(e),r=n.computeGhostText(i,s,o);return r?{ghostText:r,inlineCompletion:t,suggestItem:void 0}:void 0}})),this.ghostText=Fj({owner:this,equalityComparer:U0},(e=>{const t=this.state.read(e);if(t)return t.ghostText})),this._register(Jj(this._fetchInlineCompletions)),this._register(Hj((e=>{var t,i;const n=this.state.read(e),s=null==n?void 0:n.inlineCompletion;if((null==s?void 0:s.semanticId)!==(null==u?void 0:u.semanticId)&&(u=s,s)){const e=s.inlineCompletion,n=e.source;null===(i=(t=n.provider).handleItemDidShow)||void 0===i||i.call(t,n.inlineCompletions,e.sourceInlineCompletion,e.insertText)}})))}trigger(e){return c2(this,void 0,void 0,(function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()}))}triggerExplicitly(e){return c2(this,void 0,void 0,(function*(){xj(e,(e=>{this._isActive.set(!0,e),this._forceUpdate.trigger(e,cC.Explicit)})),yield this._fetchInlineCompletions.get()}))}stop(e){xj(e,(e=>{this._isActive.set(!1,e),this._source.clear(e)}))}_computeAugmentedCompletion(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t);return function(e,t){for(const i of e){const e=t(i);if(void 0!==e)return e}}(n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(Ur),(n=>{let s=n.toSingleTextEdit(t);return s=s.removeCommonPrefix(i,Mh.fromPositions(s.range.getStartPosition(),e.range.getEndPosition())),s.augments(e)?{edit:s,completion:n}:void 0}))}_deltaSelectedInlineCompletionIndex(e){return c2(this,void 0,void 0,(function*(){yield this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}))}next(){return c2(this,void 0,void 0,(function*(){yield this._deltaSelectedInlineCompletionIndex(1)}))}previous(){return c2(this,void 0,void 0,(function*(){yield this._deltaSelectedInlineCompletionIndex(-1)}))}accept(e){var t;return c2(this,void 0,void 0,(function*(){if(e.getModel()!==this.textModel)throw new f;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),n.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[Aq.replaceMove(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition()),null===(t=r2.get(e))||void 0===t||t.insert(n.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[Aq.replaceMove(n.range,n.insertText),...n.additionalTextEdits]),n.command&&n.source.addRef(),Dj((e=>{this._source.clear(e),this._isActive.set(!1,e)})),n.command&&(yield this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,a),n.source.removeRef())}))}acceptNextWord(e){return c2(this,void 0,void 0,(function*(){yield this._acceptNext(e,((e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),s=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),o=t.match(s);let r=0;r=o&&void 0!==o.index?0===o.index?o[0].length:o.index:t.length;const a=/\s+/g.exec(t);return a&&void 0!==a.index&&a.index+a[0].length{const i=t.match(/\n/);return i&&void 0!==i.index?i.index+1:t.length}))}))}_acceptNext(e,t){return c2(this,void 0,void 0,(function*(){if(e.getModel()!==this.textModel)throw new f;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.ghostText,s=i.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText)return void(yield this.accept(e));const o=n.parts[0],r=new Ba(n.lineNumber,o.column),a=o.lines.join("\n"),l=t(r,a);if(l===a.length&&1===n.parts.length)return void this.accept(e);const h=a.substring(0,l);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[Aq.replace(Mh.fromPositions(r),h)]);const t=W0(h);e.setPosition(B0(r,t))}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){const t=Mh.fromPositions(s.range.getStartPosition(),B0(r,W0(h))),i=e.getModel().getValueInRange(t,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,i.length)}}))}handleSuggestAccepted(e){var t,i;const n=e.toSingleTextEdit().removeCommonPrefix(this.textModel),s=this._computeAugmentedCompletion(n,void 0);if(!s)return;const o=s.completion.inlineCompletion;null===(i=(t=o.source.provider).handlePartialAccept)||void 0===i||i.call(t,o.source.inlineCompletions,o.sourceInlineCompletion,n.text.length)}};u2=h2([d2(9,Oa),d2(10,Ga),d2(11,Xu)],u2);var g2,p2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m2=function(e,t){return function(i,n){t(i,n,e)}};class f2{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let s=0;sthis._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===$N.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){var i;const n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if((null===(i=this._strategy)||void 0===i?void 0:i.name)!==n){this._saveState();const e=g2._strategyCtors.get(n)||_2;this._strategy=new e;try{const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=this._storageService.get(`${g2._storagePrefix}/${n}`,e);t&&this._strategy.fromJSON(JSON.parse(t))}catch(Dre){}}return this._strategy}_saveState(){if(this._strategy){const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=JSON.stringify(this._strategy);this._storageService.store(`${g2._storagePrefix}/${this._strategy.name}`,t,e,1)}}};v2._strategyCtors=new Map([["recentlyUsedByPrefix",class extends f2{constructor(){super("recentlyUsedByPrefix"),this._trie=Uq.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageId()}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const s=`${e.getLanguageId()}/${n}`;let o=this._trie.get(s);if(o||(o=this._trie.findSubstr(s)),o)for(let r=0;re.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:dC.fromString(i.type),this._trie.set(t,i)}}}],["recentlyUsed",class extends f2{constructor(){super("recentlyUsed"),this._cache=new Ks(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);const s=i[0].score[0];let o=-1,r=-1,a=-1;for(let l=0;la&&n.type===i[l].completion.kind&&n.insertText===i[l].completion.insertText&&(a=n.touch,r=l),i[l].completion.preselect&&-1===o)return l}return-1!==r?r:-1!==o?o:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:dC.fromString(i.type),this._cache.set(t,i);this._seq=this._cache.size}}],["first",_2]]),v2._storagePrefix="suggest/memories",v2=g2=p2([m2(0,qN),m2(1,uu)],v2);const b2=Pa("ISuggestMemories");Cu(b2,v2,1);var C2,w2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},y2=function(e,t){return function(i,n){t(i,n,e)}};let S2=C2=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=C2.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(122)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(122);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};S2.AtEnd=new Tl("atEndOfWord",!1),S2=C2=w2([y2(1,Rl)],S2);var L2,k2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},D2=function(e,t){return function(i,n){t(i,n,e)}};let x2=L2=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=L2.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(0===e.items.length)return void this.reset();L2._moveIndex(!0,e,t)!==t?(this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(let s=t.items.length;s>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i)&&t.items[n].completion.additionalTextEdits;s--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=L2._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};x2.OtherSuggestions=new Tl("hasOtherSuggestions",!1),x2=L2=k2([D2(1,Rl)],x2);class N2{constructor(e,t,i,n){this._disposables=new N,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{this.reset()}))),this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((s=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!Wd(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new Ub;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var E2=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class I2{provideSelectionRanges(e,t){return E2(this,void 0,void 0,(function*(){const i=[];for(const n of t){const t=[];i.push(t);const s=new Map;yield new Promise((t=>I2._bracketsRightYield(t,0,e,n,s))),yield new Promise((i=>I2._bracketsLeftYield(i,0,e,n,s,t)))}return i}))}static _bracketsRightYield(e,t,i,n,s){const o=new Map,r=Date.now();for(;;){if(t>=I2._maxRounds){e();break}if(!n){e();break}const a=i.bracketPairs.findNextBracket(n);if(!a){e();break}if(Date.now()-r>I2._maxDuration){setTimeout((()=>I2._bracketsRightYield(e,t+1,i,n,s)));break}if(a.bracketInfo.isOpeningBracket){const e=a.bracketInfo.bracketText,t=o.has(e)?o.get(e):0;o.set(e,t+1)}else{const e=a.bracketInfo.getOpeningBrackets()[0].bracketText;let t=o.has(e)?o.get(e):0;if(t-=1,o.set(e,Math.max(0,t)),t<0){let t=s.get(e);t||(t=new O,s.set(e,t)),t.push(a.range)}}n=a.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,o){const r=new Map,a=Date.now();for(;;){if(t>=I2._maxRounds&&0===s.size){e();break}if(!n){e();break}const l=i.bracketPairs.findPrevBracket(n);if(!l){e();break}if(Date.now()-a>I2._maxDuration){setTimeout((()=>I2._bracketsLeftYield(e,t+1,i,n,s,o)));break}if(l.bracketInfo.isOpeningBracket){const e=l.bracketInfo.bracketText;let t=r.has(e)?r.get(e):0;if(t-=1,r.set(e,Math.max(0,t)),t<0){const t=s.get(e);if(t){const n=t.shift();0===t.size&&s.delete(e);const r=Mh.fromPositions(l.range.getEndPosition(),n.getStartPosition()),a=Mh.fromPositions(l.range.getStartPosition(),n.getEndPosition());o.push({range:r}),o.push({range:a}),I2._addBracketLeading(i,a,o)}}}else{const e=l.bracketInfo.getOpeningBrackets()[0].bracketText,t=r.has(e)?r.get(e):0;r.set(e,t+1)}n=l.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(n);0!==s&&s!==t.startColumn&&(i.push({range:Mh.fromPositions(new Ba(n,s),t.getEndPosition())}),i.push({range:Mh.fromPositions(new Ba(n,1),t.getEndPosition())}));const o=n-1;if(o>0){const n=e.getLineFirstNonWhitespaceColumn(o);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(o)&&(i.push({range:Mh.fromPositions(new Ba(o,n),t.getEndPosition())}),i.push({range:Mh.fromPositions(new Ba(o,1),t.getEndPosition())}))}}}I2._maxDuration=30,I2._maxRounds=2;var M2=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class T2{static create(e,t){return M2(this,void 0,void 0,(function*(){if(!t.getOption(117).localityBonus)return T2.None;if(!t.hasModel())return T2.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return T2.None;const[s]=yield(new I2).provideSelectionRanges(i,[n]);if(0===s.length)return T2.None;const o=yield e.computeWordRanges(i.uri,s[0].range);if(!o)return T2.None;const r=i.getWordUntilPosition(n);return delete o[r.word],new class extends T2{distance(e,i){if(!n.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const r="string"==typeof i.label?i.label:i.label.label,a=o[r];if(Bd(a))return 2<<20;const l=Md(a,Mh.fromPositions(e),Mh.compareRangesUsingStarts),h=l>=0?a[l]:a[Math.max(0,~l-1)];let d=s.length;for(const t of s){if(!Mh.containsRange(t.range,h))break;d-=1}return d}}}))}}T2.None=new class extends T2{distance(){return 0}};class R2{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class A2{constructor(e,t,i,n,s,o,r=Mr.default,a=void 0){this.clipboardText=a,this._snippetCompareFn=A2._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=r,"top"===o?this._snippetCompareFn=A2._compareCompletionItemsSnippetsUp:"bottom"===o&&(this._snippetCompareFn=A2._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",s="";const o=1===this._refilterKind?this._items:this._filteredItems,r=[],a=!this._options.filterGraceful||o.length>2e3?Tr:Ar;for(let l=0;l=u)h.score=Ir.Default;else if("string"==typeof h.completion.filterText){const t=a(n,s,e,h.completion.filterText,h.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===co(h.completion.filterText,h.textLabel)?h.score=t:(h.score=mr(n,s,e,h.textLabel,h.labelLow,0),h.score[0]=t[0])}else{const t=a(n,s,e,h.textLabel,h.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;h.score=t}}h.idx=l,h.distance=this._wordDistance.distance(h.position,h.completion),r.push(h),e.push(h.textLabel.length)}this._filteredItems=r.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Td(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return A2._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return A2._compareCompletionItems(e,t)}}var O2,P2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},F2=function(e,t){return function(i,n){t(i,n,e)}},B2=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class W2{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&((n.endColumn===i.column||n.startColumn+1===i.column)&&!!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}let V2=O2=class{constructor(e,t,i,n,s,o,r,a,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=o,this._configurationService=r,this._languageFeaturesService=a,this._envService=l,this._toDispose=new N,this._triggerCharacterListener=new N,this._triggerQuickSuggest=new id,this._triggerState=void 0,this._completionDisposables=new N,this._onDidCancel=new U,this._onDidTrigger=new U,this._onDidSuggest=new U,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Th(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters()}))),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})));let h=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{h=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{h=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{h||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{h||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){k(this._triggerCharacterListener),k([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(90)||!this._editor.hasModel()||!this._editor.getOption(120))return;const e=new Map;for(const i of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const t of i.triggerCharacters||[]){let n=e.get(t);n||(n=new Set,n.add(R1),e.set(t,n)),n.add(i)}const t=t=>{var i;if(!function(e,t){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getContextKeyValue(A0.suppressSuggestions.key);return void 0!==i?!i:!e.getOption(62).suppressSuggestions}(this._editor,this._contextKeyService,this._configurationService))return;if(W2.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let n="";wo(t.charCodeAt(t.length-1))?Co(t.charCodeAt(t.length-2))&&(n=t.substr(t.length-2)):n=t.charAt(t.length-1);const s=e.get(n);if(s){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())s.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:n,retrigger:Boolean(this._completionModel),clipboardText:null===(i=this._completionModel)||void 0===i?void 0:i.clipboardText,completionOptions:{providerFilter:s,providerItemsToReuse:e}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd((()=>t())))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;B1.isAllOff(this._editor.getOption(88))||this._editor.getOption(117).snippetsPreventQuickSuggestions&&(null===(e=r2.get(this._editor))||void 0===e?void 0:e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!W2.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(88);if(!B1.isAllOff(i)){if(!B1.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),s=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==B1.valueFor(i,s))return}(function(e,t){if(!Boolean(t.getContextKeyValue(A0.inlineSuggestionVisible.key)))return!0;const i=t.getContextKeyValue(A0.suppressSuggestions.key);return void 0!==i?!i:!e.getOption(62).suppressSuggestions})(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(89)))}_refilterCompletionItems(){jr(this._editor.hasModel()),jr(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new W2(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(i)}trigger(e){var t,i,n,s,o,a;if(!this._editor.hasModel())return;const l=this._editor.getModel(),h=new W2(l,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:null!==(t=e.shy)&&void 0!==t&&t,position:this._editor.getPosition()}),this._context=h;let d={triggerKind:null!==(i=e.triggerKind)&&void 0!==i?i:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Uh;let c=1;switch(this._editor.getOption(111)){case"top":c=0;break;case"bottom":c=2}const{itemKind:u,showDeprecated:g}=O2._createSuggestFilter(this._editor),p=new T1(c,null!==(s=null===(n=e.completionOptions)||void 0===n?void 0:n.kindFilter)&&void 0!==s?s:u,null===(o=e.completionOptions)||void 0===o?void 0:o.providerFilter,null===(a=e.completionOptions)||void 0===a?void 0:a.providerItemsToReuse,g),m=T2.create(this._editorWorkerService,this._editor),f=O1(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),p,d,this._requestToken.token);Promise.all([f,m]).then((([t,i])=>B2(this,void 0,void 0,(function*(){var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let s=null==e?void 0:e.clipboardText;if(!s&&t.needsClipboard&&(s=yield this._clipboardService.readText()),void 0===this._triggerState)return;const o=this._editor.getModel(),r=new W2(o,this._editor.getPosition(),e),a=Object.assign(Object.assign({},Mr.default),{firstMatchCanBeWeak:!this._editor.getOption(117).matchOnWordStartOnly});if(this._completionModel=new A2(t.items,this._context.column,{leadingLineContent:r.leadingLineContent,characterCountDelta:r.column-this._context.column},i,this._editor.getOption(117),this._editor.getOption(111),a,s),this._completionDisposables.add(t.disposable),this._onNewContext(r),this._reportDurationsTelemetry(t.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const e of t.items)e.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`,e.completion)})))).catch(r)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static _createSuggestFilter(e){const t=new Set;"none"===e.getOption(111)&&t.add(27);const i=e.getOption(117);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if(ro(e.leadingLineContent)===ro(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){if(W2.shouldAutoTrigger(this._editor)&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=W2.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};V2=O2=P2([F2(1,gG),F2(2,Xy),F2(3,rh),F2(4,ah),F2(5,Rl),F2(6,uu),F2(7,iL),F2(8,_E)],V2);class H2{constructor(e,t){this._disposables=new N,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eH2._maxSelectionLength)return;this._lastOvertyped[e]={value:s.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},U2=function(e,t){return function(i,n){t(i,n,e)}};class K2 extends OW{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=ue(0,"{0} ({1})",this._action.label,K2.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"\u23ce")}}let j2=class{constructor(e,t,i,n,s){this._menuId=t,this._menuService=n,this._contextKeyService=s,this._menuDisposables=new N,this.element=ds(e,fs(".suggest-status-bar"));const o=e=>e instanceof nh?i.createInstance(K2,e,void 0):void 0;this._leftActions=new Ix(this.element,{actionViewItemProvider:o}),this._rightActions=new Ix(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const t=[],i=[];for(const[n,s]of e.getActions())"left"===n?t.push(...s):i.push(...s);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};j2=z2([U2(2,Oa),U2(3,Jl),U2(4,Rl)],j2);var q2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},$2=function(e,t){return function(i,n){t(i,n,e)}};function G2(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let Z2=class{constructor(e,t){this._editor=e,this._onDidClose=new U,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new U,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new N,this._renderDisposeable=new N,this._borderWidth=1,this._size=new Wn(330,0),this.domNode=fs(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Yk,{editor:e}),this._body=fs(".body"),this._scrollbar=new TD(this._body,{alwaysConsumeMouseWheel:!0}),ds(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=ds(this._body,fs(".header")),this._close=ds(this._header,fs("span"+ea.asCSSSelector(Qr.close))),this._close.title=ue(0,"Close"),this._type=ds(this._header,fs("p.type")),this._docs=ds(this._body,fs("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(118)||t.fontSize,s=e.get(119)||t.lineHeight,o=t.fontWeight,r=`${n}px`,a=`${s}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+s/n,this.domNode.style.fontWeight=o,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(119)||this._editor.getOption(50).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=ue(0,"Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:s,documentation:o}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`,o=(new Ia).appendCodeblock("empty",t),s=`Provider: ${e.provider._debugDisplayName}`}if(t||G2(e)){if(this.domNode.classList.remove("no-docs","no-type"),s){const e=s.length>1e5?`${s.substr(0,1e5)}\u2026`:s;this._type.textContent=e,this._type.title=e,_s(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else Dn(this._type),this._type.title="",vs(this._type),this.domNode.classList.add("no-type");if(Dn(this._docs),"string"==typeof o)this._docs.classList.remove("markdown-docs"),this._docs.textContent=o;else if(o){this._docs.classList.add("markdown-docs"),Dn(this._docs);const e=this._markdownRenderer.render(o);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new Wn(e,t);Wn.equals(i,this._size)||(this._size=i,function(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Z2=q2([$2(1,Oa)],Z2);class Y2{constructor(e,t){let i,n;this.widget=e,this._editor=t,this._disposables=new N,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new cK,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let s=0,o=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(o=n.width-e.dimension.width,t=!0),e.north&&(s=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+s,left:i.left+o})}e.done&&(i=void 0,n=void 0,s=0,o=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size,this._preferAlignAtTop)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,null!==(i=this._userSize)&&void 0!==i?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const s=Fn(this.getDomNode().ownerDocument.body),o=this.widget.getLayoutInfo(),r=new Wn(220,2*o.lineHeight),a=e.top,l=function(){const i=s.width-(e.left+e.width+o.borderWidth+o.horizontalPadding),n=-o.borderWidth+e.left+e.width,l=new Wn(i,s.height-e.top-o.borderHeight-o.verticalPadding),h=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:h,minSize:r.with(Math.min(i,r.width))}}(),h=[l,function(){const i=e.left-o.borderWidth-o.horizontalPadding,n=Math.max(o.horizontalPadding,e.left-t.width-o.borderWidth),l=new Wn(i,s.height-e.top-o.borderHeight-o.verticalPadding),h=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:h,minSize:r.with(Math.min(i,r.width))}}(),function(){const i=e.left,n=-o.borderWidth+e.top+e.height,a=new Wn(e.width-o.borderHeight,s.height-e.top-e.height-o.verticalPadding);return{top:n,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:r.with(a.width)}}()],d=null!==(n=h.find((e=>e.fit>=0)))&&void 0!==n?n:h.sort(((e,t)=>t.fit-e.fit))[0],c=e.top+e.height-o.borderHeight;let u,g=t.height;const p=Math.max(d.maxSizeTop.height,d.maxSizeBottom.height);let m;g>p&&(g=p),i?g<=d.maxSizeTop.height?(u=!0,m=d.maxSizeTop):(u=!1,m=d.maxSizeBottom):g<=d.maxSizeBottom.height?(u=!1,m=d.maxSizeBottom):(u=!0,m=d.maxSizeTop),this._applyTopLeft({left:d.left,top:u?d.top:c-g}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!u,d===l,u,d!==l),this._resizable.minSize=d.minSize,this._resizable.maxSize=m,this._resizable.layout(g,Math.min(m.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var X2;!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(X2||(X2={}));const Q2=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function J2(e,t,i,n){const s=n===X2.ROOT_FOLDER?["rootfolder-icon"]:n===X2.FOLDER?["folder-icon"]:["file-icon"];if(i){let o;if(i.scheme===vn.data){o=Na.parseMetaData(i).get(Na.META_DATA_LABEL)}else{const e=i.path.match(Q2);e?(o=e4(e[2].toLowerCase()),e[1]&&s.push(`${e4(e[1].toLowerCase())}-name-dir-icon`)):o=e4(i.authority.toLowerCase())}if(n===X2.FOLDER)s.push(`${o}-name-folder-icon`);else{if(o){if(s.push(`${o}-name-file-icon`),s.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},n4=function(e,t){return function(i,n){t(i,n,e)}};function s4(e){return`suggest-aria-id:${e}`}const o4=QT("suggest-more-info",Qr.chevronRight,ue(0,"Icon for more information in the suggest widget.")),r4=new(t4=class{extract(e,t){if(e.textLabel.match(t4._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(t4._regexStrict))return t[0]=e.completion.detail,!0;if("string"==typeof e.completion.documentation){const i=t4._regexRelaxed.exec(e.completion.documentation);if(i&&(0===i.index||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}},t4._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,t4._regexStrict=new RegExp(`^${t4._regexRelaxed.source}$`,"i"),t4);let a4=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new U,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new N,i=e;i.classList.add("show-file-icons");const n=ds(e,fs(".icon")),s=ds(n,fs("span.colorspan")),o=ds(e,fs(".contents")),r=ds(o,fs(".main")),a=ds(r,fs(".icon-label.codicon")),l=ds(r,fs("span.left")),h=ds(r,fs("span.right")),d=new Uz(l,{supportHighlights:!0,supportIcons:!0});t.add(d);const c=ds(l,fs("span.signature-label")),u=ds(l,fs("span.qualifier-label")),g=ds(h,fs("span.details-label")),p=ds(h,fs("span.readMore"+ea.asCSSSelector(o4)));p.title=ue(0,"Read More");const m=()=>{const e=this._editor.getOptions(),t=e.get(50),s=t.getMassagedFontFamily(),o=t.fontFeatureSettings,a=e.get(118)||t.fontSize,l=e.get(119)||t.lineHeight,h=t.fontWeight,d=`${a}px`,c=`${l}px`,u=`${t.letterSpacing}px`;i.style.fontSize=d,i.style.fontWeight=h,i.style.letterSpacing=u,r.style.fontFamily=s,r.style.fontFeatureSettings=o,r.style.lineHeight=c,n.style.height=c,n.style.width=c,p.style.height=c,p.style.width=c};return m(),t.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(50)||e.hasChanged(118)||e.hasChanged(119))&&m()}))),{root:i,left:l,right:h,icon:n,colorspan:s,iconLabel:d,iconContainer:a,parametersLabel:c,qualifierLabel:u,detailsLabel:g,readMore:p,disposables:t}}renderElement(e,t,i){const{completion:n}=e;i.root.id=s4(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:fr(e.score)},o=[];if(19===n.kind&&r4.extract(e,o))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=o[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=J2(this._modelService,this._languageService,an.from({scheme:"fake",path:e.textLabel}),X2.FILE),o=J2(this._modelService,this._languageService,an.from({scheme:"fake",path:n.detail}),X2.FILE);s.extraClasses=t.length>o.length?t:o}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=[J2(this._modelService,this._languageService,an.from({scheme:"fake",path:e.textLabel}),X2.FOLDER),J2(this._modelService,this._languageService,an.from({scheme:"fake",path:n.detail}),X2.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...ea.asClassNameArray(dC.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),"string"==typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=l4(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=l4(n.label.detail||""),i.detailsLabel.textContent=l4(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(117).showInlineDetails?_s(i.detailsLabel):vs(i.detailsLabel),G2(e)?(i.right.classList.add("can-expand-details"),_s(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),vs(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function l4(e){return e.replace(/\r\n|\r|\n/g,"")}a4=i4([n4(1,Wa),n4(2,yc),n4(3,R_)],a4);var h4,d4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},c4=function(e,t){return function(i,n){t(i,n,e)}},u4=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};Sp("editorSuggestWidget.background",{dark:ym,light:ym,hcDark:ym,hcLight:ym},ue(0,"Background color of the suggest widget.")),Sp("editorSuggestWidget.border",{dark:Lm,light:Lm,hcDark:Lm,hcLight:Lm},ue(0,"Border color of the suggest widget."));const g4=Sp("editorSuggestWidget.foreground",{dark:wm,light:wm,hcDark:wm,hcLight:wm},ue(0,"Foreground color of the suggest widget."));Sp("editorSuggestWidget.selectedForeground",{dark:Wf,light:Wf,hcDark:Wf,hcLight:Wf},ue(0,"Foreground color of the selected entry in the suggest widget.")),Sp("editorSuggestWidget.selectedIconForeground",{dark:Vf,light:Vf,hcDark:Vf,hcLight:Vf},ue(0,"Icon foreground color of the selected entry in the suggest widget."));const p4=Sp("editorSuggestWidget.selectedBackground",{dark:Hf,light:Hf,hcDark:Hf,hcLight:Hf},ue(0,"Background color of the selected entry in the suggest widget."));Sp("editorSuggestWidget.highlightForeground",{dark:yf,light:yf,hcDark:yf,hcLight:yf},ue(0,"Color of the match highlights in the suggest widget.")),Sp("editorSuggestWidget.focusHighlightForeground",{dark:Sf,light:Sf,hcDark:Sf,hcLight:Sf},ue(0,"Color of the match highlights in the suggest widget when an item is focused.")),Sp("editorSuggestWidgetStatus.foreground",{dark:S_(g4,.5),light:S_(g4,.5),hcDark:S_(g4,.5),hcLight:S_(g4,.5)},ue(0,"Foreground color of the suggest widget status."));class m4{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof cW}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(Wn.is(e))return Wn.lift(e)}catch(Ws){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let f4=h4=class{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new I,this._pendingShowDetails=new I,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new id,this._disposables=new N,this._onDidSelect=new j,this._onDidFocus=new j,this._onDidHide=new U,this._onDidShow=new U,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new U,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new cK,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new _4(this,e),this._persistedSize=new m4(t,e);class o{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),r=new o(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,i,n,s;if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:o}=this.getLayoutInfo(),a=Math.round(e/2);let{width:l,height:h}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-h)<=a)&&(h=null!==(i=null===(t=r.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:o.height),(!r.persistWidth||Math.abs(r.currentSize.width-l)<=a)&&(l=null!==(s=null===(n=r.persistedSize)||void 0===n?void 0:n.width)&&void 0!==s?s:o.width),this._persistedSize.store(new Wn(l,h))}this._contentWidget.unlockPreference(),r=void 0}}))),this._messageElement=ds(this.element.domNode,fs(".message")),this._listElement=ds(this.element.domNode,fs(".tree"));const a=this._disposables.add(s.createInstance(Z2,this.editor));a.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Y2(a,this.editor);const l=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(117).showIcons);l();const h=s.createInstance(a4,this.editor);this._disposables.add(h),this._disposables.add(h.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new bx("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[h],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>ue(0,"Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!=typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=ue(0,"{0} {1}, {2}",t,i,n):i?t=ue(0,"{0} {1}",t,i):n&&(t=ue(0,"{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion;return ue(0,"{0}, docs: {1}",t,Xs("{0}{1}",n||"",i?"string"==typeof i?i:i.value:""))}}}),this._list.style(Yx({listInactiveFocusBackground:p4,listInactiveFocusOutline:Ep})),this._status=s.createInstance(j2,this.element.domNode,I1);const d=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(117).showStatusBar);d(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(117)&&(d(),l())}))),this._ctxSuggestWidgetVisible=E1.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=E1.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=E1.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=E1.HasFocusedSuggestion.bindTo(i),this._disposables.add(Mn(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=M_(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=Gh((e=>u4(this,void 0,void 0,(function*(){const t=ed((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>t.dispose()));try{return yield i.resolve(e)}finally{t.dispose(),n.dispose()}})))),this._currentSuggestionDetails.then((()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:s4(n)}))})).catch(r)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",4===e),this.element.domNode.classList.remove("message"),e){case 0:vs(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=h4.LOADING_MESSAGE,vs(this._listElement,this._status.element),_s(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,Ps(h4.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=h4.NO_SUGGESTIONS_MESSAGE,vs(this._listElement,this._status.element),_s(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,Ps(h4.NO_SUGGESTIONS_MESSAGE);break;case 3:case 4:vs(this._messageElement),_s(this._listElement,this._status.element),this._show();break;case 5:vs(this._messageElement),_s(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=ed((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,s){var o,r;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(o=this._loadingTimeout)||void 0===o||o.dispose(),null===(r=this._currentSuggestionDetails)||void 0===r||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const a=this._completionModel.items.length,l=0===a;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(s?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=Rn((()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}))}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!G2(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=Rn((()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.heightl&&(a=l);const h=this._completionModel?this._completionModel.stats.pLabelLen*o.typicalHalfwidthCharacterWidth:a,d=o.statusBarHeight+this._list.contentHeight+o.borderHeight,c=o.itemHeight+o.statusBarHeight,u=Hn(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,m=Math.min(s.height-p-o.verticalPadding,d),f=u.top+g.top-o.verticalPadding,_=Math.min(f,d);let v=Math.min(Math.max(_,m)+o.borderHeight,d);r===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(r=this._cappedHeight.wanted),rv&&(r=v);const b=150;r>m||this._forceRenderingAbove&&f>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),v=_):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),v=m),this.element.preferredSize=new Wn(h,o.defaultSize.height),this.element.maxSize=new Wn(l,v),this.element.minSize=new Wn(220,c),this._cappedHeight=r===d?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:r}:void 0}this._resize(a,r)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=t-s+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===(null===(e=this._contentWidget.getPosition())||void 0===e?void 0:e.preference[0]))}getLayoutInfo(){const e=this.editor.getOption(50),t=hD(this.editor.getOption(119)||e.lineHeight,8,1e3),i=this.editor.getOption(117).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Wn(430,i+12*t+s)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};f4.LOADING_MESSAGE=ue(0,"Loading..."),f4.NO_SUGGESTIONS_MESSAGE=ue(0,"No suggestions."),f4=h4=d4([c4(1,qN),c4(2,Rl),c4(3,R_),c4(4,Oa)],f4);class _4{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Wn(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var v4,b4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},C4=function(e,t){return function(i,n){t(i,n,e)}};class w4{constructor(e,t){this._model=e,this._position=t;if(e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);this._marker=e.deltaDecorations([],[{range:Mh.fromPositions(t,n),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let y4=v4=class{static get(e){return e.getContribution(v4.ID)}constructor(e,t,i,n,s,o,r){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=o,this._telemetryService=r,this._lineSuffix=new I,this._toDispose=new N,this._selectors=new S4((e=>e.priority)),this._onWillInsertSuggestItem=new U,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=s.createInstance(V2,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const a=E1.InsertMode.bindTo(n);a.set(e.getOption(117).insertMode),this._toDispose.add(this.model.onDidTrigger((()=>a.set(e.getOption(117).insertMode)))),this.widget=this._toDispose.add(new rd((()=>{const e=this._instantiationService.createInstance(f4,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new N2(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=E1.MakesTextEdit.bindTo(this._contextKeyService),n=E1.HasInsertAndReplaceRange.bindTo(this._contextKeyService),s=E1.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(x((()=>{i.reset(),n.reset(),s.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),o=e.editStart.column,r=t.column;let a=!0;if(!("smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-o!==e.completion.insertText.length)){a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:o,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText}i.set(a),n.set(!Ba.equals(e.editInsertEnd,e.editReplaceEnd)),s.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new _t(!0,!1,!1,!1,33))||Pe&&e.toKeyCodeChord().equals(new _t(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new rd((()=>this._toDispose.add(new H2(this.editor,this.model))))),this._alternatives=this._toDispose.add(new rd((()=>this._toDispose.add(new x2(this.editor,this._contextKeyService))))),this._toDispose.add(s.createInstance(S2,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new w4(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(e.triggerOptions.shy)return;let t=-1;for(const n of this._selectors.itemsOrderedByPriorityDesc)if(t=n.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;-1===t&&(t=0);let i=!1;if(e.triggerOptions.auto){const t=this.editor.getOption(117);"never"===t.selectionMode||"always"===t.selectionMode?i="never"===t.selectionMode:"whenTriggerCharacter"===t.selectionMode?i=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===t.selectionMode&&(i=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.triggerOptions.auto,i)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));const l=E1.AcceptSuggestionsOnEnter.bindTo(n),h=()=>{const e=this.editor.getOption(1);l.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>h()))),h()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=r2.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),s=n.getAlternativeVersionId(),{item:o}=e,l=[],h=new Uh;1&t||this.editor.pushUndoStop();const d=this.getOverwriteInfo(o,Boolean(8&t));this._memoryService.memorize(n,this.editor.getPosition(),o);const c=o.isResolved;let u=-1,g=-1;if(Array.isArray(o.completion.additionalTextEdits)){this.model.cancel();const e=PN.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map((e=>Aq.replaceMove(Mh.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!c){const e=new F;let i;const s=n.onDidChangeContent((e=>{if(e.isFlush)return h.cancel(),void s.dispose();for(const t of e.changes){const e=Mh.getEndPosition(t.range);i&&!Ba.isBefore(e,i)||(i=e)}})),r=t;t|=2;let a=!1;const d=this.editor.onWillType((()=>{d.dispose(),a=!0,2&r||this.editor.pushUndoStop()}));l.push(o.resolve(h.token).then((()=>{if(!o.completion.additionalTextEdits||h.token.isCancellationRequested)return;if(i&&o.completion.additionalTextEdits.some((e=>Ba.isBefore(i,Mh.getStartPosition(e.range)))))return!1;a&&this.editor.pushUndoStop();const e=PN.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map((e=>Aq.replaceMove(Mh.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!a&&2&r||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),g=!0===t?1:!1===t?0:-2})).finally((()=>{s.dispose(),d.dispose()})))}let{insertText:p}=o.completion;if(4&o.completion.insertTextRules||(p=l1.escape(p)),this.model.cancel(),i.insert(p,{overwriteBefore:d.overwriteBefore,overwriteAfter:d.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command)if(o.completion.command.id===L4.id)this.model.trigger({auto:!0,retrigger:!0});else{const e=new F;l.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch((e=>{o.completion.extensionId?a(e):r(e)})).finally((()=>{u=e.elapsed()})))}4&t&&this._alternatives.value.set(e,(e=>{for(h.cancel();n.canUndo();){s!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(o),Promise.all(l).finally((()=>{this._reportSuggestionAcceptedTelemetry(o,n,c,u,g),this.model.clear(),h.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i,n,s){var o,r,a;0!==Math.floor(100*Math.random())&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:null!==(r=null===(o=e.extensionId)||void 0===o?void 0:o.value)&&void 0!==r?r:"unknown",providerId:null!==(a=e.provider._debugDisplayName)&&void 0!==a?a:"unknown",kind:e.completion.kind,basenameHash:hE(ba(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:Ca(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:s})}getOverwriteInfo(e,t){jr(this.editor.hasModel());let i="replace"===this.editor.getOption(117).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:s+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if(Wd(e.completion.additionalTextEdits)){Os(ue(0,"Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length))}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:null!=t&&t,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;if(n-i!==e.completion.insertText.length)return!0;return this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};B.once(this.model.onDidTrigger)((e=>{const t=[];B.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{k(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if(k(t),0===e.items.length)return void i();const s=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),o=e.items[s];n(o)?(this.editor.pushUndoStop(),this._insertSuggestion({index:s,item:o,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};y4.ID="editor.contrib.suggestController",y4=v4=b4([C4(1,b2),C4(2,Ga),C4(3,Rl),C4(4,Oa),C4(5,ah),C4(6,rh)],y4);class S4{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class L4 extends _h{constructor(){super({id:L4.id,label:ue(0,"Trigger Suggest"),alias:"Trigger Suggest",precondition:ul.and(Rh.writable,Rh.hasCompletionItemProvider,E1.Visible.toNegated()),kbOpts:{kbExpr:Rh.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=y4.get(t);if(!n)return;let s;i&&"object"==typeof i&&!0===i.auto&&(s=!0),n.triggerSuggest(void 0,s,void 0)}}L4.id="editor.action.triggerSuggest",Lh(y4.ID,y4,2),yh(L4);const k4=190,D4=fh.bindToContribution(y4.get);wh(new D4({id:"acceptSelectedSuggestion",precondition:ul.and(E1.Visible,E1.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:ul.and(E1.Visible,Rh.textInputFocus),weight:k4},{primary:3,kbExpr:ul.and(E1.Visible,Rh.textInputFocus,E1.AcceptSuggestionsOnEnter,E1.MakesTextEdit),weight:k4}],menuOpts:[{menuId:I1,title:ue(0,"Insert"),group:"left",order:1,when:E1.HasInsertAndReplaceRange.toNegated()},{menuId:I1,title:ue(0,"Insert"),group:"left",order:1,when:ul.and(E1.HasInsertAndReplaceRange,E1.InsertMode.isEqualTo("insert"))},{menuId:I1,title:ue(0,"Replace"),group:"left",order:1,when:ul.and(E1.HasInsertAndReplaceRange,E1.InsertMode.isEqualTo("replace"))}]})),wh(new D4({id:"acceptAlternativeSelectedSuggestion",precondition:ul.and(E1.Visible,Rh.textInputFocus,E1.HasFocusedSuggestion),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:I1,group:"left",order:2,when:ul.and(E1.HasInsertAndReplaceRange,E1.InsertMode.isEqualTo("insert")),title:ue(0,"Replace")},{menuId:I1,group:"left",order:2,when:ul.and(E1.HasInsertAndReplaceRange,E1.InsertMode.isEqualTo("replace")),title:ue(0,"Insert")}]})),Za.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),wh(new D4({id:"hideSuggestWidget",precondition:E1.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:9,secondary:[1033]}})),wh(new D4({id:"selectNextSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),wh(new D4({id:"selectNextPageSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:12,secondary:[2060]}})),wh(new D4({id:"selectLastSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectLastSuggestion()})),wh(new D4({id:"selectPrevSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),wh(new D4({id:"selectPrevPageSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:11,secondary:[2059]}})),wh(new D4({id:"selectFirstSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectFirstSuggestion()})),wh(new D4({id:"focusSuggestion",precondition:ul.and(E1.Visible,E1.HasFocusedSuggestion.negate()),handler:e=>e.focusSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),wh(new D4({id:"focusAndAcceptSuggestion",precondition:ul.and(E1.Visible,E1.HasFocusedSuggestion.negate()),handler:e=>{e.focusSuggestion(),e.acceptSelectedSuggestion(!0,!1)}})),wh(new D4({id:"toggleSuggestionDetails",precondition:ul.and(E1.Visible,E1.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:I1,group:"right",order:1,when:ul.and(E1.DetailsVisible,E1.CanResolve),title:ue(0,"show less")},{menuId:I1,group:"right",order:1,when:ul.and(E1.DetailsVisible.toNegated(),E1.CanResolve),title:ue(0,"show more")}]})),wh(new D4({id:"toggleExplainMode",precondition:E1.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),wh(new D4({id:"toggleSuggestionFocus",precondition:E1.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:2570,mac:{primary:778}}})),wh(new D4({id:"insertBestCompletion",precondition:ul.and(Rh.textInputFocus,ul.equals("config.editor.tabCompletion","on"),S2.AtEnd,E1.Visible.toNegated(),x2.OtherSuggestions.toNegated(),r2.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest(Fr(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:k4,primary:2}})),wh(new D4({id:"insertNextSuggestion",precondition:ul.and(Rh.textInputFocus,ul.equals("config.editor.tabCompletion","on"),x2.OtherSuggestions,E1.Visible.toNegated(),r2.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:2}})),wh(new D4({id:"insertPrevSuggestion",precondition:ul.and(Rh.textInputFocus,ul.equals("config.editor.tabCompletion","on"),x2.OtherSuggestions,E1.Visible.toNegated(),r2.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:1026}})),yh(class extends _h{constructor(){super({id:"editor.action.resetSuggestSize",label:ue(0,"Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){var i;null===(i=y4.get(t))||void 0===i||i.resetWidgetSize()}});class x4 extends E{get selectedItem(){return this._selectedItem}constructor(e,t,i,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=i,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=Mj(this,void 0),this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const s=y4.get(this.editor);if(s){this._register(s.registerSelector({priority:100,select:(e,t,i)=>{var n;Dj((e=>this.checkModelVersion(e)));const o=this.editor.getModel();if(!o)return-1;const r=null===(n=this.suggestControllerPreselector())||void 0===n?void 0:n.removeCommonPrefix(o);if(!r)return-1;const a=Ba.lift(t),l=_c(i.map(((e,t)=>{const i=N4.fromSuggestion(s,o,a,e,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(o);return{index:t,valid:r.augments(i),prefixLength:i.text.length,suggestItem:e}})).filter((e=>e&&e.valid&&e.prefixLength>0)),Yd((e=>e.prefixLength),Xd));return l?l.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(s.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(s.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(s.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(B.once(s.model.onDidTrigger)((e=>{t()}))),this._register(s.onWillInsertSuggestItem((e=>{const t=this.editor.getPosition(),i=this.editor.getModel();if(!t||!i)return;const n=N4.fromSuggestion(s,i,t,e.item,this.isShiftKeyPressed);this.onWillAccept(n)})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();this._isActive===e&&function(e,t){if(e===t)return!0;if(!e||!t)return!1;return e.equals(t)}(this._currentSuggestItemInfo,t)||(this._isActive=e,this._currentSuggestItemInfo=t,Dj((e=>{this.checkModelVersion(e),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,e)})))}getSuggestItemInfo(){const e=y4.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();return t&&i&&n?N4.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=y4.get(this.editor);null==e||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=y4.get(this.editor);null==e||e.forceRenderingAbove()}}class N4{static fromSuggestion(e,t,i,n,s){let{insertText:o}=n.completion,r=!1;if(4&n.completion.insertTextRules){const e=(new l1).parse(o);e.children.length<100&&t2.adjustWhitespace(t,i,!0,e),o=e.toString(),r=!0}const a=e.getOverwriteInfo(n,s);return new N4(Mh.fromPositions(i.delta(0,-a.overwriteBefore),i.delta(0,Math.max(a.overwriteAfter,0))),o,n.completion.kind,r)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new bC(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new m1(this.range,this.insertText)}}var E4,I4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},M4=function(e,t){return function(i,n){t(i,n,e)}};let T4=E4=class extends E{static get(e){return e.getContribution(E4.ID)}constructor(e,t,i,n,s,o,r,a,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.configurationService=n,this.commandService=s,this.debounceService=o,this.languageFeaturesService=r,this.audioCueService=a,this._keybindingService=l,this.model=Rj("inlineCompletionModel",void 0),this.textModelVersionId=Mj(this,-1),this.cursorPosition=Mj(this,new Ba(1,1)),this.suggestWidgetAdaptor=this._register(new x4(this.editor,(()=>{var e,t;return null===(t=null===(e=this.model.get())||void 0===e?void 0:e.selectedInlineCompletion.get())||void 0===t?void 0:t.toSingleTextEdit(void 0)}),(e=>this.updateObservables(e,l2.Other)),(e=>{Dj((t=>{var i;this.updateObservables(t,l2.Other),null===(i=this.model.get())||void 0===i||i.handleSuggestAccepted(e)}))}))),this._enabled=$j(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).enabled)),this.ghostTextWidget=this._register(this.instantiationService.createInstance($0,this.editor,{ghostText:this.model.map(((e,t)=>null==e?void 0:e.ghostText.read(t))),minReservedLineCount:jj(0),targetTextModel:this.model.map((e=>null==e?void 0:e.textModel))})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new A0(this.contextKeyService,this.model)),this._register(B.runAndSubscribe(e.onDidChangeModel,(()=>Dj((i=>{this.model.set(void 0,i),this.updateObservables(i,l2.Other);const n=e.getModel();if(n){const s=t.createInstance(u2,n,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,$j(e.onDidChangeConfiguration,(()=>e.getOption(117).preview)),$j(e.onDidChangeConfiguration,(()=>e.getOption(117).previewMode)),$j(e.onDidChangeConfiguration,(()=>e.getOption(62).mode)),this._enabled);this.model.set(s,i)}})))));const h=e=>{var t;return e.isUndoing?l2.Undo:e.isRedoing?l2.Redo:(null===(t=this.model.get())||void 0===t?void 0:t.isAcceptingPartially)?l2.AcceptWord:l2.Other};let d;this._register(e.onDidChangeModelContent((e=>Dj((t=>this.updateObservables(t,h(e))))))),this._register(e.onDidChangeCursorPosition((e=>Dj((t=>{var i;this.updateObservables(t,l2.Other),3!==e.reason&&"api"!==e.source||null===(i=this.model.get())||void 0===i||i.stop(t)}))))),this._register(e.onDidType((()=>Dj((e=>{var t;this.updateObservables(e,l2.Other),this._enabled.get()&&(null===(t=this.model.get())||void 0===t||t.trigger(e))}))))),this._register(this.commandService.onDidExecuteCommand((t=>{new Set([Oy.Tab.id,Oy.DeleteLeft.id,Oy.DeleteRight.id,tq,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this._enabled.get()&&Dj((e=>{var t;null===(t=this.model.get())||void 0===t||t.trigger(e)}))}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||fq.dropDownVisible||Dj((e=>{var t;null===(t=this.model.get())||void 0===t||t.stop(e)}))}))),this._register(Hj((e=>{var t;const i=null===(t=this.model.read(e))||void 0===t?void 0:t.state.read(e);(null==i?void 0:i.suggestItem)?i.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register(x((()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register(Hj((e=>{const t=this.model.read(e),i=null==t?void 0:t.state.read(e);if(t&&i&&i.inlineCompletion){if(i.inlineCompletion.semanticId!==d){d=i.inlineCompletion.semanticId;const e=t.textModel.getLineContent(i.ghostText.lineNumber);this.audioCueService.playAudioCue(y$.inlineSuggestion).then((()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(i.ghostText.renderForScreenReader(e))}))}}else d=void 0}))),this._register(new gq(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}))),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(e){const t=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(147)&&(n=ue(0,"Inspect this in the accessible view ({0})",i.getAriaLabel())),Os(n?e+", "+n:e)}updateObservables(e,t){var i,n;const s=this.editor.getModel();this.textModelVersionId.set(null!==(i=null==s?void 0:s.getVersionId())&&void 0!==i?i:-1,e,t),this.cursorPosition.set(null!==(n=this.editor.getPosition())&&void 0!==n?n:new Ba(1,1),e)}shouldShowHoverAt(e){var t;const i=null===(t=this.model.get())||void 0===t?void 0:t.ghostText.get();return!!i&&i.parts.some((t=>e.containsPosition(new Ba(i.lineNumber,t.column))))}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};T4.ID="editor.contrib.inlineCompletionsController",T4=E4=I4([M4(1,Oa),M4(2,Rl),M4(3,uu),M4(4,Ga),M4(5,CE),M4(6,iL),M4(7,b$),M4(8,PL)],T4);var R4=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class A4 extends _h{constructor(){super({id:A4.ID,label:ue(0,"Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ul.and(Rh.writable,A0.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);null===(i=null==e?void 0:e.model.get())||void 0===i||i.next()}))}}A4.ID=nq;class O4 extends _h{constructor(){super({id:O4.ID,label:ue(0,"Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ul.and(Rh.writable,A0.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);null===(i=null==e?void 0:e.model.get())||void 0===i||i.previous()}))}}O4.ID=iq;class P4 extends _h{constructor(){super({id:P4.ID,label:ue(0,"Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:A0.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return R4(this,void 0,void 0,(function*(){const e=T4.get(t);Dj((t=>{var i;null===(i=null==e?void 0:e.model.get())||void 0===i||i.stop(t)}))}))}}P4.ID="editor.action.inlineSuggest.hide";class F4 extends sh{constructor(){super({id:F4.ID,title:ue(0,"Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Ql.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ul.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return R4(this,void 0,void 0,(function*(){const t=e.get(uu),i="always"===t.getValue("editor.inlineSuggest.showToolbar")?"onHover":"always";t.updateValue("editor.inlineSuggest.showToolbar",i)}))}}F4.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var B4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W4=function(e,t){return function(i,n){t(i,n,e)}};class V4{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let H4=class{constructor(e,t,i,n,s,o){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=o,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=T4.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new hK(1e3,this,Mh.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}if(7===i.type&&t.shouldShowHoverAt(i.range))return new hK(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(6===i.type){if(i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range))return new hK(1e3,this,i.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if("always"===this._editor.getOption(62).showToolbar)return[];const i=T4.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new V4(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new N,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(e,n,i);const s=n.controller.model.get(),o=this._instantiationService.createInstance(fq,this._editor,!1,jj(null),s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map((e=>{var t;return null!==(t=null==e?void 0:e.inlineCompletion.source.inlineCompletions.commands)&&void 0!==t?t:[]})));return e.fragment.appendChild(o.getDomNode()),s.triggerExplicitly(),i.add(o),i}renderScreenReaderText(e,t,i){const n=fs,s=n("div.hover-row.markdown-hover"),o=ds(s,n("div.hover-contents",{"aria-live":"assertive"})),r=i.add(new Yk({editor:this._editor},this._languageService,this._openerService));i.add(Hj((n=>{var s;const a=null===(s=t.controller.model.read(n))||void 0===s?void 0:s.ghostText.read(n);if(a){const t=this._editor.getModel().getLineContent(a.lineNumber);(t=>{i.add(r.onDidRenderAsync((()=>{o.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=ue(0,"Suggestion:"),s=i.add(r.render((new Ia).appendText(n).appendCodeblock("text",t)));o.replaceChildren(s.element)})(a.renderForScreenReader(t))}else us(o)}))),e.fragment.appendChild(s)}};H4=B4([W4(1,yc),W4(2,Uk),W4(3,ZR),W4(4,Oa),W4(5,rh)],H4),Lh(T4.ID,T4,3),yh(class extends _h{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:ue(0,"Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:Rh.writable})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);null===(i=null==e?void 0:e.model.get())||void 0===i||i.triggerExplicitly()}))}}),yh(A4),yh(O4),yh(class extends _h{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:ue(0,"Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ul.and(Rh.writable,A0.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:ul.and(Rh.writable,A0.inlineSuggestionVisible)},menuOpts:[{menuId:Ql.InlineSuggestionToolbar,title:ue(0,"Accept Word"),group:"primary",order:2}]})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);yield null===(i=null==e?void 0:e.model.get())||void 0===i?void 0:i.acceptNextWord(e.editor)}))}}),yh(class extends _h{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:ue(0,"Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ul.and(Rh.writable,A0.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:Ql.InlineSuggestionToolbar,title:ue(0,"Accept Line"),group:"secondary",order:2}]})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);yield null===(i=null==e?void 0:e.model.get())||void 0===i?void 0:i.acceptNextLine(e.editor)}))}}),yh(class extends _h{constructor(){super({id:tq,label:ue(0,"Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:A0.inlineSuggestionVisible,menuOpts:[{menuId:Ql.InlineSuggestionToolbar,title:ue(0,"Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ul.and(A0.inlineSuggestionVisible,Rh.tabMovesFocus.toNegated(),A0.inlineSuggestionHasIndentationLessThanTabSize,E1.Visible.toNegated(),Rh.hoverFocused.toNegated())}})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);e&&(null===(i=e.model.get())||void 0===i||i.accept(e.editor),e.editor.focus())}))}}),yh(P4),oh(F4),dK.register(H4);const z4=Pa("themeService");var U4,K4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},j4=function(e,t){return function(i,n){t(i,n,e)}};let q4=U4=class extends E{static get(e){return e.getContribution(U4.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(DC.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new $4(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};q4.ID="editor.contrib.inspectTokens",q4=U4=K4([j4(1,z4),j4(2,yc)],q4);class $4 extends E{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){const i=DC.get(t);if(i)return i;const n=e.encodeLanguageId(t);return{getInitialState:()=>xC,tokenize:(e,i,n)=>NC(t,n),tokenizeEncoded:(e,t,i)=>EC(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return $4._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let a=t.tokens1.length-1;a>=0;a--){const n=t.tokens1[a];if(e.column-1>=n.offset){i=a;break}}let n=0;for(let a=t.tokens2.length>>>1;a>=0;a--)if(e.column-1>=t.tokens2[a<<1]){n=a;break}const s=this._model.getLineContent(e.lineNumber);let o="";if(ie.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let r=t.length-2;r>=0;r--)t[r].lineNumber===t[r+1].lineNumber&&t.splice(r,1);const i=[];let n=0,s=0;const o=t.length;for(let r=1,a=e.getLineCount();r<=a;r++){const a=e.getLineContent(r),l=a.length+1;let h=0;if(s=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},X4=function(e,t){return function(i,n){t(i,n,e)}};let Q4=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumbere.tokenization.getLineTokens(t),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){const i=n.startLineNumber,s=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(s)?t.addEditOperation(new Mh(1,1,1,1),null):(t.addEditOperation(new Mh(i,1,i,1),e.getLineContent(s)),t.addEditOperation(new Mh(s,1,s,e.getLineMaxColumn(s)),null)),n=new Th(s,1,s,1)}else{let i,o;if(this._isMovingDown){i=n.endLineNumber+1,o=e.getLineContent(i),t.addEditOperation(new Mh(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let h=o;if(this.shouldAutoIndent(e,n)){const d=this.matchEnterRule(e,a,s,i,n.startLineNumber-1);if(null!==d){const t=ZJ(d+GJ(ro(e.getLineContent(i)),s),s,r);h=t+this.trimStart(o)}else{l.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);const t=vy(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber,a,this._languageConfigurationService);if(null!==t){const n=ro(e.getLineContent(i)),a=GJ(t,s);if(a!==GJ(n,s)){const e=ZJ(a,s,r);h=e+this.trimStart(o)}}}t.addEditOperation(new Mh(n.startLineNumber,1,n.startLineNumber,1),h+"\n");const c=this.matchEnterRuleMovingDown(e,a,s,n.startLineNumber,i,h);if(null!==c)0!==c&&this.getIndentEditsOfMovingBlock(e,t,n,s,r,c);else{l.getLineContent=t=>t===n.startLineNumber?h:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);const o=vy(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,a,this._languageConfigurationService);if(null!==o){const i=ro(e.getLineContent(n.startLineNumber)),a=GJ(o,s),l=GJ(i,s);if(a!==l){const i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,s,r,i)}}}}else t.addEditOperation(new Mh(n.startLineNumber,1,n.startLineNumber,1),h+"\n")}else if(i=n.startLineNumber-1,o=e.getLineContent(i),t.addEditOperation(new Mh(i,1,i+1,1),null),t.addEditOperation(new Mh(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+o),this.shouldAutoIndent(e,n)){l.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);const o=this.matchEnterRule(e,a,s,n.startLineNumber,n.startLineNumber-2);if(null!==o)0!==o&&this.getIndentEditsOfMovingBlock(e,t,n,s,r,o);else{const o=vy(this._autoIndent,l,e.getLanguageIdAtPosition(n.startLineNumber,1),i,a,this._languageConfigurationService);if(null!==o){const i=ro(e.getLineContent(n.startLineNumber)),a=GJ(o,s),l=GJ(i,s);if(a!==l){const i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,s,r,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>py.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>py.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===Ec.None||s.indentAction===Ec.Indent?o=s.indentation+s.appendText:s.indentAction===Ec.IndentOutdent?o=s.indentation:s.indentAction===Ec.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);const r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(o))>=0){const s=ro(e.getLineContent(n));let r=ro(o);const a=by(e,n,this._languageConfigurationService);null!==a&&2&a&&(r=t.unshiftIndent(r));return GJ(r,i)-GJ(s,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(ao(o)>=0){const o=e.getLineMaxColumn(s),r=ly(this._autoIndent,e,new Mh(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let s=n-1;for(;s>=1;){if(ao(e.getLineContent(s))>=0)break;s--}if(s<1||n>e.getLineCount())return null;const o=e.getLineMaxColumn(s),r=ly(this._autoIndent,e,new Mh(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,s,o){let r=s;for(;r>=1;){let t;t=r===s&&void 0!==o?o:e.getLineContent(r);if(ao(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;const a=e.getLineMaxColumn(r),l=ly(this._autoIndent,e,new Mh(r,a,r,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,s,o){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const a=ro(e.getLineContent(r)),l=ZJ(GJ(a,n)+o,n,s);l!==a&&(t.addEditOperation(new Mh(r,1,r,a.length+1),l),r===i.endLineNumber&&i.endColumn<=a.length+1&&""===l&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=s)return null;const o=[];for(let a=n;a<=s;a++)o.push(e.getLineContent(a));let r=o.slice(0);return r.sort(J4.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:s,before:o,after:r}}J4._COLLATOR=null;class t5 extends _h{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>Mh.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let o=1;onew Ba(e.positionLineNumber,e.positionColumn))));const s=t.getSelection();if(null===s)return;const o=new G4(s,n);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop()}}s5.ID="editor.action.trimTrailingWhitespace";class o5 extends _h{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let a=0,l=n.length-1;aAq.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}}class r5 extends _h{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const s=t.getOption(129),o=[];for(const r of i)if(r.isEmpty()){const e=r.getStartPosition(),i=t.getConfiguredWordAtPosition(e);if(!i)continue;const a=new Mh(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),l=n.getValueInRange(a);o.push(Aq.replace(a,this._modifyText(l,s)))}else{const e=n.getValueInRange(r);o.push(Aq.replace(r,this._modifyText(e,s)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class a5{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class l5 extends r5{constructor(){super({id:"editor.action.transformToTitlecase",label:ue(0,"Transform to Title Case"),alias:"Transform to Title Case",precondition:Rh.writable})}_modifyText(e,t){const i=l5.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}l5.titleBoundary=new a5("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class h5 extends r5{constructor(){super({id:"editor.action.transformToSnakecase",label:ue(0,"Transform to Snake Case"),alias:"Transform to Snake Case",precondition:Rh.writable})}_modifyText(e,t){const i=h5.caseBoundary.get(),n=h5.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}h5.caseBoundary=new a5("(\\p{Ll})(\\p{Lu})","gmu"),h5.singleLetters=new a5("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class d5 extends r5{constructor(){super({id:"editor.action.transformToCamelcase",label:ue(0,"Transform to Camel Case"),alias:"Transform to Camel Case",precondition:Rh.writable})}_modifyText(e,t){const i=d5.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}d5.wordBoundary=new a5("[_\\s-]","gm");class c5 extends r5{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()))}constructor(){super({id:"editor.action.transformToKebabcase",label:ue(0,"Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:Rh.writable})}_modifyText(e,t){const i=c5.caseBoundary.get(),n=c5.singleLetters.get(),s=c5.underscoreBoundary.get();return i&&n&&s?e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}c5.caseBoundary=new a5("(\\p{Ll})(\\p{Lu})","gmu"),c5.singleLetters=new a5("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),c5.underscoreBoundary=new a5("(\\S)(_)(\\S)","gm"),yh(class extends t5{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:ue(0,"Copy Line Up"),alias:"Copy Line Up",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"&&Copy Line Up"),order:1}})}}),yh(class extends t5{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:ue(0,"Copy Line Down"),alias:"Copy Line Down",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"Co&&py Line Down"),order:2}})}}),yh(class extends _h{constructor(){super({id:"editor.action.duplicateSelection",label:ue(0,"Duplicate Selection"),alias:"Duplicate Selection",precondition:Rh.writable,menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],s=t.getSelections(),o=t.getModel();for(const r of s)if(r.isEmpty())n.push(new Z4(r,!0));else{const e=new Th(r.endLineNumber,r.endColumn,r.endLineNumber,r.endColumn);n.push(new Zw(e,o.getValueInRange(r)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}),yh(class extends i5{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:ue(0,"Move Line Up"),alias:"Move Line Up",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"Mo&&ve Line Up"),order:3}})}}),yh(class extends i5{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:ue(0,"Move Line Down"),alias:"Move Line Down",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"Move &&Line Down"),order:4}})}}),yh(class extends n5{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:ue(0,"Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:Rh.writable})}}),yh(class extends n5{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:ue(0,"Sort Lines Descending"),alias:"Sort Lines Descending",precondition:Rh.writable})}}),yh(class extends _h{constructor(){super({id:"editor.action.removeDuplicateLines",label:ue(0,"Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:Rh.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;const n=[],s=[];let o=0;for(const r of t.getSelections()){const e=new Set,t=[];for(let n=r.startLineNumber;n<=r.endLineNumber;n++){const s=i.getLineContent(n);e.has(s)||(t.push(s),e.add(s))}const a=new Th(r.startLineNumber,1,r.endLineNumber,i.getLineMaxColumn(r.endLineNumber)),l=r.startLineNumber-o,h=new Th(l,1,l+t.length-1,t[t.length-1].length);n.push(Aq.replace(a,t.join("\n"))),s.push(h),o+=r.endLineNumber-r.startLineNumber+1-t.length}t.pushUndoStop(),t.executeEdits(this.id,n,s),t.pushUndoStop()}}),yh(s5),yh(class extends _h{constructor(){super({id:"editor.action.deleteLines",label:ue(0,"Delete Line"),alias:"Delete Line",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let s=0;const o=[],r=[];for(let a=0,l=i.length;a1&&(t-=1,h=n.getLineMaxColumn(t)),o.push(Aq.replace(new Th(t,h,l,d),"")),r.push(new Th(t-s,e.positionColumn,t-s,e.positionColumn)),s+=e.endLineNumber-e.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let s=1;s=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}),yh(class extends _h{constructor(){super({id:"editor.action.indentLines",label:ue(0,"Indent Line"),alias:"Indent Line",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Cy.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}),yh(class extends _h{constructor(){super({id:"editor.action.outdentLines",label:ue(0,"Outdent Line"),alias:"Outdent Line",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:2140,weight:100}})}run(e,t){Oy.Outdent.runEditorCommand(e,t,null)}}),yh(class extends _h{constructor(){super({id:"editor.action.insertLineBefore",label:ue(0,"Insert Line Above"),alias:"Insert Line Above",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Cy.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}),yh(class extends _h{constructor(){super({id:"editor.action.insertLineAfter",label:ue(0,"Insert Line Below"),alias:"Insert Line Below",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Cy.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}),yh(class extends o5{constructor(){super({id:"deleteAllLeft",label:ue(0,"Delete All Left"),alias:"Delete All Left",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach((t=>{let o;if(1===t.endColumn&&s>0){const e=t.startLineNumber-s;o=new Th(e,t.startColumn,e,t.startColumn)}else o=new Th(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);s+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=o:n.push(o)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(Mh.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new Mh(t,i,e.startLineNumber,1)}return new Mh(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new Mh(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}),yh(class extends o5{constructor(){super({id:"deleteAllRight",label:ue(0,"Delete All Right"),alias:"Delete All Right",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let s=0,o=t.length,r=0;s{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new Mh(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new Mh(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(Mh.compareRangesUsingStarts),n}}),yh(class extends _h{constructor(){super({id:"editor.action.joinLines",label:ue(0,"Join Lines"),alias:"Join Lines",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(Mh.compareRangesUsingStarts);const s=[],o=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(s.push(e),t):new Th(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(s.push(e),t):new Th(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));s.push(o);const r=t.getModel();if(null===r)return;const a=[],l=[];let h=n,d=0;for(let c=0,u=s.length;c=1){let i=!0;""===m&&(i=!1),!i||" "!==m.charAt(m.length-1)&&"\t"!==m.charAt(m.length-1)||(i=!1,m=m.replace(/[\s\uFEFF\xA0]+$/g," "));const n=e.substr(t-1);m+=(i?" ":"")+n,g=i?n.length+1:n.length}else g=0}const f=new Mh(t,i,o,u);if(!f.isEmpty()){let i;e.isEmpty()?(a.push(Aq.replace(f,m)),i=new Th(f.startLineNumber-d,m.length-g+1,t-d,m.length-g+1)):e.startLineNumber===e.endLineNumber?(a.push(Aq.replace(f,m)),i=new Th(e.startLineNumber-d,e.startColumn,e.endLineNumber-d,e.endColumn)):(a.push(Aq.replace(f,m)),i=new Th(e.startLineNumber-d,e.startColumn,e.startLineNumber-d,m.length-p)),null!==Mh.intersectRanges(f,n)?h=i:l.push(i)}d+=f.endLineNumber-f.startLineNumber}l.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}),yh(class extends _h{constructor(){super({id:"editor.action.transpose",label:ue(0,"Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:Rh.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const s=[];for(let o=0,r=i.length;o=r){if(t.lineNumber===n.getLineCount())continue;const e=new Mh(t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i=n.getValueInRange(e).split("").reverse().join("");s.push(new Gw(new Th(t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i))}else{const e=new Mh(t.lineNumber,Math.max(1,t.column-1),t.lineNumber,t.column+1),i=n.getValueInRange(e).split("").reverse().join("");s.push(new Qw(e,i,new Th(t.lineNumber,t.column+1,t.lineNumber,t.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}),yh(class extends r5{constructor(){super({id:"editor.action.transformToUppercase",label:ue(0,"Transform to Uppercase"),alias:"Transform to Uppercase",precondition:Rh.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}),yh(class extends r5{constructor(){super({id:"editor.action.transformToLowercase",label:ue(0,"Transform to Lowercase"),alias:"Transform to Lowercase",precondition:Rh.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}),h5.caseBoundary.isSupported()&&h5.singleLetters.isSupported()&&yh(h5),d5.wordBoundary.isSupported()&&yh(d5),l5.titleBoundary.isSupported()&&yh(l5),c5.isSupported()&&yh(c5);var u5,g5=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},p5=function(e,t){return function(i,n){t(i,n,e)}},m5=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const f5=new Tl("LinkedEditingInputVisible",!1);let _5=u5=class extends E{static get(e){return e.getContribution(u5.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new N),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=f5.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new N),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(69)||e.hasChanged(92))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(69)||this._editor.getOption(92))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(B.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new Xh(this._debounceInformation.get(t)),s=()=>{var e;this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),null!==(e=this._debounceDuration)&&void 0!==e?e:this._debounceInformation.get(t))},o=new Xh(0),r=e=>{this._rangeSyncTriggerPromise=o.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{s()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void r(this._syncRangesToken)}s()}))),this._localToDispose.add({dispose:()=>{n.dispose(),o.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}const s=[];for(let o=1,r=this._currentDecorations.length;o1)return void this.clearRanges();const i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=n;const s=Gh((e=>m5(this,void 0,void 0,(function*(){try{const o=new F(!1),r=yield v5(this._providers,i,t,e);if(this._debounceInformation.update(i,o.elapsed()),s!==this._currentRequest)return;if(this._currentRequest=null,n!==i.getVersionId())return;let a=[];(null==r?void 0:r.ranges)&&(a=r.ranges),this._currentWordPattern=(null==r?void 0:r.wordPattern)||this._languageWordPattern;let l=!1;for(let e=0,i=a.length;e({range:e,options:u5.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(h),this._syncRangesToken++}catch(o){d(o)||r(o),this._currentRequest!==s&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=s,s}))}};_5.ID="editor.contrib.linkedEditing",_5.DECORATION=xw.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"}),_5=u5=g5([p5(1,Rl),p5(2,iL),p5(3,Xu),p5(4,CE)],_5);function v5(e,t,i,n){return td(e.ordered(t).map((e=>()=>m5(this,void 0,void 0,(function*(){try{return yield e.provideLinkedEditingRanges(t,i,n)}catch(Dre){return void a(Dre)}})))),(e=>!!e&&Wd(null==e?void 0:e.ranges)))}wh(new(fh.bindToContribution(_5.get))({id:"cancelLinkedEditingInput",precondition:f5,handler:e=>e.clearRanges(),kbOpts:{kbExpr:Rh.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));Sp("editor.linkedEditingBackground",{dark:rc.fromHex("#f00").transparent(.3),light:rc.fromHex("#f00").transparent(.3),hcDark:rc.fromHex("#f00").transparent(.3),hcLight:rc.white},ue(0,"Background color when the editor auto renames on type."));Ch("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(iL);return v5(n,t,i,Hh.None)})),Lh(_5.ID,_5,1),yh(class extends _h{constructor(){super({id:"editor.action.linkedEditing",label:ue(0,"Start Linked Editing"),alias:"Start Linked Editing",precondition:ul.and(Rh.writable,Rh.hasRenameProvider),kbOpts:{kbExpr:Rh.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(Fa),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return an.isUri(n)&&Ba.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(s),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r):super.runCommand(e,t)}run(e,t){const i=_5.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}});var b5=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class C5{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return b5(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}))}}class w5{constructor(e){this._disposables=new N;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new C5(e,n)));t=w5._union(t,e),L(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,s,o,r;for(n=0,o=0,s=e.length,r=t.length;nPromise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[s]=[t,e])}),a)));return Promise.all(s).then((()=>{const e=new w5(Pd(n));return i.isCancellationRequested?(e.dispose(),new w5([])):e}))}Za.registerCommand("_executeLinkProvider",((e,...t)=>b5(void 0,void 0,void 0,(function*(){let[i,n]=t;jr(i instanceof an),"number"!=typeof n&&(n=0);const{linkProvider:s}=e.get(iL),o=e.get(Wa).getModel(i);if(!o)return[];const r=yield y5(s,o,Hh.None);if(!r)return[];for(let e=0;e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},k5=function(e,t){return function(i,n){t(i,n,e)}},D5=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let x5=S5=class extends E{static get(e){return e.getContribution(S5.ID)}constructor(e,t,i,n,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new sd((()=>this.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const o=this._register(new IR(e));this._register(o.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(o.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(o.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(70)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}computeLinksNow(){return D5(this,void 0,void 0,(function*(){if(!this.editor.hasModel()||!this.editor.getOption(70))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Gh((t=>y5(this.providers,e,t)));try{const t=new F(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){r(t)}finally{this.computePromise=null}}}))}updateDecorations(e){const t="altKey"===this.editor.getOption(77),i=[],n=Object.keys(this.currentOccurrences);for(const o of n){const e=this.currentOccurrences[o];i.push(e.decorationId)}const s=[];if(e)for(const o of e)s.push(E5.decoration(o,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,s);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let i=0,s=n.length;i{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(77);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(Hh.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===vn.file&&e.startsWith(`${vn.file}:`)){const i=an.parse(e);if(i.scheme===vn.file){const n=pa(i);let s=null;n.startsWith("/./")?s=`.${n.substr(1)}`:n.startsWith("//./")&&(s=`.${n.substr(2)}`),s&&(e=ya(t,s))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(ue(0,"Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(ue(0,"Failed to open this link because its target is missing.")):r(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of t){const e=this.currentOccurrences[i.id];if(e)return e}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};x5.ID="editor.linkDetector",x5=S5=L5([k5(1,Uk),k5(2,uL),k5(3,iL),k5(4,CE)],x5);const N5={general:xw.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:xw.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class E5{static decoration(e,t){return{range:e.range,options:E5._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n=Object.assign({},i?N5.active:N5.general);return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:ue(0,i?"Execute command":"Follow link"),s=ue(0,t?Pe?"cmd + click":"ctrl + click":Pe?"option + click":"alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){t=ue(0,"Execute command {0}",i[1])}}return new Ia("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${s})`)}return(new Ia).appendText(`${n} (${s})`)}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,E5._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,E5._getOptions(this.link,t,!1))}}Lh(x5.ID,x5,1),yh(class extends _h{constructor(){super({id:"editor.action.openLink",label:ue(0,"Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=x5.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const s of n){const e=i.getLinkOccurrence(s.getEndPosition());e&&i.openLinkOccurrence(e,!1)}}});class I5 extends E{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(116);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}I5.ID="editor.contrib.longLinesHelper",Lh(I5.ID,I5,2);const M5=Sp("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},ue(0,"Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Sp("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},ue(0,"Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editor.wordHighlightTextBackground",{light:M5,dark:M5,hcDark:M5,hcLight:M5},ue(0,"Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const T5=Sp("editor.wordHighlightBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of a symbol during read-access, like reading a variable."));Sp("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of a symbol during write-access, like writing to a variable.")),Sp("editor.wordHighlightTextBorder",{light:T5,dark:T5,hcDark:T5,hcLight:T5},ue(0,"Border color of a textual occurrence for a symbol."));const R5=Sp("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},ue(0,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),A5=Sp("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},ue(0,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),O5=Sp("editorOverviewRuler.wordHighlightTextForeground",{dark:h_,light:h_,hcDark:h_,hcLight:h_},ue(0,"Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),P5=xw.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:A_(A5),position:vd.Center},minimap:{color:A_(c_),position:Cd.Inline}}),F5=xw.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:A_(O5),position:vd.Center},minimap:{color:A_(c_),position:Cd.Inline}}),B5=xw.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:A_(h_),position:vd.Center},minimap:{color:A_(c_),position:Cd.Inline}}),W5=xw.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),V5=xw.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:A_(R5),position:vd.Center},minimap:{color:A_(c_),position:Cd.Inline}});function H5(e){return e?W5:B5}B_(((e,t)=>{const i=e.getColor(Bm);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}));var z5,U5=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},K5=function(e,t){return function(i,n){t(i,n,e)}};function j5(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", ");Ps(1===i.length?ue(0,"Cursor added: {0}",e):ue(0,"Cursors added: {0}",e))}}class q5{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class $5{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new $5(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,s,o=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(o=!0,n=!0,s=!0):(n=i.wholeWord,s=i.matchCase);const a=e.getSelection();let l,h=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,h=new Th(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new $5(e,t,o,l,n,s,h)}constructor(e,t,i,n,s,o,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new q5(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new q5(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return i?new Th(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new q5(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new q5(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return i?new Th(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824)}}class G5 extends E{static get(e){return e.getContribution(G5.ID)}constructor(e){super(),this._sessionDispose=this._register(new N),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=$5.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new Th(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!Q5(this._editor.getModel(),t,i)){const e=this._editor.getModel(),i=[];for(let n=0,s=t.length;n0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(129):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(129):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew Th(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}G5.ID="editor.contrib.multiCursorController";class Z5 extends _h{run(e,t){const i=G5.get(t);if(!i)return;const n=t._getViewModel();if(n){const s=n.getCursorStates(),o=_Q.get(t);if(o)this._run(i,o);else{const n=e.get(Oa).createInstance(_Q,t);this._run(i,n),n.dispose()}j5(s,n.getCursorStates())}}}class Y5{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(Mh.compareRangesUsingStarts)),this._cachedFindMatches}}let X5=z5=class extends E{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(107),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new sd((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(107)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=_Q.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(z5._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const s=G5.get(i);if(!s)return null;const o=_Q.get(i);if(!o)return null;let r=s.getSession(o);if(!r){const e=i.getSelections();if(e.length>1){const t=o.getState().matchCase;if(!Q5(i.getModel(),e,t))return null}r=$5.create(i,o)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=o.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new Y5(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(129):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(Mh.compareRangesUsingStarts);const s=[];for(let a=0,l=0,h=i.length,d=n.length;a=d)s.push(e),a++;else{const t=Mh.compareRangesUsingStarts(e,n[l]);t<0?(!n[l].isEmpty()&&Mh.areIntersecting(e,n[l])||s.push(e),a++):(t>0||a++,l++)}}const o=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(80),r=s.map((e=>({range:e,options:H5(o)})));this._decorations.set(r)}dispose(){this._setState(null),super.dispose()}};function Q5(e,t,i){const n=J5(e,t[0],!i);for(let s=1,o=t.length;s1&&i.push(new Th(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),o=s.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),j5(o,s.getCursorStates())}}),yh(class extends Z5{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:ue(0,"Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:2082,weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"3_multi",title:ue(0,"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:ue(0,"Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"3_multi",title:ue(0,"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:ue(0,"Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:pt(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:ue(0,"Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.selectHighlights",label:ue(0,"Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:3114,weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"3_multi",title:ue(0,"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.changeAll",label:ue(0,"Change All Occurrences"),alias:"Change All Occurrences",precondition:ul.and(Rh.writable,Rh.editorTextFocus),kbOpts:{kbExpr:Rh.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}),yh(class extends _h{constructor(){super({id:"editor.action.addCursorsToBottom",label:ue(0,"Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let a=i[0].startLineNumber;a<=n;a++)s.push(new Th(a,i[0].startColumn,a,i[0].endColumn));const o=t._getViewModel(),r=o.getCursorStates();s.length>0&&t.setSelections(s),j5(r,o.getCursorStates())}}),yh(class extends _h{constructor(){super({id:"editor.action.addCursorsToTop",label:ue(0,"Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let r=i[0].startLineNumber;r>=1;r--)n.push(new Th(r,i[0].startColumn,r,i[0].endColumn));const s=t._getViewModel(),o=s.getCursorStates();n.length>0&&t.setSelections(n),j5(o,s.getCursorStates())}}),yh(class extends _h{constructor(){super({id:"editor.action.focusNextCursor",label:ue(0,"Focus Next Cursor"),description:{description:ue(0,"Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const s=Array.from(n.getCursorStates()),o=s.shift();o&&(s.push(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),j5(s,n.getCursorStates()))}}),yh(class extends _h{constructor(){super({id:"editor.action.focusPreviousCursor",label:ue(0,"Focus Previous Cursor"),description:{description:ue(0,"Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const s=Array.from(n.getCursorStates()),o=s.pop();o&&(s.unshift(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),j5(s,n.getCursorStates()))}});var e3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const t3={Visible:new Tl("parameterHintsVisible",!1),MultipleSignatures:new Tl("parameterHintsMultipleSignatures",!1)};function i3(e,t,i,n,s){return e3(this,void 0,void 0,(function*(){const o=e.ordered(t);for(const e of o)try{const o=yield e.provideSignatureHelp(t,i,s,n);if(o)return o}catch(r){a(r)}}))}Za.registerCommand("_executeSignatureHelpProvider",((e,...t)=>e3(void 0,void 0,void 0,(function*(){const[i,n,s]=t;jr(an.isUri(i)),jr(Ba.isIPosition(n)),jr("string"==typeof s||!s);const o=e.get(iL),r=yield e.get(Va).createModelReference(i);try{const e=yield i3(o.signatureHelpProvider,r.object.textEditorModel,Ba.lift(n),{triggerKind:uC.Invoke,isRetrigger:!1,triggerCharacter:s},Hh.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}}))));var n3,s3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e.Default={type:0};e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}};e.Active=class{constructor(e){this.hints=e,this.type=1}}}(n3||(n3={}));class o3 extends E{constructor(e,t,i=o3.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new U),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=n3.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new I),this.triggerChars=new Ub,this.retriggerChars=new Ub,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Xh(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=n3.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(r)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(85).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(85).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new n3.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return s3(this,void 0,void 0,(function*(){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(r3);this._pendingTriggers=[];const s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),a=this.editor.getPosition();this.state=new n3.Pending(Gh((e=>i3(this.providers,o,a,s,e))),i);try{const t=yield this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new n3.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(l){return e===this.triggerId&&(this.state=n3.Default),r(l),!1}}))}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:uC.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:uC.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:uC.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(85).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function r3(e,t){switch(t.triggerKind){case uC.Invoke:return t;case uC.ContentChange:return e;case uC.TriggerCharacter:default:return t}}o3.DEFAULT_DELAY=120;var a3,l3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},h3=function(e,t){return function(i,n){t(i,n,e)}};const d3=fs,c3=QT("parameter-hints-next",Qr.chevronDown,ue(0,"Icon for show next parameter hint.")),u3=QT("parameter-hints-previous",Qr.chevronUp,ue(0,"Icon for show previous parameter hint."));let g3=a3=class extends E{constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new N),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Yk({editor:e},s,n)),this.keyVisible=t3.Visible.bindTo(i),this.keyMultipleSignatures=t3.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=d3(".editor-widget.parameter-hints-widget"),t=ds(e,d3(".phwrapper"));t.tabIndex=-1;const i=ds(t,d3(".controls")),n=ds(i,d3(".button"+ea.asCSSSelector(u3))),s=ds(i,d3(".overloads")),o=ds(i,d3(".button"+ea.asCSSSelector(c3)));this._register(En(n,"click",(e=>{as(e),this.previous()}))),this._register(En(o,"click",(e=>{as(e),this.next()})));const r=d3(".body"),a=new TD(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=ds(r,d3(".signature")),h=ds(r,d3(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:s,docs:h,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const d=()=>{if(!this.domNodes)return;const e=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${e.fontSize}px`,this.domNodes.element.style.lineHeight=""+e.lineHeight/e.fontSize};d(),this._register(B.chain(this.editor.onDidChangeConfiguration.bind(this.editor),(e=>e.filter((e=>e.hasChanged(50)))))(d)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{var e;null===(e=this.domNodes)||void 0===e||e.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,null===(e=this.domNodes)||void 0===e||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const s=ds(this.domNodes.signature,d3(".code")),o=this.editor.getOption(50);s.style.fontSize=`${o.fontSize}px`,s.style.fontFamily=o.fontFamily;const r=n.parameters.length>0,a=null!==(t=n.activeParameter)&&void 0!==t?t:e.activeParameter;if(r)this.renderParameters(s,n,a);else{ds(s,d3("span")).textContent=n.label}const l=n.parameters[a];if(null==l?void 0:l.documentation){const e=d3("span.documentation");if("string"==typeof l.documentation)e.textContent=l.documentation;else{const t=this.renderMarkdownDocs(l.documentation);e.appendChild(t.element)}ds(this.domNodes.docs,d3("p",{},e))}if(void 0===n.documentation);else if("string"==typeof n.documentation)ds(this.domNodes.docs,d3("p",{},n.documentation));else{const e=this.renderMarkdownDocs(n.documentation);ds(this.domNodes.docs,e.element)}const h=this.hasDocs(n,l);if(this.domNodes.signature.classList.toggle("has-docs",h),this.domNodes.docs.classList.toggle("empty",!h),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,l){let e="";const t=n.parameters[a];e=Array.isArray(t.label)?n.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),n.documentation&&(e+="string"==typeof n.documentation?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==e&&(Os(ue(0,"{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&qr(t.documentation).length>0)||(!!(t&&"object"==typeof t.documentation&&qr(t.documentation).value.length>0)||(!!(e.documentation&&"string"==typeof e.documentation&&qr(e.documentation).length>0)||!!(e.documentation&&"object"==typeof e.documentation&&qr(e.documentation.value).length>0)))}renderParameters(e,t,i){const[n,s]=this.getParameterLabelOffsets(t,i),o=document.createElement("span");o.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,s),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(s),ds(e,o,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${Js(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return a3.ID}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};g3.ID="editor.widget.parameterHintsWidget",g3=a3=l3([h3(2,Rl),h3(3,Uk),h3(4,yc)],g3),Sp("editorHoverWidget.highlightForeground",{dark:yf,light:yf,hcDark:yf,hcLight:yf},ue(0,"Foreground color of the active item in the parameter hint."));var p3,m3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},f3=function(e,t){return function(i,n){t(i,n,e)}};let _3=p3=class extends E{static get(e){return e.getContribution(p3.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new o3(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{var t;e?(this.widget.value.show(),this.widget.value.render(e)):null===(t=this.widget.rawValue)||void 0===t||t.hide()}))),this.widget=new Gs((()=>this._register(t.createInstance(g3,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){var e;null===(e=this.widget.rawValue)||void 0===e||e.previous()}next(){var e;null===(e=this.widget.rawValue)||void 0===e||e.next()}trigger(e){this.model.trigger(e,0)}};_3.ID="editor.controller.parameterHints",_3=p3=m3([f3(1,Oa),f3(2,iL)],_3);Lh(_3.ID,_3,2),yh(class extends _h{constructor(){super({id:"editor.action.triggerParameterHints",label:ue(0,"Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:Rh.hasSignatureHelpProvider,kbOpts:{kbExpr:Rh.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=_3.get(t);null==i||i.trigger({triggerKind:uC.Invoke})}});const v3=fh.bindToContribution(_3.get);function b3(e,t){return t&&(e.stack||e.stacktrace)?ue(0,"{0}: {1}",w3(e),C3(e.stack)||C3(e.stacktrace)):w3(e)}function C3(e){return Array.isArray(e)?e.join("\n"):e}function w3(e){return"ERR_UNC_HOST_NOT_ALLOWED"===e.code?`${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?ue(0,"A system error occurred ({0})",e.message):e.message||ue(0,"An unknown error occurred. Please consult the log for more details.")}function y3(e=null,t=!1){if(!e)return ue(0,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=Pd(e),n=y3(i[0],t);return i.length>1?ue(0,"{0} ({1} errors in total)",n,i.length):n}if(Pr(e))return e;if(e.detail){const i=e.detail;if(i.error)return b3(i.error,t);if(i.exception)return b3(i.exception,t)}return e.stack?b3(e,t):e.message?e.message:ue(0,"An unknown error occurred. Please consult the log for more details.")}wh(new v3({id:"closeParameterHints",precondition:t3.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:Rh.focus,primary:9,secondary:[1033]}})),wh(new v3({id:"showPrevParameterHint",precondition:ul.and(t3.Visible,t3.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:Rh.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),wh(new v3({id:"showNextParameterHint",precondition:ul.and(t3.Visible,t3.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:Rh.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));class S3{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,s=[];for(const[o,r]of this.documents){if(t.isCancellationRequested)return[];for(const e of r.chunks){const t=this.computeSimilarityScore(e,i,n);t>0&&s.push({key:o,score:t})}}return s}static termFrequencies(e){return function(e){var t;const i=new Map;for(const n of e)i.set(n,(null!==(t=i.get(n))&&void 0!==t?t:0)+1);return i}(S3.splitTerms(e))}static*splitTerms(e){const t=e=>e.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const e=i.split(/(?<=[a-z])(?=[A-Z])/g);if(e.length>1)for(const i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){var t;for(const{key:i}of e)this.deleteDocument(i);for(const i of e){const e=[];for(const n of i.textChunks){const i=S3.termFrequencies(n);for(const e of i.keys())this.chunkOccurrences.set(e,(null!==(t=this.chunkOccurrences.get(e))&&void 0!==t?t:0)+1);e.push({text:n,tf:i})}this.chunkCount+=e.length,this.documents.set(i.key,{chunks:e})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const e of t.chunks)for(const t of e.tf.keys()){const e=this.chunkOccurrences.get(t);if("number"==typeof e){const i=e-1;i<=0?this.chunkOccurrences.delete(t):this.chunkOccurrences.set(t,i)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[s,o]of Object.entries(t)){const t=e.tf.get(s);if(!t)continue;let r=i.get(s);"number"!=typeof r&&(r=this.computeIdf(s),i.set(s,r));n+=t*r*o}return n}computeEmbedding(e){const t=S3.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const i=null!==(t=this.chunkOccurrences.get(e))&&void 0!==t?t:0;return i>0?Math.log((this.chunkCount+1)/i):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}const L3=Pa("dialogService");var k3,D3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function x3(e){const t=e;return Array.isArray(t.items)}function N3(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(k3||(k3={}));class E3 extends E{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const s=new N;let o;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=s.add(new I),a=()=>D3(this,void 0,void 0,(function*(){const n=r.value=new N;null==o||o.dispose(!0),e.busy=!1,o=new Uh(t);const s=o.token,a=e.value.substr(this.prefix.length).trim(),l=this._getPicks(a,n,s,i),h=(t,i)=>{var n;let s,o;if(x3(t)?(s=t.items,o=t.active):s=t,0===s.length){if(i)return!1;(a.length>0||e.hideInput)&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(s=$r(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=s,o&&(e.activeItems=[o]),!0},d=t=>D3(this,void 0,void 0,(function*(){let i=!1,n=!1;yield Promise.all([(()=>D3(this,void 0,void 0,(function*(){"number"==typeof t.mergeDelay&&(yield Jh(t.mergeDelay),s.isCancellationRequested)||n||(i=h(t.picks,!0))})))(),(()=>D3(this,void 0,void 0,(function*(){e.busy=!0;try{const n=yield t.additionalPicks;if(s.isCancellationRequested)return;let o,r,a,l;if(x3(t.picks)?(o=t.picks.items,r=t.picks.active):o=t.picks,x3(n)?(a=n.items,l=n.active):a=n,a.length>0||!i){let t;if(!r&&!l){const i=e.activeItems[0];i&&-1!==o.indexOf(i)&&(t=i)}h({items:[...o,...a],active:r||l||t})}}finally{s.isCancellationRequested||(e.busy=!1),n=!0}})))()])}));if(null===l);else if(N3(l))yield d(l);else if(l instanceof Promise){e.busy=!0;try{const e=yield l;if(s.isCancellationRequested)return;N3(e)?yield d(e):h(e)}finally{s.isCancellationRequested||(e.busy=!1)}}else h(l)}));return s.add(e.onDidChangeValue((()=>a()))),a(),s.add(e.onDidAccept((t=>{const[i]=e.selectedItems;"function"==typeof(null==i?void 0:i.accept)&&(t.inBackground||e.hide(),i.accept(e.keyMods,t))}))),s.add(e.onDidTriggerItemButton((({button:i,item:n})=>D3(this,void 0,void 0,(function*(){var s,o;if("function"==typeof n.trigger){const r=null!==(o=null===(s=n.buttons)||void 0===s?void 0:s.indexOf(i))&&void 0!==o?o:-1;if(r>=0){const i=n.trigger(r,e.keyMods),s="number"==typeof i?i:yield i;if(t.isCancellationRequested)return;switch(s){case k3.NO_ACTION:break;case k3.CLOSE_PICKER:e.hide();break;case k3.REFRESH_PICKER:a();break;case k3.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),s=e.activeItems.filter((e=>e!==n[0])),o=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,s&&(e.activeItems=s),e.keepScrollPosition=o}break}}}}}))))),s}}var I3,M3,T3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},R3=function(e,t){return function(i,n){t(i,n,e)}},A3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let O3=I3=class extends E3{constructor(e,t,i,n,s,o){super(I3.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=o,this.commandsHistory=this._register(this.instantiationService.createInstance(P3)),this.options=e}_getPicks(e,t,i,n){var s,o,r,a;return A3(this,void 0,void 0,(function*(){const t=yield this.getCommandPicks(i);if(i.isCancellationRequested)return[];const l=_((()=>{const n=new S3;n.updateDocuments(t.map((e=>({key:e.commandId,textChunks:[e.label+(e.commandAlias?` ${e.commandAlias}`:"")]}))));return function(e){var t,i;const n=e.slice(0);n.sort(((e,t)=>t.score-e.score));const s=null!==(i=null===(t=n[0])||void 0===t?void 0:t.score)&&void 0!==i?i:0;if(s>0)for(const o of n)o.score/=s;return n}(n.calculateScores(e,i)).filter((e=>e.score>I3.TFIDF_THRESHOLD)).slice(0,I3.TFIDF_MAX_RESULTS)})),h=[];for(const n of t){const t=null!==(s=I3.WORD_FILTER(e,n.label))&&void 0!==s?s:void 0,r=n.commandAlias&&null!==(o=I3.WORD_FILTER(e,n.commandAlias))&&void 0!==o?o:void 0;if(t||r)n.highlights={label:t,detail:this.options.showAlias?r:void 0},h.push(n);else if(e===n.commandId)h.push(n);else if(e.length>=3){const e=l();if(i.isCancellationRequested)return[];const t=e.find((e=>e.key===n.commandId));t&&(n.tfIdfScore=t.score,h.push(n))}}const d=new Map;for(const e of h){const t=d.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):d.set(e.label,e)}h.sort(((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return-1;const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const c=[];let u=!1,g=!0,p=!!this.options.suggestedCommandIds;for(let e=0;eA3(this,void 0,void 0,(function*(){var s;const o=yield this.getAdditionalCommandPicks(t,h,e,i);if(i.isCancellationRequested)return[];const r=o.map((e=>this.toCommandPick(e,n)));return g&&"separator"!==(null===(s=r[0])||void 0===s?void 0:s.type)&&r.unshift({type:"separator",label:ue(0,"similar commands")}),r})))()}:c}))}toCommandPick(e,t){if("separator"===e.type)return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?ue(0,"{0}, {1}",e.label,i.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:()=>A3(this,void 0,void 0,(function*(){var i,n;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:null!==(i=null==t?void 0:t.from)&&void 0!==i?i:"quick open"});try{(null===(n=e.args)||void 0===n?void 0:n.length)?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(s){d(s)||this.dialogService.error(ue(0,"Command '{0}' resulted in an error",e.label),y3(s))}}))})}};O3.PREFIX=">",O3.TFIDF_THRESHOLD=.5,O3.TFIDF_MAX_RESULTS=5,O3.WORD_FILTER=jo(qo,(function(e,t,i=!1){if(!t||0===t.length)return null;let n=null,s=0;for(e=e.toLowerCase(),t=t.toLowerCase();sthis.updateConfiguration(e))))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=M3.getConfiguredCommandHistoryLength(this.configurationService),M3.cache&&M3.cache.limit!==this.configuredCommandsHistoryLength&&(M3.cache.limit=this.configuredCommandsHistoryLength,M3.saveState(this.storageService)))}load(){const e=this.storageService.get(M3.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(n){}const i=M3.cache=new Ks(this.configuredCommandsHistoryLength,1);if(t){let e;e=t.usesLRU?t.entries:t.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}M3.counter=this.storageService.getNumber(M3.PREF_KEY_COUNTER,0,M3.counter)}push(e){M3.cache&&(M3.cache.set(e,M3.counter++),M3.saveState(this.storageService))}peek(e){var t;return null===(t=M3.cache)||void 0===t?void 0:t.peek(e)}static saveState(e){if(!M3.cache)return;const t={usesLRU:!0,entries:[]};M3.cache.forEach(((e,i)=>t.entries.push({key:i,value:e}))),e.store(M3.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(M3.PREF_KEY_COUNTER,M3.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const n=null===(i=null===(t=e.getValue().workbench)||void 0===t?void 0:t.commandPalette)||void 0===i?void 0:i.history;return"number"==typeof n?n:M3.DEFAULT_COMMANDS_HISTORY_LENGTH}};P3.DEFAULT_COMMANDS_HISTORY_LENGTH=50,P3.PREF_KEY_CACHE="commandPalette.mru.cache",P3.PREF_KEY_COUNTER="commandPalette.mru.counter",P3.counter=1,P3=M3=T3([R3(0,qN),R3(1,uu)],P3);class F3 extends O3{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:oa(i.label)||i.id});return t}}var B3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W3=function(e,t){return function(i,n){t(i,n,e)}},V3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let H3=class extends F3{get activeTextEditorControl(){var e;return null!==(e=this.codeEditorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}constructor(e,t,i,n,s,o){super({showAlias:!1},e,i,n,s,o),this.codeEditorService=t}getCommandPicks(){return V3(this,void 0,void 0,(function*(){return this.getCodeEditorCommandPicks()}))}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return V3(this,void 0,void 0,(function*(){return[]}))}};H3=B3([W3(0,Oa),W3(1,Fa),W3(2,PL),W3(3,Ga),W3(4,rh),W3(5,L3)],H3);class z3 extends _h{constructor(){super({id:z3.ID,label:TJ.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(lE).quickAccess.show(H3.PREFIX)}}z3.ID="editor.action.quickCommand",yh(z3),Ul.as(NJ).registerQuickAccessProvider({ctor:H3,prefix:H3.PREFIX,helpEntries:[{description:TJ.quickCommandHelp,commandId:z3.ID}]});var U3,K3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},j3=function(e,t){return function(i,n){t(i,n,e)}};let q3=U3=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Ul.as(NJ)}provide(e){const t=new N;return t.add(e.onDidAccept((()=>{const[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),t.add(e.onDidChangeValue((e=>{const t=this.registry.getQuickAccessProvider(e.substr(U3.PREFIX.length));t&&t.prefix&&t.prefix!==U3.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),e.items=this.getQuickAccessProviders().filter((e=>e.prefix!==U3.PREFIX)),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)))}createPicks(e){return e.helpEntries.map((t=>{const i=t.prefix||e.prefix,n=i||"\u2026";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:ue(0,"{0}, {1}",n,t.description),description:t.description}}))}};q3.PREFIX="?",q3=U3=K3([j3(0,lE),j3(1,PL)],q3),Ul.as(NJ).registerQuickAccessProvider({ctor:q3,prefix:"",helpEntries:[{description:MJ.helpQuickAccessActionLabel}]});const $3=[void 0,[]];function G3(e,t,i=0,n=0){const s=t;return s.values&&s.values.length>1?function(e,t,i,n){let s=0;const o=[];for(const r of t){const[t,a]=Z3(e,r,i,n);if("number"!=typeof t)return $3;s+=t,o.push(...a)}return[s,Y3(o)]}(e,s.values,i,n):Z3(e,t,i,n)}function Z3(e,t,i,n){const s=Tr(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],fr(s)]:$3}Object.freeze({score:0});function Y3(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const s of t)n&&X3(n,s)?(n.start=Math.min(n.start,s.start),n.end=Math.max(n.end,s.end)):(n=s,i.push(s));return i}function X3(e,t){return!(e.end=0,r=Q3(e);let a;const l=e.split(" ");if(l.length>1)for(const h of l){const e=Q3(h),{pathNormalized:t,normalized:i,normalizedLowercase:n}=e6(h);i&&(a||(a=[]),a.push({original:h,originalLowercase:h.toLowerCase(),pathNormalized:t,normalized:i,normalizedLowercase:n,expectContiguousMatch:e}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:s,values:a,containsPathSeparator:o,expectContiguousMatch:r}}function e6(e){let t;t=Oe?e.replace(/\//g,Ji):e.replace(/\\/g,Ji);const i=(n=t,n.replace(/\*/g,"")).replace(/\s|"/g,"");var n;return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function t6(e){return Array.isArray(e)?J3(e.map((e=>e.original)).join(" ")):J3(e.original)}var i6,n6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},s6=function(e,t){return function(i,n){t(i,n,e)}},o6=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let r6=i6=class extends kJ{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,ue(0,"To go to a symbol, first open a text editor with symbol information.")),E.None}provideWithTextEditor(e,t,i){const n=e.editor,s=this.getModel(n);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,i):this.doProvideWithoutEditorSymbols(e,s,t,i):E.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new N;return this.provideLabelPick(i,ue(0,"The active text editor does not provide symbol information.")),(()=>{o6(this,void 0,void 0,(function*(){(yield this.waitForLanguageSymbolRegistry(t,s))&&!n.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,i,n))}))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return o6(this,void 0,void 0,(function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new ad,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))})));return t.add(x((()=>i.complete(!1)))),i.p}))}doProvideWithEditorSymbols(e,t,i,n){var s;const o=e.editor,r=new N;r.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),t.inBackground||i.hide())}))),r.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const a=this.getDocumentSymbols(t,n);let l;const h=e=>o6(this,void 0,void 0,(function*(){null==l||l.dispose(!0),i.busy=!1,l=new Uh(n),i.busy=!0;try{const t=J3(i.value.substr(i6.PREFIX.length).trim()),s=yield this.doGetSymbolPicks(a,t,void 0,l.token);if(n.isCancellationRequested)return;if(s.length>0){if(i.items=s,e&&0===t.original.length){const t=uc(s,(t=>Boolean("separator"!==t.type&&t.range&&Mh.containsPosition(t.range.decoration,e))));t&&(i.activeItems=[t])}}else t.original.length>0?this.provideLabelPick(i,ue(0,"No matching editor symbols")):this.provideLabelPick(i,ue(0,"No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}}));return r.add(i.onDidChangeValue((()=>h(void 0)))),h(null===(s=o.getSelection())||void 0===s?void 0:s.getPosition()),r.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;e&&e.range&&(o.revealRangeInCenter(e.range.selection,0),this.addDecorations(o,e.range.decoration))}))),r}doGetSymbolPicks(e,t,i,n){var s,o;return o6(this,void 0,void 0,(function*(){const r=yield e;if(n.isCancellationRequested)return[];const a=0===t.original.indexOf(i6.SCOPE_PREFIX),l=a?1:0;let h,d,c;t.values&&t.values.length>1?(h=t6(t.values[0]),d=t6(t.values.slice(1))):h=t;const u=null===(o=null===(s=this.options)||void 0===s?void 0:s.openSideBySideDirection)||void 0===o?void 0:o.call(s);u&&(c=[{iconClass:"right"===u?ea.asClassName(Qr.splitHorizontal):ea.asClassName(Qr.splitVertical),tooltip:ue(0,"right"===u?"Open to the Side":"Open to the Bottom")}]);const g=[];for(let v=0;vl){let E=!1;if(h!==t&&([S,L]=G3(w,Object.assign(Object.assign({},t),{values:void 0}),l,y),"number"==typeof S&&(E=!0)),"number"!=typeof S&&([S,L]=G3(w,h,l,y),"number"!=typeof S))continue;if(!E&&d){if(x&&d.original.length>0&&([k,D]=G3(x,d)),"number"!=typeof k)continue;"number"==typeof S&&(S+=k)}}const N=b.tags&&b.tags.indexOf(1)>=0;g.push({index:v,kind:b.kind,score:S,label:w,ariaLabel:(p=b.name,m=b.kind,ue(0,"{0} ({1})",p,CC[m])),description:x,highlights:N?void 0:{label:L,description:D},range:{selection:Mh.collapseToStart(b.selectionRange),decoration:b.range},strikethrough:N,buttons:c})}var p,m;const f=g.sort(((e,t)=>a?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let _=[];if(a){let I,M,T=0;function R(){M&&"number"==typeof I&&T>0&&(M.label=Xs(l6[I]||a6,T))}for(const A of f)I!==A.kind?(R(),I=A.kind,T=1,M={type:"separator"},_.push(M)):T++,_.push(A);R()}else f.length>0&&(_=[{label:ue(0,"symbols ({0})",g.length),type:"separator"},...f]);return _}))}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=l6[e.kind]||a6,n=l6[t.kind]||a6,s=i.localeCompare(n);return 0===s?this.compareByScore(e,t):s}getDocumentSymbols(e,t){return o6(this,void 0,void 0,(function*(){const i=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}))}};r6.PREFIX="@",r6.SCOPE_PREFIX=":",r6.PREFIX_BY_CATEGORY=`${i6.PREFIX}${i6.SCOPE_PREFIX}`,r6=i6=n6([s6(0,iL),s6(1,yZ)],r6);const a6=ue(0,"properties ({0})"),l6={5:ue(0,"methods ({0})"),11:ue(0,"functions ({0})"),8:ue(0,"constructors ({0})"),12:ue(0,"variables ({0})"),4:ue(0,"classes ({0})"),22:ue(0,"structs ({0})"),23:ue(0,"events ({0})"),24:ue(0,"operators ({0})"),10:ue(0,"interfaces ({0})"),2:ue(0,"namespaces ({0})"),3:ue(0,"packages ({0})"),25:ue(0,"type parameters ({0})"),1:ue(0,"modules ({0})"),6:ue(0,"properties ({0})"),9:ue(0,"enumerations ({0})"),21:ue(0,"enumeration members ({0})"),14:ue(0,"strings ({0})"),0:ue(0,"files ({0})"),17:ue(0,"arrays ({0})"),15:ue(0,"numbers ({0})"),16:ue(0,"booleans ({0})"),18:ue(0,"objects ({0})"),19:ue(0,"keys ({0})"),7:ue(0,"fields ({0})"),13:ue(0,"constants ({0})")};var h6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},d6=function(e,t){return function(i,n){t(i,n,e)}};let c6=class extends r6{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=B.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};c6=h6([d6(0,Fa),d6(1,iL),d6(2,yZ)],c6);class u6 extends _h{constructor(){super({id:u6.ID,label:RJ.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:Rh.hasDocumentSymbolProvider,kbOpts:{kbExpr:Rh.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(lE).quickAccess.show(r6.PREFIX,{itemActivation:aE.NONE})}}u6.ID="editor.action.quickOutline",yh(u6),Ul.as(NJ).registerQuickAccessProvider({ctor:c6,prefix:r6.PREFIX,helpEntries:[{description:RJ.quickOutlineActionLabel,prefix:r6.PREFIX,commandId:u6.ID},{description:RJ.quickOutlineByCategoryActionLabel,prefix:r6.PREFIX_BY_CATEGORY}]});class g6 extends E{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=iD.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(91);t||(t=this.editor.isSimpleWidget?new Ia(ue(0,"Cannot edit in read-only input")):new Ia(ue(0,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}g6.ID="editor.contrib.readOnlyMessageController",Lh(g6.ID,g6,2);var p6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m6=function(e,t){return function(i,n){t(i,n,e)}};let f6=class extends _U{constructor(e,t,i,n,s,o,r){super(!0,e,t,i,n,s,o,r)}};f6=p6([m6(1,Rl),m6(2,Fa),m6(3,uL),m6(4,Oa),m6(5,qN),m6(6,uu)],f6),Lh(_U.ID,f6,4);var _6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},v6=function(e,t){return function(i,n){t(i,n,e)}};const b6=new Tl("renameInputVisible",!1,ue(0,"Whether the rename input widget is visible"));let C6=class{constructor(e,t,i,n,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new N,this.allowEditorOverflow=!0,this._visibleContextKey=b6.bindTo(s),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",ue(0,"Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,i,n,s;if(!this._input||!this._domNode)return;const o=e.getColor(Mp),r=e.getColor(Tp);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(ym))&&void 0!==t?t:""),this._domNode.style.boxShadow=o?` 0 0 8px 2px ${o}`:"",this._domNode.style.border=r?`1px solid ${r}`:"",this._domNode.style.color=String(null!==(i=e.getColor(Ap))&&void 0!==i?i:""),this._input.style.backgroundColor=String(null!==(n=e.getColor(Rp))&&void 0!==n?n:"");const a=e.getColor(Op);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=null!==(s=null==a?void 0:a.toString())&&void 0!==s?s:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(50);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=.8*e.fontSize+"px"}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;const[i,n]=this._acceptKeybindings;return this._label.innerText=ue(0,"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(n))||void 0===t?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;null===(t=this._currentAcceptInput)||void 0===t||t.call(this,e)}cancelInput(e){var t;null===(t=this._currentCancelInput)||void 0===t||t.call(this,e)}getInput(e,t,i,n,s,o){this._domNode.classList.toggle("preview",s),this._position=new Ba(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const r=new N;return new Promise((e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=i=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:s&&i})):this.cancelInput(!0)},r.add(o.onCancellationRequested((()=>this.cancelInput(!0)))),r.add(this._editor.onDidBlurEditorWidget((()=>{var e;return this.cancelInput(!(null===(e=this._domNode)||void 0===e?void 0:e.ownerDocument.hasFocus()))}))),this._show()})).finally((()=>{r.dispose(),this._hide()}))}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))}),100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};C6=_6([v6(2,R_),v6(3,PL),v6(4,Rl)],C6);var w6,y6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},S6=function(e,t){return function(i,n){t(i,n,e)}},L6=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class k6{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return L6(this,void 0,void 0,(function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:Mh.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}))}provideRenameEdits(e,t){return L6(this,void 0,void 0,(function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}))}_provideRenameEdits(e,t,i,n){return L6(this,void 0,void 0,(function*(){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join("\n")};const o=yield s.provideRenameEdits(this.model,this.position,e,n);return o?o.rejectReason?this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n):o:this._provideRenameEdits(e,t+1,i.concat(ue(0,"No result.")),n)}))}}let D6=w6=class{static get(e){return e.getContribution(w6.ID)}constructor(e,t,i,n,s,o,r,a){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=o,this._configService=r,this._languageFeaturesService=a,this._disposableStore=new N,this._cts=new Uh,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(C6,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return L6(this,void 0,void 0,(function*(){if(this._cts.dispose(!0),this._cts=new Uh,!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new k6(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;const s=new aL(this.editor,5,void 0,this._cts.token);let o;try{const e=n.resolveRenameLocation(s.token);this._progressService.showWhile(e,250),o=yield e}catch(Dre){return void(null===(e=iD.get(this.editor))||void 0===e||e.showMessage(Dre||ue(0,"An unknown error occurred while resolving rename location"),i))}finally{s.dispose()}if(!o)return;if(o.rejectReason)return void(null===(t=iD.get(this.editor))||void 0===t||t.showMessage(o.rejectReason,i));if(s.token.isCancellationRequested)return;const r=new aL(this.editor,5,o.range,this._cts.token),a=this.editor.getSelection();let l=0,h=o.text.length;Mh.isEmpty(a)||Mh.spansMultipleLines(a)||!Mh.containsRange(o.range,a)||(l=Math.max(0,a.startColumn-o.range.startColumn),h=Math.min(o.range.endColumn,a.endColumn)-o.range.startColumn);const d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),c=yield this._renameInputField.getInput(o.range,o.text,l,h,d,r.token);if("boolean"==typeof c)return c&&this.editor.focus(),void r.dispose();this.editor.focus();const u=Zh(n.provideRenameEdits(c.newName,r.token),r.token).then((e=>L6(this,void 0,void 0,(function*(){e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):(this.editor.setSelection(Mh.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(e,{editor:this.editor,showPreview:c.wantsPreview,label:ue(0,"Renaming '{0}' to '{1}'",null==o?void 0:o.text,c.newName),code:"undoredo.rename",quotableLabel:ue(0,"Renaming {0} to {1}",null==o?void 0:o.text,c.newName),respectAutoSaveConfig:!0}).then((e=>{e.ariaSummary&&Os(ue(0,"Successfully renamed '{0}' to '{1}'. Summary: {2}",o.text,c.newName,e.ariaSummary))})).catch((e=>{this._notificationService.error(ue(0,"Rename failed to apply edits")),this._logService.error(e)}))))}))),(e=>{this._notificationService.error(ue(0,"Rename failed to compute edits")),this._logService.error(e)})).finally((()=>{r.dispose()}));return this._progressService.showWhile(u,250),u}))}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};D6.ID="editor.contrib.renameController",D6=w6=y6([S6(1,Oa),S6(2,uL),S6(3,QS),S6(4,mL),S6(5,ah),S6(6,cT),S6(7,iL)],D6);Lh(D6.ID,D6,4),yh(class extends _h{constructor(){super({id:"editor.action.rename",label:ue(0,"Rename Symbol"),alias:"Rename Symbol",precondition:ul.and(Rh.writable,Rh.hasRenameProvider),kbOpts:{kbExpr:Rh.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(Fa),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return an.isUri(n)&&Ba.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(s),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r):super.runCommand(e,t)}run(e,t){const i=D6.get(t);return i?i.run():Promise.resolve()}});const x6=fh.bindToContribution(D6.get);wh(new x6({id:"acceptRenameInput",precondition:b6,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:ul.and(Rh.focus,ul.not("isComposing")),primary:3}})),wh(new x6({id:"acceptRenameInputWithPreview",precondition:ul.and(b6,ul.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:ul.and(Rh.focus,ul.not("isComposing")),primary:1027}})),wh(new x6({id:"cancelRenameInput",precondition:b6,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:Rh.focus,primary:9,secondary:[1033]}})),Ch("_executeDocumentRenameProvider",(function(e,t,i,...n){const[s]=n;jr("string"==typeof s);const{renameProvider:o}=e.get(iL);return function(e,t,i,n){return L6(this,void 0,void 0,(function*(){const s=new k6(t,i,e),o=yield s.resolveRenameLocation(Hh.None);return(null==o?void 0:o.rejectReason)?{edits:[],rejectReason:o.rejectReason}:s.provideRenameEdits(n,Hh.None)}))}(o,t,i,s)})),Ch("_executePrepareRename",(function(e,t,i){return L6(this,void 0,void 0,(function*(){const{renameProvider:n}=e.get(iL),s=new k6(t,i,n),o=yield s.resolveRenameLocation(Hh.None);if(null==o?void 0:o.rejectReason)throw new Error(o.rejectReason);return o}))})),Ul.as(ku).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:ue(0,"Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});class N6{static create(e,t){return new N6(e,new E6(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new Mh(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,s,o]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new N6(this._startLineNumber,n),new N6(this._startLineNumber+o,s)]}applyEdit(e,t){const[i,n,s]=ac(t);this.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new Ba(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(0===t&&0===i)return;const o=e.lineNumber-this._startLineNumber;if(o<0)return void(this._startLineNumber+=t);o>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(o,e.column-1,t,i,n,s)}}class E6{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let s=n;for(;s>t&&this._getDeltaLine(s-1)===e;)s--;let o=n;for(;oe||d===e&&u>=t)&&(de||r===e&&g>=t){if(rs?p-=s-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>s)){h=!0;continue}p-=s-i}else if(us)){h=!0;continue}u=t,g=i,p=g+(p-s)}else if(u>n){if(0===a&&!h){l=r;break}u-=a}else{if(!(u===n&&g>=s))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=s-i,p-=s-i}const f=4*l;o[f]=u,o[f+1]=g,o[f+2]=p,o[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,s,o){const r=0===i&&1===n&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),a=this._tokens,l=this._tokenCount;for(let h=0;h=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},T6=function(e,t){return function(i,n){t(i,n,e)}};let R6=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new P6}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),s=this._hashTable.get(e,t,n);let o;if(s)o=s.metadata,this._logService.getLevel()===lh.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${jg.getForeground(o)}, fontStyle ${jg.getFontStyle(o).toString(2)}`);else{let s=this._legend.tokenTypes[e];const r=[];if(s){let e=t;for(let t=0;e>0&&t>=1;e>0&&this._logService.getLevel()===lh.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),r.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(s,r,i);if(void 0===n)o=2147483647;else{if(o=0,void 0!==n.italic){o|=1|(n.italic?1:0)<<11}if(void 0!==n.bold){o|=2|(n.bold?2:0)<<11}if(void 0!==n.underline){o|=4|(n.underline?4:0)<<11}if(void 0!==n.strikethrough){o|=8|(n.strikethrough?8:0)<<11}if(n.foreground){o|=16|n.foreground<<15}0===o&&(o=2147483647)}}else this._logService.getLevel()===lh.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),o=2147483647,s="not-in-legend";this._hashTable.add(e,t,n,o),this._logService.getLevel()===lh.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${s}) / ${t} (${r.join(" ")}): foreground ${jg.getForeground(o)}, fontStyle ${jg.getFontStyle(o).toString(2)}`)}return o}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};function A6(e,t,i){const n=e.data,s=e.data.length/5|0,o=Math.max(Math.ceil(s/1024),400),r=[];let a=0,l=1,h=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=d;for(;e+1d)t.warnOverlappingSemanticTokens(r,d+1);else{const e=t.getMetadata(_,v,i);2147483647!==e&&(0===g&&(g=r),c[u]=r-g,c[u+1]=d,c[u+2]=f,c[u+3]=e,u+=4,p=r,m=f)}l=r,h=d,a++}u!==c.length&&(c=c.subarray(0,u));const f=N6.create(g,c);r.push(f)}return r}R6=M6([T6(1,R_),T6(2,yc),T6(3,ah)],R6);class O6{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class P6{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=P6._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=P6._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10?i[0]:[]}(e,t),r=yield Promise.all(o.map((e=>B6(this,void 0,void 0,(function*(){let o,r=null;try{o=yield e.provideDocumentSemanticTokens(t,e===i?n:null,s)}catch(a){r=a,o=null}return o&&(W6(o)||V6(o))||(o=null),new H6(e,o,r)})))));for(const e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}))}class K6{constructor(e,t){this.provider=e,this.tokens=t}}function j6(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}function q6(e,t,i,n){return B6(this,void 0,void 0,(function*(){const s=j6(e,t),o=yield Promise.all(s.map((e=>B6(this,void 0,void 0,(function*(){let s;try{s=yield e.provideDocumentRangeSemanticTokens(t,i,n)}catch(o){a(o),s=null}return s&&W6(s)||(s=null),new K6(e,s)})))));for(const e of o)if(e.tokens)return e;return o.length>0?o[0]:null}))}Za.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>B6(void 0,void 0,void 0,(function*(){const[i]=t;jr(i instanceof an);const n=e.get(Wa).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=e.get(iL),o=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(s,n);return o?o[0].getLegend():e.get(Ga).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),Za.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>B6(void 0,void 0,void 0,(function*(){const[i]=t;jr(i instanceof an);const n=e.get(Wa).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=e.get(iL);if(!z6(s,n))return e.get(Ga).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const o=yield U6(s,n,null,null,Hh.None);if(!o)return;const{provider:r,tokens:a}=o;if(!a||!W6(a))return;const l=F6({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l})))),Za.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>B6(void 0,void 0,void 0,(function*(){const[i,n]=t;jr(i instanceof an);const s=e.get(Wa).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:o}=e.get(iL),r=j6(o,s);if(0===r.length)return;if(1===r.length)return r[0].getLegend();if(!n||!Mh.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=yield q6(o,s,Mh.lift(n),Hh.None);return a?a.provider.getLegend():void 0})))),Za.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>B6(void 0,void 0,void 0,(function*(){const[i,n]=t;jr(i instanceof an),jr(Mh.isIRange(n));const s=e.get(Wa).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:o}=e.get(iL),r=yield q6(o,s,Mh.lift(n),Hh.None);return r&&r.tokens?F6({id:0,type:"full",data:r.tokens.data}):void 0}))));const $6=Pa("semanticTokensStylingService"),G6="editor.semanticHighlighting";function Z6(e,t,i){var n;const s=null===(n=i.getValue(G6,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof s?s:t.getColorTheme().semanticHighlighting}var Y6,X6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Q6=function(e,t){return function(i,n){t(i,n,e)}};let J6=class extends E{constructor(e,t,i,n,s,o){super(),this._watchers=Object.create(null);const r=t=>{this._watchers[t.uri.toString()]=new e9(t,e,i,s,o)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];Z6(e,i,n)?t||r(e):t&&a(e,t)}};this._register(t.onModelAdded((e=>{Z6(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(G6)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};J6=X6([Q6(0,$6),Q6(1,Wa),Q6(2,R_),Q6(3,uu),Q6(4,CE),Q6(5,iL)],J6);let e9=Y6=class extends E{constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:Y6.REQUEST_MIN_DELAY,max:Y6.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new sd((()=>this._fetchDocumentSemanticTokensNow()),Y6.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeAttached((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const o=()=>{k(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of this._provider.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};o(),this._register(this._provider.onDidChange((()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(i.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),k(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!z6(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));if(!this._model.isAttachedToEditor())return;const e=new Uh,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=U6(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const s=[],o=this._model.onDidChangeContent((e=>{s.push(e)})),a=new F(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,s)}else this._setDocumentSemanticTokens(null,null,null,s)}),(e=>{e&&(d(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||r(e),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),(s.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let o=0;o{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.tokenization.setSemanticTokens(null,!0),void o();if(V6(t)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const n=s.data,o=new Uint32Array(n.length+e);let r=n.length,a=o.length;for(let l=t.edits.length-1;l>=0;l--){const e=t.edits[l];if(e.start>n.length)return i.warnInvalidEditStart(s.resultId,t.resultId,l,e.start,n.length),void this._model.tokenization.setSemanticTokens(null,!0);const h=r-(e.start+e.deleteCount);h>0&&(Y6._copy(n,r-h,o,a-h,h),a-=h),e.data&&(Y6._copy(e.data,0,o,a-e.data.length,e.data.length),a-=e.data.length),r=e.start}r>0&&Y6._copy(n,0,o,0,r),t={resultId:t.resultId,data:o}}}if(W6(t)){this._currentDocumentResponse=new t9(e,t.resultId,t.data);const s=A6(t,i,this._model.getLanguageId());if(n.length>0)for(const e of n)for(const t of s)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(s,!0)}else this._model.tokenization.setSemanticTokens(null,!0);o()}else this._model.tokenization.setSemanticTokens(null,!1)}};e9.REQUEST_MIN_DELAY=300,e9.REQUEST_MAX_DELAY=2e3,e9=Y6=X6([Q6(1,$6),Q6(2,R_),Q6(3,CE),Q6(4,iL)],e9);class t9{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}DT(J6);var i9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},n9=function(e,t){return function(i,n){t(i,n,e)}};let s9=class extends E{constructor(e,t,i,n,s,o){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=o.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new sd((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const r=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{r()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),r()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),r()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),r()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(G6)&&(this._cancelAll(),r())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),r()}))),r()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),n=Gh((i=>Promise.resolve(q6(this._provider,e,t,i)))),s=new F(!1);return n.then((n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:o,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,A6(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(n)),(()=>this._removeOutstandingRequest(n))),n}};s9.ID="editor.contrib.viewportSemanticTokens",s9=i9([n9(1,$6),n9(2,R_),n9(3,uu),n9(4,CE),n9(5,iL)],s9),Lh(s9.ID,s9,1);class o9{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:o}=n,r=i.column-o;let a=r,l=r,h=0;for(;a>=0;a--){const e=s.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if(po(e)&&mo(h))break;h=e}for(a+=1;l0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new Mh(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var r9,a9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},l9=function(e,t){return function(i,n){t(i,n,e)}},h9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class d9{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new d9(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let c9=r9=class{static get(e){return e.getContribution(r9.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}run(e){return h9(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||(yield g9(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(112),Hh.None).then((e=>{var i;if(Wd(e)&&e.length===t.length&&this._editor.hasModel()&&Id(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new d9(0,e))),null===(i=this._selectionListener)||void 0===i||i.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}}))),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const n=this._state.map((e=>Th.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}))}};c9.ID="editor.contrib.smartSelectController",c9=r9=a9([l9(1,iL)],c9);class u9 extends _h{constructor(e,t){super(t),this._forward=e}run(e,t){return h9(this,void 0,void 0,(function*(){const e=c9.get(t);e&&(yield e.run(this._forward))}))}}Za.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");function g9(e,t,i,n,s){return h9(this,void 0,void 0,(function*(){const o=e.all(t).concat(new o9(n.selectSubwords));1===o.length&&o.unshift(new I2);const r=[],l=[];for(const e of o)r.push(Promise.resolve(e.provideSelectionRanges(t,i,s)).then((e=>{if(Wd(e)&&e.length===i.length)for(let t=0;t{if(0===e.length)return[];e.sort(((e,t)=>Ba.isBefore(e.getStartPosition(),t.getStartPosition())?1:Ba.isBefore(t.getStartPosition(),e.getStartPosition())||Ba.isBefore(e.getEndPosition(),t.getEndPosition())?-1:Ba.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let s;for(const t of e)(!s||Mh.containsRange(t,s)&&!Mh.equalsRange(t,s))&&(i.push(t),s=t);if(!n.selectLeadingAndTrailingWhitespace)return i;const o=[i[0]];for(let n=1;ne}),v9="data-sticky-line-index",b9="data-sticky-is-line",C9="data-sticky-is-folding-icon";class w9 extends E{constructor(e){super(),this._editor=e,this._foldingIconStore=new N,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof cW),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(114)&&t(),e.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))}))),this._register(this._editor.onDidScrollChange((e=>{e.scrollLeftChanged&&t(),e.scrollWidthChanged&&this._updateWidgetWidth()}))),this._register(this._editor.onDidChangeModel((()=>{t(),this._updateWidgetWidth()}))),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange((e=>{this._updateWidgetWidth()}))),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(e){return this._stickyLines.find((t=>t.lineNumber===e))}getCurrentLines(){return this._lineNumbers}setState(e,t,i=1/0){if((!this._previousState&&!e||this._previousState&&this._previousState.equals(e))&&i===1/0)return;this._previousState=e;const n=this._stickyLines;if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const t=[...e.startLineNumbers];null!==e.showEndForLine&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=t}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(n,t,i)}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",this._editor.getScrollWidth()-e.verticalScrollbarWidth+"px"),this._rootDomNode.style.width=e.width-e.verticalScrollbarWidth+"px"}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),Dn(this._lineNumbersDomNode),Dn(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._stickyLines){const i=t.foldingIcon;i&&i.setVisible(!!e||i.isCollapsed)}}_renderRootNode(e,t,i=1/0){return m9(this,void 0,void 0,(function*(){const n=this._editor.getLayoutInfo();for(const[o,r]of this._lineNumbers.entries()){const s=e[o],a=r>=i||(null==s?void 0:s.lineNumber)!==r?this._renderChildNode(o,r,t,n):this._updateTopAndZIndexOfStickyLine(s);a&&(this._linesDomNode.appendChild(a.lineDomNode),this._lineNumbersDomNode.appendChild(a.lineNumberDomNode),this._stickyLines.push(a))}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const s=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;0!==s?(this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${s}px`,this._linesDomNodeScrollable.style.height=`${s}px`,this._rootDomNode.style.height=`${s}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)):this._clearStickyWidget()}))}_setFoldingHoverListeners(){"mouseover"===this._editor.getOption(109)&&(this._foldingIconStore.add(En(this._lineNumbersDomNode,os.MOUSE_ENTER,(e=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)}))),this._foldingIconStore.add(En(this._lineNumbersDomNode,os.MOUSE_LEAVE,(()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)}))))}_renderChildNode(e,t,i,n){const s=this._editor._getViewModel();if(!s)return;const o=s.coordinatesConverter.convertModelPositionToViewPosition(new Ba(t,1)).lineNumber,r=s.getViewLineRenderingData(o),a=this._editor.getOption(67);let l;try{l=fA.filter(r.inlineDecorations,o,r.minColumn,r.maxColumn)}catch(b){l=[]}const h=new yA(!0,!0,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,0,r.tokens,l,r.tabSize,r.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new Qc(2e3),c=DA(h,d);let u;u=_9?_9.createHTML(d.build()):d.build();const g=document.createElement("span");g.setAttribute(v9,String(e)),g.setAttribute(b9,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=u;const p=document.createElement("span");p.setAttribute(v9,String(e)),p.setAttribute("data-sticky-is-line-number",""),p.className="sticky-line-number",p.style.lineHeight=`${this._lineHeight}px`;const m=n.contentLeft;p.style.width=`${m}px`;const f=document.createElement("span");1===a.renderType||3===a.renderType&&t%10==0?f.innerText=t.toString():2===a.renderType&&(f.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),f.className="sticky-line-number-inner",f.style.lineHeight=`${this._lineHeight}px`,f.style.width=`${n.lineNumbersWidth}px`,f.style.paddingLeft=`${n.lineNumbersLeft}px`,p.appendChild(f);const _=this._renderFoldingIconForLine(i,t);_&&p.appendChild(_.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(f),p.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const v=new y9(e,t,g,p,_,c.characterMapping);return this._updateTopAndZIndexOfStickyLine(v)}_updateTopAndZIndexOfStickyLine(e){var t;const i=e.index,n=e.lineDomNode,s=e.lineNumberDomNode,o=i===this._lineNumbers.length-1;n.style.zIndex=o?"0":"1",s.style.zIndex=o?"0":"1";const r=`${i*this._lineHeight+this._lastLineRelativePosition+((null===(t=e.foldingIcon)||void 0===t?void 0:t.isCollapsed)?1:0)}px`,a=i*this._lineHeight+"px";return n.style.top=o?r:a,s.style.top=o?r:a,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(109);if(!e||"never"===i)return;const n=e.regions,s=n.findRange(t),o=n.getStartLineNumber(s);if(!(t===o))return;const r=n.isCollapsed(s),a=new S9(r,o,n.getEndLineNumber(s),this._lineHeight);return a.setVisible(!!this._isOnGlyphMargin||(r||"always"===i)),a.domNode.setAttribute(C9,""),a}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=zA(t.characterMapping,e,0);return new Ba(t.lineNumber,i)}getLineNumberFromChildDomNode(e){var t,i;return null!==(i=null===(t=this._getRenderedStickyLineFromChildDomNode(e))||void 0===t?void 0:t.lineNumber)&&void 0!==i?i:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return null===t||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,v9);return t?parseInt(t,10):null}isInStickyLine(e){return void 0!==this._getAttributeValue(e,b9)}isInFoldingIconDomNode(e){return void 0!==this._getAttributeValue(e,C9)}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(null!==i)return i;e=e.parentElement}}}class y9{constructor(e,t,i,n,s,o){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=s,this.characterMapping=o}}class S9{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=ea.asClassName(e?UQ:zQ)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class L9{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class k9{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class D9{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var x9,N9,E9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},I9=function(e,t){return function(i,n){t(i,n,e)}},M9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e.OUTLINE_MODEL="outlineModel",e.FOLDING_PROVIDER_MODEL="foldingProviderModel",e.INDENTATION_MODEL="indentationModel"}(x9||(x9={})),function(e){e[e.VALID=0]="VALID",e[e.INVALID=1]="INVALID",e[e.CANCELED=2]="CANCELED"}(N9||(N9={}));let T9=class extends E{constructor(e,t,i,n){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=i,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Xh(300)),this._updateOperation=this._register(new N);const s=new A9(i),o=new F9(this._editor,i),r=new P9(this._editor,t);switch(n){case x9.OUTLINE_MODEL:this._modelProviders.push(s),this._modelProviders.push(o),this._modelProviders.push(r);break;case x9.FOLDING_PROVIDER_MODEL:this._modelProviders.push(o),this._modelProviders.push(r);break;case x9.INDENTATION_MODEL:this._modelProviders.push(r)}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,i){return M9(this,void 0,void 0,(function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger((()=>M9(this,void 0,void 0,(function*(){for(const n of this._modelProviders){const{statusPromise:s,modelPromise:o}=n.computeStickyModel(e,t,i);this._modelPromise=o;const r=yield s;if(this._modelPromise!==o)return null;switch(r){case N9.CANCELED:return this._updateOperation.clear(),null;case N9.VALID:return n.stickyModel}}return null})))).catch((e=>(r(e),null)))}))}};T9=E9([I9(1,Xu),I9(2,iL)],T9);class R9{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,N9.INVALID}computeStickyModel(e,t,i){if(i.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};const n=Gh((i=>this.createModelFromProvider(e,t,i)));return{statusPromise:n.then((n=>this.isModelValid(n)?i.isCancellationRequested?N9.CANCELED:(this._stickyModel=this.createStickyModel(e,t,i,n),N9.VALID):this._invalid())).then(void 0,(e=>(r(e),N9.CANCELED))),modelPromise:n}}isModelValid(e){return!0}isProviderValid(e){return!0}}let A9=class extends R9{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,i){return wZ.create(this._languageFeaturesService.documentSymbolProvider,e,i)}createStickyModel(e,t,i,n){var s;const{stickyOutlineElement:o,providerID:r}=this._stickyModelFromOutlineModel(n,null===(s=this._stickyModel)||void 0===s?void 0:s.outlineProviderId);return new D9(e.uri,t,o,r)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(v.first(e.children.values())instanceof CZ){const n=v.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,s="",o=-1;for(const[t,i]of e.children.entries()){const e=this._findSumOfRangesOfGroup(i);e>o&&(n=i,o=e,s=i.id)}t=s,i=n.children}}else i=e.children;const n=[],s=Array.from(i.values()).sort(((e,t)=>{const i=new L9(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new L9(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this._comparator(i,n)}));for(const o of s)n.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new k9(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const s of e.children.values())if(s.symbol.selectionRange.startLineNumber!==s.symbol.range.endLineNumber)if(s.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(s,s.symbol.selectionRange.startLineNumber));else for(const e of s.children.values())i.push(this._stickyModelFromOutlineElement(e,s.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this._comparator(e.range,t.range)));const n=new L9(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new k9(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof bZ?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};A9=E9([I9(0,iL)],A9);class O9 extends R9{constructor(e){super(),this._foldingLimitReporter=new nJ(e)}createStickyModel(e,t,i,n){const s=this._fromFoldingRegions(n);return new D9(e.uri,t,s,void 0)}isModelValid(e){return null!==e}_fromFoldingRegions(e){const t=e.length,i=[],n=new k9(void 0,[],void 0);for(let s=0;s0}createModelFromProvider(e,t,i){const n=iJ.getFoldingRangeProviders(this._languageFeaturesService,e);return new ZQ(e,n,(()=>this.createModelFromProvider(e,t,i)),this._foldingLimitReporter,void 0).compute(i)}};F9=E9([I9(1,iL)],F9);var B9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W9=function(e,t){return function(i,n){t(i,n,e)}},V9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class H9{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let z9=class extends E{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new U),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new N),this._updateSoon=this._register(new sd((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(114)&&this.readConfiguration()}))),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new T9(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel((()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()}))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas((()=>this.update()))),this._sessionStore.add(this._editor.onDidChangeModelContent((()=>this._updateSoon.schedule()))),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>this.update()))),this.update())}getVersionId(){var e;return null===(e=this._model)||void 0===e?void 0:e.version}update(){var e;return V9(this,void 0,void 0,(function*(){null===(e=this._cts)||void 0===e||e.dispose(!0),this._cts=new Uh,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}))}updateStickyModel(e){return V9(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization())return void(this._model=null);const t=this._editor.getModel(),i=t.getVersionId(),n=yield this._stickyModelProvider.update(t,i,e);e.isCancellationRequested||(this._model=n)}))}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,s){if(0===t.children.length)return;let o=s;const r=[];for(let h=0;he-t))),l=this.updateIndex(Md(r,e.startLineNumber+n,((e,t)=>e-t)));for(let h=a;h<=l;h++){const r=t.children[h];if(!r)return;if(r.range){const t=r.range.startLineNumber,s=r.range.endLineNumber;e.startLineNumber<=s+1&&t-1<=e.endLineNumber&&t!==o&&(o=t,i.push(new H9(t,s-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,r,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,r,i,n,s)}}getCandidateStickyLinesIntersecting(e){var t,i;if(!(null===(t=this._model)||void 0===t?void 0:t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);const s=null===(i=this._editor._getViewModel())||void 0===i?void 0:i.getHiddenAreas();if(s)for(const o of s)n=n.filter((e=>!(e.startLineNumber>=o.startLineNumber&&e.endLineNumber<=o.endLineNumber+1)));return n}};z9=B9([W9(1,iL),W9(2,Xu)],z9);var U9,K9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},j9=function(e,t){return function(i,n){t(i,n,e)}},q9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let $9=U9=class extends E{constructor(e,t,i,n,s,o,r){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=r,this._sessionStore=new N,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new w9(this._editor),this._stickyLineCandidateProvider=new z9(this._editor,i,s),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new f9([],[],0),this._readConfiguration();const a=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(114)||e.hasChanged(72)||e.hasChanged(66)||e.hasChanged(109))&&this._readConfiguration()}))),this._register(En(a,os.CONTEXT_MENU,(e=>q9(this,void 0,void 0,(function*(){this._onContextMenu(e)}))))),this._stickyScrollFocusedContextKey=Rh.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=Rh.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(hs(a));this._register(l.onDidBlur((e=>{!1===this._positionRevealed&&0===a.clientHeight?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()}))),this._register(l.onDidFocus((e=>{this.focus()}))),this._registerMouseListeners(),this._register(En(a,os.MOUSE_DOWN,(e=>{this._onMouseDown=!0})))}static get(e){return e.getContribution(U9.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),null===(e=this._focusDisposableStore)||void 0===e||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown)return this._onMouseDown=!1,void this._editor.focus();!0!==this._stickyScrollFocusedContextKey.get()&&(this._focused=!0,this._focusDisposableStore=new N,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,(()=>this._editor.revealPosition(e)))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,(()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0)))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(Mh.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new N),t=this._register(new IR(this._editor,{extractLineNumberFromMouseEvent:e=>{const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);return t?t.lineNumber:0}})),i=e=>{if(!this._editor.hasModel())return null;if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return null;const t=e.target.element;if(!t||t.innerText!==t.innerHTML)return null;const i=this._stickyScrollWidget.getEditorPositionFromNode(t);return i?{range:new Mh(i.lineNumber,i.column,i.lineNumber,i.column+t.innerText.length),textElement:t}:null},n=this._stickyScrollWidget.getDomNode();this._register(Mn(n,os.CLICK,(e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;if(!e.leftButton)return;if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t)return;const i=new Ba(this._endLineNumbers[t],1);return void this._revealLineInCenterIfOutsideViewport(i)}if(this._stickyScrollWidget.isInFoldingIconDomNode(e.target)){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);return void this._toggleFoldingRegionForLine(t)}if(!this._stickyScrollWidget.isInStickyLine(e.target))return;let t=this._stickyScrollWidget.getEditorPositionFromNode(e.target);if(!t){const i=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);if(null===i)return;t=new Ba(i,1)}this._revealPosition(t)}))),this._register(Mn(n,os.MOUSE_MOVE,(e=>{if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t||null!==this._showEndForLine&&this._showEndForLine===t)return;return this._showEndForLine=t,void this._renderStickyScroll()}null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(En(n,os.MOUSE_LEAVE,(e=>{null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(t.onMouseMoveOrRelevantKeyDown((([t,n])=>{const s=i(t);if(!s||!t.hasTriggerModifier||!this._editor.hasModel())return void e.clear();const{range:o,textElement:r}=s;if(o.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===r.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=o,e.clear();const a=new Uh;let l;e.add(x((()=>a.dispose(!0)))),xU(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new Ba(o.startLineNumber,o.startColumn+1),a.token).then((t=>{if(!a.token.isCancellationRequested)if(0!==t.length){this._candidateDefinitionsLength=t.length;const i=r;l!==i?(e.clear(),l=i,l.style.textDecoration="underline",e.add(x((()=>{l.style.textDecoration="none"})))):l||(l=i,l.style.textDecoration="underline",e.add(x((()=>{l.style.textDecoration="none"}))))}else e.clear()}))}))),this._register(t.onCancel((()=>{e.clear()}))),this._register(t.onExecute((e=>q9(this,void 0,void 0,(function*(){if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return;const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);t&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:t.lineNumber,column:1})),this._instaService.invokeFunction(_0,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))))}_onContextMenu(e){const t=new Nt(e);this._contextMenuService.showContextMenu({menuId:Ql.StickyScrollContext,getAnchor:()=>t})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||null===e)return;const t=this._stickyScrollWidget.getStickyLineForLine(e),i=null==t?void 0:t.foldingIcon;if(!i)return;IQ(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(66)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(114);if(!1===e.enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),void(this._enabled=!1);e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>{this._showEndForLine=null,this._renderStickyScroll()}))),this._enabled=!0);2===this._editor.getOption(67).renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>{this._showEndForLine=null,this._renderStickyScroll()})))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(-1)}_onDidResize(){const e=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(.25*e)}_renderStickyScroll(e=1/0){var t,i;return q9(this,void 0,void 0,(function*(){const n=this._editor.getModel();if(!n||n.isTooLargeForTokenization())return this._foldingModel=null,void this._stickyScrollWidget.setState(void 0,null,e);const s=this._stickyLineCandidateProvider.getVersionId();if(void 0===s||s===n.getVersionId())if(this._foldingModel=null!==(i=yield null===(t=iJ.get(this._editor))||void 0===t?void 0:t.getFoldingModel())&&void 0!==i?i:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(!(0===this._widgetState.startLineNumbers.length)),this._focused)if(-1===this._focusedStickyElementIndex)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,-1!==this._focusedStickyElementIndex&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const t=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];if(this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),0===this._stickyScrollWidget.lineNumberCount)this._focusedStickyElementIndex=-1;else{this._stickyScrollWidget.lineNumbers.includes(t)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}}else this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}))}findScrollWidgetState(){const e=this._editor.getOption(66),t=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),i=this._editor.getScrollTop();let n=0;const s=[],o=[],r=this._editor.getVisibleRanges();if(0!==r.length){const a=new L9(r[0].startLineNumber,r[r.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const r of l){const a=r.startLineNumber,l=r.endLineNumber,h=r.nestingDepth;if(l-a>0){const r=(h-1)*e,d=h*e,c=this._editor.getBottomForLineNumber(a)-i,u=this._editor.getTopForLineNumber(l)-i,g=this._editor.getBottomForLineNumber(l)-i;if(r>u&&r<=g){s.push(a),o.push(l+1),n=g-d;break}if(d>c&&d<=g&&(s.push(a),o.push(l+1)),s.length===t)break}}}return this._endLineNumbers=o,new f9(s,o,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};$9.ID="store.contrib.stickyScrollController",$9=U9=K9([j9(1,Hx),j9(2,iL),j9(3,Oa),j9(4,Xu),j9(5,CE),j9(6,Rl)],$9);var G9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Z9=100;Lh($9.ID,$9,1),oh(class extends sh{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:ue(0,"Toggle Sticky Scroll"),mnemonicTitle:ue(0,"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:p9.View,toggled:{condition:ul.equals("config.editor.stickyScroll.enabled",!0),title:ue(0,"Sticky Scroll"),mnemonicTitle:ue(0,"&&Sticky Scroll")},menu:[{id:Ql.CommandPalette},{id:Ql.MenubarAppearanceMenu,group:"4_editor",order:3},{id:Ql.StickyScrollContext}]})}run(e){return G9(this,void 0,void 0,(function*(){const t=e.get(uu),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}))}}),oh(class extends bh{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:ue(0,"Focus Sticky Scroll"),mnemonicTitle:ue(0,"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:ul.and(ul.has("config.editor.stickyScroll.enabled"),Rh.stickyScrollVisible),menu:[{id:Ql.CommandPalette}]})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.focus()}}),oh(class extends bh{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:ue(0,"Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:Rh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Z9,primary:16}})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.focusPrevious()}}),oh(class extends bh{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:ue(0,"Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:Rh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Z9,primary:18}})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.focusNext()}}),oh(class extends bh{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:ue(0,"Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:Rh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Z9,primary:3}})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.goToFocused()}}),oh(class extends bh{constructor(){super({id:"editor.action.selectEditor",title:{value:ue(0,"Select Editor"),original:"Select Editor"},precondition:Rh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Z9,primary:9}})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.selectEditor()}});var Y9,X9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Q9=function(e,t){return function(i,n){t(i,n,e)}},J9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class e7{constructor(e,t,i,n,s,o){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.completion=o}}let t7=class extends M{constructor(e,t,i,n,s,o){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=o}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&a.resolve(Hh.None)}return t}};t7=X9([Q9(5,b2)],t7);let i7=class{constructor(e,t,i,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=n}provideInlineCompletions(e,t,i,n){var s;return J9(this,void 0,void 0,(function*(){if(i.selectedSuggestionInfo)return;const o=this._getEditorOption(88,e);if(B1.isAllOff(o))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const r=e.tokenization.getLineTokens(t.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==B1.valueFor(o,a))return;let l,h,d=e.getWordAtPosition(t);if((null==d?void 0:d.word)||(l=this._getTriggerCharacterInfo(e,t)),!(null==d?void 0:d.word)&&!l)return;if(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column)return;const c=e.getValueInRange(new Mh(t.lineNumber,1,t.lineNumber,t.column));if(!l&&(null===(s=this._lastResult)||void 0===s?void 0:s.canBeReused(e,t.lineNumber,d))){const e=new R2(c,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),h=this._lastResult}else{const i=yield O1(this._languageFeatureService.completionProvider,e,t,new T1(void 0,void 0,null==l?void 0:l.providers),l&&{triggerKind:1,triggerCharacter:l.ch},n);let s;i.needsClipboard&&(s=yield this._clipboardService.readText());const o=new A2(i.items,t.column,new R2(c,0),T2.None,this._getEditorOption(117,e),this._getEditorOption(111,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},s);h=new t7(e,t.lineNumber,d,o,i,this._suggestMemoryService)}return this._lastResult=h,h}))}handleItemDidShow(e,t){t.completion.resolve(Hh.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(Mh.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const o of this._languageFeatureService.completionProvider.all(e))(null===(i=o.triggerCharacters)||void 0===i?void 0:i.includes(n))&&s.add(o);if(0!==s.size)return{providers:s,ch:n}}};i7=X9([Q9(1,iL),Q9(2,Xy),Q9(3,b2)],i7);let n7=Y9=class{constructor(e,t,i,n){if(1==++Y9._counter){const s=n.createInstance(i7,((t,n)=>{var s;return(null!==(s=i.listCodeEditors().find((e=>e.getModel()===n)))&&void 0!==s?s:e).getOption(t)}));Y9._disposable=t.inlineCompletionsProvider.register("*",s)}}dispose(){var e;0==--Y9._counter&&(null===(e=Y9._disposable)||void 0===e||e.dispose(),Y9._disposable=void 0)}};n7._counter=0,n7=Y9=X9([Q9(1,iL),Q9(2,Fa),Q9(3,Oa)],n7),Lh("suggest.inlineCompletionsProvider",n7,0);class s7{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}const o7=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class r7{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(o7);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=rc.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class a7{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,s=e.length;n{const i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",s="ffffff";for(;e.length>=1&&""===e[0].token;){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(s=t.background)}const o=new r7;for(const d of t)o.getId(d);const r=o.getId(n),a=o.getId(s),l=new h7(i,r,a),h=new d7(l);for(let d=0,c=e.length;d>>0,this._cache.set(t,i)}return(i|e)>>>0}}const l7=/\b(comment|string|regex|regexp)\b/;class h7{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new h7(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class d7{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const s=this._children.get(i);return void 0!==s?s.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const s=e.indexOf(".");let o,r;-1===s?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1));let a=this._children.get(o);void 0===a&&(a=new d7(this._mainRule.clone()),this._children.set(o,a)),a.insert(r,t,i,n)}}const c7={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Cm]:"#FFFFFE",[wm]:"#000000",[Fm]:"#E5EBF1",[G_]:"#D3D3D3",[ev]:"#939393",[Bm]:"#ADD6FF4D"}},u7={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Cm]:"#1E1E1E",[wm]:"#D4D4D4",[Fm]:"#3A3D41",[G_]:"#404040",[ev]:"#707070",[Bm]:"#ADD6FF26"}},g7={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Cm]:"#000000",[wm]:"#FFFFFF",[G_]:"#FFFFFF",[ev]:"#FFFFFF"}},p7={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Cm]:"#FFFFFF",[wm]:"#292929",[G_]:"#292929",[ev]:"#292929"}};class m7{getIcon(e){const t=JT();let i=e.defaults;for(;ea.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}const f7="vs",_7="vs-dark",v7="hc-black",b7="hc-light",C7=Ul.as(wp),w7=Ul.as(P_);class y7{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(S7(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,rc.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=L7(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,rc.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);return i||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=C7.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case f7:return I_.LIGHT;case v7:return I_.HIGH_CONTRAST_DARK;case b7:return I_.HIGH_CONTRAST_LIGHT;default:return I_.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=L7(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=a7.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=jg.getForeground(n),o=jg.getFontStyle(n);return{foreground:s,italic:Boolean(1&o),bold:Boolean(2&o),underline:Boolean(4&o),strikethrough:Boolean(8&o)}}}function S7(e){return e===f7||e===_7||e===v7||e===b7}function L7(e){switch(e){case f7:return c7;case _7:return u7;case v7:return g7;case b7:return p7}}function k7(e){const t=L7(e);return new y7(e,t)}yh(class extends _h{constructor(){super({id:"editor.action.toggleHighContrast",label:OJ.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(z4),n=i.getColorTheme();M_(n.type)?(i.setTheme(this._originalThemeName||(T_(n.type)?_7:f7)),this._originalThemeName=null):(i.setTheme(T_(n.type)?v7:b7),this._originalThemeName=n.themeName)}});class D7 extends sh{constructor(){super({id:D7.ID,title:{value:ue(0,"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const e=!GR.getTabFocusMode();GR.setTabFocusMode(e),Os(ue(0,e?"Pressing Tab will now move focus to the next focusable element":"Pressing Tab will now insert the tab character"))}}D7.ID="editor.action.toggleTabFocusMode",oh(D7);yh(class extends _h{constructor(){super({id:"editor.action.forceRetokenize",label:ue(0,"Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new F;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}});var x7=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},N7=function(e,t){return function(i,n){t(i,n,e)}};let E7=class extends E{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n){var s;super(),this._link=t,this._enabled=!0,this.el=ds(e,fs("a.monaco-link",{tabIndex:null!==(s=t.tabIndex)&&void 0!==s?s:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const o=this._register(new Hy(this.el,"click")),r=this._register(new Hy(this.el,"keypress")),a=B.chain(r.event,(e=>e.map((e=>new St(e))).filter((e=>3===e.keyCode)))),l=this._register(new Hy(this.el,KL.Tap)).event;this._register(qL.addTarget(this.el));const h=B.any(o.event,a,l);this._register(h((e=>{this.enabled&&(as(e,!0),(null==i?void 0:i.opener)?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}};E7=x7([N7(3,Uk)],E7);var I7=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},M7=function(e,t){return function(i,n){t(i,n,e)}};let T7=class extends E{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(R7))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),null===(t=e.onClose)||void 0===t||t.call(e)}})),this._editor.setBanner(this.banner.element,26)}};T7=I7([M7(1,Oa)],T7);let R7=class extends E{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Yk,{}),this.element=fs("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){const t=fs("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Dn(this.element)}show(e){Dn(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=ds(this.element,fs("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(fs(`div${ea.asCSSSelector(e.icon)}`));const n=ds(this.element,fs("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=ds(this.element,fs("div.message-actions-container")),e.actions)for(const o of e.actions)this._register(this.instantiationService.createInstance(E7,this.messageActionsContainer,Object.assign(Object.assign({},o),{tabIndex:-1}),{}));const s=ds(this.element,fs("div.action-container"));this.actionBar=this._register(new Ix(s)),this.actionBar.push(this._register(new za("banner.close","Close Banner",ea.asClassName(nR),!0,(()=>{"function"==typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};R7=I7([M7(0,Oa)],R7);const A7=Pa("workspaceTrustManagementService");var O7=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},P7=function(e,t){return function(i,n){t(i,n,e)}},F7=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const B7=QT("extensions-warning-message",Qr.warning,ue(0,"Icon shown with a warning message in the extensions editor."));let W7=class extends E{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:ue(0,"This document contains many non-basic ASCII unicode characters"),command:new X7};else if(e.ambiguousCharacterCount>=t)i={message:ue(0,"This document contains many ambiguous unicode characters"),command:new Z7};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:ue(0,"This document contains many invisible unicode characters"),command:new Y7}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:B7,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(T7,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(124),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(124)&&(this._options=e.getOption(124),this._updateHighlighter())}))),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=function(e,t){return{nonBasicASCII:t.nonBasicASCII===AS?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===AS?!e:t.includeComments,includeStrings:t.includeStrings===AS?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>{if("_os"===e){return(new Intl.NumberFormat).resolvedOptions().locale}return"_vscode"===e?Ke:e}))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new V7(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new H7(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};W7.ID="editor.contrib.unicodeHighlighter",W7=O7([P7(1,gG),P7(2,A7),P7(3,Oa)],W7);let V7=class extends E{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new sd((()=>this._update()),250)),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:q7.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!eB(t,e))return null;return{reason:j7(t.getValueInRange(e.range),this._options),inComment:tB(t,e),inString:iB(t,e)}}};V7=O7([P7(3,gG)],V7);class H7 extends E{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new sd((()=>this._update()),250)),this._register(this._editor.onDidLayoutChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidScrollChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeHiddenAreas((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const e=lM.computeUnicodeHighlights(this._model,this._options,n);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:q7.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return eB(t,e)?{reason:j7(i,this._options),inComment:tB(t,e),inString:iB(t,e)}:null}}let z7=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(W7.ID);if(!n)return[];const s=[],o=new Set;let r=300;for(const a of t){const e=n.getDecorationInfo(a);if(!e)continue;const t=i.getValueInRange(a.range).codePointAt(0),l=K7(t);let h;switch(e.reason.kind){case 0:h=Mo(e.reason.confusableWith)?ue(0,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",l,K7(e.reason.confusableWith.codePointAt(0))):ue(0,"The character {0} could be confused with the character {1}, which is more common in source code.",l,K7(e.reason.confusableWith.codePointAt(0)));break;case 1:h=ue(0,"The character {0} is invisible.",l);break;case 2:h=ue(0,"The character {0} is not a basic ASCII character.",l)}if(o.has(h))continue;o.add(h);const d={codePoint:t,reason:e.reason,inComment:e.inComment,inString:e.inString},c=ue(0,"Adjust settings"),u=`command:${Q7.ID}?${encodeURIComponent(JSON.stringify(d))}`,g=new Ia("",!0).appendMarkdown(h).appendText(" ").appendLink(u,c);s.push(new OK(this,a.range,[g],!1,r++))}return s}renderHoverParts(e,t){return FK(e,t,this._editor,this._languageService,this._openerService)}};function U7(e){return`U+${e.toString(16).padStart(4,"0")}`}function K7(e){let t=`\`${U7(e)}\``;return Ko.isInvisibleCharacter(e)||(t+=` "${function(e){if(96===e)return"`` ` ``";return"`"+String.fromCodePoint(e)+"`"}(e)}"`),t}function j7(e,t){return lM.computeUnicodeHighlightReason(e,t)}z7=O7([P7(1,yc),P7(2,Uk)],z7);class q7{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=xw.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}q7.instance=new q7;class $7 extends _h{constructor(){super({id:Z7.ID,label:ue(0,"Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=ue(0,"Disable Highlight In Comments")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(WS,!1,2)}))}}class G7 extends _h{constructor(){super({id:Z7.ID,label:ue(0,"Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=ue(0,"Disable Highlight In Strings")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(VS,!1,2)}))}}class Z7 extends _h{constructor(){super({id:Z7.ID,label:ue(0,"Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=ue(0,"Disable Ambiguous Highlight")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(BS,!1,2)}))}}Z7.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class Y7 extends _h{constructor(){super({id:Y7.ID,label:ue(0,"Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=ue(0,"Disable Invisible Highlight")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(PS,!1,2)}))}}Y7.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class X7 extends _h{constructor(){super({id:X7.ID,label:ue(0,"Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=ue(0,"Disable Non ASCII Highlight")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(FS,!1,2)}))}}X7.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class Q7 extends _h{constructor(){super({id:Q7.ID,label:ue(0,"Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,i){return F7(this,void 0,void 0,(function*(){const{codePoint:t,reason:n,inString:s,inComment:o}=i,r=String.fromCodePoint(t),a=e.get(lE),l=e.get(uu);const h=[];if(0===n.kind)for(const e of n.notAmbiguousInLocales)h.push({label:ue(0,'Allow unicode characters that are more common in the language "{0}".',e),run:()=>F7(this,void 0,void 0,(function*(){J7(l,[e])}))});if(h.push({label:function(e){return Ko.isInvisibleCharacter(e)?ue(0,"Exclude {0} (invisible character) from being highlighted",U7(e)):ue(0,"Exclude {0} from being highlighted",`${U7(e)} "${r}"`)}(t),run:()=>function(e,t){return F7(this,void 0,void 0,(function*(){const i=e.getValue(OS);let n;n="object"==typeof i&&i?i:{};for(const e of t)n[String.fromCodePoint(e)]=!0;yield e.updateValue(OS,n,2)}))}(l,[t])}),o){const e=new $7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}else if(s){const e=new G7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}if(0===n.kind){const e=new Z7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}else if(1===n.kind){const e=new Y7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}else if(2===n.kind){const e=new X7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}else!function(e){throw new Error(`Unexpected value: ${e}`)}(n);const d=yield a.pick(h,{title:ue(0,"Configure Unicode Highlight Options")});d&&(yield d.run())}))}}function J7(e,t){var i;return F7(this,void 0,void 0,(function*(){const n=null===(i=e.inspect(HS).user)||void 0===i?void 0:i.value;let s;s="object"==typeof n&&n?Object.assign({},n):{};for(const e of t)s[e]=!0;yield e.updateValue(HS,s,2)}))}Q7.ID="editor.action.unicodeHighlight.showExcludeOptions",yh(Z7),yh(Y7),yh(X7),yh(Q7),Lh(W7.ID,W7,1),dK.register(z7);var e8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},t8=function(e,t){return function(i,n){t(i,n,e)}},i8=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const n8="ignoreUnusualLineTerminators";let s8=class extends E{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return i8(this,void 0,void 0,(function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,n8)}(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(90))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=yield this._dialogService.confirm({title:ue(0,"Unusual Line Terminators"),message:ue(0,"Detected unusual line terminators"),detail:ue(0,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",ba(e.uri)),primaryButton:ue(0,"&&Remove Unusual Line Terminators"),cancelButton:ue(0,"Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){e.setModelProperty(t.uri,n8,i)}(this._codeEditorService,e,!0)}))}};s8.ID="editor.contrib.unusualLineTerminatorsDetector",s8=e8([t8(1,L3),t8(2,Fa)],s8),Lh(s8.ID,s8,1);var o8,r8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},a8=function(e,t){return function(i,n){t(i,n,e)}};const l8=new Tl("hasWordHighlights",!1);function h8(e,t,i,n){return td(e.ordered(t).map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,a))),Wd)}class d8{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Gh((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new Mh(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,o=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let l=0,h=i.length;!a&&l=o&&(a=!0)}return a}cancel(){this.result.cancel()}}class c8 extends d8{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return h8(this._providers,e,t.getPosition(),n).then((e=>e||[]))}}class u8 extends d8{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return Jh(250,n).then((()=>{if(!t.isEmpty())return[];const n=e.getWordAtPosition(t.getPosition());if(!n||n.word.length>1e3)return[];return e.findMatches(n.word,!0,!1,!0,i,!1).map((e=>({range:e.range,kind:gC.Text})))}))}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}Ch("_executeDocumentHighlights",((e,t,i)=>h8(e.get(iL).documentHighlightProvider,t,i,Hh.None)));class g8{constructor(e,t,i,n){this.toUnhook=new N,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.linkedHighlighters=i,this._hasWordHighlights=l8.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(80);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(Mh.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){Os(`${this.editor.getModel().getLineContent(n.startLineNumber)}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){Os(`${this.editor.getModel().getLineContent(n.startLineNumber)}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();const t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())}),r)}}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const i of this.workerRequestValue)i.range&&e.push({range:i.range,options:(t=i.kind,t===gC.Write?P5:t===gC.Text?F5:V5)});var t;this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations());for(const i of this.linkedHighlighters())(null==i?void 0:i.editor.getModel())===this.editor.getModel()&&(i._stopAll(),i.decorations.set(e),i._hasWordHighlights.set(i.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}}let p8=o8=class extends E{static get(e){return e.getContribution(o8.ID)}constructor(e,t,i){super(),this.wordHighlighter=null,this.linkedContributions=new Set;const n=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this.wordHighlighter=new g8(e,i.documentHighlightProvider,(()=>v.map(this.linkedContributions,(e=>e.wordHighlighter))),t))};this._register(e.onDidChangeModel((e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()}))),n()}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){var e;null===(e=this.wordHighlighter)||void 0===e||e.moveNext()}moveBack(){var e;null===(e=this.wordHighlighter)||void 0===e||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};p8.ID="editor.contrib.wordHighlighter",p8=o8=r8([a8(1,Rl),a8(2,iL)],p8);class m8 extends _h{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=p8.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}Lh(p8.ID,p8,0),yh(class extends m8{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:ue(0,"Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:l8,kbOpts:{kbExpr:Rh.editorTextFocus,primary:65,weight:100}})}}),yh(class extends m8{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:ue(0,"Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:l8,kbOpts:{kbExpr:Rh.editorTextFocus,primary:1089,weight:100}})}}),yh(class extends _h{constructor(){super({id:"editor.action.wordHighlight.trigger",label:ue(0,"Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:l8.toNegated(),kbOpts:{kbExpr:Rh.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=p8.get(t);n&&n.restoreViewState(!0)}});class f8 extends fh{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=jb(t.getOption(129)),s=t.getModel(),o=t.getSelections().map((e=>{const t=new Ba(e.positionLineNumber,e.positionColumn),i=this._move(n,s,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)}));if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,o.map((e=>Hw.fromModelSelection(e)))),1===o.length){const e=new Ba(o[0].positionLineNumber,o[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new Th(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Th(t.lineNumber,t.column,t.lineNumber,t.column)}}class _8 extends f8{_move(e,t,i,n){return ny.moveWordLeft(e,t,i,n)}}class v8 extends f8{_move(e,t,i,n){return ny.moveWordRight(e,t,i,n)}}class b8 extends fh{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(Xu);if(!t.hasModel())return;const s=jb(t.getOption(129)),o=t.getModel(),r=t.getSelections(),a=t.getOption(6),l=t.getOption(11),h=n.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),c=r.map((e=>{const i=this._delete({wordSeparators:s,model:o,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:h,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Gw(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop()}}class C8 extends b8{_delete(e,t){const i=ny.deleteWordLeft(e,t);return i||new Mh(1,1,1,1)}}class w8 extends b8{_delete(e,t){const i=ny.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new Mh(n,s,n,s)}}wh(new class extends _8{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}),wh(new class extends _8{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}),wh(new class extends _8{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ul.and(Rh.textInputFocus,null===(e=ul.and(YR,MH))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}),wh(new class extends _8{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}),wh(new class extends _8{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}),wh(new class extends _8{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ul.and(Rh.textInputFocus,null===(e=ul.and(YR,MH))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}),wh(new class extends v8{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}),wh(new class extends v8{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ul.and(Rh.textInputFocus,null===(e=ul.and(YR,MH))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}),wh(new class extends v8{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}),wh(new class extends v8{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}),wh(new class extends v8{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ul.and(Rh.textInputFocus,null===(e=ul.and(YR,MH))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}),wh(new class extends v8{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}),wh(new class extends _8{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(jb(qS.wordSeparators.defaultValue),t,i,n)}}),wh(new class extends _8{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(jb(qS.wordSeparators.defaultValue),t,i,n)}}),wh(new class extends v8{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(jb(qS.wordSeparators.defaultValue),t,i,n)}}),wh(new class extends v8{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(jb(qS.wordSeparators.defaultValue),t,i,n)}}),wh(new class extends C8{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:Rh.writable})}}),wh(new class extends C8{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:Rh.writable})}}),wh(new class extends C8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}),wh(new class extends w8{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:Rh.writable})}}),wh(new class extends w8{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:Rh.writable})}}),wh(new class extends w8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}),yh(class extends _h{constructor(){super({id:"deleteInsideWord",precondition:Rh.writable,label:ue(0,"Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=jb(t.getOption(129)),s=t.getModel(),o=t.getSelections().map((e=>{const t=ny.deleteInsideWord(n,s,e);return new Gw(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}});class y8 extends f8{_move(e,t,i,n){return sy.moveWordPartLeft(e,t,i)}}Za.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");Za.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class S8 extends f8{_move(e,t,i,n){return sy.moveWordPartRight(e,t,i)}}wh(new class extends b8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=sy.deleteWordPartLeft(e);return i||new Mh(1,1,1,1)}}),wh(new class extends b8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=sy.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new Mh(n,s,n,s)}}),wh(new class extends y8{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}),wh(new class extends y8{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}),wh(new class extends S8{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}),wh(new class extends S8{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}});class L8 extends LT{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(Dre){return Promise.reject(Dre)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?_d(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},s={};for(const e of t)s[e]=n(e,i);return s}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}function k8(e){return!function(e){return Array.isArray(e)}(e)}function D8(e){return"string"==typeof e}function x8(e){return!D8(e)}function N8(e){return!e}function E8(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function I8(e){return e.replace(/[&<>'"_]/g,"-")}function M8(e,t){console.log(`${e.languageId}: ${t}`)}function T8(e,t){return new Error(`${e.languageId}: ${t}`)}function R8(e,t,i,n,s){let o=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,h,d,c,u,g){return N8(a)?N8(l)?!N8(h)&&h0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}var O8,P8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},F8=function(e,t){return function(i,n){t(i,n,e)}};class B8{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new W8(e,t);let i=W8.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new W8(e,t),this._entries[i]=n,n)}}B8._INSTANCE=new B8(5);class W8{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return W8._equals(this,e)}push(e){return B8.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return B8.create(this.parent,e)}}class V8{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new V8(this.languageId,this.state)}}class H8{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new z8(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new z8(e,t);const i=W8.getStackElementId(e);let n=this._entries[i];return n||(n=new z8(e,null),this._entries[i]=n,n)}}H8._INSTANCE=new H8(5);class z8{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:H8.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof z8&&(!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData)))}}class U8{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new fC(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const s=i.languageId,o=i.state,r=DC.get(s);if(!r)return this.enterLanguage(s),this.emit(n,""),o;const a=r.tokenize(e,t,o);if(0!==n)for(const l of a.tokens)this._tokens.push(new fC(l.offset+n,l.type,l.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new _C(this._tokens,e)}}class K8{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,s=t.length,o=null!==i?i.length:0;if(0===n&&0===s&&0===o)return new Uint32Array(0);if(0===n&&0===s)return i;if(0===s&&0===o)return e;const r=new Uint32Array(n+s+o);null!==e&&r.set(e);for(let a=0;a{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=DC.get(t);if(i){if(i instanceof O8){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else DC.isResolved(t)||e.push(DC.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=B8.create(null,this._lexer.start);return H8.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return NC(this._languageId,i);const n=new U8,s=this._tokenize(e,t,i,n);return n.finalize(s)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return EC(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new K8(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),s=this._tokenize(e,t,i,n);return n.finalize(s)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=A8(this._lexer,t.stack.state),!i))throw T8(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const o of i){if(!x8(o.action)||"@pop"!==o.action.nextEmbedded)continue;s=!0;let t=o.regex;const i=o.regex.source;if("^(?:"===i.substr(0,4)&&")"===i.substr(i.length-1,1)){const e=(t.ignoreCase?"i":"")+(t.unicode?"u":"");t=new RegExp(i.substr(4,i.length-5),e)}const r=e.search(t);-1===r||0!==r&&o.matchOnlyAtLineStart||(-1===n||r0&&s.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(o);return this._myTokenize(a,t,i,n+o,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterLanguage(this._languageId);const o=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,h=i.stack,d=0,c=null,u=!0;for(;u||d=a)break;u=!1;let e=this._lexer.tokenizer[m];if(!e&&(e=A8(this._lexer,m),!e))throw T8(this._lexer,"tokenizer state is not defined: "+m);const t=r.substr(d);for(const i of e)if((0===d||!i.matchOnlyAtLineStart)&&(f=t.match(i.regex),f)){_=f[0],v=i.action;break}}if(f||(f=[""],_=""),v||(d=this._lexer.maxStack)throw T8(this._lexer,"maximum tokenizer stack size reached: ["+h.state+","+h.parent.state+",...]");h=h.push(m)}else if("@pop"===v.next){if(h.depth<=1)throw T8(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(b));h=h.pop()}else if("@popall"===v.next)h=h.popall();else{let e=R8(this._lexer,v.next,_,f,m);if("@"===e[0]&&(e=e.substr(1)),!A8(this._lexer,e))throw T8(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(b));h=h.push(e)}}v.log&&"string"==typeof v.log&&M8(this._lexer,this._lexer.languageId+": "+R8(this._lexer,v.log,_,f,m))}if(null===w)throw T8(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(b));const y=i=>{const o=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(o);if(d0)throw T8(this._lexer,"groups cannot be nested: "+this._safeRuleName(b));if(f.length!==w.length+1)throw T8(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(b));let e=0;for(let t=1;te});class Z8{static colorizeElement(e,t,i,n){const s=(n=n||{}).theme||"vs",o=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(o)||o;e.setTheme(s);const a=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;return this.colorize(t,a||"",r,n).then((e=>{var t;const n=null!==(t=null==G8?void 0:G8.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static colorize(e,t,i,n){return $8(this,void 0,void 0,(function*(){const s=e.languageIdCodec;let o=4;n&&"number"==typeof n.tabSize&&(o=n.tabSize),Fo(t)&&(t=t.substr(1));const r=so(t);if(!e.isRegisteredLanguageId(i))return Y8(r,o,s);const a=yield DC.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((s,o)=>{const r=()=>{const a=function(e,t,i,n){let s=[],o=i.getInitialState();for(let r=0,a=e.length;r"),o=l.endState}return s.join("")}(e,t,i,n);if(i instanceof j8){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,o)}s(a)};r()}))}(r,o,a,s):Y8(r,o,s)}))}static colorizeLine(e,t,i,n,s=4){const o=lP.isBasicASCII(e,t),r=lP.containsRTL(e,o,i);return NA(new yA(!1,!0,e,!1,o,r,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const s=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,i)}}function Y8(e,t,i){let n=[];const s=new Uint32Array(2);s[0]=0,s[1]=33587200;for(let o=0,r=e.length;o")}return n.join("")}var X8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Q8=function(e,t){return function(i,n){t(i,n,e)}},J8=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let eee=class extends E{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new U),this._onCodeEditorAdd=this._register(new U),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new U),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new U),this._onDiffEditorAdd=this._register(new U),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new U),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new O,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i)){return this._modelProperties.get(i).get(t)}}openCodeEditor(e,t,i){return J8(this,void 0,void 0,(function*(){for(const n of this._codeEditorOpenHandlers){const s=yield n(e,t,i);if(null!==s)return s}return null}))}registerCodeEditorOpenHandler(e){return x(this._codeEditorOpenHandlers.unshift(e))}};eee=X8([Q8(0,R_)],eee);var tee=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},iee=function(e,t){return function(i,n){t(i,n,e)}},nee=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let see=class extends eee{constructor(e,t){super(t),this._register(this.onCodeEditorAdd((()=>this._checkContextKey()))),this._register(this.onCodeEditorRemove((()=>this._checkContextKey()))),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(((e,t,i)=>nee(this,void 0,void 0,(function*(){return t?this.doOpenEditor(t,e):null})))))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===vn.http||i===vn.https)return Cs(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};see=tee([iee(0,Rl),iee(1,R_)],see),Cu(Fa,see,0);const oee=Pa("layoutService");var ree=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},aee=function(e,t){return function(i,n){t(i,n,e)}};let lee=class{get dimension(){return this._dimension||(this._dimension=Fn(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayout=B.None,this.offset={top:0,quickPickTop:0}}};lee=ree([aee(0,Fa)],lee);let hee=class extends lee{get hasContainer(){return!1}get container(){return this._container}constructor(e,t){super(t),this._container=e}};hee=ree([aee(1,Fa)],hee),Cu(oee,lee,1);var dee=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cee=function(e,t){return function(i,n){t(i,n,e)}},uee=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const gee=!1;function pee(e){return e.scheme===vn.file?e.fsPath:e.path}let mee=0;class fee{constructor(e,t,i,n,s,o,r){this.id=++mee,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class _ee{constructor(e,t){this.resourceLabel=e,this.reason=t}}class vee{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements){(0===n.reason?e:t).push(n.resourceLabel)}const i=[];return e.length>0&&i.push(ue(0,"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(ue(0,"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class bee{constructor(e,t,i,n,s,o,r){this.id=++mee,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new vee),this.removedResources.has(t)||this.removedResources.set(t,new _ee(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new vee),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new _ee(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Cee{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)1===t.type&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i=0;i--)t.push(this._future[i].id);return new aw(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let r=0,a=this._past.length;r=t||o.id!==e.elements[n])&&(i=!1,s=0),i||1!==o.type||o.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let r=this._future.length-1;r>=0;r--,n++){const s=this._future[r];i&&(n>=t||s.id!==e.elements[n])&&(i=!1,o=r),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}-1!==s&&(this._past=this._past.slice(0,s)),-1!==o&&(this._future=this._future.slice(o+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class wee{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;tt.sourceOrder)&&(t=o,i=n))}return[t,i]}canUndo(e){if(e instanceof hw){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){return this._editStacks.get(t).hasPastElements()}return!1}_onError(e,t){r(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const o=this._acquireLocks(i);let r;try{r=t()}catch(a){return o(),n.dispose(),this._onError(a,e)}return r?r.then((()=>(o(),n.dispose(),s())),(t=>(o(),n.dispose(),this._onError(t,e)))):(o(),n.dispose(),s())}_invokeWorkspacePrepare(e){return uee(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return E.None;const t=e.actual.prepareUndoRedo();return void 0===t?E.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(E.None);const i=e.actual.prepareUndoRedo();return i?L(i)?t(i):i.then((e=>t(e))):t(E.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||yee);return new wee(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Lee(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new Lee}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,ue(0,"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,ue(0,"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const r of i.editStacks)r.getClosestPastElement()!==t&&s.push(r.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,ue(0,"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const r of i.editStacks)r.locked&&o.push(r.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,ue(0,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,ue(0,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return uee(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let s;!function(e){e[e.All=0]="All",e[e.This=1]="This",e[e.Cancel=2]="Cancel"}(s||(s={}));const{result:o}=yield this._dialogService.prompt({type:dL.Info,message:ue(0,"Would you like to undo '{0}' across all files?",t.label),buttons:[{label:ue(0,"&&Undo in {0} Files",i.editStacks.length),run:()=>s.All},{label:ue(0,"Undo this &&File"),run:()=>s.This}],cancelButton:{run:()=>s.Cancel}});if(o===s.Cancel)return;if(o===s.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let s;try{s=yield this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const o=this._checkWorkspaceUndo(e,t,i,!0);if(o)return s.dispose(),o.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,s,(()=>this._continueUndoInGroup(t.groupId,n)))}))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new wee([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=ue(0,"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestPastElement();o&&(o.groupId===e&&(!t||o.groupOrder>t.groupOrder)&&(t=o,i=n))}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof hw){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(!s)return;if(s.groupId){const[e,n]=this._findClosestUndoElementInGroup(s.groupId);if(s!==e&&n)return this._undo(n,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return 1===s.type?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{gee}}_confirmAndContinueUndo(e,t,i){return uee(this,void 0,void 0,(function*(){if((yield this._dialogService.confirm({message:ue(0,"Would you like to undo '{0}'?",i.label),primaryButton:ue(0,"&&Yes"),cancelButton:ue(0,"No")})).confirmed)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&(o.sourceId===e&&(!t||o.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,ue(0,"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const r of i.editStacks)r.locked&&o.push(r.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,ue(0,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,ue(0,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return uee(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(o){return this._onError(o,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new wee([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=ue(0,"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&(o.groupId===e&&(!t||o.groupOrder=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Dee=function(e,t){return function(i,n){t(i,n,e)}};let xee=class extends E{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new R6(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};xee=kee([Dee(0,R_),Dee(1,ah),Dee(2,yc)],xee),Cu($6,xee,1);var Nee=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Eee="**",Iee="[/\\\\]",Mee="[^/\\\\]",Tee=/\//g;function Ree(e,t){switch(e){case 0:return"";case 1:return`${Mee}*?`;default:return`(?:${Iee}|${Mee}+${Iee}${t?`|${Iee}${Mee}+`:""})*?`}}function Aee(e,t){if(!e)return[];const i=[];let n=!1,s=!1,o="";for(const r of e){switch(r){case t:if(!n&&!s){i.push(o),o="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1}o+=r}return o&&i.push(o),i}function Oee(e){if(!e)return"";let t="";const i=Aee(e,"/");if(i.every((e=>e===Eee)))t=".*";else{let e=!1;i.forEach(((n,s)=>{if(n===Eee){if(e)return;t+=Ree(2,s===i.length-1)}else{let e=!1,o="",r=!1,a="";for(const i of n)if("}"!==i&&e)o+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=`(?:${Aee(o,",").map((e=>Oee(e))).join("|")})`;t+=i,e=!1,o="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+=Mee;continue;case"*":t+=Ree(1);continue;default:t+=Js(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?"/"===i?"":Js(i):"^",a+=e}sjee(e,t))).filter((e=>e!==Kee)),e),n=i.length;if(!n)return Kee;if(1===n)return i[0];const s=function(t,n){for(let s=0,o=i.length;s!!e.allBasenames));o&&(s.allBasenames=o.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);r.length&&(s.allPaths=r);return s}(i,t):(s=Vee.exec($ee(i,t)))?Gee(s[1].substr(1),i,!0):(s=Hee.exec($ee(i,t)))?Gee(s[1],i,!1):function(e){try{const t=new RegExp(`^${Oee(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(t){return Kee}}(i),zee.set(n,o)),qee(o,e)}function qee(e,t){if("string"==typeof t)return e;const i=function(i,n){return ua(i,t.base,!Fe)?e(to(i.substr(t.base.length),Ji),n):null};return i.allBasenames=e.allBasenames,i.allPaths=e.allPaths,i.basenames=e.basenames,i.patterns=e.patterns,i}function $ee(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function Gee(e,t,i){const n=Ji===qi.sep,s=n?e:e.replace(Tee,Ji),o=Ji+s,r=qi.sep+e;let a;return a=i?function(i,a){return"string"!=typeof i||i!==s&&!i.endsWith(o)&&(n||i!==e&&!i.endsWith(r))?null:t}:function(i,o){return"string"!=typeof i||i!==s&&(n||i!==e)?null:t},a.allPaths=[(i?"*/":"./")+e],a}function Zee(e,t={}){if(!e)return Uee;if("string"==typeof e||function(e){const t=e;if(!t)return!1;return"string"==typeof t.base&&"string"==typeof t.pattern}(e)){const i=jee(e,t);if(i===Kee)return Uee;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=Yee(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return Kee;const n=jee(e,i);if(n===Kee)return Kee;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,s,o,r)=>{if(!r||!n(t,s))return null;const a=r(i.replace("$(basename)",(()=>o)));return $h(a)?a.then((t=>t?e:null)):a?e:null};return t.requiresSiblings=!0,t}}return n}(i,e[i],t))).filter((e=>e!==Kee))),n=i.length;if(!n)return Kee;if(!i.some((e=>!!e.requiresSiblings))){if(1===n)return i[0];const e=function(e,t){let n;for(let s=0,o=i.length;sNee(this,void 0,void 0,(function*(){for(const e of n){const t=yield e;if("string"==typeof t)return t}return null})))():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,n){let s,o;for(let r=0,a=i.length;rNee(this,void 0,void 0,(function*(){for(const e of o){const t=yield e;if("string"==typeof t)return t}return null})))():null},o=i.find((e=>!!e.allBasenames));o&&(s.allBasenames=o.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);r.length&&(s.allPaths=r);return s}(e,t)}function Yee(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let s;if(t){s=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const o=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?s[i]:null};o.basenames=n,o.patterns=s,o.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(o),r}function Xee(e,t,i,n,s,o){if(Array.isArray(e)){let r=0;for(const a of e){const e=Xee(a,t,i,n,s,o);if(10===e)return e;e>r&&(r=e)}return r}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:h,pattern:d,scheme:c,hasAccessToAllModels:u,notebookType:g}=e;if(!n&&!u)return 0;g&&s&&(t=s);let p=0;if(c)if(c===t.scheme)p=10;else{if("*"!==c)return 0;p=5}if(h)if(h===i)p=10;else{if("*"!==h)return 0;p=Math.max(p,5)}if(g)if(g===o)p=10;else{if("*"!==g||void 0===o)return 0;p=Math.max(p,5)}if(d){let e;if(e="string"==typeof d?d:Object.assign(Object.assign({},d),{base:$i(d.base)}),e!==t.fsPath&&(r=e,a=t.fsPath,!r||"string"!=typeof a||!Zee(r)(a,void 0,l)))return 0;p=10}return p}return 0;var r,a,l}function Qee(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(Qee):!!e.exclusive)}class Jee{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&(null===(t=this.notebookUri)||void 0===t?void 0:t.toString())===(null===(i=e.notebookUri)||void 0===i?void 0:i.toString())}}class ete{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new U,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),x((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(const i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){this._updateScores(e);for(const i of this._entries)i._score>0&&t(i)}_updateScores(e){var t,i;const n=null===(t=this._notebookInfoResolver)||void 0===t?void 0:t.call(this,e.uri),s=n?new Jee(e.uri,e.getLanguageId(),n.uri,n.type):new Jee(e.uri,e.getLanguageId(),void 0,void 0);if(!(null===(i=this._lastCandidate)||void 0===i?void 0:i.equals(s))){this._lastCandidate=s;for(const t of this._entries)if(t._score=Xee(t.selector,s.uri,s.languageId,Nd(e),s.notebookUri,s.notebookType),Qee(t.selector)&&t._score>0){for(const e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(ete._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:tte(e.selector)&&!tte(t.selector)?1:!tte(e.selector)&&tte(t.selector)?-1:e._timet._time?-1:0}}function tte(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(tte):Boolean(e.isBuiltin))}function ite(e){return Object.isFrozen(e)?e:function(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(ud.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||Br(n)||t.push(n)}}return e}(e)}Cu(iL,class{constructor(){this.referenceProvider=new ete(this._score.bind(this)),this.renameProvider=new ete(this._score.bind(this)),this.codeActionProvider=new ete(this._score.bind(this)),this.definitionProvider=new ete(this._score.bind(this)),this.typeDefinitionProvider=new ete(this._score.bind(this)),this.declarationProvider=new ete(this._score.bind(this)),this.implementationProvider=new ete(this._score.bind(this)),this.documentSymbolProvider=new ete(this._score.bind(this)),this.inlayHintsProvider=new ete(this._score.bind(this)),this.colorProvider=new ete(this._score.bind(this)),this.codeLensProvider=new ete(this._score.bind(this)),this.documentFormattingEditProvider=new ete(this._score.bind(this)),this.documentRangeFormattingEditProvider=new ete(this._score.bind(this)),this.onTypeFormattingEditProvider=new ete(this._score.bind(this)),this.signatureHelpProvider=new ete(this._score.bind(this)),this.hoverProvider=new ete(this._score.bind(this)),this.documentHighlightProvider=new ete(this._score.bind(this)),this.selectionRangeProvider=new ete(this._score.bind(this)),this.foldingRangeProvider=new ete(this._score.bind(this)),this.linkProvider=new ete(this._score.bind(this)),this.inlineCompletionsProvider=new ete(this._score.bind(this)),this.completionProvider=new ete(this._score.bind(this)),this.linkedEditingRangeProvider=new ete(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new ete(this._score.bind(this)),this.documentSemanticTokensProvider=new ete(this._score.bind(this)),this.documentOnDropEditProvider=new ete(this._score.bind(this)),this.documentPasteEditProvider=new ete(this._score.bind(this))}_score(e){var t;return null===(t=this._notebookTypeResolver)||void 0===t?void 0:t.call(this,e)}},1);class nte{constructor(e={},t=[],i=[],n){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(null===(e=this.raw)||void 0===e?void 0:e.length){const e=this.raw.map((e=>{if(e instanceof nte)return e;const t=new ste("");return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?_u(this.contents,e):this.contents}inspect(e,t){const i=this.rawConfiguration.getValue(e);return{value:i,override:t?this.rawConfiguration.getOverrideValue(e,t):void 0,merged:t?this.rawConfiguration.override(t).getValue(e):i}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?_u(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,i;const n=cd(this.contents),s=cd(this.overrides),o=[...this.keys],r=(null===(t=this.raw)||void 0===t?void 0:t.length)?[...this.raw]:[this];for(const a of e)if(r.push(...(null===(i=a.raw)||void 0===i?void 0:i.length)?a.raw:[a]),!a.isEmpty()){this.mergeContents(n,a.contents);for(const e of a.overrides){const[t]=s.filter((t=>Id(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=Vd(t.keys)):s.push(cd(e))}for(const e of a.keys)-1===o.indexOf(e)&&o.push(e)}return new nte(n,o,s,r.every((e=>e instanceof nte))?void 0:r)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;const i={};for(const n of Vd([...Object.keys(this.contents),...Object.keys(t)])){let e=this.contents[n];const s=t[n];s&&("object"==typeof e&&"object"==typeof s?(e=cd(e),this.mergeContents(e,s)):e=s),i[n]=e}return new nte(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&Fr(e[i])&&Fr(t[i])?this.mergeContents(e[i],t[i]):e[i]=cd(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=cd(e))};for(const s of this.overrides)1===s.identifiers.length&&s.identifiers[0]===e?t=s.contents:s.identifiers.includes(e)&&n(s.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),mu(this.contents,e),Fu.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>Id(t.identifiers,Bu(e)))),1))}updateValue(e,t,i){pu(this.contents,e,t,(e=>console.error(e))),(i=i||-1===this.keys.indexOf(e))&&this.keys.push(e),Fu.test(e)&&this.overrides.push({identifiers:Bu(e),keys:Object.keys(this.contents[e]),contents:gu(this.contents[e],(e=>console.error(e)))})}}class ste{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new nte}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:s,restricted:o,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new nte(i,n,s,r?[e]:void 0),this._restrictedConfigurations=o||[]}doParseRaw(e,t){const i=Ul.as(ku).getConfigurationProperties(),n=this.filter(e,i,!0,t);return{contents:gu(e=n.raw,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),keys:Object.keys(e),overrides:this.toOverrides(e,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){var s,o,r;let a=!1;if(!(null==n?void 0:n.scopes)&&!(null==n?void 0:n.skipRestricted)&&!(null===(s=null==n?void 0:n.exclude)||void 0===s?void 0:s.length))return{raw:e,restricted:[],hasExcludedProperties:a};const l={},h=[];for(const d in e)if(Fu.test(d)&&i){const i=this.filter(e[d],t,!1,n);l[d]=i.raw,a=a||i.hasExcludedProperties,h.push(...i.restricted)}else{const i=t[d],s=i?void 0!==i.scope?i.scope:3:void 0;(null==i?void 0:i.restricted)&&h.push(d),(null===(o=n.exclude)||void 0===o?void 0:o.includes(d))||!(null===(r=n.include)||void 0===r?void 0:r.includes(d))&&(void 0!==s&&void 0!==n.scopes&&!n.scopes.includes(s)||n.skipRestricted&&(null==i?void 0:i.restricted))?a=!0:l[d]=e[d]}return{raw:l,restricted:h,hasExcludedProperties:a}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(Fu.test(n)){const s={};for(const t in e[n])s[t]=e[n][t];i.push({identifiers:Bu(n),keys:Object.keys(s),contents:gu(s,t)})}return i}}class ote{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=s,this.policyConfiguration=o,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=h,this.workspaceConfiguration=d,this.folderConfigurationModel=c,this.memoryConfigurationModel=u}inspect(e,t,i){const n=e.inspect(t,i);return{get value(){return ite(n.value)},get override(){return ite(n.override)},get merged(){return ite(n.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return void 0!==this.userInspectValue.value||void 0!==this.userInspectValue.override?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class rte{constructor(e,t,i,n,s=new nte,o=new nte,r=new zs,a=new nte,l=new zs){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=s,this._workspaceConfiguration=o,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new zs,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new nte,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),s=this.getFolderConfigurationModelForResource(t.resource,i),o=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const a of n.overrides)for(const t of a.identifiers)void 0!==n.getOverrideValue(e,t)&&r.add(t);return new ote(e,t,n.getValue(e),r.size?[...r]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,s||void 0,o)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.policy),n=this.parseConfigurationModel(e.application),s=this.parseConfigurationModel(e.user),o=this.parseConfigurationModel(e.workspace),r=e.folders.reduce(((e,t)=>(e.set(an.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new zs);return new rte(t,i,n,s,new nte,o,r,new nte,new zs)}static parseConfigurationModel(e){return new nte(e.contents,e.keys,e.overrides)}}class ate{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const s of e.keys)this.affectedKeys.add(s);for(const[,s]of e.overrides)for(const e of s)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=rte.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;const n=this._marker+e,s=this._affectsConfigStr.indexOf(n);if(s<0)return!1;const o=s+n.length;if(o>=this._affectsConfigStr.length)return!1;const r=this._affectsConfigStr.charCodeAt(o);if(r!==this._markerCode1&&r!==this._markerCode2)return!1;if(t){return!fd(this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,this.currentConfiguraiton.getValue(e,t,this.currentWorkspace))}return!0}}const lte={kind:0},hte={kind:1};class dte{constructor(e,t,i){var n;this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const s of e){const e=s.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=dte.handleRemovals([].concat(e).concat(t));for(let s=0,o=this._keybindings.length;s=0;n--){const e=i[n];if(e.command===t.command)continue;let s=!0;for(let i=1;i=0;n--){const e=i[n];if(t.contextMatchesRules(e.when))return e}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const s=this._map.get(n[0]);if(void 0===s)return this._log("\\ No keybinding entries."),lte;let o=null;if(n.length<2)o=s;else{o=[];for(let e=0,t=s.length;et.chords.length)continue;let i=!0;for(let e=1;e=0;i--){const n=t[i];if(dte._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function cte(e){return e?`${e.serialize()}`:"no when condition"}function ute(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}const gte=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class pte extends E{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:B.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new U),this._currentChords=[],this._currentChordChecker=new nd,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=mte.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new id,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),lte;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),lte;const s=this._contextKeyService.getContext(t),o=this._currentChords.map((({keypress:e})=>e));return this._getResolver().resolve(s,o,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-e>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw g("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(ue(0,"({0}) was pressed. Waiting for second key of chord...",t));break;default:{const e=this._currentChords.map((({label:e})=>e)).join(", ");this._currentChordStatusMessage=this._notificationService.status(ue(0,"({0}) was pressed. Waiting for next key of chord...",e))}}this._scheduleLeaveChordMode(),pO.enabled&&pO.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],pO.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=mte.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=mte.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getChords();return this._ignoreSingleModifiers=new mte(s),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){var n;let s=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let o=null,r=null;if(i){const[t]=e.getSingleModifierDispatchChords();o=t,r=t?[t]:[]}else[o]=e.getDispatchChords(),r=this._currentChords.map((({keypress:e})=>e));if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),s;const a=this._contextKeyService.getContext(t),l=e.getLabel(),h=this._getResolver().resolve(a,r,o);switch(h.kind){case 0:if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(ue(0,"The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),s=!0}return s;case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),s=!0,this._expectAnotherChord(o,l),this._log(1===this._currentChords.length?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),s;case 2:if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${h.commandId} ]`),null===h.commandId||""===h.commandId){if(this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(ue(0,"The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),s=!0}}else this.inChordMode&&this._leaveChordMode(),h.isBubble||(s=!0),this._log(`+ Invoking command ${h.commandId}.`),void 0===h.commandArgs?this._commandService.executeCommand(h.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(h.commandId,h.commandArgs).then(void 0,(e=>this._notificationService.warn(e))),gte.test(h.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:h.commandId,from:"keybinding",detail:null!==(n=e.getUserSettingsLabel())&&void 0!==n?n:void 0});return s}}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class mte{constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}mte.EMPTY=new mte(null);class fte{constructor(e,t,i,n,s,o,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?_te(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=_te(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=o,this.isBuiltinExtension=r}}function _te(e){const t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return Rx.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Ax.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}getUserSettingsLabel(){return Ox.toLabel(this._os,this._chords,(e=>this._getUserSettingsLabel(e)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((e=>this._getChord(e)))}_getChord(e){return new bt(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map((e=>this._getChordDispatch(e)))}getSingleModifierDispatchChords(){return this._chords.map((e=>this._getSingleModifierChordDispatch(e)))}}class bte extends vte{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return gt.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":gt.toString(e.keyCode)}_getElectronAccelerator(e){return gt.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=gt.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_getChordDispatch(e){return bte.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=gt.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=ct[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof _t)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new _t(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=_te(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new bte(i,t)]:[]}}var Cte;function wte(e,t,i){const n=i.mode===Cte.ALIGN?i.offset:i.offset+i.size,s=i.mode===Cte.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=s?s-t:Math.max(e-t,0):t<=s?s-t:t<=e-n?n:0}!function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(Cte||(Cte={}));class yte extends E{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=E.None,this.toDisposeOnSetContainer=E.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=fs(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,vs(this.view),this.setContainer(e,t),this._register(x((()=>this.setContainer(null,1))))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=fs(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Ste,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(fs("slot"))}else this.container.appendChild(this.view);const i=new N;yte.BUBBLE_UP_EVENTS.forEach((e=>{i.add(Mn(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),yte.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(Mn(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){var t,i;this.isVisible()&&this.hide(),Dn(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",_s(this.view),this.toDisposeOnClean=e.render(this.view)||E.None,this.delegate=e,this.doLayout(),null===(i=(t=this.delegate).focus)||void 0===i||i.call(t)}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||He&&tt?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(ss(e)){const i=Hn(e),n=function(e){let t=e,i=1;do{const e=Pn(t).zoom;null!=e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==t.ownerDocument.documentElement);return i}(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t=function(e){const t=e;return!!t&&"number"==typeof t.x&&"number"==typeof t.y}(e)?{top:e.y,left:e.x,width:e.width||1,height:e.height||2}:{top:e.posy,left:e.posx,width:2,height:2};const i=zn(this.view),n=jn(this.view),s=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0;let r,a;if(0===(this.delegate.anchorAxisAlignment||0)){const e={offset:t.top-window.pageYOffset,size:t.height,position:0===s?0:1},l={offset:t.left,size:t.width,position:0===o?0:1,mode:Cte.ALIGN};r=wte(window.innerHeight,n,e)+window.pageYOffset,RD.intersects({start:r,end:r+n},{start:e.offset,end:e.offset+e.size})&&(l.mode=Cte.AVOID),a=wte(window.innerWidth,i,l)}else{const e={offset:t.left,size:t.width,position:0===o?0:1},l={offset:t.top,size:t.height,position:0===s?0:1,mode:Cte.ALIGN};a=wte(window.innerWidth,i,e),RD.intersects({start:a,end:a+i},{start:e.offset,end:e.offset+e.size})&&(l.mode=Cte.AVOID),r=wte(window.innerHeight,n,l)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===s?"bottom":"top"),this.view.classList.add(0===o?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=Hn(this.container);this.view.style.top=r-(this.useFixedPosition?Hn(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?Hn(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),vs(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!qn(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}yte.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],yte.BUBBLE_DOWN_EVENTS=["click"];const Ste='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var Lte=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},kte=function(e,t){return function(i,n){t(i,n,e)}};let Dte=class extends E{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=E.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new yte(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t===this.container&&this.shadowRoot===i||(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=i,this.contextView.show(e);const n=x((()=>{this.currentViewDisposable===n&&this.hideContextView()}));return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};Dte=Lte([kte(0,oee)],Dte);let xte=[],Nte=[],Ete=[];function Ite(e,t=!1){!function(e,t,i){const n=function(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:t,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?Zee(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(qi.sep)>=0}}(e,t);xte.push(n),n.userConfigured?Ete.push(n):Nte.push(n);i&&!n.userConfigured&&xte.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}(e,!1,t)}function Mte(e,t){return function(e,t){let i;if(e)switch(e.scheme){case vn.file:i=e.fsPath;break;case vn.data:i=Na.parseMetaData(e).get(Na.META_DATA_LABEL);break;case vn.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:yu.unknown}];i=i.toLowerCase();const n=Xi(i),s=Tte(i,n,Ete);if(s)return[s,{id:zu,mime:yu.text}];const o=Tte(i,n,Nte);if(o)return[o,{id:zu,mime:yu.text}];if(t){const e=function(e){Fo(e)&&(e=e.substr(1));if(e.length>0)for(let t=xte.length-1;t>=0;t--){const i=xte[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}return}(t);if(e)return[e,{id:zu,mime:yu.text}]}return[{id:"unknown",mime:yu.unknown}]}(e,t).map((e=>e.id))}function Tte(e,t,i){var n;let s,o,r;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){s=l;break}if(l.filepattern&&(!o||l.filepattern.length>o.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(o=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return s||(o||(r||void 0))}const Rte=Object.prototype.hasOwnProperty,Ate="vs.editor.nullLanguage";class Ote{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Ate,0),this._register(zu,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Ate}}class Pte extends E{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,Pte.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Ote,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Hu.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){Pte.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},xte=xte.filter((e=>e.userConfigured)),Nte=[];const e=[].concat(Hu.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),Ul.as(ku).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;Rte.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)Ite({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const l of t.filenames)Ite({id:i,mime:n,filename:l},this._warnOnOverwrite),e.filenames.push(l);if(Array.isArray(t.filenamePatterns))for(const l of t.filenamePatterns)Ite({id:i,mime:n,filepattern:l},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);"^"!==(s=t).source&&"^$"!==s.source&&"$"!==s.source&&"^\\s*$"!==s.source&&s.exec("")&&0===s.lastIndex||Ite({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(a){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,a)}}var s;e.aliases.push(i);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const l of o)l&&0!==l.length&&e.aliases.push(l);const r=null!==o&&o.length>0;if(r&&null===o[0]);else{const t=(r?o[0]:null)||i;!r&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&Rte.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return Rte.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&Rte.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?Mte(e,t):[]}}Pte.instanceCount=0;class Fte extends E{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new U),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new U),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new U({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,Fte.instanceCount++,this._registry=this._register(new Pte(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){Fte.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){return Hd(this._registry.guessLanguageIdByFilepathOrFirstLine(e,t),null)}createById(e){return new Bte(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new Bte(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=zu),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),DC.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}Fte.instanceCount=0;class Bte{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages((()=>this._evaluate()))),this._emitter||(this._emitter=new U({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,null===(e=this._emitter)||void 0===e||e.fire(this.languageId))}}const Wte=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Vte=/(&)?(&)([^\s&])/g;var Hte;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(Hte||(Hte={}));class zte extends Ix{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const s=document.createElement("div");s.classList.add("monaco-menu"),s.setAttribute("role","presentation"),super(s,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Pe||Fe?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=s,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new N),this.initializeOrUpdateStyleSheet(e,n),this._register(qL.addTarget(s)),En(s,os.KEY_DOWN,(e=>{new St(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add(En(s,os.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){as(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof Kte&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),Fe&&this._register(En(s,os.KEY_DOWN,(e=>{const t=new St(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),as(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),as(e,!0))}))),this._register(En(this.domNode,os.MOUSE_OUT,(e=>{qn(e.relatedTarget,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register(En(this.actionsList,os.MOUSE_OVER,(e=>{let t=e.target;if(t&&qn(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(qL.addTarget(this.actionsList)),this._register(En(this.actionsList,KL.Tap,(e=>{let t=e.initialTarget;if(t&&qn(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new TD(s,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register(En(s,KL.Change,(e=>{as(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register(En(r,os.MOUSE_UP,(e=>{e.preventDefault()}))),s.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof jte))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(Zn(e)?this.styleSheet=Jn(e):(zte.globalStyleSheet||(zte.globalStyleSheet=Jn()),this.styleSheet=zte.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${qte(Qr.menuSelection)}\n${qte(Qr.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221a\u03c6 */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderHoverBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderActiveBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`)}return i}(t,Zn(e))}styleScrollElement(e,t){var i,n;const s=null!==(i=t.foregroundColor)&&void 0!==i?i:"",o=null!==(n=t.backgroundColor)&&void 0!==n?n:"",r=t.borderColor?`1px solid ${t.borderColor}`:"",a=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=r,e.style.borderRadius="5px",e.style.color=s,e.style.backgroundColor=o,e.style.boxShadow=a}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(En(this.element,os.MOUSE_UP,(e=>{if(as(e,!0),ne){if(new Nt(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register(En(this.element,os.CONTEXT_MENU,(e=>{as(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=ds(this.element,fs("a.action-menu-item")),this._action.id===Ka.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=ds(this.item,fs("span.menu-item-check"+ea.asCSSSelector(Qr.menuSelection))),this.check.setAttribute("role","none"),this.label=ds(this.item,fs("span.action-label")),this.options.label&&this.options.keybinding&&(ds(this.item,fs("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),null===(e=this.item)||void 0===e||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){Dn(this.label);let t=oa(this.action.label);if(t){const i=function(e){const t=Wte,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=Wte.exec(t);if(n){t=Qs(t),Vte.lastIndex=0;let i=Vte.exec(t);for(;i&&i[1];)i=Vte.exec(t);const s=e=>e.replace(/&&/g,"&");i?this.label.append(to(s(t.substr(0,i.index))," "),fs("u",{"aria-hidden":"true"},i[3]),io(s(t.substr(i.index+i[0].length))," ")):this.label.innerText=s(t).trim(),null===(e=this.item)||void 0===e||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=null!=t?t:"",this.item.style.backgroundColor=null!=i?i:"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=null!=t?t:"")}}class Kte extends Ute{constructor(e,t,i,n,s){super(e,e,n,s),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new N),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:Hte.Right,this.showScheduler=new sd((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new sd((()=>{this.element&&!qn(Xn(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=ds(this.item,fs("span.submenu-indicator"+ea.asCSSSelector(Qr.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(En(this.element,os.KEY_UP,(e=>{const t=new St(e);(t.equals(17)||t.equals(3))&&(as(e,!0),this.createSubmenu(!0))}))),this._register(En(this.element,os.KEY_DOWN,(e=>{const t=new St(e);Xn()===this.item&&(t.equals(17)||t.equals(3))&&as(e,!0)}))),this._register(En(this.element,os.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register(En(this.element,os.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register(En(this.element,os.FOCUS_OUT,(e=>{this.element&&!qn(Xn(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}))))}updateEnabled(){}onClick(e){as(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(ge){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=wte(e.width,t.width,{position:n===Hte.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left{new St(e).equals(15)&&(as(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add(En(this.submenuContainer,os.KEY_DOWN,(e=>{new St(e).equals(15)&&as(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=null!=e?e:"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class jte extends xx{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function qte(e){const t=Xr()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}class $te{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;const n=ss(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{var s;this.lastContainer=n;const o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild(fs(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",null===(s=this.blockDisposable)||void 0===s||s.dispose(),this.blockDisposable=En(this.block,os.MOUSE_DOWN,(e=>e.stopPropagation())));const r=new N,a=e.actionRunner||new Ua;return a.onWillRun((t=>this.onActionRun(t,!e.skipTelemetry)),this,r),a.onDidRun(this.onDidActionRun,this,r),i=new zte(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:a,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},eN),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r),r.add(En(window,os.BLUR,(()=>this.contextViewService.hideContextView(!0)))),r.add(En(window,os.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new Nt(e);let i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),D(r,i)},focus:()=>{null==i||i.focus(!!e.autoSelectFirstItem)},onHide:t=>{var i,n,s;null===(i=e.onHide)||void 0===i||i.call(e,!!t),this.block&&(this.block.remove(),this.block=null),null===(n=this.blockDisposable)||void 0===n||n.dispose(),this.blockDisposable=null,this.lastContainer&&(Xn()===this.lastContainer||qn(Xn(),this.lastContainer))&&(null===(s=this.focusToReturn)||void 0===s||s.focus()),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!d(e.error)&&this.notificationService.error(e.error)}}var Gte=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Zte=function(e,t){return function(i,n){t(i,n,e)}};let Yte=class extends E{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new $te(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,o){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=o,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new U),this._onDidHideContextMenu=this._store.add(new U)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Xte.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var i;null===(i=e.onHide)||void 0===i||i.call(e,t),this._onDidHideContextMenu.fire()}})),ks.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var Xte,Qte;Yte=Gte([Zte(0,rh),Zte(1,uL),Zte(2,Vx),Zte(3,PL),Zte(4,Jl),Zte(5,Rl)],Yte),function(e){e.transform=function(e,t,i){if(!((n=e)&&n.menuId instanceof Ql))return e;var n;const{menuId:s,menuActionOptions:o,contextKeyService:r}=e;return Object.assign(Object.assign({},e),{getActions:()=>{const n=[];if(s){const e=t.createMenu(s,null!=r?r:i);!function(e,t,i,n){const s=e.getActions(t),o=ks.getInstance();AW(s,i,o.keyStatus.altKey||(Oe||Fe)&&o.keyStatus.shiftKey,n?e=>e===n:e=>"navigation"===e)}(e,o,n),e.dispose()}return e.getActions?Ka.join(e.getActions(),n):n}})}}(Xte||(Xte={})),function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(Qte||(Qte={}));var Jte=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},eie=function(e,t){return function(i,n){t(i,n,e)}},tie=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let iie=class{constructor(e){this._commandService=e}open(e,t){return tie(this,void 0,void 0,(function*(){if(!Kk(e,vn.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;if("string"==typeof e&&(e=an.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=ck(decodeURIComponent(e.query))}catch(ge){try{i=ck(e.query)}catch(Ws){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};iie=Jte([eie(0,Ga)],iie);let nie=class{constructor(e){this._editorService=e}open(e,t){return tie(this,void 0,void 0,(function*(){"string"==typeof e&&(e=an.parse(e));const{selection:i,uri:n}=function(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}(e);return(e=n).scheme===vn.file&&(e=Sa(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,source:(null==t?void 0:t.fromUserGesture)?Qte.USER:Qte.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};nie=Jte([eie(0,Fa)],nie);let sie=class{constructor(e,t){this._openers=new O,this._validators=new O,this._resolvers=new O,this._resolvedUriTargets=new zs((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new O,this._defaultExternalOpener={openExternal:e=>tie(this,void 0,void 0,(function*(){return jk(e,vn.http,vn.https)?Cs(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>tie(this,void 0,void 0,(function*(){return!(!(null==t?void 0:t.openExternal)&&!jk(e,vn.mailto,vn.http,vn.https,vn.vsls))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new iie(t)),this._openers.push(new nie(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}open(e,t){var i;return tie(this,void 0,void 0,(function*(){const n="string"==typeof e?an.parse(e):e,s=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!(yield e.shouldOpen(s,t)))return!1;for(const i of this._openers){if(yield i.open(e,t))return!0}return!1}))}resolveExternalUri(e,t){return tie(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(ge){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return tie(this,void 0,void 0,(function*(){const i="string"==typeof e?an.parse(e):e;let n,s;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(ge){n=i}if(s="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners){if(yield t.openExternal(s,{sourceUri:i,preferredOpenerId:e},Hh.None))return!0}}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},Hh.None)}))}dispose(){this._validators.clear()}};sie=Jte([eie(0,Fa),eie(1,Ga)],sie);var oie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},rie=function(e,t){return function(i,n){t(i,n,e)}};let aie=class extends E{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new U),this._markerDecorations=new zs,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new lie(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==vn.inMemory&&e.uri.scheme!==vn.internal&&e.uri.scheme!==vn.vscode||null===(t=this._markerService)||void 0===t||t.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};aie=oie([rie(0,Wa),rie(1,wN)],aie);class lie extends E{constructor(e){super(),this.model=e,this._map=new js,this._register(x((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:i}=function(e,t){const i=[],n=[];for(const s of e)t.has(s)||i.push(s);for(const s of t)e.has(s)||n.push(s);return{removed:i,added:n}}(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===i.length)return!1;const n=i.map((e=>this._map.get(e))),s=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),o=this.model.deltaDecorations(n,s);for(const r of i)this._map.delete(r);for(let r=0;r=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new Mh(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}}var hie,die=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cie=function(e,t){return function(i,n){t(i,n,e)}};function uie(e){return e.toString()}class gie{constructor(e,t,i){this.model=e,this._modelEventListeners=new N,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}dispose(){this._modelEventListeners.dispose()}}const pie=Fe||Pe?1:2;class mie{constructor(e,t,i,n,s,o,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=o,this.versionId=r,this.alternativeVersionId=a}}let fie=hie=class extends E{constructor(e,t,i,n,s){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._languageService=n,this._languageConfigurationService=s,this._onModelAdded=this._register(new U),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new U),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new U),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var i;let n=wc.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let s="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(s=Math.max(t,1))}let o=wc.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=pie;const a=e.eol;"\r\n"===a?r=2:"\n"===a&&(r=1);let l=wc.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let h=wc.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(h="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=wc.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let c=wc.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(c={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:s,insertSpaces:o,detectIndentation:h,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:d,bracketPairColorizationOptions:c}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===$e||2===$e?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(e,t,i){const n="string"==typeof e?e:e.languageId;let s=this._modelCreationOptionsByLanguageAndResource[n+t];if(!s){const e=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),o=this._getEOL(t,n);s=hie._readModelOptions({editor:e,eol:o},i),this._modelCreationOptionsByLanguageAndResource[n+t]=s}return s}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;ne){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),o=new _w(e,t,s,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(uie(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=this._getSHA1Computer(),s=!!n.canComputeSHA1(o)&&n.computeSHA1(o)===e.sha1;if(s||e.sharesUndoRedoStack){for(const e of t.past)jv(e)&&e.matchesResource(i)&&e.setModel(o);for(const e of t.future)jv(e)&&e.matchesResource(i)&&e.setModel(o);this._undoRedoService.setElementsValidFlag(i,!0,(e=>jv(e)&&e.matchesResource(i))),s&&(o._overwriteVersionId(e.versionId),o._overwriteAlternativeVersionId(e.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=uie(o.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new gie(o,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=a,a}createModel(e,t,i,n=!1){let s;return s=t?this._createModelData(e,t,i,n):this._createModelData(e,zu,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||t.future.length>0){for(const i of t.past)jv(i)&&i.matchesResource(e.uri)&&(s=!0,o+=i.heapSize(e.uri),i.setModel(e.uri));for(const i of t.future)jv(i)&&i.matchesResource(e.uri)&&(s=!0,o+=i.heapSize(e.uri),i.setModel(e.uri))}}const r=hie.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(s)if(n||!(o>r)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(r-o),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>jv(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new mie(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,o,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!n){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),o=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);hie._setModelOptionsForModel(e,o,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new _ie}};fie.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,fie=hie=die([cie(0,uu),cie(1,uT),cie(2,rw),cie(3,yc),cie(4,Xu)],fie);class _ie{canComputeSHA1(e){return e.getValueLength()<=_ie.MAX_MODEL_SIZE}computeSHA1(e){const t=new fE,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}}_ie.MAX_MODEL_SIZE=10485760;var vie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},bie=function(e,t){return function(i,n){t(i,n,e)}};let Cie=class extends E{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Ul.as(NJ),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[s,o]=this.getOrInstantiateProvider(e),r=this.visibleQuickAccess,a=null==r?void 0:r.descriptor;if(r&&o&&a===o)return e===o.prefix||(null==i?void 0:i.preserveValue)||(r.picker.value=e),void this.adjustValueSelection(r.picker,o,i);if(o&&!(null==i?void 0:i.preserveValue)){let t;if(r&&a&&a!==o){const e=r.value.substr(a.prefix.length);e&&(t=`${o.prefix}${e}`)}if(!t){const e=null==s?void 0:s.defaultFilterValue;e===xJ.LAST?t=this.lastAcceptedPickerValues.get(o):"string"==typeof e&&(t=`${o.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new N,h=l.add(this.quickInputService.createQuickPick());let d;h.value=e,this.adjustValueSelection(h,o,i),h.placeholder=null==o?void 0:o.placeholder,h.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!r,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(h.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:aE.SECOND),h.contextKey=null==o?void 0:o.contextKey,h.filterValue=e=>e.substring(o?o.prefix.length:0),t&&(d=new ad,l.add(B.once(h.onWillAccept)((e=>{e.veto(),h.hide()})))),l.add(this.registerPickerListeners(h,s,o,e,null==i?void 0:i.providerOptions));const c=l.add(new Uh);return s&&l.add(s.provide(h,c.token,null==i?void 0:i.providerOptions)),B.once(h.onDidHide)((()=>{0===h.selectedItems.length&&c.cancel(),l.dispose(),null==d||d.complete(h.selectedItems.slice(0))})),h.show(),t?null==d?void 0:d.p:void 0}adjustValueSelection(e,t,i){var n;let s;s=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n,s){const o=new N,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add(x((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0,providerOptions:s}):r.value=e}))),i&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};Cie=vie([bie(0,lE),bie(1,Oa)],Cie);const wie="done",yie="active",Sie="infinite",Lie="infinite-long-running",kie="discrete";class Die extends E{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new sd((()=>_s(this.element)),0)),this.longRunningScheduler=this._register(new sd((()=>this.infiniteLongRunning()),Die.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(null==t?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(yie,Sie,Lie,kie),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(wie),this.element.classList.contains(Sie)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(kie,wie,Lie),this.element.classList.add(yie,Sie),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Lie)}getContainer(){return this.element}}Die.LONG_RUNNING_INFINITE_THRESHOLD=1e4;const xie=fs;class Nie extends E{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>En(this.findInput.inputBox.inputElement,os.KEY_DOWN,(t=>{e(new St(t))})),this.onMouseDown=e=>En(this.findInput.inputBox.inputElement,os.MOUSE_DOWN,(t=>{e(new Nt(t))})),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=ds(this.parent,xie(".quick-input-box")),this.findInput=this._register(new NV(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return"password"===this.findInput.inputBox.inputElement.type}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===dL.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===dL.Info?1:e===dL.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===dL.Info?1:e===dL.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}const Eie=new Gs((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new Gs((()=>({collator:new Intl.Collator(void 0,{numeric:!0})}))),new Gs((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));function Iie(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=function(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=n.startsWith(i),r=s.startsWith(i);if(o!==r)return o?-1:1;if(o&&r){if(n.lengths.length)return 1}return 0}(e,t,i);if(o)return o;const r=n.endsWith(i);if(r!==s.endsWith(i))return r?-1:1;const a=function(e,t){const i=e||"",n=t||"",s=Eie.value.collator.compare(i,n);return Eie.value.collatorIsNumeric&&0===s&&i!==n?i=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class Tie{constructor(e){this.nodes=e}toString(){return this.nodes.map((e=>"string"==typeof e?e:e.label)).join("")}}Mie([UL],Tie.prototype,"toString",null);const Rie=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;const Aie={},Oie=new ak("quick-input-button-icon-");function Pie(e){if(!e)return;let t;const i=e.dark.toString();return Aie[i]?t=Aie[i]:(t=Oie.nextId(),is(`.${t}, .hc-light .${t}`,`background-image: ${ws(e.light||e.dark)}`),is(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${ws(e.dark)}`),Aie[i]=t),t}function Fie(e,t,i){us(t);const n=function(e){const t=[];let i,n=0;for(;i=Rie.exec(e);){i.index-n>0&&t.push(e.substring(n,i.index));const[,s,o,,r]=i;r?t.push({label:s,href:o,title:r}):t.push({label:s,href:o}),n=i.index+i[0].length}return n{rs(e)&&as(e,!0),i.callback(o.href)},a=i.disposables.add(new Hy(n,os.CLICK)).event,l=i.disposables.add(new Hy(n,os.KEY_DOWN)).event,h=B.chain(l,(e=>e.filter((e=>{const t=new St(e);return t.equals(10)||t.equals(3)}))));i.disposables.add(qL.addTarget(n));const d=i.disposables.add(new Hy(n,KL.Tap)).event;B.any(a,d,h)(r,null,i.disposables),t.appendChild(n)}}var Bie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Wie=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Vie=fs;class Hie{constructor(e,t,i,n,s,o,r){var a,l,h;this._checked=!1,this._hidden=!1,this.hasCheckbox=n,this.index=i,this.fireButtonTriggered=s,this.fireSeparatorButtonTriggered=o,this._onChecked=r,this.onChecked=n?B.map(B.filter(this._onChecked.event,(e=>e.listElement===this)),(e=>e.checked)):B.None,"separator"===e.type?this._separator=e:(this.item=e,t&&"separator"===t.type&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=null===(a=this.item.highlights)||void 0===a?void 0:a.label,this._descriptionHighlights=null===(l=this.item.highlights)||void 0===l?void 0:l.description,this._detailHighlights=null===(h=this.item.highlights)||void 0===h?void 0:h.detail,this.saneTooltip=this.item.tooltip),this._init=new Gs((()=>{var t;const i=null!==(t=e.label)&&void 0!==t?t:"",n=aa(i).text.trim(),s=e.ariaLabel||[i,this.saneDescription,this.saneDetail].map((e=>{return(t=e)?t.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():"";var t})).filter((e=>!!e)).join(", ");return{saneLabel:i,saneSortLabel:n,saneAriaLabel:s}}))}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class zie{constructor(e){this.themeService=e}get templateId(){return zie.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=ds(e,Vie(".quick-input-list-entry"));const i=ds(t.entry,Vie("label.quick-input-list-label"));t.toDisposeTemplate.push(Mn(i,os.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=ds(i,Vie("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(Mn(t.checkbox,os.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=ds(i,Vie(".quick-input-list-rows")),s=ds(n,Vie(".quick-input-list-row")),o=ds(n,Vie(".quick-input-list-row"));t.label=new Uz(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.label),t.icon=cs(t.label.element,Vie(".quick-input-list-icon"));const r=ds(s,Vie(".quick-input-list-entry-keybinding"));t.keybinding=new Wx(r,$e);const a=ds(o,Vie(".quick-input-list-label-meta"));return t.detail=new Uz(a,{supportHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.detail),t.separator=ds(t.entry,Vie(".quick-input-list-separator")),t.actionBar=new Ix(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){var n,s,o,r;i.element=e,e.element=null!==(n=i.entry)&&void 0!==n?n:void 0;const a=e.item?e.item:e.separator;i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:l,descriptionHighlights:h,detailHighlights:d}=e;if(null===(s=e.item)||void 0===s?void 0:s.iconPath){const t=T_(this.themeService.getColorTheme().type)?e.item.iconPath.dark:null!==(o=e.item.iconPath.light)&&void 0!==o?o:e.item.iconPath.dark,n=an.revive(t);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=ws(n)}else i.icon.style.backgroundImage="",i.icon.className=(null===(r=e.item)||void 0===r?void 0:r.iconClass)?`quick-input-list-icon ${e.item.iconClass}`:"";const c={matches:l||[],descriptionTitle:e.saneDescription,descriptionMatches:h||[],labelEscapeNewLines:!0};"separator"!==a.type?(c.extraClasses=a.iconClasses,c.italic=a.italic,c.strikethrough=a.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item")):i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(e.saneLabel,e.saneDescription,c),i.keybinding.set("separator"===a.type?void 0:a.keybinding),e.saneDetail?(i.detail.element.style.display="",i.detail.setLabel(e.saneDetail,void 0,{matches:d,title:e.saneDetail,labelEscapeNewLines:!0})):i.detail.element.style.display="none",e.item&&e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);const u=a.buttons;u&&u.length?(i.actionBar.push(u.map(((t,i)=>{let n=t.iconClass||(t.iconPath?Pie(t.iconPath):void 0);return t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:`id-${i}`,class:n,enabled:!0,label:"",tooltip:t.tooltip||"",run:()=>{"separator"!==a.type?e.fireButtonTriggered({button:t,item:a}):e.fireSeparatorButtonTriggered({button:t,separator:a})}}})),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=k(i.toDisposeElement),i.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=k(e.toDisposeElement),e.toDisposeTemplate=k(e.toDisposeTemplate)}}zie.ID="listelement";class Uie{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return zie.ID}}var Kie;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(Kie||(Kie={}));class jie{constructor(e,t,i,n){this.parent=e,this.options=i,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new U,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new U,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new U,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new U,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new U,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new U,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new U,this.onKeyDown=this._onKeyDown.event,this._onLeave=new U,this.onLeave=this._onLeave.event,this._listElementChecked=new U,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=ds(this.parent,Vie(".quick-input-list"));const s=new Uie,o=new $ie;if(this.list=i.createList("QuickInput",this.container,s,[new zie(n)],{identityProvider:{getId:e=>{var t,i,n,s,o,r,a,l;return null!==(l=null!==(r=null!==(s=null!==(i=null===(t=e.item)||void 0===t?void 0:t.id)&&void 0!==i?i:null===(n=e.item)||void 0===n?void 0:n.label)&&void 0!==s?s:null===(o=e.separator)||void 0===o?void 0:o.id)&&void 0!==r?r:null===(a=e.separator)||void 0===a?void 0:a.label)&&void 0!==l?l:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new St(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(Pe?e.metaKey:e.ctrlKey)&&this.list.setFocus(zd(this.list.length));break;case 16:{const e=this.list.getFocus();1===e.length&&0===e[0]&&this._onLeave.fire();break}case 18:{const e=this.list.getFocus();1===e.length&&e[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(En(this.container,os.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),i.hoverDelegate){const e=new Qh(i.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver((t=>Wie(this,void 0,void 0,(function*(){var i;if(t.browserEvent.target instanceof HTMLAnchorElement)e.cancel();else if(t.browserEvent.relatedTarget instanceof HTMLAnchorElement||!qn(t.browserEvent.relatedTarget,null===(i=t.element)||void 0===i?void 0:i.element))try{yield e.trigger((()=>Wie(this,void 0,void 0,(function*(){t.element&&this.showHover(t.element)}))))}catch(t){if(!d(t))throw t}}))))),this.disposables.push(this.list.onMouseOut((t=>{var i;qn(t.browserEvent.relatedTarget,null===(i=t.element)||void 0===i?void 0:i.element)||e.cancel()}))),this.disposables.push(e)}this.disposables.push(this._listElementChecked.event((e=>this.fireCheckedEvents()))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return B.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return B.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=k(this.elementDisposables);const t=e=>this.fireButtonTriggered(e),i=e=>this.fireSeparatorButtonTriggered(e);this.inputElements=e;const n=new Map,s=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce(((o,r,a)=>{var l;const h=a>0?e[a-1]:void 0;if("separator"===r.type&&!r.buttons)return o;const d=new Hie(r,h,a,s,t,i,this._listElementChecked),c=o.length;return o.push(d),n.set(null!==(l=d.item)&&void 0!==l?l:d.separator,c),o}),[]),this.elementsToIndexes=n,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item)).filter((e=>!!e))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===Kie.Second&&this.list.length<2&&(e=Kie.First),e){case Kie.First:this.list.scrollTop=0,this.list.focusFirst(void 0,(e=>!!e.item));break;case Kie.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,(e=>!!e.item));break;case Kie.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,(e=>!!e.item));break;case Kie.Next:{this.list.focusNext(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case Kie.Previous:{this.list.focusPrevious(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case Kie.NextPage:this.list.focusNextPage(void 0,(e=>!!e.item));break;case Kie.PreviousPage:this.list.focusPreviousPage(void 0,(e=>!!e.item))}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,i,n;void 0!==this.options.hoverDelegate&&(this._lastHover&&!this._lastHover.isDisposed&&(null===(i=(t=this.options.hoverDelegate).onDidHideHover)||void 0===i||i.call(t),null===(n=this._lastHover)||void 0===n||n.dispose()),e.element&&e.saneTooltip&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:e=>{this.options.linkOpenerDelegate(e)},showPointer:!0,container:this.container,hoverPosition:1},!1)))}layout(e){this.list.getHTMLElement().style.maxHeight=e?44*Math.floor(e/44)+6+"px":"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this.elements.forEach((n=>{var s,o,r,a;let l;l="fuzzy"===this.matchOnLabelMode?this.matchOnLabel&&null!==(s=la(e,aa(n.saneLabel)))&&void 0!==s?s:void 0:this.matchOnLabel&&null!==(o=function(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return qie(e,i);const s=to(i," "),o=i.length-s.length,r=qie(e,s);if(r)for(const a of r){const e=n[a.start+o]+o;a.start+=e,a.end+=e}return r}(t,aa(n.saneLabel)))&&void 0!==o?o:void 0;const h=this.matchOnDescription&&null!==(r=la(e,aa(n.saneDescription||"")))&&void 0!==r?r:void 0,d=this.matchOnDetail&&null!==(a=la(e,aa(n.saneDetail||"")))&&void 0!==a?a:void 0;if(l||h||d?(n.labelHighlights=l,n.descriptionHighlights=h,n.detailHighlights=d,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const e=n.index&&this.inputElements[n.index-1];i=e&&"separator"===e.type?e:i,i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));const i=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const t=e.toLowerCase();i.sort(((e,i)=>function(e,t,i){const n=e.labelHighlights||[],s=t.labelHighlights||[];if(n.length&&!s.length)return-1;if(!n.length&&s.length)return 1;if(0===n.length&&0===s.length)return 0;return Iie(e.saneSortLabel,t.saneSortLabel,i)}(e,i,t)))}return this.elementsToIndexes=i.reduce(((e,t,i)=>{var n;return e.set(null!==(n=t.item)&&void 0!==n?n:t.separator,i),e}),new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=k(this.elementDisposables),this.disposables=k(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){const e=this.list.getFocusedElements()[0];if(!(null==e?void 0:e.saneTooltip))return;if(this._lastHover&&!this._lastHover.isDisposed)return void this._lastHover.dispose();const t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);const i=new N;i.add(this.list.onDidChangeFocus((e=>{e.indexes.length&&this.showHover(e.elements[0])}))),this._lastHover&&i.add(this._lastHover),this._toggleHover=i,this.elementDisposables.push(this._toggleHover)}}function qie(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}Bie([UL],jie.prototype,"onDidChangeFocus",null),Bie([UL],jie.prototype,"onDidChangeSelection",null);class $ie{getWidgetAriaLabel(){return ue(0,"Quick Input")}getAriaLabel(e){var t;return(null===(t=e.separator)||void 0===t?void 0:t.label)?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var Gie=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Zie={iconClass:ea.asClassName(Qr.quickInputBack),tooltip:ue(0,"Back"),handle:-1};class Yie extends E{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=Yie.noPromptMessage,this._severity=dL.Ignore,this.onDidTriggerButtonEmitter=this._register(new U),this.onDidHideEmitter=this._register(new U),this.onDisposeEmitter=this._register(new U),this.visibleDisposables=this._register(new N),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!He;this._ignoreFocusOut=e&&!He,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=null!=e?e:[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=rE.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const i=this.getTitle();i&&this.ui.title.textContent!==i?this.ui.title.textContent=i:i||" "===this.ui.title.innerHTML||(this.ui.title.innerText="\xa0");const n=this.getDescription();if(this.ui.description1.textContent!==n&&(this.ui.description1.textContent=n),this.ui.description2.textContent!==n&&(this.ui.description2.textContent=n),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?us(this.ui.widget,this._widget):us(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new id,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===Zie));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new za(`id-${t}`,"",e.iconClass||Pie(e.iconPath),!0,(()=>Gie(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==Zie));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new za(`id-${t}`,"",e.iconClass||Pie(e.iconPath),!0,(()=>Gie(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const i=null!==(t=null===(e=this.toggles)||void 0===e?void 0:e.filter((e=>e instanceof mV)))&&void 0!==t?t:[];this.ui.inputBox.toggles=i}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const s=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==s&&(this._lastValidationMessage=s,us(this.ui.message),Fie(s,this.ui.message,{callback:e=>{this.ui.linkOpenerDelegate(e)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?ue(0,"{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==dL.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}Yie.noPromptMessage=ue(0,"Press 'Enter' to confirm your input or 'Escape' to cancel");class Xie extends Yie{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new U),this.onWillAcceptEmitter=this._register(new U),this.onDidAcceptEmitter=this._register(new U),this.onDidCustomEmitter=this._register(new U),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=aE.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new U),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new U),this.onDidTriggerItemButtonEmitter=this._register(new U),this.onDidTriggerSeparatorButtonEmitter=this._register(new U),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){if(this._value!==e){if(this._value=e,t||this.update(),this.visible){this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst()}this.onDidChangeValueEmitter.fire(this._value)}}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?oE:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(Kie.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(Kie.Next),this.canSelectMany&&this.ui.list.domFocus(),as(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(Kie.Previous):this.ui.list.focus(Kie.Last),this.canSelectMany&&this.ui.list.domFocus(),as(e,!0);break;case 12:this.ui.list.focus(Kie.NextPage),this.canSelectMany&&this.ui.list.domFocus(),as(e,!0);break;case 11:this.ui.list.focus(Kie.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),as(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Kie.First),as(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Kie.Last),as(e,!0))}}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Id(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&Id(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&Id(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((e=>this.onDidTriggerSeparatorButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return En(this.ui.container,os.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new St(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const n=e.getChords();return!(n.length>1)&&(n[0].shiftKey&&4===i?!(t.ctrlKey||t.altKey||t.metaKey):!(!n[0].altKey||6!==i)||(!(!n[0].ctrlKey||5!==i)||!(!n[0].metaKey||57!==i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;if(!n&&i.inputBox&&(n=this.placeholder||Xie.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=null!=n?n:null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case aE.NONE:this._itemActivation=aE.FIRST;break;case aE.SECOND:this.ui.list.focus(Kie.Second),this._itemActivation=aE.FIRST;break;case aE.LAST:this.ui.list.focus(Kie.Last),this._itemActivation=aE.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Kie.First)),this.keepScrollPosition&&(this.scrollTop=e)}}Xie.DEFAULT_ARIA_LABEL=ue(0,"Type to narrow down results.");class Qie extends Yie{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new U),this.onDidAcceptEmitter=this._register(new U),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire()))),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}const Jie=fs;class ene extends E{constructor(e,t){super(),this.options=e,this.themeService=t,this.enabled=!0,this.onDidAcceptEmitter=this._register(new U),this.onDidCustomEmitter=this._register(new U),this.onDidTriggerButtonEmitter=this._register(new U),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new U),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new U),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(En(window,os.KEY_DOWN,e,!0)),this._register(En(window,os.KEY_UP,e,!0)),this._register(En(window,os.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=ds(this.parentElement,Jie(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Jn(e),i=ds(e,Jie(".quick-input-titlebar")),n=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,s=this._register(new Ix(i,n));s.domNode.classList.add("quick-input-left-action-bar");const o=ds(i,Jie(".quick-input-title")),r=this._register(new Ix(i,n));r.domNode.classList.add("quick-input-right-action-bar");const a=ds(e,Jie(".quick-input-header")),l=ds(a,Jie("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",ue(0,"Toggle all checkboxes")),this._register(Mn(l,os.CHANGE,(e=>{const t=l.checked;D.setAllVisibleChecked(t)}))),this._register(En(l,os.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const h=ds(a,Jie(".quick-input-description")),d=ds(a,Jie(".quick-input-and-message")),c=ds(d,Jie(".quick-input-filter")),u=this._register(new Nie(c,this.styles.inputBox,this.styles.toggle));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=ds(c,Jie(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new Vz(g,{countFormat:ue(0,"{0} Results")},this.styles.countBadge),m=ds(c,Jie(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new Vz(m,{countFormat:ue(0,"{0} Selected")},this.styles.countBadge),_=ds(a,Jie(".quick-input-action")),v=this._register(new GZ(_,this.styles.button));v.label=ue(0,"OK"),this._register(v.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=ds(a,Jie(".quick-input-action")),C=this._register(new GZ(b,this.styles.button));C.label=ue(0,"Custom"),this._register(C.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const w=ds(d,Jie(`#${this.idPrefix}message.quick-input-message`)),y=this._register(new Die(e,this.styles.progressBar));y.getContainer().classList.add("quick-input-progress");const S=ds(e,Jie(".quick-input-html-widget"));S.tabIndex=-1;const L=ds(e,Jie(".quick-input-description")),k=this.idPrefix+"list",D=this._register(new jie(e,k,this.options,this.themeService));u.setAttribute("aria-controls",k),this._register(D.onDidChangeFocus((()=>{var e;u.setAttribute("aria-activedescendant",null!==(e=D.getActiveDescendant())&&void 0!==e?e:"")}))),this._register(D.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(D.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(D.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(D.onLeave((()=>{setTimeout((()=>{u.setFocus(),this.controller instanceof Xie&&this.controller.canSelectMany&&D.clearFocus()}),0)})));const x=hs(e);return this._register(x),this._register(En(e,os.FOCUS,(t=>{qn(t.relatedTarget,e)||(this.previousFocusElement=t.relatedTarget instanceof HTMLElement?t.relatedTarget:void 0)}),!0)),this._register(x.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(rE.Blur),this.previousFocusElement=void 0}))),this._register(En(e,os.FOCUS,(e=>{u.setFocus()}))),this._register(Mn(e,os.KEY_DOWN,(t=>{if(!qn(t.target,S))switch(t.keyCode){case 3:as(t,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:as(t,!0),this.hide(rE.Gesture);break;case 2:if(!t.altKey&&!t.ctrlKey&&!t.metaKey){const i=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(e.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.isDisplayed()&&i.push(".monaco-list"),this.getUI().message&&i.push(".quick-input-message a"),this.getUI().widget){if(qn(t.target,this.getUI().widget))break;i.push(".quick-input-html-widget")}const n=e.querySelectorAll(i.join(", "));t.shiftKey&&t.target===n[0]?(as(t,!0),D.clearFocus()):!t.shiftKey&&qn(t.target,n[n.length-1])&&(as(t,!0),n[0].focus())}break;case 10:t.ctrlKey&&(as(t,!0),this.getUI().list.toggleHover())}}))),this.ui={container:e,styleSheet:t,leftActionBar:s,titleBar:i,title:o,description1:L,description2:h,widget:S,rightActionBar:r,checkAll:l,inputContainer:d,filterContainer:c,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:v,message:w,customButtonContainer:b,customButton:C,list:D,progressBar:y,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e),linkOpenerDelegate:e=>this.options.linkOpenerDelegate(e)},this.updateStyles(),this.ui}pick(e,t={},i=Hh.None){return new Promise(((n,s)=>{let o=e=>{var i;o=n,null===(i=t.onKeyMods)||void 0===i||i.call(t,r.keyMods),n(e)};if(i.isCancellationRequested)return void o(void 0);const r=this.createQuickPick();let a;const l=[r,r.onDidAccept((()=>{if(r.canSelectMany)o(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(o(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(o(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),s=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=s}}})))),r.onDidTriggerSeparatorButton((e=>{var i;return null===(i=t.onDidTriggerSeparatorButton)||void 0===i?void 0:i.call(t,e)})),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{k(l),o(void 0)}))];r.title=t.title,r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{s(e),r.hide()}))}))}createQuickPick(){const e=this.getUI();return new Xie(e)}createInputBox(){const e=this.getUI();return new Qie(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,null==i||i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",us(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(dL.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),us(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();Zie.tooltip=n?ue(0,"Back ({0})",n):ue(0,"Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,i,n;const s=this.controller;if(!s)return;const o=!qn(document.activeElement,null!==(i=null===(t=this.ui)||void 0===t?void 0:t.container)&&void 0!==i?i:null);if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!o){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=null!==(n=e.parentElement)&&void 0!==n?n:void 0;(null==e?void 0:e.offsetParent)?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}s.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,ene.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=null!=e?e:"",this.ui.container.style.backgroundColor=null!=t?t:"",this.ui.container.style.color=null!=i?i:"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.list.style(this.styles.list);const o=[];this.styles.pickerGroup.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(o.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&o.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&o.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&o.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&o.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&o.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),o.push("}"));const r=o.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}isDisplayed(){return this.ui&&"none"!==this.ui.container.style.display}}ene.MAX_WIDTH=600;var tne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ine=function(e,t){return function(i,n){t(i,n,e)}};let nne=class extends W_{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Cie))),this._quickAccess}constructor(e,t,i,n){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this._onShow=this._register(new U),this._onHide=this._register(new U),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),linkOpenerDelegate:e=>{this.instantiationService.invokeFunction((t=>{t.get(Uk).open(e,{allowCommands:!0,fromUserGesture:!0})}))},returnFocus:()=>e.focus(),createList:(e,t,i,n,s)=>this.instantiationService.createInstance(vz,e,t,i,n,s),styles:this.computeStyles()},n=this._register(new ene(Object.assign(Object.assign({},i),t),this.themeService));return n.layout(e.dimension,e.offset.quickPickTop),this._register(e.onDidLayout((t=>n.layout(t,e.offset.quickPickTop)))),this._register(n.onShow((()=>{this.resetContextKeys(),this._onShow.fire()}))),this._register(n.onHide((()=>{this.resetContextKeys(),this._onHide.fire()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Tl(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),null==t||t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=Hh.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:Cp(Dm),quickInputForeground:Cp(xm),quickInputTitleBackground:Cp(Nm),widgetBorder:Cp(Tp),widgetShadow:Cp(Mp)},inputBox:qx,toggle:jx,countBadge:Gx,button:Ux,progressBar:Kx,keybindingLabel:zx,list:Yx({listBackground:Dm,listFocusBackground:Hf,listFocusForeground:Wf,listInactiveFocusForeground:Wf,listInactiveSelectionIconForeground:Vf,listInactiveFocusBackground:Hf,listFocusOutline:Ep,listInactiveFocusOutline:Ep}),pickerGroup:{pickerGroupBorder:Cp(Im),pickerGroupForeground:Cp(Em)}}}};nne=tne([ine(0,Oa),ine(1,Rl),ine(2,R_),ine(3,oee)],nne);var sne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},one=function(e,t){return function(i,n){t(i,n,e)}};let rne=class extends nne{constructor(e,t,i,n,s){super(t,i,n,new hee(e.getContainerDomNode(),s)),this.host=void 0;const o=lne.get(e);if(o){const t=o.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return t.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};rne=sne([one(1,Oa),one(2,Rl),one(3,R_),one(4,Fa)],rne);let ane=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(rne,e);this.mapEditorToService.set(e,t),_(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},i=Hh.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};ane=sne([one(0,Oa),one(1,Fa)],ane);class lne{static get(e){return e.getContribution(lne.ID)}constructor(e){this.editor=e,this.widget=new hne(this.editor)}dispose(){this.widget.dispose()}}lne.ID="editor.controller.quickInput";class hne{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return hne.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}hne.ID="editor.contrib.quickInputWidget",Lh(lne.ID,lne,4);var dne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cne=function(e,t){return function(i,n){t(i,n,e)}};let une=class extends E{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new U,this._onDidChangeReducedMotion=new U,this._accessibilityModeEnabledContext=YR.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const s=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(s)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register(En(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",e),this._layoutService.container.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};une=dne([cne(0,Rl),cne(1,oee),cne(2,uu)],une);var gne,pne,mne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fne=function(e,t){return function(i,n){t(i,n,e)}};let _ne=class{constructor(e,t){this._commandService=e,this._hiddenStates=new vne(t)}createMenu(e,t,i){return new Cne(e,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};_ne=mne([fne(0,Ga),fne(1,qN)],_ne);let vne=gne=class{constructor(e){this._storageService=e,this._disposables=new N,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(gne._key,0,"{}");this._data=JSON.parse(t)}catch(t){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,gne._key,this._disposables)((()=>{if(!this._ignoreChangeEvent)try{const t=e.get(gne._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var i;return null!==(i=this._hiddenByDefaultCache.get(`${e.id}/${t}`))&&void 0!==i&&i}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){var i,n;const s=this._isHiddenByDefault(e,t),o=null!==(n=null===(i=this._data[e.id])||void 0===i?void 0:i.includes(t))&&void 0!==n&&n;return s?!o:o}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const n=this._data[e.id];if(i)if(n){n.indexOf(t)<0&&n.push(t)}else this._data[e.id]=[t];else if(n){const i=n.indexOf(t);i>=0&&function(e,t){const i=e.length-1;te[1])));s.length>0&&o.push(new ih(t,n,s))}}o.length>0&&t.push([n,o])}return t}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n)return-1;if("navigation"===i)return-1;if("navigation"===n)return 1;const e=i.localeCompare(n);if(0!==e)return e}const s=e.order||0,o=t.order||0;return so?1:pne._compareTitles(Xl(e)?e.command.title:e.title,Xl(t)?t.command.title:t.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};bne=pne=mne([fne(3,Ga),fne(4,Rl)],bne);let Cne=class{constructor(e,t,i,n,s){this._disposables=new N,this._menuInfo=new bne(e,t,i.emitEventsForSubmenuChanges,n,s);const o=new sd((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(o),this._disposables.add(th.onDidChangeMenu((t=>{t.has(e)&&o.schedule()})));const r=this._disposables.add(new N);this._onDidChange=new q({onWillAddFirstListener:()=>{r.add(s.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),r.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))},onDidRemoveLastListener:r.clear.bind(r),delay:i.eventDebounceDelay,merge:e=>{let t=!1,i=!1,n=!1;for(const s of e)if(t=t||s.isStructuralChange,i=i||s.isEnablementChange,n=n||s.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}}}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function wne(e,t,i){const n=void 0!==t.submenu?t.submenu.id:t.id;const s="string"==typeof t.title?t.title:t.title.value,o=$a({id:`hide/${e.id}/${n}`,label:ue(0,"Hide '{0}'",s),run(){i.updateHidden(e,n,!0)}}),r=$a({id:`toggle/${e.id}/${n}`,label:s,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:o,toggle:r,get isHidden(){return!r.checked}}}Cne=mne([fne(3,Ga),fne(4,Rl)],Cne);var yne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Sne=function(e,t){return function(i,n){t(i,n,e)}},Lne=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let kne=class extends E{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],(re||ae)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const e=new ad;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((t=>Lne(this,void 0,void 0,(function*(){t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))))};this.layoutService.hasContainer&&(this._register(En(this.layoutService.container,"click",e)),this._register(En(this.layoutService.container,"keydown",e)))}writeText(e,t){return Lne(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch(s){console.error(s)}const i=document.activeElement,n=document.body.appendChild(fs("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return Lne(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(t){return console.error(t),""}}))}readFindText(){return Lne(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return Lne(this,void 0,void 0,(function*(){this.findText=e}))}writeResources(e){return Lne(this,void 0,void 0,(function*(){this.resources=e}))}readResources(){return Lne(this,void 0,void 0,(function*(){return this.resources}))}};kne=yne([Sne(0,oee),Sne(1,ah)],kne);var Dne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},xne=function(e,t){return function(i,n){t(i,n,e)}};const Nne="data-keybinding-context";class Ene{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return Object.assign({},this._value)}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class Ine extends Ene{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Ine.INSTANCE=new Ine;class Mne extends Ene{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=Uq.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new Ane(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...v.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new Ane(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(Mne._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Mne._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Mne._keyPrefix="config.";class Tne{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Rne{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class Ane{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every((t=>e.has(t)))}}class One{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every((t=>t.allKeysContainedIn(e)))}}class Pne extends E{constructor(e){super(),this._onDidChangeContext=this._register(new j({merge:e=>new One(e)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Tne(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Bne(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return!e||e.evaluate(t)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new Rne(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Rne(e))}getContext(e){return this._isDisposed?Ine.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(Nne)){const t=e.getAttribute(Nne);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}dispose(){super.dispose(),this._isDisposed=!0}}let Fne=class extends Pne{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new Mne(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?Ine.INSTANCE:this._contexts.get(e)||Ine.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new Ene(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};Fne=Dne([xne(0,uu)],Fne);class Bne extends Pne{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new I),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Nne)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(Nne,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{const t=this._parent.getContextValuesContainer(this._myContextId).value;var i;i=t,e.allKeysContainedIn(new Set(Object.keys(i)))||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(Nne),super.dispose())}getContextValuesContainer(e){return this._isDisposed?Ine.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}Za.registerCommand("_setContext",(function(e,t,i){e.get(Rl).createKey(String(t),function(e){return gd(e,(e=>"object"==typeof e&&1===e.$mid?an.revive(e).toString():e instanceof an?e.toString():void 0))}(i))})),Za.registerCommand({id:"getContextKeyInfo",handler:()=>[...Tl.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:ue(0,"A command that returns information about context keys"),args:[]}}),Za.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of Tl.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));class Wne{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class Vne{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Wne(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}class Hne extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class zne{constructor(e=new SB,t=!1,i,n=false){var s;this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._activeInstantiations=new Set,this._services.set(Oa,this),this._globalGraph=n?null!==(s=null==i?void 0:i._globalGraph)&&void 0!==s?s:new Vne((e=>e)):void 0}createChild(e){return new zne(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){const i=Une.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:e=>{if(n)throw g("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof vu?(i=Une.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Une.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=Ea.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),s=[];for(const r of n){const t=this._getOrCreateServiceInstance(r.id,i);t||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${r.id}.`,!1),s.push(t)}const o=n.length>0?n[0].index:t.length;if(t.length!==o){console.trace(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);const i=o-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,o)}return Reflect.construct(e,t.concat(s))}_setServiceInstance(e,t){if(this._services.get(e)instanceof vu)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof vu?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){var n;const s=new Vne((e=>e.id.toString()));let o=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const t=r.pop();if(s.lookupOrInsertNode(t),o++>1e3)throw new Hne(s);for(const i of Ea.getServiceDependencies(t.desc.ctor)){const o=this._getServiceInstanceOrDescriptor(i.id);if(o||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),null===(n=this._globalGraph)||void 0===n||n.insertEdge(String(t.id),String(i.id)),o instanceof vu){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};s.insertEdge(t,e),r.push(e)}}}for(;;){const e=s.roots();if(0===e.length){if(!s.isEmpty())throw new Hne(s);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof vu){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}s.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof vu)return this._createServiceInstance(e,t,i,n,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s){if(n){const n=new zne(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const o=new Map,r=new rd((()=>{const e=n._createInstance(t,i,s);for(const[t,i]of o){const n=e[t];if("function"==typeof n)for(const t of i)n.apply(e,t)}return o.clear(),e}));return new Proxy(Object.create(null),{get(e,t){if(!r.isInitialized&&"string"==typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=o.get(t);e||(e=new O,o.set(t,e));return(t,i,n)=>x(e.push([t,i,n]))}if(t in e)return e[t];const i=r.value;let n=i[t];return"function"!=typeof n||(n=n.bind(i),e[t]=n),n},set:(e,t,i)=>(r.value[t]=i,!0),getPrototypeOf:e=>t.prototype})}return this._createInstance(t,i,s)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Une{static traceInvocation(e,t){return e?new Une(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):Une._None}static traceCreation(e,t){return e?new Une(1,t.name):Une._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Une(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Une._totals+=e;let t=!1;const i=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){const s=[],o=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,s.push(`${o}CREATES -> ${r}`);const n=e(i+1,l);n&&s.push(n)}else s.push(`${o}uses -> ${r}`);return s.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Une._totals.toFixed(2)}ms)`];(e>2||t)&&Une.all.add(i.join("\n"))}}Une.all=new Set,Une._None=new class extends Une{constructor(){super(0,null)}stop(){}branch(){return this}},Une._totals=0;const Kne=new Set([vn.inMemory,vn.vscodeSourceControl,vn.walkThrough,vn.walkThroughSnippet]);class jne{constructor(){this._byResource=new zs,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new zs,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){const i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const s=this._byResource.get(e);s&&(i=s.delete(t));const o=this._byOwner.get(t);if(o&&(n=o.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,s;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:v.empty():an.isUri(e)?null!==(s=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==s?s:v.empty():v.map(v.concat(...this._byOwner.values()),(e=>e[1]))}}class qne{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new zs,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Kne.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===bN.Error?t.errors+=1:i===bN.Warning?t.warnings+=1:i===bN.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class $ne{constructor(){this._onMarkerChanged=new q({delay:0,merge:$ne._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new jne,this._stats=new qne(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(Bd(i)){this._data.delete(t,e)&&this._onMarkerChanged.fire([t])}else{const n=[];for(const s of i){const i=$ne._toMarker(e,t,s);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:h,endColumn:d,relatedInformation:c,tags:u}=i;if(o)return a=a>0?a:1,l=l>0?l:1,h=h>=a?h:a,d=d>0?d:l,{resource:t,owner:e,code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:h,endColumn:d,relatedInformation:c,tags:u}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const s of n){const t=v.first(s);t&&(i.push(t.resource),this._data.delete(t.resource,e))}if(Wd(t)){const n=new zs;for(const{resource:s,marker:o}of t){const t=$ne._toMarker(e,s,o);if(!t)continue;const r=n.get(s);r?r.push(t):(n.set(s,[t]),i.push(s))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if($ne._accept(i,n)){const e=t.push(i);if(s>0&&e===s)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),o=[];for(const t of e)for(const e of t)if($ne._accept(e,n)){const t=o.push(e);if(s>0&&t===s)return o}return o}{const e=[];for(const t of this._data.values())for(const i of t)if($ne._accept(i,n)){const t=e.push(i);if(s>0&&t===s)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new zs;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}class Gne extends E{constructor(){super(...arguments),this._configurationModel=new nte}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new nte;const e=Ul.as(ku).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],s=t[n];void 0!==e?this._configurationModel.addValue(n,e):s?this._configurationModel.addValue(n,s.default):this._configurationModel.removeValue(n)}}}class Zne extends E{constructor(e,t=[]){super(),this.logger=new uh([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}var Yne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Xne=function(e,t){return function(i,n){t(i,n,e)}},Qne=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Jne{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new U}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let ese=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new T(new Jne(t))):Promise.reject(new Error("Model not found"))}};ese=Yne([Xne(0,Wa)],ese);class tse{show(){return tse.NULL_PROGRESS_RUNNER}showWhile(e,t){return Qne(this,void 0,void 0,(function*(){yield e}))}}tse.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class ise{info(e){return this.notify({severity:dL.Info,message:e})}warn(e){return this.notify({severity:dL.Warning,message:e})}error(e){return this.notify({severity:dL.Error,message:e})}notify(e){switch(e.severity){case dL.Error:console.error(e.message);break;case dL.Warning:console.warn(e.message);break;default:console.log(e.message)}return ise.NO_OP}prompt(e,t,i,n){return ise.NO_OP}status(e,t){return E.None}}ise.NO_OP=new class{};let nse=class{constructor(e){this._onWillExecuteCommand=new U,this._onDidExecuteCommand=new U,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Za.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};nse=Yne([Xne(0,Oa)],nse);let sse=class extends pte{constructor(e,t,i,n,s,o){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new N;t.add(En(e,os.KEY_DOWN,(e=>{const t=new St(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(En(e,os.KEY_UP,(e=>{const t=new St(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new ose(e,t))},a=e=>{for(let t=0;t{e.getOption(61)||r(e.getContainerDomNode())};this._register(o.onCodeEditorAdd(l)),this._register(o.onCodeEditorRemove((e=>{e.getOption(61)||a(e.getContainerDomNode())}))),o.listCodeEditors().forEach(l);const h=e=>{r(e.getContainerDomNode())};this._register(o.onDiffEditorAdd(h)),this._register(o.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),o.listDiffEditors().forEach(h)}addDynamicKeybinding(e,t,i,n){return D(Za.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>{var t;return{keybinding:mt(e.keybinding,$e),command:null!==(t=e.command)&&void 0!==t?t:null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),x((()=>{for(let e=0;ethis._log(e)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const e=s.when||void 0,o=s.keybinding;if(o){const r=bte.resolveKeybinding(o,$e);for(const o of r)i[n++]=new fte(o,s.command,s.commandArgs,e,t,null,!1)}else i[n++]=new fte(void 0,s.command,s.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new _t(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new bte([t],$e)}};sse=Yne([Xne(0,Rl),Xne(1,Ga),Xne(2,rh),Xne(3,uL),Xne(4,ah),Xne(5,Fa)],sse);class ose extends E{constructor(e,t){super(),this.domNode=e,this._register(t)}}function rse(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof an)}class ase{constructor(){this._onDidChangeConfiguration=new U,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const e=new Gne;this._configuration=new rte(e.reload(),new nte,new nte,new nte),e.dispose()}getValue(e,t){const i="string"==typeof e?e:void 0,n=rse(e)?e:rse(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[e,t]=n;this.getValue(e)!==t&&(this._configuration.updateValue(e,t),i.push(e))}if(i.length>0){const e=new ate({keys:i,overrides:[]},t,this._configuration);e.source=8,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let lse=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new U,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=Ba.isIPosition(t)?t:null,s=n?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0,o=e?this.getLanguage(e,n):void 0;return void 0===s?this.configurationService.getValue({resource:e,overrideIdentifier:o}):this.configurationService.getValue(s,{resource:e,overrideIdentifier:o})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};lse=Yne([Xne(0,uu),Xne(1,Wa),Xne(2,yc)],lse);let hse=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:Fe||Pe?"\n":"\r\n"}};hse=Yne([Xne(0,uu)],hse);class dse{constructor(){const e=an.from({scheme:dse.SCHEME,authority:"model",path:"/"});this.workspace={id:Xq,folders:[new Zq({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===dse.SCHEME?this.workspace.folders[0]:null}}function cse(e,t,i){if(!t)return;if(!(e instanceof ase))return;const n=[];Object.keys(t).forEach((e=>{(function(e){return XS()[`editor.${e}`]||!1})(e)&&n.push([`editor.${e}`,t[e]]),i&&function(e){return XS()[`diffEditor.${e}`]||!1}(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}dse.SCHEME="inmemory";let use=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return Qne(this,void 0,void 0,(function*(){const t=Array.isArray(e)?e:JS.convert(e),i=new Map;for(const e of t){if(!(e instanceof eL))throw new Error("bad edit - only text edits are supported");const t=this._modelService.getModel(e.resource);if(!t)throw new Error("bad edit - model not found");if("number"==typeof e.versionId&&t.getVersionId()!==e.versionId)throw new Error("bad state - model changed in the meantime");let n=i.get(t);n||(n=[],i.set(t,n)),n.push(Aq.replaceMove(Mh.lift(e.textEdit.range),e.textEdit.text))}let n=0,s=0;for(const[e,o]of i)e.pushStackElement(),e.pushEditOperations([],o,(()=>[])),e.pushStackElement(),s+=1,n+=o.length;return{ariaSummary:Xs(PJ.bulkEditServiceSummary,n,s),isApplied:n>0}}))}};use=Yne([Xne(0,Wa)],use);let gse=class extends Dte{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};gse=Yne([Xne(0,oee),Xne(1,Fa)],gse);let pse=class extends Yte{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o),this.configure({blockMouse:!1})}};pse=Yne([Xne(0,rh),Xne(1,uL),Xne(2,Vx),Xne(3,PL),Xne(4,Jl),Xne(5,Rl)],pse);var mse;Cu(uu,ase,0),Cu(cT,lse,0),Cu(uT,hse,0),Cu(Kq,dse,0),Cu(qz,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return ba(e)}},0),Cu(rh,class{publicLog2(){}},0),Cu(L3,class{confirm(e){return Qne(this,void 0,void 0,(function*(){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}))}doConfirm(e,t){let i=e;return t&&(i=i+"\n\n"+t),window.confirm(i)}prompt(e){var t,i;return Qne(this,void 0,void 0,(function*(){let n;if(this.doConfirm(e.message,e.detail)){const s=[...null!==(t=e.buttons)&&void 0!==t?t:[]];e.cancelButton&&"string"!=typeof e.cancelButton&&"boolean"!=typeof e.cancelButton&&s.push(e.cancelButton),n=yield null===(i=s[0])||void 0===i?void 0:i.run({checkboxChecked:!1})}return{result:n}}))}error(e,t){return Qne(this,void 0,void 0,(function*(){yield this.prompt({type:dL.Error,message:e,detail:t})}))}},0),Cu(_E,class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},0),Cu(uL,ise,0),Cu(wN,$ne,0),Cu(yc,class extends Fte{constructor(){super()}},0),Cu(z4,class extends E{constructor(){super(),this._onColorThemeChange=this._register(new U),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new U),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new m7,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(f7,k7(f7)),this._knownThemes.set(_7,k7(_7)),this._knownThemes.set(v7,k7(v7)),this._knownThemes.set(b7,k7(b7));const e=this._register(function(e){const t=new N,i=t.add(new U),n=JT();return t.add(n.onDidChange((()=>i.fire()))),e&&t.add(e.onDidProductIconThemeChange((()=>i.fire()))),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){const t=e?e.getProductIconTheme():new m7,i={},s=e=>{const n=t.getIcon(e);if(!n)return;const s=n.font;return s?(i[s.id]=s.definition,`.codicon-${e.id}:before { content: '${n.fontCharacter}'; font-family: ${ys(s.id)}; }`):`.codicon-${e.id}:before { content: '${n.fontCharacter}'; }`},o=[];for(const e of n.getIcons()){const t=s(e);t&&o.push(t)}for(const e in i){const t=i[e],n=t.weight?`font-weight: ${t.weight};`:"",s=t.style?`font-style: ${t.style};`:"",r=t.src.map((e=>`${ws(e.location)} format('${e.format}')`)).join(", ");o.push(`@font-face { src: ${r}; font-family: ${ys(e)};${n}${s} font-display: block; }`)}return o.join("\n")}}}(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(f7),this._onOSSchemeChanged(),this._register(e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}))),ee("(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return Zn(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Jn(void 0,(e=>{e.className="monaco-colors",e.textContent=this._allCSS})),this._styleElements.push(this._globalStyleElement)),E.None}_registerShadowDomContainer(e){const t=Jn(e,(e=>{e.className="monaco-colors",e.textContent=this._allCSS}));return this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(f7),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==M_(this._theme.type)){let t;t=T_(this._theme.type)?e?v7:_7:e?b7:f7,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};w7.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const o of C7.getColors()){const e=this._theme.getColor(o.id,!0);e&&n.push(`${bp(o.id)}: ${e.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor { ${n.join("\n")} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}},0),Cu(ah,class extends Zne{constructor(){super(new ch)}},0),Cu(Wa,fie,0),Cu(MR,aie,0),Cu(Rl,Fne,0),Cu(gL,class{withProgress(e,t,i){return t({report:()=>{}})}},0),Cu(mL,tse,0),Cu(qN,class extends GN{constructor(){super(),this.applicationStorage=this._register(new UN(new KN,{hint:VN.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new UN(new KN,{hint:VN.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new UN(new KN,{hint:VN.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e)))),this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}},0),Cu(gG,vT,0),Cu(QS,use,0),Cu(A7,class{constructor(){this._neverEmitter=new U,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},0),Cu(Va,ese,0),Cu(ZR,une,0),Cu(PH,class{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new N,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;new cx(Jn(),"").style(Zx)}if(this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),D(e.onDidFocus((()=>this.setLastFocusedList(e))),x((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}},0),Cu(Ga,nse,0),Cu(PL,sse,0),Cu(lE,ane,0),Cu(Vx,gse,0),Cu(Uk,sie,0),Cu(Xy,kne,0),Cu(Hx,pse,0),Cu(Jl,_ne,0),Cu(b$,class{playAudioCue(e,t){return Qne(this,void 0,void 0,(function*(){}))}},0),function(e){const t=new SB;for(const[r,a]of wu())t.set(r,a);const i=new zne(t,!0);t.set(Oa,i),e.get=function(e){n||o({});const s=t.get(e);if(!s)throw new Error("Missing service "+e);return s instanceof vu?i.invokeFunction((t=>t.get(e))):s};let n=!1;const s=new U;function o(e){if(n)return i;n=!0;for(const[i,n]of wu())t.get(i)||t.set(i,n);for(const i in e)if(e.hasOwnProperty(i)){const n=Pa(i);t.get(n)instanceof vu&&t.set(n,e[i])}const o=xT();for(const t of o)try{i.createInstance(t)}catch(a){r(a)}return s.fire(),i}e.initialize=o,e.withServices=function(e){if(n)return e();const t=new N,i=t.add(s.event((()=>{i.dispose(),t.add(e())})));return t}}(mse||(mse={}));var fse=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_se=function(e,t){return function(i,n){t(i,n,e)}};let vse=0,bse=!1;function Cse(e){if(!e){if(bse)return;bse=!0}!function(e){Is=document.createElement("div"),Is.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),Is.appendChild(e),e};Ms=t(),Ts=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),Is.appendChild(e),e};Rs=i(),As=i(),e.appendChild(Is)}(e||document.body)}let wse=class extends XB{constructor(e,t,i,n,s,o,r,a,l,h,d,c){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||AJ.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+AJ.accessibilityHelpMessage,super(e,u,{},i,n,s,o,a,l,h,d,c),this._standaloneKeybindingService=r instanceof sse?r:null,Cse(u.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++vse,s=ul.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),E.None;const t=e.id,i=e.label,n=ul.and(ul.equals("editorId",this.getId()),ul.deserialize(e.precondition)),s=e.keybindings,o=ul.and(n,ul.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),h=new N,d=this.getId()+":"+t;if(h.add(Za.registerCommand(d,l)),r){const e={command:{id:d,title:i},when:n,group:r,order:a};h.add(th.appendMenuItem(Ql.EditorContext,e))}if(Array.isArray(s))for(const u of s)h.add(this._standaloneKeybindingService.addDynamicKeybinding(d,u,l,o));const c=new nF(d,i,i,n,((...t)=>Promise.resolve(e.run(this,...t))),this._contextKeyService);return this._actions.set(t,c),h.add(x((()=>{this._actions.delete(t)}))),h}_triggerCommand(e,t){if(this._codeEditorService instanceof see)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};wse=fse([_se(2,Oa),_se(3,Fa),_se(4,Ga),_se(5,Rl),_se(6,PL),_se(7,R_),_se(8,uL),_se(9,ZR),_se(10,Xu),_se(11,iL)],wse);let yse=class extends wse{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p){const m=Object.assign({},t);cse(h,m,!1);const f=a.registerEditorContainer(e);"string"==typeof m.theme&&a.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&a.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const _=m.model;let v;if(delete m.model,super(e,m,i,n,s,o,r,a,l,d,g,p),this._configurationService=h,this._standaloneThemeService=a,this._register(f),void 0===_){const e=u.getLanguageIdByMimeType(m.language)||m.language||zu;v=Lse(c,u,m.value||"",e,void 0),this._ownsModel=!0}else v=_,this._ownsModel=!1;if(this._attachModel(v),v){const e={oldModelUrl:null,newModelUrl:v.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){cse(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};yse=fse([_se(2,Oa),_se(3,Fa),_se(4,Ga),_se(5,Rl),_se(6,PL),_se(7,z4),_se(8,uL),_se(9,uu),_se(10,ZR),_se(11,Wa),_se(12,yc),_se(13,Xu),_se(14,iL)],yse);let Sse=class extends iZ{constructor(e,t,i,n,s,o,r,a,l,h,d,c){const u=Object.assign({},t);cse(a,u,!0);const g=o.registerEditorContainer(e);"string"==typeof u.theme&&o.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&o.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},n,i,s,c,h),this._configurationService=a,this._standaloneThemeService=o,this._register(g)}dispose(){super.dispose()}updateOptions(e){cse(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(wse,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function Lse(e,t,i,n,s){if(i=i||"",!n){const n=i.indexOf("\n");let o=i;return-1!==n&&(o=i.substring(0,n)),kse(e,i,t.createByFilepathOrFirstLine(s||null,o),s)}return kse(e,i,t.createById(n),s)}function kse(e,t,i,n){return e.createModel(t,i,n)}Sse=fse([_se(2,Oa),_se(3,Rl),_se(4,Fa),_se(5,z4),_se(6,uL),_se(7,uu),_se(8,Hx),_se(9,mL),_se(10,Xy),_se(11,b$)],Sse);var Dse=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function xse(e,t,i){return mse.initialize(i||{}).createInstance(yse,e,t)}function Nse(e){return mse.get(Fa).onCodeEditorAdd((t=>{e(t)}))}function Ese(e){return mse.get(Fa).onDiffEditorAdd((t=>{e(t)}))}function Ise(){return mse.get(Fa).listCodeEditors()}function Mse(){return mse.get(Fa).listDiffEditors()}function Tse(e,t,i){return mse.initialize(i||{}).createInstance(Sse,e,t)}function Rse(e){if("string"!=typeof e.id||"function"!=typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Za.registerCommand(e.id,e.run)}function Ase(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=ul.deserialize(e.precondition),i=new N;if(i.add(Za.registerCommand(e.id,((i,...n)=>fh.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n))))))),e.contextMenuGroupId){const n={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};i.add(th.appendMenuItem(Ql.EditorContext,n))}if(Array.isArray(e.keybindings)){const n=mse.get(PL);if(n instanceof sse){const s=ul.and(t,ul.deserialize(e.keybindingContext));i.add(n.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:s})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return i}function Ose(e){return Pse([e])}function Pse(e){const t=mse.get(PL);return t instanceof sse?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:ul.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),E.None)}function Fse(e,t,i){const n=mse.get(yc),s=n.getLanguageIdByMimeType(t)||t;return Lse(mse.get(Wa),n,e,s,i)}function Bse(e,t){const i=mse.get(yc),n=i.getLanguageIdByMimeType(t)||t||zu;e.setLanguage(i.createById(n))}function Wse(e,t,i){if(e){mse.get(wN).changeOne(t,e.uri,i)}}function Vse(e){mse.get(wN).changeAll(e,[])}function Hse(e){return mse.get(wN).read(e)}function zse(e){return mse.get(wN).onMarkerChanged(e)}function Use(e){return mse.get(Wa).getModel(e)}function Kse(){return mse.get(Wa).getModels()}function jse(e){return mse.get(Wa).onModelAdded(e)}function qse(e){return mse.get(Wa).onModelRemoved(e)}function $se(e){return mse.get(Wa).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))}function Gse(e){return function(e,t,i){return new L8(e,t,i)}(mse.get(Wa),mse.get(Xu),e)}function Zse(e,t){const i=mse.get(yc),n=mse.get(z4);return Z8.colorizeElement(n,i,e,t).then((()=>{n.registerEditorContainer(e)}))}function Yse(e,t,i){const n=mse.get(yc);return mse.get(z4).registerEditorContainer(document.body),Z8.colorize(n,e,t,i)}function Xse(e,t,i=4){return mse.get(z4).registerEditorContainer(document.body),Z8.colorizeModelLine(e,t,i)}function Qse(e,t){DC.getOrCreate(t);const i=function(e){const t=DC.get(e);return t||{getInitialState:()=>xC,tokenize:(t,i,n)=>NC(e,n)}}(t),n=so(e),s=[];let o=i.getInitialState();for(let r=0,a=n.length;rDse(this,void 0,void 0,(function*(){var n;if(!i)return null;const s=null===(n=t.options)||void 0===n?void 0:n.selection;let o;return s&&"number"==typeof s.endLineNumber&&"number"==typeof s.endColumn?o=s:s&&(o={lineNumber:s.startLineNumber,column:s.startColumn}),(yield e.openCodeEditor(i,t.resource,o))?i:null}))))}function ooe(e,t){return"boolean"==typeof e?e:t}function roe(e,t){return"string"==typeof e?e:t}function aoe(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function loe(e,t){t=t.replace(/@@/g,"\x01");let i,n=0;do{i=!1,t=t.replace(/@(\w+)/g,(function(n,s){i=!0;let o="";if("string"==typeof e[s])o=e[s];else{if(!(e[s]&&e[s]instanceof RegExp))throw void 0===e[s]?T8(e,"language definition does not contain attribute '"+s+"', used at: "+t):T8(e,"attribute reference '"+s+"' must be a string, used at: "+t);o=e[s].source}return N8(o)?"":"(?:"+o+")"})),n++}while(i&&n<5);t=t.replace(/\x01/g,"@");const s=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,s)}function hoe(e,t,i,n){let s=-1,o=i,r=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(s=parseInt(r[3]),r[2]&&(s+=100)),o=r[4]);let a,l="~",h=o;if(o&&0!==o.length?/^\w*$/.test(h)?l="==":(r=o.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(l=r[1],h=r[2])):(l="!=",h=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(h))if("@"===l||"!@"===l){const i=e[h];if(!i)throw T8(e,"the @ match target '"+h+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const i of t)if(!e(i))return!1;return!0}((function(e){return"string"==typeof e}),i))throw T8(e,"the @ match target '"+h+"' must be an array of strings, in rule: "+t);const n=aoe(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(h.indexOf("$")<0){const t=loe(e,"^"+h+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,s){return loe(e,"^"+R8(e,h,i,n,s)+"$").test(t)};else if(h.indexOf("$")<0){const t=E8(e,h);a=function(e){return"=="===l?e===t:e!==t}}else{const t=E8(e,h);a=function(i,n,s,o,r){const a=R8(e,t,n,s,o);return"=="===l?i===a:i!==a}}else{const t=aoe(h.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===s?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){const o=function(e,t,i,n){if(n<0)return e;if(n=100){n-=100;const e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw T8(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw T8(e,"the next state must be a string value in rule: "+t);{let s=i.next;if(!/^(@pop|@push|@popall)$/.test(s)&&("@"===s[0]&&(s=s.substr(1)),s.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,R8(e,s,"",[],""))))throw T8(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=s}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let s=0,o=i.length;s0&&"^"===i[0],this.name=this.name+": "+i,this.regex=loe(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=doe(e,this.name,t)}}function uoe(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=e,i.includeLF=ooe(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=ooe(t.ignoreCase,!1),i.unicode=ooe(t.unicode,!1),i.tokenPostfix=roe(t.tokenPostfix,"."+i.languageId),i.defaultToken=roe(t.defaultToken,"source"),i.usesEmbedded=!1;const n=t;function s(e,o,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw T8(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw T8(i,"include target '"+r+"' is not defined at: "+e);s(e+"."+r,o,t.tokenizer[r])}else{const t=new coe(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw T8(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw T8(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=ooe(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}o.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw T8(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const r in t.tokenizer)if(t.tokenizer.hasOwnProperty(r)){i.start||(i.start=r);const e=t.tokenizer[r];i.tokenizer[r]=new Array,s("tokenizer."+r,i.tokenizer[r],e)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw T8(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const o=[];for(const r of t.brackets){let e=r;if(e&&Array.isArray(e)&&3===e.length&&(e={token:e[2],open:e[0],close:e[1]}),e.open===e.close)throw T8(i,"open and close brackets in a 'brackets' attribute must be different: "+e.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof e.open||"string"!=typeof e.token||"string"!=typeof e.close)throw T8(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");o.push({token:e.token+i.tokenPostfix,open:E8(i,e.open),close:E8(i,e.close)})}return i.brackets=o,i.noThrow=!0,i}var goe=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function poe(e){Hu.registerLanguage(e)}function moe(){let e=[];return e=e.concat(Hu.getLanguages()),e}function foe(e){return mse.get(yc).languageIdCodec.encodeLanguageId(e)}function _oe(e,t){return mse.withServices((()=>{const i=mse.get(yc).onDidRequestRichLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))}function voe(e,t){return mse.withServices((()=>{const i=mse.get(yc).onDidRequestBasicLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))}function boe(e,t){if(!mse.get(yc).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return mse.get(Xu).register(e,t,100)}class Coe{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return woe.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new vC(n.tokens,n.endState)}}class woe{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,o=e.length;s0&&s[o-1]===a)continue;let h=e.startIndex;0===l?h=0:hgoe(this,void 0,void 0,(function*(){const i=yield Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?Loe(e,i):new j8(mse.get(yc),mse.get(z4),e,uoe(e,i),mse.get(uu)):null}))));return DC.registerFactory(e,i)}function Doe(e,t){if(!mse.get(yc).isRegisteredLanguageId(e))throw new Error(`Cannot set tokens provider for unknown language ${e}`);return yoe(t)?koe(e,{create:()=>t}):DC.register(e,Loe(e,t))}function xoe(e,t){return yoe(t)?koe(e,{create:()=>t}):DC.register(e,(t=>new j8(mse.get(yc),mse.get(z4),e,uoe(e,t),mse.get(uu)))(t))}function Noe(e,t){return mse.get(iL).referenceProvider.register(e,t)}function Eoe(e,t){return mse.get(iL).renameProvider.register(e,t)}function Ioe(e,t){return mse.get(iL).signatureHelpProvider.register(e,t)}function Moe(e,t){return mse.get(iL).hoverProvider.register(e,{provideHover:(e,i,n)=>{const s=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&s&&(e.range=new Mh(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn)),e.range||(e.range=new Mh(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})}function Toe(e,t){return mse.get(iL).documentSymbolProvider.register(e,t)}function Roe(e,t){return mse.get(iL).documentHighlightProvider.register(e,t)}function Aoe(e,t){return mse.get(iL).linkedEditingRangeProvider.register(e,t)}function Ooe(e,t){return mse.get(iL).definitionProvider.register(e,t)}function Poe(e,t){return mse.get(iL).implementationProvider.register(e,t)}function Foe(e,t){return mse.get(iL).typeDefinitionProvider.register(e,t)}function Boe(e,t){return mse.get(iL).codeLensProvider.register(e,t)}function Woe(e,t,i){return mse.get(iL).codeActionProvider.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,documentation:null==i?void 0:i.documentation,provideCodeActions:(e,i,n,s)=>{const o=mse.get(wN).read({resource:e.uri}).filter((e=>Mh.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:o,only:n.only,trigger:n.trigger},s)},resolveCodeAction:t.resolveCodeAction})}function Voe(e,t){return mse.get(iL).documentFormattingEditProvider.register(e,t)}function Hoe(e,t){return mse.get(iL).documentRangeFormattingEditProvider.register(e,t)}function zoe(e,t){return mse.get(iL).onTypeFormattingEditProvider.register(e,t)}function Uoe(e,t){return mse.get(iL).linkProvider.register(e,t)}function Koe(e,t){return mse.get(iL).completionProvider.register(e,t)}function joe(e,t){return mse.get(iL).colorProvider.register(e,t)}function qoe(e,t){return mse.get(iL).foldingRangeProvider.register(e,t)}function $oe(e,t){return mse.get(iL).declarationProvider.register(e,t)}function Goe(e,t){return mse.get(iL).selectionRangeProvider.register(e,t)}function Zoe(e,t){return mse.get(iL).documentSemanticTokensProvider.register(e,t)}function Yoe(e,t){return mse.get(iL).documentRangeSemanticTokensProvider.register(e,t)}function Xoe(e,t){return mse.get(iL).inlineCompletionsProvider.register(e,t)}function Qoe(e,t){return mse.get(iL).inlayHintsProvider.register(e,t)}qS.wrappingIndent.defaultValue=0,qS.glyphMargin.defaultValue=!1,qS.autoIndent.defaultValue=3,qS.overviewRulerLanes.defaultValue=2,pJ.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const Joe=aM();Joe.editor={create:xse,getEditors:Ise,getDiffEditors:Mse,onDidCreateEditor:Nse,onDidCreateDiffEditor:Ese,createDiffEditor:Tse,addCommand:Rse,addEditorAction:Ase,addKeybindingRule:Ose,addKeybindingRules:Pse,createModel:Fse,setModelLanguage:Bse,setModelMarkers:Wse,getModelMarkers:Hse,removeAllMarkers:Vse,onDidChangeMarkers:zse,getModels:Kse,getModel:Use,onDidCreateModel:jse,onWillDisposeModel:qse,onDidChangeModelLanguage:$se,createWebWorker:Gse,colorizeElement:Zse,colorize:Yse,colorizeModelLine:Xse,tokenize:Qse,defineTheme:Jse,setTheme:eoe,remeasureFonts:toe,registerCommand:ioe,registerLinkOpener:noe,registerEditorOpener:soe,AccessibilitySupport:wI,ContentWidgetPositionPreference:xI,CursorChangeReason:NI,DefaultEndOfLine:EI,EditorAutoIndentStrategy:MI,EditorOption:TI,EndOfLinePreference:RI,EndOfLineSequence:AI,MinimapPosition:UI,MouseTargetType:KI,OverlayWidgetPositionPreference:jI,OverviewRulerLane:qI,GlyphMarginLane:OI,RenderLineNumbersType:GI,RenderMinimap:ZI,ScrollbarVisibility:XI,ScrollType:YI,TextEditorCursorBlinkingStyle:iM,TextEditorCursorStyle:nM,TrackedRangeStickiness:sM,WrappingIndent:oM,InjectedTextCursorStops:FI,PositionAffinity:$I,ConfigurationChangedEvent:dS,BareFontInfo:VR,FontInfo:HR,TextModelResolvedOptions:Sd,FindMatch:Ld,ApplyUpdateResult:gS,EditorZoom:BR,EditorType:sF,EditorOptions:qS},Joe.languages={register:poe,getLanguages:moe,onLanguage:_oe,onLanguageEncountered:voe,getEncodedLanguageId:foe,setLanguageConfiguration:boe,setColorMap:Soe,registerTokensProviderFactory:koe,setTokensProvider:Doe,setMonarchTokensProvider:xoe,registerReferenceProvider:Noe,registerRenameProvider:Eoe,registerCompletionItemProvider:Koe,registerSignatureHelpProvider:Ioe,registerHoverProvider:Moe,registerDocumentSymbolProvider:Toe,registerDocumentHighlightProvider:Roe,registerLinkedEditingRangeProvider:Aoe,registerDefinitionProvider:Ooe,registerImplementationProvider:Poe,registerTypeDefinitionProvider:Foe,registerCodeLensProvider:Boe,registerCodeActionProvider:Woe,registerDocumentFormattingEditProvider:Voe,registerDocumentRangeFormattingEditProvider:Hoe,registerOnTypeFormattingEditProvider:zoe,registerLinkProvider:Uoe,registerColorProvider:joe,registerFoldingRangeProvider:qoe,registerDeclarationProvider:$oe,registerSelectionRangeProvider:Goe,registerDocumentSemanticTokensProvider:Zoe,registerDocumentRangeSemanticTokensProvider:Yoe,registerInlineCompletionsProvider:Xoe,registerInlayHintsProvider:Qoe,DocumentHighlightKind:II,CompletionItemKind:LI,CompletionItemTag:kI,CompletionItemInsertTextRule:SI,SymbolKind:eM,SymbolTag:tM,IndentAction:PI,CompletionTriggerKind:DI,SignatureHelpTriggerKind:JI,InlayHintKind:BI,InlineCompletionTriggerKind:WI,CodeActionTriggerType:yI,FoldingRangeKind:LC,SelectedSuggestionInfo:bC};const ere=Joe.CancellationTokenSource,tre=Joe.Emitter,ire=Joe.KeyCode,nre=Joe.KeyMod,sre=Joe.Position,ore=Joe.Range,rre=Joe.Selection,are=Joe.SelectionDirection,lre=Joe.MarkerSeverity,hre=Joe.MarkerTag,dre=Joe.Uri,cre=Joe.Token,ure=Joe.editor,gre=Joe.languages,pre=globalThis.MonacoEnvironment;((null==pre?void 0:pre.globalAPI)||"function"==typeof define&&i.amdO)&&(globalThis.monaco=Joe),void 0!==globalThis.require&&"function"==typeof globalThis.require.config&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});var mre,fre,_re=Object.defineProperty,vre=Object.getOwnPropertyDescriptor,bre=Object.getOwnPropertyNames,Cre=Object.prototype.hasOwnProperty,wre=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of bre(t))Cre.call(e,s)||s===i||_re(e,s,{get:()=>t[s],enumerable:!(n=vre(t,s))||n.enumerable});return e},yre={};wre(yre,mre=s,"default"),fre&&wre(fre,mre,"default");var Sre,Lre=new class{_onDidChange=new yre.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(e,t,i){this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});yre.languages.json={jsonDefaults:Lre},yre.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),yre.languages.onLanguage("json",(()=>{i.e(2499).then(i.bind(i,52499)).then((e=>e.setupMode(Lre)))})),self.MonacoEnvironment=(Sre={editorWorkerService:"editor.worker.js",json:"json.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var n=i.p,s=(n?n.replace(/\/$/,"")+"/":"")+Sre[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(s)){var o=String(window.location),r=o.substr(0,o.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(s.substring(0,r.length)!==r){/^(\/\/)/.test(s)&&(s=window.location.protocol+s);var a=new Blob(["/*"+t+'*/importScripts("'+s+'");'],{type:"application/javascript"});return URL.createObjectURL(a)}}return s}});const kre=n},39781:(e,t,i)=>{i.r(t),i.d(t,{MonacoDiffEditor:()=>h,default:()=>g,monaco:()=>n});var n=i(85868),s=i(63696);function o(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function r(){}var a=function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i{i.r(t),i.d(t,{default:()=>o});i(63696);var n=i(92303),s=i(62540);function o(e){let{children:t,fallback:i}=e;return(0,n.A)()?(0,s.jsx)(s.Fragment,{children:t?.()}):i??null}}}]); \ No newline at end of file +/*! For license information please see 9295.254bd121.js.LICENSE.txt */ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[9295],{85868:(e,t,i)=>{i.r(t),i.d(t,{CancellationTokenSource:()=>ere,Emitter:()=>tre,KeyCode:()=>ire,KeyMod:()=>nre,MarkerSeverity:()=>lre,MarkerTag:()=>hre,Position:()=>sre,Range:()=>ore,Selection:()=>rre,SelectionDirection:()=>are,Token:()=>cre,Uri:()=>dre,default:()=>kre,editor:()=>ure,languages:()=>gre});var n={};i.r(n),i.d(n,{CancellationTokenSource:()=>ere,Emitter:()=>tre,KeyCode:()=>ire,KeyMod:()=>nre,MarkerSeverity:()=>lre,MarkerTag:()=>hre,Position:()=>sre,Range:()=>ore,Selection:()=>rre,SelectionDirection:()=>are,Token:()=>cre,Uri:()=>dre,editor:()=>ure,languages:()=>gre});var s={};i.r(s),i.d(s,{CancellationTokenSource:()=>ere,Emitter:()=>tre,KeyCode:()=>ire,KeyMod:()=>nre,MarkerSeverity:()=>lre,MarkerTag:()=>hre,Position:()=>sre,Range:()=>ore,Selection:()=>rre,SelectionDirection:()=>are,Token:()=>cre,Uri:()=>dre,default:()=>kre,editor:()=>ure,languages:()=>gre});const o=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(m.isErrorNoTelemetry(e))throw new m(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function r(e){d(e)||o.onUnexpectedError(e)}function a(e){d(e)||o.onUnexpectedExternalError(e)}function l(e){if(e instanceof Error){const{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack,noTelemetry:m.isErrorNoTelemetry(e)}}return e}const h="Canceled";function d(e){return e instanceof c||e instanceof Error&&e.name===h&&e.message===h}class c extends Error{constructor(){super(h),this.name=this.message}}function u(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function g(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class p extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class m extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof m)return e;const t=new m;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}function _(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}var v;!function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const i=Object.freeze([]);function*n(e){yield e}e.empty=function(){return i},e.single=n,e.wrap=function(e){return t(e)?e:n(e)},e.from=function(e){return e||i},e.reverse=function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const s of e)n=t(n,s);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);ts}]}}(v||(v={}));let b=null;function C(e){return null==b||b.trackDisposable(e),e}function w(e){null==b||b.markAsDisposed(e)}function y(e,t){null==b||b.setParent(e,t)}function S(e){return null==b||b.markAsSingleton(e),e}function L(e){return"function"==typeof e.dispose&&0===e.dispose.length}function k(e){if(v.is(e)){const i=[];for(const n of e)if(n)try{n.dispose()}catch(t){i.push(t)}if(1===i.length)throw i[0];if(i.length>1)throw new AggregateError(i,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function D(...e){const t=x((()=>k(e)));return function(e,t){if(b)for(const i of e)b.setParent(i,t)}(e,t),t}function x(e){const t=C({dispose:_((()=>{w(t),e()}))});return t}class N{constructor(){this._toDispose=new Set,this._isDisposed=!1,C(this)}dispose(){this._isDisposed||(w(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{k(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return y(e,this),this._isDisposed?N.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),y(e,null))}}N.DISABLE_DISPOSED_WARNING=!1;class E{constructor(){this._store=new N,C(this),y(this._store,this)}dispose(){w(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}E.None=Object.freeze({dispose(){}});class I{constructor(){this._isDisposed=!1,C(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),e&&y(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,w(this),null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}}class M{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0==--this._counter&&this._disposable.dispose(),this}}class T{constructor(e){this.object=e}dispose(){}}class R{constructor(){this._store=new Map,this._isDisposed=!1,C(this)}dispose(){w(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{k(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){var n;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||null===(n=this._store.get(e))||void 0===n||n.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;null===(t=this._store.get(e))||void 0===t||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}class A{constructor(e){this.element=e,this.next=A.Undefined,this.prev=A.Undefined}}A.Undefined=new A(void 0);class O{constructor(){this._first=A.Undefined,this._last=A.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===A.Undefined}clear(){let e=this._first;for(;e!==A.Undefined;){const t=e.next;e.prev=A.Undefined,e.next=A.Undefined,e=t}this._first=A.Undefined,this._last=A.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new A(e);if(this._first===A.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==A.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==A.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==A.Undefined&&e.next!==A.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===A.Undefined&&e.next===A.Undefined?(this._first=A.Undefined,this._last=A.Undefined):e.next===A.Undefined?(this._last=this._last.prev,this._last.next=A.Undefined):e.prev===A.Undefined&&(this._first=this._first.next,this._first.prev=A.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==A.Undefined;)yield e.element,e=e.next}}const P=globalThis.performance&&"function"==typeof globalThis.performance.now;class F{static create(e){return new F(e)}constructor(e){this._now=P&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}var B;!function(e){function t(e){false}function i(e){return(t,i=null,n)=>{let s,o=!1;return s=e((e=>{if(!o)return s?s.dispose():o=!0,t.call(i,e)}),null,n),o&&s.dispose(),s}}function n(e,t,i){return o(((i,n=null,s)=>e((e=>i.call(n,t(e))),null,s)),i)}function s(e,t,i){return o(((i,n=null,s)=>e((e=>t(e)&&i.call(n,e)),null,s)),i)}function o(e,i){let n;const s={onWillAddFirstListener(){n=e(o.fire,o)},onDidRemoveLastListener(){null==n||n.dispose()}};i||t();const o=new U(s);return null==i||i.add(o),o.event}function r(e,i,n=100,s=!1,o=!1,r,a){let l,h,d,c,u=0;const g={leakWarningThreshold:r,onWillAddFirstListener(){l=e((e=>{u++,h=i(h,e),s&&!d&&(p.fire(h),h=void 0),c=()=>{const e=h;h=void 0,d=void 0,(!s||u>1)&&p.fire(e),u=0},"number"==typeof n?(clearTimeout(d),d=setTimeout(c,n)):void 0===d&&(d=0,queueMicrotask(c))}))},onWillRemoveListener(){o&&u>0&&(null==c||c())},onDidRemoveLastListener(){c=void 0,l.dispose()}};a||t();const p=new U(g);return null==a||a.add(p),p.event}e.None=()=>E.None,e.defer=function(e,t){return r(e,(()=>{}),0,void 0,!0,void 0,t)},e.once=i,e.map=n,e.forEach=function(e,t,i){return o(((i,n=null,s)=>e((e=>{t(e),i.call(n,e)}),null,s)),i)},e.filter=s,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>function(e,t){t instanceof Array?t.push(e):t&&t.add(e);return e}(D(...e.map((e=>e((e=>t.call(i,e)))))),n)},e.reduce=function(e,t,i,s){let o=i;return n(e,(e=>(o=t(o,e),o)),s)},e.debounce=r,e.accumulate=function(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,!0,void 0,n)},e.latch=function(e,t=(e,t)=>e===t,i){let n,o=!0;return s(e,(e=>{const i=o||!t(e,n);return o=!1,n=e,i}),i)},e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[],n){let s=i.slice(),o=e((e=>{s?s.push(e):a.fire(e)}));n&&n.add(o);const r=()=>{null==s||s.forEach((e=>a.fire(e))),s=null},a=new U({onWillAddFirstListener(){o||(o=e((e=>a.fire(e))),n&&n.add(o))},onDidAddFirstListener(){s&&(t?setTimeout(r):r())},onDidRemoveLastListener(){o&&o.dispose(),o=null}});return n&&n.add(a),a.event},e.chain=function(e,t){return(i,n,s)=>{const o=t(new l);return e((function(e){const t=o.evaluate(e);t!==a&&i.call(n,t)}),void 0,s)}};const a=Symbol("HaltChainable");class l{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:a)),this}reduce(e,t){let i=t;return this.steps.push((t=>(i=e(i,t),i))),this}latch(e=(e,t)=>e===t){let t,i=!0;return this.steps.push((n=>{const s=i||!e(n,t);return i=!1,t=n,s?n:a})),this}evaluate(e){for(const t of this.steps)if((e=t(e))===a)break;return e}}e.fromNodeEventEmitter=function(e,t,i=e=>e){const n=(...e)=>s.fire(i(...e)),s=new U({onWillAddFirstListener:()=>e.on(t,n),onDidRemoveLastListener:()=>e.removeListener(t,n)});return s.event},e.fromDOMEventEmitter=function(e,t,i=e=>e){const n=(...e)=>s.fire(i(...e)),s=new U({onWillAddFirstListener:()=>e.addEventListener(t,n),onDidRemoveLastListener:()=>e.removeEventListener(t,n)});return s.event},e.toPromise=function(e){return new Promise((t=>i(e)(t)))},e.fromPromise=function(e){const t=new U;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},e.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))},e.runAndSubscribeWithStore=function(e,t){let i=null;function n(e){null==i||i.dispose(),i=new N,t(e,i)}n(void 0);const s=e((e=>n(e)));return x((()=>{s.dispose(),null==i||i.dispose()}))};class h{constructor(e,i){this._observable=e,this._counter=0,this._hasChanged=!1;const n={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};i||t(),this.emitter=new U(n),i&&i.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new h(e,t).emitter.event},e.fromObservableLight=function(e){return t=>{let i=0,n=!1;const s={beginUpdate(){i++},endUpdate(){i--,0===i&&(e.reportChanges(),n&&(n=!1,t()))},handlePossibleChange(){},handleChange(){n=!0}};return e.addObserver(s),e.reportChanges(),{dispose(){e.removeObserver(s)}}}}}(B||(B={}));class W{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${W._idPool++}`,W.all.add(this)}start(e){this._stopWatch=new F,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}W.all=new Set,W._idPool=0;class V{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;null===(e=this._stacks)||void 0===e||e.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}}class H{static create(){var e;return new H(null!==(e=(new Error).stack)&&void 0!==e?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}}class z{constructor(e){this.value=e}}class U{constructor(e){var t,i,n,s,o;this._size=0,this._options=e,this._leakageMon=(null===(t=this._options)||void 0===t?void 0:t.leakWarningThreshold)?new V(null!==(n=null===(i=this._options)||void 0===i?void 0:i.leakWarningThreshold)&&void 0!==n?n:-1):void 0,this._perfMon=(null===(s=this._options)||void 0===s?void 0:s._profName)?new W(this._options._profName):void 0,this._deliveryQueue=null===(o=this._options)||void 0===o?void 0:o.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,(null===(e=this._deliveryQueue)||void 0===e?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),null===(i=null===(t=this._options)||void 0===t?void 0:t.onDidRemoveLastListener)||void 0===i||i.call(t),null===(n=this._leakageMon)||void 0===n||n.dispose())}get event(){var e;return null!==(e=this._event)&&void 0!==e||(this._event=(e,t,i)=>{var n,s,o,r,a;if(this._leakageMon&&this._size>3*this._leakageMon.threshold)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),E.None;if(this._disposed)return E.None;t&&(e=e.bind(t));const l=new z(e);let h;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(l.stack=H.create(),h=this._leakageMon.check(l.stack,this._size+1)),this._listeners?this._listeners instanceof z?(null!==(a=this._deliveryQueue)&&void 0!==a||(this._deliveryQueue=new K),this._listeners=[this._listeners,l]):this._listeners.push(l):(null===(s=null===(n=this._options)||void 0===n?void 0:n.onWillAddFirstListener)||void 0===s||s.call(n,this),this._listeners=l,null===(r=null===(o=this._options)||void 0===o?void 0:o.onDidAddFirstListener)||void 0===r||r.call(o,this)),this._size++;const d=x((()=>{null==h||h(),this._removeListener(l)}));return i instanceof N?i.add(d):Array.isArray(i)&&i.push(d),d}),this._event}_removeListener(e){var t,i,n,s;if(null===(i=null===(t=this._options)||void 0===t?void 0:t.onWillRemoveListener)||void 0===i||i.call(t,this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,null===(s=null===(n=this._options)||void 0===n?void 0:n.onDidRemoveLastListener)||void 0===s||s.call(n,this),void(this._size=0);const o=this._listeners,r=o.indexOf(e);if(-1===r)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,o[r]=void 0;const a=this._deliveryQueue.current===this;if(2*this._size<=o.length){let e=0;for(let t=0;t0}}class K{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class j extends U{constructor(e){super(e),this._isPaused=0,this._eventQueue=new O,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class q extends j{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class $ extends U{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=null==e?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class G{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new U({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};this.events.push(t),this.hasListeners&&this.hook(t);return x(_((()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)})))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((e=>this.emitter.fire(e)))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}class Z{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class Y{constructor(){this.listening=!1,this.inputEvent=B.None,this.inputEventListener=E.None,this.emitter=new U({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}class X{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}X.INSTANCE=new X;class Q extends E{constructor(){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;null===(t=this._mediaQueryList)||void 0===t||t.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class J extends E{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new Q);this._register(e.onDidChange((()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)})))}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}function ee(e,t){"string"==typeof e&&(e=window.matchMedia(e)),e.addEventListener("change",t)}const te=new class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=S(new J)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};const ie=navigator.userAgent,ne=ie.indexOf("Firefox")>=0,se=ie.indexOf("AppleWebKit")>=0,oe=ie.indexOf("Chrome")>=0,re=!oe&&ie.indexOf("Safari")>=0,ae=!oe&&!re&&se,le=(ie.indexOf("Electron/"),ie.indexOf("Android")>=0);let he=!1;if(window.matchMedia){const e=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=window.matchMedia("(display-mode: fullscreen)");he=e.matches,ee(e,(({matches:e})=>{he&&t.matches||(he=e)}))}let de="undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function ce(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],s=t[n];let o=e;return"string"==typeof s?o=s:"number"!=typeof s&&"boolean"!=typeof s&&null!=s||(o=String(s)),o})),de&&(i="\uff3b"+i.replace(/[aouei]/g,"$&$&")+"\uff3d"),i}function ue(e,t,...i){return ce(t,i)}var ge;const pe="en";let me,fe,_e=!1,ve=!1,be=!1,Ce=!1,we=!1,ye=!1,Se=!1,Le=!1,ke=!1,De=!1,xe=pe,Ne=null,Ee=null;const Ie="object"==typeof self?self:"object"==typeof i.g?i.g:{};let Me;void 0!==Ie.vscode&&void 0!==Ie.vscode.process?Me=Ie.vscode.process:"undefined"!=typeof process&&(Me=process);const Te="string"==typeof(null===(ge=null==Me?void 0:Me.versions)||void 0===ge?void 0:ge.electron),Re=Te&&"renderer"===(null==Me?void 0:Me.type);if("object"!=typeof navigator||Re)if("object"==typeof Me){_e="win32"===Me.platform,ve="darwin"===Me.platform,be="linux"===Me.platform,Ce=be&&!!Me.env.SNAP&&!!Me.env.SNAP_REVISION,Se=Te,ke=!!Me.env.CI||!!Me.env.BUILD_ARTIFACTSTAGINGDIRECTORY,me=pe,xe=pe;const e=Me.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];me=t.locale,Ne=t.osLocale,xe=i||pe,Ee=t._translationsConfigFile}catch(Dre){}we=!0}else console.error("Unable to resolve platform.");else{fe=navigator.userAgent,_e=fe.indexOf("Windows")>=0,ve=fe.indexOf("Macintosh")>=0,Le=(fe.indexOf("Macintosh")>=0||fe.indexOf("iPad")>=0||fe.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,be=fe.indexOf("Linux")>=0,De=(null==fe?void 0:fe.indexOf("Mobi"))>=0,ye=!0;me=void ue(0,"_")||pe,xe=me,Ne=navigator.language}let Ae=0;ve?Ae=1:_e?Ae=3:be&&(Ae=2);const Oe=_e,Pe=ve,Fe=be,Be=we,We=ye,Ve=ye&&"function"==typeof Ie.importScripts,He=Le,ze=De,Ue=fe,Ke=xe,je="function"==typeof Ie.postMessage&&!Ie.importScripts,qe=(()=>{if(je){const e=[];Ie.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),Ie.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),$e=ve||Le?2:_e?1:3;let Ge=!0,Ze=!1;function Ye(){if(!Ze){Ze=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);Ge=513===t[0]}return Ge}const Xe=!!(Ue&&Ue.indexOf("Chrome")>=0),Qe=!!(Ue&&Ue.indexOf("Firefox")>=0),Je=!!(!Xe&&Ue&&Ue.indexOf("Safari")>=0),et=!!(Ue&&Ue.indexOf("Edg/")>=0),tt=(Ue&&Ue.indexOf("Android"),Be||document.queryCommandSupported&&document.queryCommandSupported("copy")||navigator&&navigator.clipboard&&navigator.clipboard.writeText,Be||navigator&&navigator.clipboard&&navigator.clipboard.readText,Be||he||navigator.keyboard,"ontouchstart"in window||navigator.maxTouchPoints,window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0));class it{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const nt=new it,st=new it,ot=new it,rt=new Array(230),at={},lt=[],ht=Object.create(null),dt=Object.create(null),ct=[],ut=[];for(let xre=0;xre<=193;xre++)ct[xre]=-1;for(let xre=0;xre<=132;xre++)ut[xre]=-1;var gt;function pt(e,t){return(e|(65535&t)<<16>>>0)>>>0}function mt(e,t){if("number"==typeof e){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new vt(0!==n?[ft(i,t),ft(n,t)]:[ft(i,t)])}{const i=[];for(let n=0;n=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return nt.keyCodeToStr(e)}}(gt||(gt={}));class _t{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return e instanceof _t&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class vt{constructor(e){if(0===e.length)throw u("chords");this.chords=e}}class bt{constructor(e,t,i,n,s,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=o}}class Ct{}const wt=Pe?256:2048,yt=Pe?2048:256;class St{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=function(e){if(e.charCode){const t=String.fromCharCode(e.charCode).toUpperCase();return gt.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(ne)switch(t){case 59:return 85;case 60:if(Fe)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Pe)return 57}else if(se){if(Pe&&93===t)return 57;if(!Pe&&92===t)return 57}return rt[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=wt),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=yt),t|=e,t}_computeKeyCodeChord(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new _t(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let Lt=!1,kt=null;function Dt(e){if(!e.parent||e.parent===e)return null;try{const t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return Lt=!0,null}catch(Dre){return Lt=!0,null}return e.parent}class xt{static getSameOriginWindowChain(){if(!kt){kt=[];let e,t=window;do{e=Dt(t),e?kt.push({window:t,iframeElement:t.frameElement||null}):kt.push({window:t,iframeElement:null}),t=e}while(t)}return kt.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;const s=this.getSameOriginWindowChain();for(const o of s){if(i+=o.window.scrollY,n+=o.window.scrollX,o.window===t)break;if(!o.iframeElement)break;const e=o.iframeElement.getBoundingClientRect();i+=e.top,n+=e.left}return{top:i,left:n}}}class Nt{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=e.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const t=xt.getPositionOfChildWindowRelativeToAncestorWindow(window,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class Et{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){const t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?this.deltaY=ne&&!Pe?-e.deltaY/3:-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)this.deltaX=re&&Oe?-t.wheelDeltaX/120:t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?this.deltaX=ne&&!Pe?-e.deltaX/3:-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;null===(e=this.browserEvent)||void 0===e||e.preventDefault()}stopPropagation(){var e;null===(e=this.browserEvent)||void 0===e||e.stopPropagation()}}const{entries:It,setPrototypeOf:Mt,isFrozen:Tt,getPrototypeOf:Rt,getOwnPropertyDescriptor:At}=Object;let{freeze:Ot,seal:Pt,create:Ft}=Object,{apply:Bt,construct:Wt}="undefined"!=typeof Reflect&&Reflect;Bt||(Bt=function(e,t,i){return e.apply(t,i)}),Ot||(Ot=function(e){return e}),Pt||(Pt=function(e){return e}),Wt||(Wt=function(e,t){return new e(...t)});const Vt=Qt(Array.prototype.forEach),Ht=Qt(Array.prototype.pop),zt=Qt(Array.prototype.push),Ut=Qt(String.prototype.toLowerCase),Kt=Qt(String.prototype.toString),jt=Qt(String.prototype.match),qt=Qt(String.prototype.replace),$t=Qt(String.prototype.indexOf),Gt=Qt(String.prototype.trim),Zt=Qt(RegExp.prototype.test),Yt=(Xt=TypeError,function(){for(var e=arguments.length,t=new Array(e),i=0;i1?i-1:0),s=1;s/gm),mi=Pt(/\${[\w\W]*}/gm),fi=Pt(/^data-[\-\w.\u00B7-\uFFFF]/),_i=Pt(/^aria-[\-\w]+$/),vi=Pt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bi=Pt(/^(?:\w+script|data):/i),Ci=Pt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wi=Pt(/^html$/i);var yi=Object.freeze({__proto__:null,MUSTACHE_EXPR:gi,ERB_EXPR:pi,TMPLIT_EXPR:mi,DATA_ATTR:fi,ARIA_ATTR:_i,IS_ALLOWED_URI:vi,IS_SCRIPT_OR_DATA:bi,ATTR_WHITESPACE:Ci,DOCTYPE_NAME:wi});const Si=()=>"undefined"==typeof window?null:window;var Li=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Si();const i=t=>e(t);if(i.version="3.0.5",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;const n=t.document,s=n.currentScript;let{document:o}=t;const{DocumentFragment:r,HTMLTemplateElement:a,Node:l,Element:h,NodeFilter:d,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:g,trustedTypes:p}=t,m=h.prototype,f=ti(m,"cloneNode"),_=ti(m,"nextSibling"),v=ti(m,"childNodes"),b=ti(m,"parentNode");if("function"==typeof a){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let C,w="";const{implementation:y,createNodeIterator:S,createDocumentFragment:L,getElementsByTagName:k}=o,{importNode:D}=n;let x={};i.isSupported="function"==typeof It&&"function"==typeof b&&y&&void 0!==y.createHTMLDocument;const{MUSTACHE_EXPR:N,ERB_EXPR:E,TMPLIT_EXPR:I,DATA_ATTR:M,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:A}=yi;let{IS_ALLOWED_URI:O}=yi,P=null;const F=Jt({},[...ii,...ni,...si,...ri,...li]);let B=null;const W=Jt({},[...hi,...di,...ci,...ui]);let V=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,z=null,U=!0,K=!0,j=!1,q=!0,$=!1,G=!1,Z=!1,Y=!1,X=!1,Q=!1,J=!1,ee=!0,te=!1,ie=!0,ne=!1,se={},oe=null;const re=Jt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ae=null;const le=Jt({},["audio","video","img","source","image","track"]);let he=null;const de=Jt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ce="http://www.w3.org/1998/Math/MathML",ue="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let pe=ge,me=!1,fe=null;const _e=Jt({},[ce,ue,ge],Kt);let ve;const be=["application/xhtml+xml","text/html"];let Ce,we=null;const ye=o.createElement("form"),Se=function(e){return e instanceof RegExp||e instanceof Function},Le=function(e){if(!we||we!==e){if(e&&"object"==typeof e||(e={}),e=ei(e),ve=ve=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ce="application/xhtml+xml"===ve?Kt:Ut,P="ALLOWED_TAGS"in e?Jt({},e.ALLOWED_TAGS,Ce):F,B="ALLOWED_ATTR"in e?Jt({},e.ALLOWED_ATTR,Ce):W,fe="ALLOWED_NAMESPACES"in e?Jt({},e.ALLOWED_NAMESPACES,Kt):_e,he="ADD_URI_SAFE_ATTR"in e?Jt(ei(de),e.ADD_URI_SAFE_ATTR,Ce):de,ae="ADD_DATA_URI_TAGS"in e?Jt(ei(le),e.ADD_DATA_URI_TAGS,Ce):le,oe="FORBID_CONTENTS"in e?Jt({},e.FORBID_CONTENTS,Ce):re,H="FORBID_TAGS"in e?Jt({},e.FORBID_TAGS,Ce):{},z="FORBID_ATTR"in e?Jt({},e.FORBID_ATTR,Ce):{},se="USE_PROFILES"in e&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,j=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,$=e.SAFE_FOR_TEMPLATES||!1,G=e.WHOLE_DOCUMENT||!1,X=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ne=e.IN_PLACE||!1,O=e.ALLOWED_URI_REGEXP||vi,pe=e.NAMESPACE||ge,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),$&&(K=!1),Q&&(X=!0),se&&(P=Jt({},[...li]),B=[],!0===se.html&&(Jt(P,ii),Jt(B,hi)),!0===se.svg&&(Jt(P,ni),Jt(B,di),Jt(B,ui)),!0===se.svgFilters&&(Jt(P,si),Jt(B,di),Jt(B,ui)),!0===se.mathMl&&(Jt(P,ri),Jt(B,ci),Jt(B,ui))),e.ADD_TAGS&&(P===F&&(P=ei(P)),Jt(P,e.ADD_TAGS,Ce)),e.ADD_ATTR&&(B===W&&(B=ei(B)),Jt(B,e.ADD_ATTR,Ce)),e.ADD_URI_SAFE_ATTR&&Jt(he,e.ADD_URI_SAFE_ATTR,Ce),e.FORBID_CONTENTS&&(oe===re&&(oe=ei(oe)),Jt(oe,e.FORBID_CONTENTS,Ce)),ie&&(P["#text"]=!0),G&&Jt(P,["html","head","body"]),P.table&&(Jt(P,["tbody"]),delete H.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,w=C.createHTML("")}else void 0===C&&(C=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:e=>e,createScriptURL:e=>e})}catch(o){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}(p,s)),null!==C&&"string"==typeof w&&(w=C.createHTML(""));Ot&&Ot(e),we=e}},ke=Jt({},["mi","mo","mn","ms","mtext"]),De=Jt({},["foreignobject","desc","title","annotation-xml"]),xe=Jt({},["title","style","font","a","script"]),Ne=Jt({},ni);Jt(Ne,si),Jt(Ne,oi);const Ee=Jt({},ri);Jt(Ee,ai);const Ie=function(e){zt(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Me=function(e,t){try{zt(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(n){zt(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!B[e])if(X||Q)try{Ie(t)}catch(n){}else try{t.setAttribute(e,"")}catch(n){}},Te=function(e){let t,i;if(Y)e=""+e;else{const t=jt(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===ve&&pe===ge&&(e=''+e+"");const n=C?C.createHTML(e):e;if(pe===ge)try{t=(new g).parseFromString(n,ve)}catch(r){}if(!t||!t.documentElement){t=y.createDocument(pe,"template",null);try{t.documentElement.innerHTML=me?w:n}catch(r){}}const s=t.body||t.documentElement;return e&&i&&s.insertBefore(o.createTextNode(i),s.childNodes[0]||null),pe===ge?k.call(t,G?"html":"body")[0]:G?t.documentElement:s},Re=function(e){return S.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},Ae=function(e){return"object"==typeof l?e instanceof l:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Oe=function(e,t,n){x[e]&&Vt(x[e],(e=>{e.call(i,t,n,we)}))},Pe=function(e){let t;if(Oe("beforeSanitizeElements",e,null),(n=e)instanceof u&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof c)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return Ie(e),!0;var n;const s=Ce(e.nodeName);if(Oe("uponSanitizeElement",e,{tagName:s,allowedTags:P}),e.hasChildNodes()&&!Ae(e.firstElementChild)&&(!Ae(e.content)||!Ae(e.content.firstElementChild))&&Zt(/<[/\w]/g,e.innerHTML)&&Zt(/<[/\w]/g,e.textContent))return Ie(e),!0;if(!P[s]||H[s]){if(!H[s]&&Be(s)){if(V.tagNameCheck instanceof RegExp&&Zt(V.tagNameCheck,s))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(s))return!1}if(ie&&!oe[s]){const t=b(e)||e.parentNode,i=v(e)||e.childNodes;if(i&&t){for(let n=i.length-1;n>=0;--n)t.insertBefore(f(i[n],!0),_(e))}}return Ie(e),!0}return e instanceof h&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});const i=Ut(e.tagName),n=Ut(t.tagName);return!!fe[e.namespaceURI]&&(e.namespaceURI===ue?t.namespaceURI===ge?"svg"===i:t.namespaceURI===ce?"svg"===i&&("annotation-xml"===n||ke[n]):Boolean(Ne[i]):e.namespaceURI===ce?t.namespaceURI===ge?"math"===i:t.namespaceURI===ue?"math"===i&&De[n]:Boolean(Ee[i]):e.namespaceURI===ge?!(t.namespaceURI===ue&&!De[n])&&!(t.namespaceURI===ce&&!ke[n])&&!Ee[i]&&(xe[i]||!Ne[i]):!("application/xhtml+xml"!==ve||!fe[e.namespaceURI]))}(e)?(Ie(e),!0):"noscript"!==s&&"noembed"!==s&&"noframes"!==s||!Zt(/<\/no(script|embed|frames)/i,e.innerHTML)?($&&3===e.nodeType&&(t=e.textContent,t=qt(t,N," "),t=qt(t,E," "),t=qt(t,I," "),e.textContent!==t&&(zt(i.removed,{element:e.cloneNode()}),e.textContent=t)),Oe("afterSanitizeElements",e,null),!1):(Ie(e),!0)},Fe=function(e,t,i){if(ee&&("id"===t||"name"===t)&&(i in o||i in ye))return!1;if(K&&!z[t]&&Zt(M,t));else if(U&&Zt(T,t));else if(!B[t]||z[t]){if(!(Be(e)&&(V.tagNameCheck instanceof RegExp&&Zt(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&Zt(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&Zt(V.tagNameCheck,i)||V.tagNameCheck instanceof Function&&V.tagNameCheck(i))))return!1}else if(he[t]);else if(Zt(O,qt(i,A,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==$t(i,"data:")||!ae[e]){if(j&&!Zt(R,qt(i,A,"")));else if(i)return!1}else;return!0},Be=function(e){return e.indexOf("-")>0},We=function(e){let t,n,s,o;Oe("beforeSanitizeAttributes",e,null);const{attributes:r}=e;if(!r)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B};for(o=r.length;o--;){t=r[o];const{name:h,namespaceURI:d}=t;if(n="value"===h?t.value:Gt(t.value),s=Ce(h),a.attrName=s,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,Oe("uponSanitizeAttribute",e,a),n=a.attrValue,a.forceKeepAttr)continue;if(Me(h,e),!a.keepAttr)continue;if(!q&&Zt(/\/>/i,n)){Me(h,e);continue}$&&(n=qt(n,N," "),n=qt(n,E," "),n=qt(n,I," "));const c=Ce(e.nodeName);if(Fe(c,s,n)){if(!te||"id"!==s&&"name"!==s||(Me(h,e),n="user-content-"+n),C&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(d);else switch(p.getAttributeType(c,s)){case"TrustedHTML":n=C.createHTML(n);break;case"TrustedScriptURL":n=C.createScriptURL(n)}try{d?e.setAttributeNS(d,h,n):e.setAttribute(h,n),Ht(i.removed)}catch(l){}}}Oe("afterSanitizeAttributes",e,null)},Ve=function e(t){let i;const n=Re(t);for(Oe("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)Oe("uponSanitizeShadowNode",i,null),Pe(i)||(i.content instanceof r&&e(i.content),We(i));Oe("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e){let t,s,o,a,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(me=!e,me&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ae(e)){if("function"!=typeof e.toString)throw Yt("toString is not a function");if("string"!=typeof(e=e.toString()))throw Yt("dirty is not a string, aborting")}if(!i.isSupported)return e;if(Z||Le(h),i.removed=[],"string"==typeof e&&(ne=!1),ne){if(e.nodeName){const t=Ce(e.nodeName);if(!P[t]||H[t])throw Yt("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)t=Te("\x3c!----\x3e"),s=t.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?t=s:t.appendChild(s);else{if(!X&&!$&&!G&&-1===e.indexOf("<"))return C&&J?C.createHTML(e):e;if(t=Te(e),!t)return X?null:J?w:""}t&&Y&&Ie(t.firstChild);const d=Re(ne?e:t);for(;o=d.nextNode();)Pe(o)||(o.content instanceof r&&Ve(o.content),We(o));if(ne)return e;if(X){if(Q)for(a=L.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(B.shadowroot||B.shadowrootmode)&&(a=D.call(n,a,!0)),a}let c=G?t.outerHTML:t.innerHTML;return G&&P["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&Zt(wi,t.ownerDocument.doctype.name)&&(c="\n"+c),$&&(c=qt(c,N," "),c=qt(c,E," "),c=qt(c,I," ")),C&&J?C.createHTML(c):c},i.setConfig=function(e){Le(e),Z=!0},i.clearConfig=function(){we=null,Z=!1},i.isValidAttribute=function(e,t,i){we||Le({});const n=Ce(e),s=Ce(t);return Fe(n,s,i)},i.addHook=function(e,t){"function"==typeof t&&(x[e]=x[e]||[],zt(x[e],t))},i.removeHook=function(e){if(x[e])return Ht(x[e])},i.removeHooks=function(e){x[e]&&(x[e]=[])},i.removeAllHooks=function(){x={}},i}();Li.version,Li.isSupported;const ki=Li.sanitize,Di=(Li.setConfig,Li.clearConfig,Li.isValidAttribute,Li.addHook),xi=Li.removeHook;Li.removeHooks,Li.removeAllHooks;let Ni;if(void 0!==Ie.vscode&&void 0!==Ie.vscode.process){const e=Ie.vscode.process;Ni={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else Ni="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return Oe?"win32":Pe?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const Ei=Ni.cwd,Ii=Ni.env,Mi=Ni.platform,Ti=46,Ri=47,Ai=92,Oi=58;class Pi extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const s=-1!==e.indexOf(".")?"property":"argument";let o=`The "${e}" ${s} ${n} of type ${t}`;o+=". Received type "+typeof i,super(o),this.code="ERR_INVALID_ARG_TYPE"}}function Fi(e,t){if("string"!=typeof e)throw new Pi(t,"string",e)}const Bi="win32"===Mi;function Wi(e){return e===Ri||e===Ai}function Vi(e){return e===Ri}function Hi(e){return e>=65&&e<=90||e>=97&&e<=122}function zi(e,t,i,n){let s="",o=0,r=-1,a=0,l=0;for(let h=0;h<=e.length;++h){if(h2){const e=s.lastIndexOf(i);-1===e?(s="",o=0):(s=s.slice(0,e),o=s.length-1-s.lastIndexOf(i)),r=h,a=0;continue}if(0!==s.length){s="",o=0,r=h,a=0;continue}}t&&(s+=s.length>0?`${i}..`:"..",o=2)}else s.length>0?s+=`${i}${e.slice(r+1,h)}`:s=e.slice(r+1,h),o=h-r-1;r=h,a=0}else l===Ti&&-1!==a?++a:a=-1}return s}function Ui(e,t){!function(e,t){if(null===e||"object"!=typeof e)throw new Pi(t,"Object",e)}(t,"pathObject");const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const Ki={resolve(...e){let t="",i="",n=!1;for(let s=e.length-1;s>=-1;s--){let o;if(s>=0){if(o=e[s],Fi(o,"path"),0===o.length)continue}else 0===t.length?o=Ei():(o=Ii[`=${t}`]||Ei(),(void 0===o||o.slice(0,2).toLowerCase()!==t.toLowerCase()&&o.charCodeAt(2)===Ai)&&(o=`${t}\\`));const r=o.length;let a=0,l="",h=!1;const d=o.charCodeAt(0);if(1===r)Wi(d)&&(a=1,h=!0);else if(Wi(d))if(h=!0,Wi(o.charCodeAt(1))){let e=2,t=e;for(;e2&&Wi(o.charCodeAt(2))&&(h=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(i=`${o.slice(a)}\\${i}`,n=h,h&&t.length>0)break}return i=zi(i,!n,"\\",Wi),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){Fi(e,"path");const t=e.length;if(0===t)return".";let i,n=0,s=!1;const o=e.charCodeAt(0);if(1===t)return Vi(o)?"\\":e;if(Wi(o))if(s=!0,Wi(e.charCodeAt(1))){let s=2,o=s;for(;s2&&Wi(e.charCodeAt(2))&&(s=!0,n=3));let r=n0&&Wi(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?s?`\\${r}`:r:s?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){Fi(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return Wi(i)||t>2&&Hi(i)&&e.charCodeAt(1)===Oi&&Wi(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let o=0;o0&&(void 0===t?t=i=n:t+=`\\${n}`)}if(void 0===t)return".";let n=!0,s=0;if("string"==typeof i&&Wi(i.charCodeAt(0))){++s;const e=i.length;e>1&&Wi(i.charCodeAt(1))&&(++s,e>2&&(Wi(i.charCodeAt(2))?++s:n=!1))}if(n){for(;s=2&&(t=`\\${t.slice(s)}`)}return Ki.normalize(t)},relative(e,t){if(Fi(e,"from"),Fi(t,"to"),e===t)return"";const i=Ki.resolve(e),n=Ki.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let s=0;for(;ss&&e.charCodeAt(o-1)===Ai;)o--;const r=o-s;let a=0;for(;aa&&t.charCodeAt(l-1)===Ai;)l--;const h=l-a,d=rd){if(t.charCodeAt(a+u)===Ai)return n.slice(a+u+1);if(2===u)return n.slice(a+u)}r>d&&(e.charCodeAt(s+u)===Ai?c=u:2===u&&(c=3)),-1===c&&(c=0)}let g="";for(u=s+c+1;u<=o;++u)u!==o&&e.charCodeAt(u)!==Ai||(g+=0===g.length?"..":"\\..");return a+=c,g.length>0?`${g}${n.slice(a,l)}`:(n.charCodeAt(a)===Ai&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=Ki.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===Ai){if(t.charCodeAt(1)===Ai){const e=t.charCodeAt(2);if(63!==e&&e!==Ti)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Hi(t.charCodeAt(0))&&t.charCodeAt(1)===Oi&&t.charCodeAt(2)===Ai)return`\\\\?\\${t}`;return e},dirname(e){Fi(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const s=e.charCodeAt(0);if(1===t)return Wi(s)?e:".";if(Wi(s)){if(i=n=1,Wi(e.charCodeAt(1))){let s=2,o=s;for(;s2&&Wi(e.charCodeAt(2))?3:2,n=i);let o=-1,r=!0;for(let a=t-1;a>=n;--a)if(Wi(e.charCodeAt(a))){if(!r){o=a;break}}else r=!1;if(-1===o){if(-1===i)return".";o=i}return e.slice(0,o)},basename(e,t){void 0!==t&&Fi(t,"ext"),Fi(e,"path");let i,n=0,s=-1,o=!0;if(e.length>=2&&Hi(e.charCodeAt(0))&&e.charCodeAt(1)===Oi&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(Wi(l)){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(s=i):(r=-1,s=a))}return n===s?s=a:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(Wi(e.charCodeAt(i))){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){Fi(e,"path");let t=0,i=-1,n=0,s=-1,o=!0,r=0;e.length>=2&&e.charCodeAt(1)===Oi&&Hi(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(Wi(t)){if(!o){n=a+1;break}}else-1===s&&(o=!1,s=a+1),t===Ti?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===s||0===r||1===r&&i===s-1&&i===n+1?"":e.slice(i,s)},format:Ui.bind(null,"\\"),parse(e){Fi(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,s=e.charCodeAt(0);if(1===i)return Wi(s)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(Wi(s)){if(n=1,Wi(e.charCodeAt(1))){let t=2,s=t;for(;t0&&(t.root=e.slice(0,n));let o=-1,r=n,a=-1,l=!0,h=e.length-1,d=0;for(;h>=n;--h)if(s=e.charCodeAt(h),Wi(s)){if(!l){r=h+1;break}}else-1===a&&(l=!1,a=h+1),s===Ti?-1===o?o=h:1!==d&&(d=1):-1!==o&&(d=-1);return-1!==a&&(-1===o||0===d||1===d&&o===a-1&&o===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,o),t.base=e.slice(r,a),t.ext=e.slice(o,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},ji=(()=>{if(Bi){const e=/\\/g;return()=>{const t=Ei().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>Ei()})(),qi={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const s=n>=0?e[n]:ji();Fi(s,"path"),0!==s.length&&(t=`${s}/${t}`,i=s.charCodeAt(0)===Ri)}return t=zi(t,!i,"/",Vi),i?`/${t}`:t.length>0?t:"."},normalize(e){if(Fi(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===Ri,i=e.charCodeAt(e.length-1)===Ri;return 0===(e=zi(e,!t,"/",Vi)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(Fi(e,"path"),e.length>0&&e.charCodeAt(0)===Ri),join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":qi.normalize(t)},relative(e,t){if(Fi(e,"from"),Fi(t,"to"),e===t)return"";if((e=qi.resolve(e))===(t=qi.resolve(t)))return"";const i=e.length,n=i-1,s=t.length-1,o=no){if(t.charCodeAt(1+a)===Ri)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>o&&(e.charCodeAt(1+a)===Ri?r=a:0===a&&(r=0));let l="";for(a=1+r+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==Ri||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+r)}`},toNamespacedPath:e=>e,dirname(e){if(Fi(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===Ri;let i=-1,n=!0;for(let s=e.length-1;s>=1;--s)if(e.charCodeAt(s)===Ri){if(!n){i=s;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&Fi(t,"ext"),Fi(e,"path");let i,n=0,s=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===Ri){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(s=i):(r=-1,s=a))}return n===s?s=a:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===Ri){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){Fi(e,"path");let t=-1,i=0,n=-1,s=!0,o=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==Ri)-1===n&&(s=!1,n=r+1),a===Ti?-1===t?t=r:1!==o&&(o=1):-1!==t&&(o=-1);else if(!s){i=r+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)},format:Ui.bind(null,"/"),parse(e){Fi(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===Ri;let n;i?(t.root="/",n=1):n=0;let s=-1,o=0,r=-1,a=!0,l=e.length-1,h=0;for(;l>=n;--l){const t=e.charCodeAt(l);if(t!==Ri)-1===r&&(a=!1,r=l+1),t===Ti?-1===s?s=l:1!==h&&(h=1):-1!==s&&(h=-1);else if(!a){o=l+1;break}}if(-1!==r){const n=0===o&&i?1:o;-1===s||0===h||1===h&&s===r-1&&s===o+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,s),t.base=e.slice(n,r),t.ext=e.slice(s,r))}return o>0?t.dir=e.slice(0,o-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};qi.win32=Ki.win32=Ki,qi.posix=Ki.posix=qi;const $i=Bi?Ki.normalize:qi.normalize,Gi=Bi?Ki.resolve:qi.resolve,Zi=Bi?Ki.relative:qi.relative,Yi=Bi?Ki.dirname:qi.dirname,Xi=Bi?Ki.basename:qi.basename,Qi=Bi?Ki.extname:qi.extname,Ji=Bi?Ki.sep:qi.sep,en=/^\w[\w\d+.-]*$/,tn=/^\//,nn=/^\/\//;const sn="",on="/",rn=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class an{static isUri(e){return e instanceof an||!!e&&("string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString)}constructor(e,t,i,n,s,o=!1){"object"==typeof e?(this.scheme=e.scheme||sn,this.authority=e.authority||sn,this.path=e.path||sn,this.query=e.query||sn,this.fragment=e.fragment||sn):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||sn,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==on&&(t=on+t):t=on}return t}(this.scheme,i||sn),this.query=n||sn,this.fragment=s||sn,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!en.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!tn.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(nn.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,o))}get fsPath(){return gn(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=sn),void 0===i?i=this.authority:null===i&&(i=sn),void 0===n?n=this.path:null===n&&(n=sn),void 0===s?s=this.query:null===s&&(s=sn),void 0===o?o=this.fragment:null===o&&(o=sn),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment?this:new hn(t,i,n,s,o)}static parse(e,t=!1){const i=rn.exec(e);return i?new hn(i[2]||sn,_n(i[4]||sn),_n(i[5]||sn),_n(i[7]||sn),_n(i[9]||sn),t):new hn(sn,sn,sn,sn,sn)}static file(e){let t=sn;if(Oe&&(e=e.replace(/\\/g,on)),e[0]===on&&e[1]===on){const i=e.indexOf(on,2);-1===i?(t=e.substring(2),e=on):(t=e.substring(2,i),e=e.substring(i)||on)}return new hn("file",t,e,sn,sn)}static from(e,t){return new hn(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=Oe&&"file"===e.scheme?an.file(Ki.join(gn(e,!0),...t)).path:qi.join(e.path,...t),e.with({path:i})}toString(e=!1){return pn(this,e)}toJSON(){return this}static revive(e){var t,i;if(e){if(e instanceof an)return e;{const n=new hn(e);return n._formatted=null!==(t=e.external)&&void 0!==t?t:null,n._fsPath=e._sep===ln&&null!==(i=e.fsPath)&&void 0!==i?i:null,n}}return e}}const ln=Oe?1:void 0;class hn extends an{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=gn(this,!1)),this._fsPath}toString(e=!1){return e?pn(this,!0):(this._formatted||(this._formatted=pn(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=ln),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const dn={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 cn(e,t,i){let n,s=-1;for(let o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));const t=dn[r];void 0!==t?(-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),n+=t):-1===s&&(s=o)}}return-1!==s&&(n+=encodeURIComponent(e.substring(s))),void 0!==n?n:e}function un(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,Oe&&(i=i.replace(/\//g,"\\")),i}function pn(e,t){const i=t?un:cn;let n="",{scheme:s,authority:o,path:r,query:a,fragment:l}=e;if(s&&(n+=s,n+=":"),(o||"file"===s)&&(n+=on,n+=on),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}o=o.toLowerCase(),e=o.lastIndexOf(":"),-1===e?n+=i(o,!1,!0):(n+=i(o.substr(0,e),!1,!0),n+=o.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:cn(l,!1,!1)),n}function mn(e){try{return decodeURIComponent(e)}catch(ge){return e.length>3?e.substr(0,3)+mn(e.substr(3)):e}}const fn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _n(e){return e.match(fn)?e.replace(fn,(e=>mn(e))):e}var vn;!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm"}(vn||(vn={}));const bn=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${vn.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return r(a),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const n=this._ports[t],s=this._connectionTokens[t];let o=`path=${encodeURIComponent(e.path)}`;return"string"==typeof s&&(o+=`&tkn=${encodeURIComponent(s)}`),an.from({scheme:We?this._preferredWebSchema:vn.vscodeRemoteResource,authority:`${i}:${n}`,path:this._remoteResourcesPath,query:o})}};class Cn{uriToBrowserUri(e){return e.scheme===vn.vscodeRemote?bn.rewrite(e):e.scheme===vn.file&&(Be||Ve&&Ie.origin===`${vn.vscodeFileResource}://${Cn.FALLBACK_AUTHORITY}`)?e.with({scheme:vn.vscodeFileResource,authority:e.authority||Cn.FALLBACK_AUTHORITY,query:null,fragment:null}):e}}Cn.FALLBACK_AUTHORITY="vscode-app";const wn=new Cn;var yn;!function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";e.getHeadersFromQuery=function(e){let n;"string"==typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:an.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const s=null==n?void 0:n.get(i);if(s)return t.get(s)},e.addSearchParam=function(e,t,n){if(!globalThis.crossOriginIsolated)return;const s=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,s):e[i]=s}}(yn||(yn={}));const{registerWindow:Sn,getWindows:Ln,onDidCreateWindow:kn}=function(){const e=[],t=new U;return{onDidCreateWindow:t.event,registerWindow(i){e.push(i);const n=new N;return n.add(x((()=>{const t=e.indexOf(i);-1!==t&&e.splice(t,1)}))),t.fire({window:i,disposableStore:n}),n},getWindows:()=>e}}();function Dn(e){for(;e.firstChild;)e.firstChild.remove()}function xn(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class Nn{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function En(e,t,i,n){return new Nn(e,t,i,n)}function In(e){return function(t){return e(new Nt(t))}}const Mn=function(e,t,i,n){let s=i;return"click"===t||"mousedown"===t?s=In(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(s=function(e){return function(t){return e(new St(t))}}(i)),En(e,t,s,n)},Tn=function(e,t,i){return function(e,t,i){return En(e,He&&tt?os.POINTER_DOWN:os.MOUSE_DOWN,t,i)}(e,In(t),i)};let Rn,An;class On{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(Dre){r(Dre)}}static sort(e,t){return t.priority-e.priority}}function Pn(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)}function Fn(e){var t;const i=e.ownerDocument,n=null===(t=i.defaultView)||void 0===t?void 0:t.window;if(e!==i.body)return new Wn(e.clientWidth,e.clientHeight);if(He&&(null==n?void 0:n.visualViewport))return new Wn(n.visualViewport.width,n.visualViewport.height);if((null==n?void 0:n.innerWidth)&&n.innerHeight)return new Wn(n.innerWidth,n.innerHeight);if(i.body&&i.body.clientWidth&&i.body.clientHeight)return new Wn(i.body.clientWidth,i.body.clientHeight);if(i.documentElement&&i.documentElement.clientWidth&&i.documentElement.clientHeight)return new Wn(i.documentElement.clientWidth,i.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}!function(){let e=[],t=null,i=!1,n=!1;const s=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;){t.sort(On.sort);t.shift().execute()}n=!1};An=(t,n=0)=>{const o=new On(t,n);return e.push(o),i||(i=!0,requestAnimationFrame(s)),o},Rn=(e,i)=>{if(n){const n=new On(e,i);return t.push(n),n}return An(e,i)}}();class Bn{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=Pn(e),s=n?n.getPropertyValue(t):"0";return Bn.convertToPixels(e,s)}static getBorderLeftWidth(e){return Bn.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Bn.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Bn.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Bn.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Bn.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Bn.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Bn.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Bn.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Bn.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Bn.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Bn.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Bn.getDimension(e,"margin-bottom","marginBottom")}}class Wn{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Wn(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof Wn?e:new Wn(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}}function Vn(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==e.ownerDocument.body&&e!==e.ownerDocument.documentElement;){i-=e.scrollTop;const s=Gn(e)?null:Pn(e);s&&(n-="rtl"!==s.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=Bn.getBorderLeftWidth(e),i+=Bn.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function Hn(e){var t,i,n,s;const o=e.getBoundingClientRect();return{left:o.left+(null!==(i=null===(t=e.ownerDocument.defaultView)||void 0===t?void 0:t.scrollX)&&void 0!==i?i:0),top:o.top+(null!==(s=null===(n=e.ownerDocument.defaultView)||void 0===n?void 0:n.scrollY)&&void 0!==s?s:0),width:o.width,height:o.height}}function zn(e){const t=Bn.getMarginLeft(e)+Bn.getMarginRight(e);return e.offsetWidth+t}function Un(e){const t=Bn.getBorderLeftWidth(e)+Bn.getBorderRightWidth(e),i=Bn.getPaddingLeft(e)+Bn.getPaddingRight(e);return e.offsetWidth-t-i}function Kn(e){const t=Bn.getBorderTopWidth(e)+Bn.getBorderBottomWidth(e),i=Bn.getPaddingTop(e)+Bn.getPaddingBottom(e);return e.offsetHeight-t-i}function jn(e){const t=Bn.getMarginTop(e)+Bn.getMarginBottom(e);return e.offsetHeight+t}function qn(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function $n(e,t,i){return!!function(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}(e,t,i)}function Gn(e){return e&&!!e.host&&!!e.mode}function Zn(e){return!!Yn(e)}function Yn(e){for(var t;e.parentNode;){if(e===(null===(t=e.ownerDocument)||void 0===t?void 0:t.body))return null;e=e.parentNode}return Gn(e)?e:null}function Xn(){let e=Qn().activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Qn(){var e;return null!==(e=[document,...Ln().map((e=>e.document))].find((e=>e.hasFocus())))&&void 0!==e?e:document}function Jn(e=document.getElementsByTagName("head")[0],t){const i=document.createElement("style");return i.type="text/css",i.media="screen",null==t||t(i),e.appendChild(i),i}Wn.None=new Wn(0,0);let es=null;function ts(){return es||(es=Jn()),es}function is(e,t,i=ts()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function ns(e,t=ts()){if(!t)return;const i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let s=0;s=0;s--)t.sheet.deleteRule(n[s])}function ss(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const os={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:se?"webkitAnimationStart":"animationstart",ANIMATION_END:se?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:se?"webkitAnimationIteration":"animationiteration"};function rs(e){const t=e;return!(!t||"function"!=typeof t.preventDefault||"function"!=typeof t.stopPropagation)}const as=(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e);class ls extends E{static hasFocusWithin(e){if(ss(e)){const t=Yn(e);return qn(t?t.activeElement:e.ownerDocument.activeElement,e)}return qn(window.document.activeElement,window.document)}constructor(e){super(),this._onDidFocus=this._register(new U),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new U),this.onDidBlur=this._onDidBlur.event;let t=ls.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},s=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{ls.hasFocusWithin(e)!==t&&(t?s():n())},this._register(En(e,os.FOCUS,n,!0)),this._register(En(e,os.BLUR,s,!0)),e instanceof HTMLElement&&(this._register(En(e,os.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(En(e,os.FOCUS_OUT,(()=>this._refreshStateHandler()))))}}function hs(e){return new ls(e)}function ds(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function cs(e,t){return e.insertBefore(t,e.firstChild),t}function us(e,...t){e.innerText="",ds(e,...t)}const gs=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var ps;function ms(e,t,i,...n){const s=gs.exec(t);if(!s)throw new Error("Bad use of emmet");const o=s[1]||"div";let r;return r=e!==ps.HTML?document.createElementNS(e,o):document.createElement(o),s[3]&&(r.id=s[3]),s[4]&&(r.className=s[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function fs(e,t,...i){return ms(ps.HTML,e,t,...i)}function _s(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function vs(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function bs(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function Cs(e){window.open(e,"_blank","noopener")}function ws(e){return e?`url('${wn.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function ys(e){return`'${e.replace(/'/g,"%27")}'`}function Ss(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=Ss(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(ps||(ps={})),fs.SVG=function(e,t,...i){return ms(ps.SVG,e,t,...i)},bn.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");const Ls=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class ks extends U{constructor(){super(),this._subscriptions=new N,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(En(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new St(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),this._subscriptions.add(En(window,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),this._subscriptions.add(En(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(En(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(En(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(En(window,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return ks.instance||(ks.instance=new ks),ks.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class Ds extends E{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(En(this.element,os.DRAG_ENTER,(e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter(e)}))),this._register(En(this.element,os.DRAG_OVER,(e=>{var t,i;e.preventDefault(),null===(i=(t=this.callbacks).onDragOver)||void 0===i||i.call(t,e,e.timeStamp-this.dragStartTime)}))),this._register(En(this.element,os.DRAG_LEAVE,(e=>{this.counter--,0===this.counter&&(this.dragStartTime=0,this.callbacks.onDragLeave(e))}))),this._register(En(this.element,os.DRAG_END,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(e)}))),this._register(En(this.element,os.DROP,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(e)})))}}const xs=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function Ns(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const s=xs.exec(e);if(!s||!s.groups)throw new Error("Bad use of h");const o=s.groups.tag||"div",r=document.createElement(o);s.groups.id&&(r.id=s.groups.id);const a=[];if(s.groups.class)for(const h of s.groups.class.split("."))""!==h&&a.push(h);if(void 0!==i.className)for(const h of i.className.split("."))""!==h&&a.push(h);a.length>0&&(r.className=a.join(" "));const l={};if(s.groups.name&&(l[s.groups.name]=r),n)for(const h of n)h instanceof HTMLElement?r.appendChild(h):"string"==typeof h?r.append(h):"root"in h&&(Object.assign(l,h),r.appendChild(h.root));for(const[h,d]of Object.entries(i))if("className"!==h)if("style"===h)for(const[e,t]of Object.entries(d))r.style.setProperty(Es(e),"number"==typeof t?t+"px":""+t);else"tabIndex"===h?r.tabIndex=d:r.setAttribute(Es(h),d.toString());return l.root=r,l}function Es(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}let Is,Ms,Ts,Rs,As;function Os(e){Is&&(Ms.textContent!==e?(Dn(Ts),Fs(Ms,e)):(Dn(Ms),Fs(Ts,e)))}function Ps(e){Is&&(Rs.textContent!==e?(Dn(As),Fs(Rs,e)):(Dn(Rs),Fs(As,e)))}function Fs(e,t){Dn(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}var Bs,Ws,Vs;class Hs{constructor(e,t){this.uri=e,this.value=t}}class zs{constructor(e,t){if(this[Bs]="ResourceMap",e instanceof zs)this.map=new Map(e.map),this.toKey=null!=t?t:zs.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=null!=t?t:zs.defaultToKey;for(const[t,i]of e)this.set(t,i)}else this.map=new Map,this.toKey=null!=e?e:zs.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new Hs(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[i,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(Bs=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}zs.defaultToKey=e=>e.toString();class Us{constructor(){this[Ws]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(Ws=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class Ks extends Us{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}class js{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class qs{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}class $s{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);const t=this.fn(e);return this._map.set(e,t),t}}class Gs{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Zs(e){return!e||"string"!=typeof e||0===e.trim().length}const Ys=/{(\d+)}/g;function Xs(e,...t){return 0===t.length?e:e.replace(Ys,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function Qs(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function Js(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function eo(e,t=" "){return io(to(e,t),t)}function to(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function io(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let s=n,o=-1;for(;o=e.lastIndexOf(t,s-1),-1!==o&&o+i===s;){if(0===o)return"";s=o}return e.substring(0,s)}function no(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=Js(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function so(e){return e.split(/\r\n|\r|\n/)}function oo(e){for(let t=0,i=e.length;t=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function lo(e,t){return et?1:0}function ho(e,t,i=0,n=e.length,s=0,o=t.length){for(;io)return 1}const r=n-i,a=o-s;return ra?1:0}function co(e,t){return uo(e,t,0,e.length,0,t.length)}function uo(e,t,i=0,n=e.length,s=0,o=t.length){for(;i=128||a>=128)return ho(e.toLowerCase(),t.toLowerCase(),i,n,s,o);po(r)&&(r-=32),po(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=o-s;return ra?1:0}function go(e){return e>=48&&e<=57}function po(e){return e>=97&&e<=122}function mo(e){return e>=65&&e<=90}function fo(e,t){return e.length===t.length&&0===uo(e,t)}function _o(e,t){const i=t.length;return!(t.length>e.length)&&0===uo(e,t,0,i)}function vo(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n1){const n=e.charCodeAt(t-2);if(Co(n))return yo(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=So(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class ko{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new Lo(e,t)}nextGraphemeLength(){const e=Vo.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,s=e.getGraphemeBreakType(t.nextCodePoint());if(Wo(n,s)){t.setOffset(i);break}n=s}return t.offset-i}prevGraphemeLength(){const e=Vo.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,s=e.getGraphemeBreakType(t.prevCodePoint());if(Wo(s,n)){t.setOffset(i);break}n=s}return i-t.offset}eol(){return this._iterator.eol()}}function Do(e,t){return new ko(e,t).nextGraphemeLength()}function xo(e,t){return new ko(e,t).prevGraphemeLength()}let No;function Eo(e){return No||(No=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),No.test(e)}const Io=/^[\t\n\r\x20-\x7E]*$/;function Mo(e){return Io.test(e)}const To=/[\u2028\u2029]/;function Ro(e){return To.test(e)}function Ao(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Oo(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const Po=String.fromCharCode(65279);function Fo(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function Bo(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function Wo(e,t){return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}class Vo{static getInstance(){return Vo._INSTANCE||(Vo._INSTANCE=new Vo),Vo._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function Ho(e,t){if(0===e)return 0;const i=function(e,t){const i=new Lo(t,e);let n=i.prevCodePoint();for(;zo(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!Oo(n))return;let s=i.offset;if(s>0){8205===i.prevCodePoint()&&(s=i.offset)}return s}(e,t);if(void 0!==i)return i;const n=new Lo(t,e);return n.prevCodePoint(),n.offset}function zo(e){return 127995<=e&&e<=127999}Vo._INSTANCE=null;class Uo{static getInstance(e){return Vs.cache.get(Array.from(e))}static getLocales(){return Vs._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}Vs=Uo,Uo.ambiguousCharacterData=new Gs((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))),Uo.cache=new class{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}}((e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in n));0===o.length&&(o=["_default"]);for(const a of o){s=i(s,t(n[a]))}const r=function(e,t){const i=new Map(e);for(const[n,s]of t)i.set(n,s);return i}(t(n._common),s);return new Vs(r)})),Uo._locales=new Gs((()=>Object.keys(Vs.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))));class Ko{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(Ko.getRawData())),this._data}static isInvisibleCharacter(e){return Ko.getData().has(e)}static get codePoints(){return Ko.getData()}}function jo(...e){return function(t,i){for(let n=0,s=e.length;n0?[{start:0,end:t.length}]:[]:null}function Go(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function Zo(e,t){return Yo(e.toLowerCase(),t.toLowerCase(),0,0)}function Yo(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let s=null;return(s=Yo(e,t,i+1,n+1))?sr({start:n,end:n+1},s):null}return Yo(e,t,i,n+1)}function Xo(e){return 97<=e&&e<=122}function Qo(e){return 65<=e&&e<=90}function Jo(e){return 48<=e&&e<=57}function er(e){return 32===e||9===e||10===e||13===e}const tr=new Set;function ir(e){return er(e)||tr.has(e)}function nr(e){return Xo(e)||Qo(e)||Jo(e)}function sr(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function or(e,t){for(let i=t;i0&&!nr(e.charCodeAt(i-1)))return i}return e.length}function rr(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let s=null,o=n+1;for(s=rr(e,t,i+1,n+1);!s&&(o=or(t,o))60)return null;const i=function(e){let t=0,i=0,n=0,s=0,o=0;for(let r=0;r.2&&t<.8&&n>.6&&s<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,s=0;for(e=e.toLowerCase();s0&&ir(e.charCodeAt(i-1)))return i;return e.length}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>tr.add(e.charCodeAt(0))));const dr=jo(qo,ar,Go),cr=jo(qo,ar,Zo),ur=new Ks(1e4);function gr(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=ur.get(e);n||(n=new RegExp(e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*"),"i"),ur.set(e,n));const s=n.exec(t);return s?[{start:s.index,end:s.index+s[0].length}]:i?cr(e,t):dr(e,t)}function pr(e,t){const i=Tr(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?fr(i):null}function mr(e,t,i,n,s,o){const r=Math.min(13,e.length);for(;i1;n--){const s=e[n]+i,o=t[t.length-1];o&&o.end===s?o.end=s+1:t.push({start:s,end:s+1})}return t}const _r=128;function vr(){const e=[],t=[];for(let i=0;i<=_r;i++)t[i]=0;for(let i=0;i<=_r;i++)e.push(t.slice(0));return e}function br(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const Cr=br(2*_r),wr=br(2*_r),yr=vr(),Sr=vr(),Lr=vr(),kr=!1;function Dr(e,t,i,n,s){function o(e,t,i=" "){for(;e.lengtho(e,3))).join("|")}\n`;for(let a=0;a<=i;a++)r+=0===a?" |":`${t[a-1]}|`,r+=e[a].slice(0,s+1).map((e=>o(e.toString(),3))).join("|")+"\n";return r}function xr(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!Oo(i)}}function Nr(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function Er(e,t,i){return t[e]!==i[e]}var Ir;!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(Ir||(Ir={}));class Mr{constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}function Tr(e,t,i,n,s,o,r=Mr.default){const a=e.length>_r?_r:e.length,l=n.length>_r?_r:n.length;if(i>=a||o>=l||a-i>l-o)return;if(!function(e,t,i,n,s,o,r=!1){for(;t=i&&a>=n;)s[r]===o[a]&&(wr[r]=a,r--),a--}(a,l,i,o,t,s);let h=1,d=1,c=i,u=o;const g=[!1];for(h=1,c=i;cr,v=_?Sr[h][d-1]+(yr[h][d-1]>0?-5:0):0,b=u>r+1&&yr[h][d-1]>0,C=b?Sr[h][d-2]+(yr[h][d-2]>0?-5:0):0;if(b&&(!_||C>=v)&&(!m||C>=f))Sr[h][d]=C,Lr[h][d]=3,yr[h][d]=0;else if(_&&(!m||v>=f))Sr[h][d]=v,Lr[h][d]=2,yr[h][d]=0;else{if(!m)throw new Error("not possible");Sr[h][d]=f,Lr[h][d]=1,yr[h][d]=yr[h-1][d-1]+1}}}if(kr&&function(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(Dr(Sr,e,e.length,i,i.length)),console.log(Dr(Lr,e,e.length,i,i.length)),console.log(Dr(yr,e,e.length,i,i.length))}(e,i,n,o),!g[0]&&!r.firstMatchCanBeWeak)return;h--,d--;const p=[Sr[h][d],o];let m=0,f=0;for(;h>=1;){let e=d;do{const t=Lr[h][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+h-1]===s[o+d-1]&&!Er(e+o-1,n,s)&&m+1>yr[h][e]&&(e=d),e===d?m++:m=1,f||(f=e),h--,d=e-1,p.push(d)}l===a&&r.boostFullMatch&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function Rr(e,t,i,n,s,o,r,a,l,h,d){if(t[i]!==o[r])return Number.MIN_SAFE_INTEGER;let c=1,u=!1;return r===i-n?c=e[i]===s[r]?7:5:!Er(r,s,o)||0!==r&&Er(r-1,s,o)?!xr(o,r)||0!==r&&xr(o,r-1)?(xr(o,r-1)||Nr(o,r-1))&&(c=5,u=!0):c=5:(c=e[i]===s[r]?7:5,u=!0),c>1&&i===n&&(d[0]=!0),u||(u=Er(r,s,o)||xr(o,r-1)||Nr(o,r-1)),i===n?r>l&&(c-=u?3:5):c+=h?u?2:0:u?0:1,r+1===a&&(c-=u?3:5),c}function Ar(e,t,i,n,s,o,r){return function(e,t,i,n,s,o,r,a){let l=Tr(e,t,i,n,s,o,a);if(l&&!r)return l;if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e))}}}return l}(e,t,i,n,s,o,!0,r)}function Or(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}function Pr(e){return"string"==typeof e}function Fr(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function Br(e){const t=Object.getPrototypeOf(Uint8Array);return"object"==typeof e&&e instanceof t}function Wr(e){return"number"==typeof e&&!isNaN(e)}function Vr(e){return!!e&&"function"==typeof e[Symbol.iterator]}function Hr(e){return!0===e||!1===e}function zr(e){return void 0===e}function Ur(e){return!Kr(e)}function Kr(e){return zr(e)||null===e}function jr(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function qr(e){if(Kr(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function $r(e){return"function"==typeof e}function Gr(e,t){if(Pr(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if($r(t)){try{if(e instanceof t)return}catch(ge){}if(!Kr(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Mr.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};const Zr=Object.create(null);function Yr(e,t){if(Pr(t)){const i=Zr[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return Zr[e]=t,{id:e}}function Xr(){return Zr}const Qr={add:Yr("add",6e4),plus:Yr("plus",6e4),gistNew:Yr("gist-new",6e4),repoCreate:Yr("repo-create",6e4),lightbulb:Yr("lightbulb",60001),lightBulb:Yr("light-bulb",60001),repo:Yr("repo",60002),repoDelete:Yr("repo-delete",60002),gistFork:Yr("gist-fork",60003),repoForked:Yr("repo-forked",60003),gitPullRequest:Yr("git-pull-request",60004),gitPullRequestAbandoned:Yr("git-pull-request-abandoned",60004),recordKeys:Yr("record-keys",60005),keyboard:Yr("keyboard",60005),tag:Yr("tag",60006),tagAdd:Yr("tag-add",60006),tagRemove:Yr("tag-remove",60006),gitPullRequestLabel:Yr("git-pull-request-label",60006),person:Yr("person",60007),personFollow:Yr("person-follow",60007),personOutline:Yr("person-outline",60007),personFilled:Yr("person-filled",60007),gitBranch:Yr("git-branch",60008),gitBranchCreate:Yr("git-branch-create",60008),gitBranchDelete:Yr("git-branch-delete",60008),sourceControl:Yr("source-control",60008),mirror:Yr("mirror",60009),mirrorPublic:Yr("mirror-public",60009),star:Yr("star",60010),starAdd:Yr("star-add",60010),starDelete:Yr("star-delete",60010),starEmpty:Yr("star-empty",60010),comment:Yr("comment",60011),commentAdd:Yr("comment-add",60011),alert:Yr("alert",60012),warning:Yr("warning",60012),search:Yr("search",60013),searchSave:Yr("search-save",60013),logOut:Yr("log-out",60014),signOut:Yr("sign-out",60014),logIn:Yr("log-in",60015),signIn:Yr("sign-in",60015),eye:Yr("eye",60016),eyeUnwatch:Yr("eye-unwatch",60016),eyeWatch:Yr("eye-watch",60016),circleFilled:Yr("circle-filled",60017),primitiveDot:Yr("primitive-dot",60017),closeDirty:Yr("close-dirty",60017),debugBreakpoint:Yr("debug-breakpoint",60017),debugBreakpointDisabled:Yr("debug-breakpoint-disabled",60017),debugHint:Yr("debug-hint",60017),primitiveSquare:Yr("primitive-square",60018),edit:Yr("edit",60019),pencil:Yr("pencil",60019),info:Yr("info",60020),issueOpened:Yr("issue-opened",60020),gistPrivate:Yr("gist-private",60021),gitForkPrivate:Yr("git-fork-private",60021),lock:Yr("lock",60021),mirrorPrivate:Yr("mirror-private",60021),close:Yr("close",60022),removeClose:Yr("remove-close",60022),x:Yr("x",60022),repoSync:Yr("repo-sync",60023),sync:Yr("sync",60023),clone:Yr("clone",60024),desktopDownload:Yr("desktop-download",60024),beaker:Yr("beaker",60025),microscope:Yr("microscope",60025),vm:Yr("vm",60026),deviceDesktop:Yr("device-desktop",60026),file:Yr("file",60027),fileText:Yr("file-text",60027),more:Yr("more",60028),ellipsis:Yr("ellipsis",60028),kebabHorizontal:Yr("kebab-horizontal",60028),mailReply:Yr("mail-reply",60029),reply:Yr("reply",60029),organization:Yr("organization",60030),organizationFilled:Yr("organization-filled",60030),organizationOutline:Yr("organization-outline",60030),newFile:Yr("new-file",60031),fileAdd:Yr("file-add",60031),newFolder:Yr("new-folder",60032),fileDirectoryCreate:Yr("file-directory-create",60032),trash:Yr("trash",60033),trashcan:Yr("trashcan",60033),history:Yr("history",60034),clock:Yr("clock",60034),folder:Yr("folder",60035),fileDirectory:Yr("file-directory",60035),symbolFolder:Yr("symbol-folder",60035),logoGithub:Yr("logo-github",60036),markGithub:Yr("mark-github",60036),github:Yr("github",60036),terminal:Yr("terminal",60037),console:Yr("console",60037),repl:Yr("repl",60037),zap:Yr("zap",60038),symbolEvent:Yr("symbol-event",60038),error:Yr("error",60039),stop:Yr("stop",60039),variable:Yr("variable",60040),symbolVariable:Yr("symbol-variable",60040),array:Yr("array",60042),symbolArray:Yr("symbol-array",60042),symbolModule:Yr("symbol-module",60043),symbolPackage:Yr("symbol-package",60043),symbolNamespace:Yr("symbol-namespace",60043),symbolObject:Yr("symbol-object",60043),symbolMethod:Yr("symbol-method",60044),symbolFunction:Yr("symbol-function",60044),symbolConstructor:Yr("symbol-constructor",60044),symbolBoolean:Yr("symbol-boolean",60047),symbolNull:Yr("symbol-null",60047),symbolNumeric:Yr("symbol-numeric",60048),symbolNumber:Yr("symbol-number",60048),symbolStructure:Yr("symbol-structure",60049),symbolStruct:Yr("symbol-struct",60049),symbolParameter:Yr("symbol-parameter",60050),symbolTypeParameter:Yr("symbol-type-parameter",60050),symbolKey:Yr("symbol-key",60051),symbolText:Yr("symbol-text",60051),symbolReference:Yr("symbol-reference",60052),goToFile:Yr("go-to-file",60052),symbolEnum:Yr("symbol-enum",60053),symbolValue:Yr("symbol-value",60053),symbolRuler:Yr("symbol-ruler",60054),symbolUnit:Yr("symbol-unit",60054),activateBreakpoints:Yr("activate-breakpoints",60055),archive:Yr("archive",60056),arrowBoth:Yr("arrow-both",60057),arrowDown:Yr("arrow-down",60058),arrowLeft:Yr("arrow-left",60059),arrowRight:Yr("arrow-right",60060),arrowSmallDown:Yr("arrow-small-down",60061),arrowSmallLeft:Yr("arrow-small-left",60062),arrowSmallRight:Yr("arrow-small-right",60063),arrowSmallUp:Yr("arrow-small-up",60064),arrowUp:Yr("arrow-up",60065),bell:Yr("bell",60066),bold:Yr("bold",60067),book:Yr("book",60068),bookmark:Yr("bookmark",60069),debugBreakpointConditionalUnverified:Yr("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:Yr("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:Yr("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:Yr("debug-breakpoint-data-unverified",60072),debugBreakpointData:Yr("debug-breakpoint-data",60073),debugBreakpointDataDisabled:Yr("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:Yr("debug-breakpoint-log-unverified",60074),debugBreakpointLog:Yr("debug-breakpoint-log",60075),debugBreakpointLogDisabled:Yr("debug-breakpoint-log-disabled",60075),briefcase:Yr("briefcase",60076),broadcast:Yr("broadcast",60077),browser:Yr("browser",60078),bug:Yr("bug",60079),calendar:Yr("calendar",60080),caseSensitive:Yr("case-sensitive",60081),check:Yr("check",60082),checklist:Yr("checklist",60083),chevronDown:Yr("chevron-down",60084),dropDownButton:Yr("drop-down-button",60084),chevronLeft:Yr("chevron-left",60085),chevronRight:Yr("chevron-right",60086),chevronUp:Yr("chevron-up",60087),chromeClose:Yr("chrome-close",60088),chromeMaximize:Yr("chrome-maximize",60089),chromeMinimize:Yr("chrome-minimize",60090),chromeRestore:Yr("chrome-restore",60091),circle:Yr("circle",60092),circleOutline:Yr("circle-outline",60092),debugBreakpointUnverified:Yr("debug-breakpoint-unverified",60092),circleSlash:Yr("circle-slash",60093),circuitBoard:Yr("circuit-board",60094),clearAll:Yr("clear-all",60095),clippy:Yr("clippy",60096),closeAll:Yr("close-all",60097),cloudDownload:Yr("cloud-download",60098),cloudUpload:Yr("cloud-upload",60099),code:Yr("code",60100),collapseAll:Yr("collapse-all",60101),colorMode:Yr("color-mode",60102),commentDiscussion:Yr("comment-discussion",60103),compareChanges:Yr("compare-changes",60157),creditCard:Yr("credit-card",60105),dash:Yr("dash",60108),dashboard:Yr("dashboard",60109),database:Yr("database",60110),debugContinue:Yr("debug-continue",60111),debugDisconnect:Yr("debug-disconnect",60112),debugPause:Yr("debug-pause",60113),debugRestart:Yr("debug-restart",60114),debugStart:Yr("debug-start",60115),debugStepInto:Yr("debug-step-into",60116),debugStepOut:Yr("debug-step-out",60117),debugStepOver:Yr("debug-step-over",60118),debugStop:Yr("debug-stop",60119),debug:Yr("debug",60120),deviceCameraVideo:Yr("device-camera-video",60121),deviceCamera:Yr("device-camera",60122),deviceMobile:Yr("device-mobile",60123),diffAdded:Yr("diff-added",60124),diffIgnored:Yr("diff-ignored",60125),diffModified:Yr("diff-modified",60126),diffRemoved:Yr("diff-removed",60127),diffRenamed:Yr("diff-renamed",60128),diff:Yr("diff",60129),discard:Yr("discard",60130),editorLayout:Yr("editor-layout",60131),emptyWindow:Yr("empty-window",60132),exclude:Yr("exclude",60133),extensions:Yr("extensions",60134),eyeClosed:Yr("eye-closed",60135),fileBinary:Yr("file-binary",60136),fileCode:Yr("file-code",60137),fileMedia:Yr("file-media",60138),filePdf:Yr("file-pdf",60139),fileSubmodule:Yr("file-submodule",60140),fileSymlinkDirectory:Yr("file-symlink-directory",60141),fileSymlinkFile:Yr("file-symlink-file",60142),fileZip:Yr("file-zip",60143),files:Yr("files",60144),filter:Yr("filter",60145),flame:Yr("flame",60146),foldDown:Yr("fold-down",60147),foldUp:Yr("fold-up",60148),fold:Yr("fold",60149),folderActive:Yr("folder-active",60150),folderOpened:Yr("folder-opened",60151),gear:Yr("gear",60152),gift:Yr("gift",60153),gistSecret:Yr("gist-secret",60154),gist:Yr("gist",60155),gitCommit:Yr("git-commit",60156),gitCompare:Yr("git-compare",60157),gitMerge:Yr("git-merge",60158),githubAction:Yr("github-action",60159),githubAlt:Yr("github-alt",60160),globe:Yr("globe",60161),grabber:Yr("grabber",60162),graph:Yr("graph",60163),gripper:Yr("gripper",60164),heart:Yr("heart",60165),home:Yr("home",60166),horizontalRule:Yr("horizontal-rule",60167),hubot:Yr("hubot",60168),inbox:Yr("inbox",60169),issueClosed:Yr("issue-closed",60324),issueReopened:Yr("issue-reopened",60171),issues:Yr("issues",60172),italic:Yr("italic",60173),jersey:Yr("jersey",60174),json:Yr("json",60175),bracket:Yr("bracket",60175),kebabVertical:Yr("kebab-vertical",60176),key:Yr("key",60177),law:Yr("law",60178),lightbulbAutofix:Yr("lightbulb-autofix",60179),linkExternal:Yr("link-external",60180),link:Yr("link",60181),listOrdered:Yr("list-ordered",60182),listUnordered:Yr("list-unordered",60183),liveShare:Yr("live-share",60184),loading:Yr("loading",60185),location:Yr("location",60186),mailRead:Yr("mail-read",60187),mail:Yr("mail",60188),markdown:Yr("markdown",60189),megaphone:Yr("megaphone",60190),mention:Yr("mention",60191),milestone:Yr("milestone",60192),gitPullRequestMilestone:Yr("git-pull-request-milestone",60192),mortarBoard:Yr("mortar-board",60193),move:Yr("move",60194),multipleWindows:Yr("multiple-windows",60195),mute:Yr("mute",60196),noNewline:Yr("no-newline",60197),note:Yr("note",60198),octoface:Yr("octoface",60199),openPreview:Yr("open-preview",60200),package:Yr("package",60201),paintcan:Yr("paintcan",60202),pin:Yr("pin",60203),play:Yr("play",60204),run:Yr("run",60204),plug:Yr("plug",60205),preserveCase:Yr("preserve-case",60206),preview:Yr("preview",60207),project:Yr("project",60208),pulse:Yr("pulse",60209),question:Yr("question",60210),quote:Yr("quote",60211),radioTower:Yr("radio-tower",60212),reactions:Yr("reactions",60213),references:Yr("references",60214),refresh:Yr("refresh",60215),regex:Yr("regex",60216),remoteExplorer:Yr("remote-explorer",60217),remote:Yr("remote",60218),remove:Yr("remove",60219),replaceAll:Yr("replace-all",60220),replace:Yr("replace",60221),repoClone:Yr("repo-clone",60222),repoForcePush:Yr("repo-force-push",60223),repoPull:Yr("repo-pull",60224),repoPush:Yr("repo-push",60225),report:Yr("report",60226),requestChanges:Yr("request-changes",60227),rocket:Yr("rocket",60228),rootFolderOpened:Yr("root-folder-opened",60229),rootFolder:Yr("root-folder",60230),rss:Yr("rss",60231),ruby:Yr("ruby",60232),saveAll:Yr("save-all",60233),saveAs:Yr("save-as",60234),save:Yr("save",60235),screenFull:Yr("screen-full",60236),screenNormal:Yr("screen-normal",60237),searchStop:Yr("search-stop",60238),server:Yr("server",60240),settingsGear:Yr("settings-gear",60241),settings:Yr("settings",60242),shield:Yr("shield",60243),smiley:Yr("smiley",60244),sortPrecedence:Yr("sort-precedence",60245),splitHorizontal:Yr("split-horizontal",60246),splitVertical:Yr("split-vertical",60247),squirrel:Yr("squirrel",60248),starFull:Yr("star-full",60249),starHalf:Yr("star-half",60250),symbolClass:Yr("symbol-class",60251),symbolColor:Yr("symbol-color",60252),symbolCustomColor:Yr("symbol-customcolor",60252),symbolConstant:Yr("symbol-constant",60253),symbolEnumMember:Yr("symbol-enum-member",60254),symbolField:Yr("symbol-field",60255),symbolFile:Yr("symbol-file",60256),symbolInterface:Yr("symbol-interface",60257),symbolKeyword:Yr("symbol-keyword",60258),symbolMisc:Yr("symbol-misc",60259),symbolOperator:Yr("symbol-operator",60260),symbolProperty:Yr("symbol-property",60261),wrench:Yr("wrench",60261),wrenchSubaction:Yr("wrench-subaction",60261),symbolSnippet:Yr("symbol-snippet",60262),tasklist:Yr("tasklist",60263),telescope:Yr("telescope",60264),textSize:Yr("text-size",60265),threeBars:Yr("three-bars",60266),thumbsdown:Yr("thumbsdown",60267),thumbsup:Yr("thumbsup",60268),tools:Yr("tools",60269),triangleDown:Yr("triangle-down",60270),triangleLeft:Yr("triangle-left",60271),triangleRight:Yr("triangle-right",60272),triangleUp:Yr("triangle-up",60273),twitter:Yr("twitter",60274),unfold:Yr("unfold",60275),unlock:Yr("unlock",60276),unmute:Yr("unmute",60277),unverified:Yr("unverified",60278),verified:Yr("verified",60279),versions:Yr("versions",60280),vmActive:Yr("vm-active",60281),vmOutline:Yr("vm-outline",60282),vmRunning:Yr("vm-running",60283),watch:Yr("watch",60284),whitespace:Yr("whitespace",60285),wholeWord:Yr("whole-word",60286),window:Yr("window",60287),wordWrap:Yr("word-wrap",60288),zoomIn:Yr("zoom-in",60289),zoomOut:Yr("zoom-out",60290),listFilter:Yr("list-filter",60291),listFlat:Yr("list-flat",60292),listSelection:Yr("list-selection",60293),selection:Yr("selection",60293),listTree:Yr("list-tree",60294),debugBreakpointFunctionUnverified:Yr("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:Yr("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:Yr("debug-breakpoint-function-disabled",60296),debugStackframeActive:Yr("debug-stackframe-active",60297),circleSmallFilled:Yr("circle-small-filled",60298),debugStackframeDot:Yr("debug-stackframe-dot",60298),debugStackframe:Yr("debug-stackframe",60299),debugStackframeFocused:Yr("debug-stackframe-focused",60299),debugBreakpointUnsupported:Yr("debug-breakpoint-unsupported",60300),symbolString:Yr("symbol-string",60301),debugReverseContinue:Yr("debug-reverse-continue",60302),debugStepBack:Yr("debug-step-back",60303),debugRestartFrame:Yr("debug-restart-frame",60304),callIncoming:Yr("call-incoming",60306),callOutgoing:Yr("call-outgoing",60307),menu:Yr("menu",60308),expandAll:Yr("expand-all",60309),feedback:Yr("feedback",60310),gitPullRequestReviewer:Yr("git-pull-request-reviewer",60310),groupByRefType:Yr("group-by-ref-type",60311),ungroupByRefType:Yr("ungroup-by-ref-type",60312),account:Yr("account",60313),gitPullRequestAssignee:Yr("git-pull-request-assignee",60313),bellDot:Yr("bell-dot",60314),debugConsole:Yr("debug-console",60315),library:Yr("library",60316),output:Yr("output",60317),runAll:Yr("run-all",60318),syncIgnored:Yr("sync-ignored",60319),pinned:Yr("pinned",60320),githubInverted:Yr("github-inverted",60321),debugAlt:Yr("debug-alt",60305),serverProcess:Yr("server-process",60322),serverEnvironment:Yr("server-environment",60323),pass:Yr("pass",60324),stopCircle:Yr("stop-circle",60325),playCircle:Yr("play-circle",60326),record:Yr("record",60327),debugAltSmall:Yr("debug-alt-small",60328),vmConnect:Yr("vm-connect",60329),cloud:Yr("cloud",60330),merge:Yr("merge",60331),exportIcon:Yr("export",60332),graphLeft:Yr("graph-left",60333),magnet:Yr("magnet",60334),notebook:Yr("notebook",60335),redo:Yr("redo",60336),checkAll:Yr("check-all",60337),pinnedDirty:Yr("pinned-dirty",60338),passFilled:Yr("pass-filled",60339),circleLargeFilled:Yr("circle-large-filled",60340),circleLarge:Yr("circle-large",60341),circleLargeOutline:Yr("circle-large-outline",60341),combine:Yr("combine",60342),gather:Yr("gather",60342),table:Yr("table",60343),variableGroup:Yr("variable-group",60344),typeHierarchy:Yr("type-hierarchy",60345),typeHierarchySub:Yr("type-hierarchy-sub",60346),typeHierarchySuper:Yr("type-hierarchy-super",60347),gitPullRequestCreate:Yr("git-pull-request-create",60348),runAbove:Yr("run-above",60349),runBelow:Yr("run-below",60350),notebookTemplate:Yr("notebook-template",60351),debugRerun:Yr("debug-rerun",60352),workspaceTrusted:Yr("workspace-trusted",60353),workspaceUntrusted:Yr("workspace-untrusted",60354),workspaceUnspecified:Yr("workspace-unspecified",60355),terminalCmd:Yr("terminal-cmd",60356),terminalDebian:Yr("terminal-debian",60357),terminalLinux:Yr("terminal-linux",60358),terminalPowershell:Yr("terminal-powershell",60359),terminalTmux:Yr("terminal-tmux",60360),terminalUbuntu:Yr("terminal-ubuntu",60361),terminalBash:Yr("terminal-bash",60362),arrowSwap:Yr("arrow-swap",60363),copy:Yr("copy",60364),personAdd:Yr("person-add",60365),filterFilled:Yr("filter-filled",60366),wand:Yr("wand",60367),debugLineByLine:Yr("debug-line-by-line",60368),inspect:Yr("inspect",60369),layers:Yr("layers",60370),layersDot:Yr("layers-dot",60371),layersActive:Yr("layers-active",60372),compass:Yr("compass",60373),compassDot:Yr("compass-dot",60374),compassActive:Yr("compass-active",60375),azure:Yr("azure",60376),issueDraft:Yr("issue-draft",60377),gitPullRequestClosed:Yr("git-pull-request-closed",60378),gitPullRequestDraft:Yr("git-pull-request-draft",60379),debugAll:Yr("debug-all",60380),debugCoverage:Yr("debug-coverage",60381),runErrors:Yr("run-errors",60382),folderLibrary:Yr("folder-library",60383),debugContinueSmall:Yr("debug-continue-small",60384),beakerStop:Yr("beaker-stop",60385),graphLine:Yr("graph-line",60386),graphScatter:Yr("graph-scatter",60387),pieChart:Yr("pie-chart",60388),bracketDot:Yr("bracket-dot",60389),bracketError:Yr("bracket-error",60390),lockSmall:Yr("lock-small",60391),azureDevops:Yr("azure-devops",60392),verifiedFilled:Yr("verified-filled",60393),newLine:Yr("newline",60394),layout:Yr("layout",60395),layoutActivitybarLeft:Yr("layout-activitybar-left",60396),layoutActivitybarRight:Yr("layout-activitybar-right",60397),layoutPanelLeft:Yr("layout-panel-left",60398),layoutPanelCenter:Yr("layout-panel-center",60399),layoutPanelJustify:Yr("layout-panel-justify",60400),layoutPanelRight:Yr("layout-panel-right",60401),layoutPanel:Yr("layout-panel",60402),layoutSidebarLeft:Yr("layout-sidebar-left",60403),layoutSidebarRight:Yr("layout-sidebar-right",60404),layoutStatusbar:Yr("layout-statusbar",60405),layoutMenubar:Yr("layout-menubar",60406),layoutCentered:Yr("layout-centered",60407),layoutSidebarRightOff:Yr("layout-sidebar-right-off",60416),layoutPanelOff:Yr("layout-panel-off",60417),layoutSidebarLeftOff:Yr("layout-sidebar-left-off",60418),target:Yr("target",60408),indent:Yr("indent",60409),recordSmall:Yr("record-small",60410),errorSmall:Yr("error-small",60411),arrowCircleDown:Yr("arrow-circle-down",60412),arrowCircleLeft:Yr("arrow-circle-left",60413),arrowCircleRight:Yr("arrow-circle-right",60414),arrowCircleUp:Yr("arrow-circle-up",60415),heartFilled:Yr("heart-filled",60420),map:Yr("map",60421),mapFilled:Yr("map-filled",60422),circleSmall:Yr("circle-small",60423),bellSlash:Yr("bell-slash",60424),bellSlashDot:Yr("bell-slash-dot",60425),commentUnresolved:Yr("comment-unresolved",60426),gitPullRequestGoToChanges:Yr("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:Yr("git-pull-request-new-changes",60428),searchFuzzy:Yr("search-fuzzy",60429),commentDraft:Yr("comment-draft",60430),send:Yr("send",60431),sparkle:Yr("sparkle",60432),insert:Yr("insert",60433),mic:Yr("mic",60434),dialogError:Yr("dialog-error","error"),dialogWarning:Yr("dialog-warning","warning"),dialogInfo:Yr("dialog-info","info"),dialogClose:Yr("dialog-close","close"),treeItemExpanded:Yr("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:Yr("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:Yr("tree-filter-on-type-off","list-selection"),treeFilterClear:Yr("tree-filter-clear","close"),treeItemLoading:Yr("tree-item-loading","loading"),menuSelection:Yr("menu-selection","check"),menuSubmenu:Yr("menu-submenu","chevron-right"),menuBarMore:Yr("menubar-more","more"),scrollbarButtonLeft:Yr("scrollbar-button-left","triangle-left"),scrollbarButtonRight:Yr("scrollbar-button-right","triangle-right"),scrollbarButtonUp:Yr("scrollbar-button-up","triangle-up"),scrollbarButtonDown:Yr("scrollbar-button-down","triangle-down"),toolBarMore:Yr("toolbar-more","more"),quickInputBack:Yr("quick-input-back","arrow-left")};var Jr,ea;!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(Jr||(Jr={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(Qr.error);const[,s,o]=n,r=["codicon","codicon-"+s];return o&&r.push("codicon-modifier-"+o.substring(1)),r}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||Jr.isThemeColor(e.color))};const n=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=n.exec(e);if(!t)return;const[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)}}(ea||(ea={}));const ta=new RegExp(`\\$\\(${ea.iconNameExpression}(?:${ea.iconModifierExpression})?\\)`,"g"),ia=new RegExp(`(\\\\)?${ta.source}`,"g");const na=new RegExp(`\\\\${ta.source}`,"g");const sa=new RegExp(`(\\s)?(\\\\)?${ta.source}(\\s)?`,"g");function oa(e){return-1===e.indexOf("$(")?e:e.replace(sa,((e,t,i,n)=>i?e:t||n||""))}const ra=new RegExp(`\\$\\(${ea.iconNameCharacter}+\\)`,"g");function aa(e){ra.lastIndex=0;let t="";const i=[];let n=0;for(;;){const s=ra.lastIndex,o=ra.exec(e),r=e.substring(s,null==o?void 0:o.index);if(r.length>0){t+=r;for(let e=0;ee.length)return!1;if(i){if(!_o(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===n&&i--,e.charAt(i)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function ga(e){return e>=65&&e<=90||e>=97&&e<=122}function pa(e){return gn(e,!0)}class ma{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:lo(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===vn.file)return ua(pa(e),pa(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(Da(e.authority,t.authority))return ua(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return an.joinPath(e,...t)}basenameOrAuthority(e){return ba(e)||e.authority}basename(e){return qi.basename(e.path)}extname(e){return qi.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===vn.file?t=an.file(Yi(pa(e))).path:(t=qi.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===vn.file?an.file($i(pa(e))).path:qi.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!Da(e.authority,t.authority))return;if(e.scheme===vn.file){const i=Zi(pa(e),pa(t));return Oe?da(i):i}let i=e.path||"/";const n=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,n.length);eca(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=Ji){return xa(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Ji){let i=!1;if(e.scheme===vn.file){const n=pa(e);i=void 0!==n&&n.length===ca(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||xa(e,t)?e:e.with({path:e.path+"/"})}}const fa=new ma((()=>!1)),_a=(new ma((e=>e.scheme!==vn.file||!Fe)),new ma((e=>!0)),fa.isEqual.bind(fa)),va=(fa.isEqualOrParent.bind(fa),fa.getComparisonKey.bind(fa),fa.basenameOrAuthority.bind(fa)),ba=fa.basename.bind(fa),Ca=fa.extname.bind(fa),wa=fa.dirname.bind(fa),ya=fa.joinPath.bind(fa),Sa=fa.normalizePath.bind(fa),La=fa.relativePath.bind(fa),ka=fa.resolvePath.bind(fa),Da=(fa.isAbsolutePath.bind(fa),fa.isEqualAuthority.bind(fa)),xa=fa.hasTrailingPathSeparator.bind(fa);fa.removeTrailingPathSeparator.bind(fa),fa.addTrailingPathSeparator.bind(fa);var Na,Ea;!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(Na||(Na={}));class Ia{constructor(e="",t=!1){var i,n,s;if(this.value=e,"string"!=typeof this.value)throw u("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(n=t.supportThemeIcons)&&void 0!==n&&n,this.supportHtml=null!==(s=t.supportHtml)&&void 0!==s&&s)}appendText(e,t=0){var i;return this.value+=function(e){return e.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}(this.supportThemeIcons?(i=e,i.replace(ia,((e,t)=>t?e:`\\${e}`))):e).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(Js(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function Ma(e){return Ta(e)?!e.value:!Array.isArray(e)||e.every(Ma)}function Ta(e){return e instanceof Ia||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&"object"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function Ra(e){return e.replace(/"/g,""")}function Aa(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}!function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(Ea||(Ea={}));const Oa=Pa("instantiationService");function Pa(e){if(Ea.serviceIds.has(e))return Ea.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[Ea.DI_TARGET]===t?t[Ea.DI_DEPENDENCIES].push({id:e,index:i}):(t[Ea.DI_DEPENDENCIES]=[{id:e,index:i}],t[Ea.DI_TARGET]=t)}(t,e,n)};return t.toString=()=>e,Ea.serviceIds.set(e,t),t}const Fa=Pa("codeEditorService");class Ba{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Ba(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Ba.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Ba.isBefore(this,e)}static isBefore(e,t){return e.lineNumberHa(this,void 0,void 0,(function*(){return e.run(...t)})),tooltip:e.label}}qa.ID="vs.actions.empty";const Ga=Pa("commandService"),Za=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new U,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(const n of e.description.args)t.push(n.constraint);const i=e.handler;e.handler=function(e,...n){return function(e,t){const i=Math.min(e.length,t.length);for(let n=0;n{s();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),o}registerCommandAlias(e,t){return Za.registerCommand(e,((e,...i)=>e.get(Ga).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return v.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};function Ya(...e){switch(e.length){case 1:return ue(0,"Did you mean {0}?",e[0]);case 2:return ue(0,"Did you mean {0} or {1}?",e[0],e[1]);case 3:return ue(0,"Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}Za.registerCommand("noop",(()=>{}));const Xa=ue(0,"Did you forget to open or close the quote?"),Qa=ue(0,"Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class Ja{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:case 8:return">=";case 9:return"=~";case 10:case 17:case 18:case 19:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 20:return"EOF";default:throw g(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();){this._start=this._current;switch(this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(Ya("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(Ya("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(Ya("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&(this._input.charCodeAt(this._current)===e&&(this._current++,!0))}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=Ja._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;39!==this._peek()&&!this._isAtEnd();)this._advance();this._isAtEnd()?this._error(Xa):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,i=!1;for(;;){if(e>=this._input.length)return this._current=e,void this._error(Qa);const n=this._input.charCodeAt(e);if(t)t=!1;else{if(47===n&&!i){e++;break}91===n?i=!0:92===n?t=!0:93===n&&(i=!1)}e++}for(;e=this._input.length}}Ja._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0)))),Ja._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);const el=new Map;el.set("false",!1),el.set("true",!0),el.set("isMac",Pe),el.set("isLinux",Fe),el.set("isWindows",Oe),el.set("isWeb",We),el.set("isMacNative",Pe&&!We),el.set("isEdge",et),el.set("isFirefox",Qe),el.set("isChrome",Xe),el.set("isSafari",Je);const tl=Object.prototype.hasOwnProperty,il={regexParsingWithErrorRecovery:!0},nl=ue(0,"Empty context key expression"),sl=ue(0,"Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),ol=ue(0,"'in' after 'not'."),rl=ue(0,"closing parenthesis ')'"),al=ue(0,"Unexpected token"),ll=ue(0,"Did you forget to put && or || before the token?"),hl=ue(0,"Unexpected end of expression"),dl=ue(0,"Did you forget to put a context key?");class cl{constructor(e=il){this._config=e,this._scanner=new Ja,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?ll:void 0;throw this._parsingErrors.push({message:al,offset:e.offset,lexeme:Ja.getLexeme(e),additionalInfo:t}),cl._parseError}return e}catch(Dre){if(Dre!==cl._parseError)throw Dre;return}}else this._parsingErrors.push({message:nl,offset:0,lexeme:"",additionalInfo:sl})}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return 1===e.length?e[0]:ul.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return 1===e.length?e[0]:ul.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),pl.INSTANCE;case 12:return this._advance(),ml.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,rl),null==e?void 0:e.negate()}case 17:return this._advance(),wl.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),ul.true();case 12:return this._advance(),ul.false();case 0:{this._advance();const e=this._expr();return this._consume(1,rl),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const i=e.lexeme,n=i.lastIndexOf("/"),s=n===i.length-1?void 0:this._removeFlagsGY(i.substring(n+1));let o;try{o=new RegExp(i.substring(1,n),s)}catch(Dre){throw this._errExpectedButGot("REGEX",e)}return xl.create(t,o)}switch(e.type){case 10:case 19:{const i=[e.lexeme];this._advance();let n=this._peek(),s=0;for(let t=0;t=0){const o=i.slice(t+1,s),r="i"===i[s+1]?"i":"";try{n=new RegExp(o,r)}catch(FU){throw this._errExpectedButGot("REGEX",e)}}}if(null===n)throw this._errExpectedButGot("REGEX",e);return xl.create(t,n)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,ol);const e=this._value();return ul.notIn(t,e)}switch(this._peek().type){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return ul.equals(t,e);switch(e){case"true":return ul.has(t);case"false":return ul.not(t);default:return ul.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return ul.notEquals(t,e);switch(e){case"true":return ul.not(t);case"false":return ul.has(t);default:return ul.notEquals(t,e)}}case 5:return this._advance(),kl.create(t,this._value());case 6:return this._advance(),Dl.create(t,this._value());case 7:return this._advance(),Sl.create(t,this._value());case 8:return this._advance(),Ll.create(t,this._value());case 13:return this._advance(),ul.in(t,this._value());default:return ul.has(t)}}case 20:throw this._parsingErrors.push({message:hl,offset:e.offset,lexeme:"",additionalInfo:dl}),cl._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=ue(0,"Expected: {0}\nReceived: '{1}'.",e,Ja.getLexeme(t)),s=t.offset,o=Ja.getLexeme(t);return this._parsingErrors.push({message:n,offset:s,lexeme:o,additionalInfo:i}),cl._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}cl._parseError=new Error;class ul{static false(){return pl.INSTANCE}static true(){return ml.INSTANCE}static has(e){return fl.create(e)}static equals(e,t){return _l.create(e,t)}static notEquals(e,t){return Cl.create(e,t)}static regex(e,t){return xl.create(e,t)}static in(e,t){return vl.create(e,t)}static notIn(e,t){return bl.create(e,t)}static not(e){return wl.create(e)}static and(...e){return Il.create(e,null,!0)}static or(...e){return Ml.create(e,null,!0)}static deserialize(e){if(null==e)return;return this._parser.parse(e)}}function gl(e,t){return e.cmp(t)}ul._parser=new cl({regexParsingWithErrorRecovery:!1});class pl{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return ml.INSTANCE}}pl.INSTANCE=new pl;class ml{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return pl.INSTANCE}}ml.INSTANCE=new ml;class fl{static create(e,t=null){const i=el.get(e);return"boolean"==typeof i?i?ml.INSTANCE:pl.INSTANCE:new fl(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:Al(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=el.get(this.key);return"boolean"==typeof e?e?ml.INSTANCE:pl.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=wl.create(this.key,this)),this.negated}}class _l{static create(e,t,i=null){if("boolean"==typeof t)return t?fl.create(e,i):wl.create(e,i);const n=el.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?ml.INSTANCE:pl.INSTANCE}return new _l(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=el.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?ml.INSTANCE:pl.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Cl.create(this.key,this.value,this)),this.negated}}class vl{static create(e,t){return new vl(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"==typeof i&&"object"==typeof t&&null!==t&&tl.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=bl.create(this.key,this.valueKey)),this.negated}}class bl{static create(e,t){return new bl(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=vl.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class Cl{static create(e,t,i=null){if("boolean"==typeof t)return t?wl.create(e,i):fl.create(e,i);const n=el.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?pl.INSTANCE:ml.INSTANCE}return new Cl(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=el.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?pl.INSTANCE:ml.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_l.create(this.key,this.value,this)),this.negated}}class wl{static create(e,t=null){const i=el.get(e);return"boolean"==typeof i?i?pl.INSTANCE:ml.INSTANCE:new wl(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:Al(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=el.get(this.key);return"boolean"==typeof e?e?pl.INSTANCE:ml.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=fl.create(this.key,this)),this.negated}}function yl(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):pl.INSTANCE}class Sl{static create(e,t,i=null){return yl(t,(t=>new Sl(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Dl.create(this.key,this.value,this)),this.negated}}class Ll{static create(e,t,i=null){return yl(t,(t=>new Ll(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=kl.create(this.key,this.value,this)),this.negated}}class kl{static create(e,t,i=null){return yl(t,(t=>new kl(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))new Dl(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:Ol(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Sl.create(this.key,this.value,this)),this.negated}}class xl{static create(e,t){return new xl(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Nl.create(this)),this.negated}}class Nl{static create(e){return new Nl(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function El(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),s=0===n.length,o=Ml.create(e.expr.map((e=>Il.create([e,t],null,i))),null,s);o&&(n.push(o),n.sort(gl))}if(1===n.length)return n[0];if(i){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=Ml.create(e,this,!0)}return this.negated}}class Ml{static create(e,t,i){return Ml._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of Bl(t))for(const t of Bl(i))n.push(Il.create([e,t],null,!1));e.unshift(Ml.create(n,null,!1))}this.negated=Ml.create(e,this,!0)}return this.negated}}class Tl extends fl{static all(){return Tl._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?Tl._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&Tl._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return _l.create(this.key,e)}}Tl._info=[];const Rl=Pa("contextKeyService");function Al(e,t){return et?1:0}function Ol(e,t,i,n){return ei?1:tn?1:0}function Pl(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&Fl(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(Pl(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return Fl(t.expr,e.expr);for(const i of e.expr)if(Pl(i,t))return!0;return!1}return e.equals(t)}function Fl(e,t){let i=0,n=0;for(;i{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(ql)),this._cachedMergedKeybindings.slice(0)}}const jl=new Kl;function ql(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.commandt.command)return 1}return e.weight2-t.weight2}Ul.add("platform.keybindingsRegistry",jl);var $l,Gl=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Zl=function(e,t){return function(i,n){t(i,n,e)}},Yl=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);st===e}}eh._all=new Map;const th=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new $({merge:eh.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(eh.for(Ql.CommandPalette)),x((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(eh.for(Ql.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new O,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(eh.for(e)),x((()=>{n(),this._onDidChangeMenu.fire(eh.for(e))}))}appendMenuItems(e){const t=new N;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===Ql.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)Xl(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class ih extends ja{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let nh=$l=class{static label(e,t){return(null==t?void 0:t.renderShortTitle)&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,n,s,o){var r,a;let l;if(this.hideActions=n,this._commandService=o,this.id=e.id,this.label=$l.label(e,i),this.tooltip=null!==(a="string"==typeof e.tooltip?e.tooltip:null===(r=e.tooltip)||void 0===r?void 0:r.value)&&void 0!==a?a:"",this.enabled=!e.precondition||s.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=s.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&ea.isThemeIcon(t.icon)&&(l=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}l||(l=ea.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new $l(t,void 0,i,n,s,o):void 0,this._options=i,this.class=l&&ea.asClassName(l)}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};nh=$l=Gl([Zl(4,Rl),Zl(5,Ga)],nh);class sh{constructor(e){this.desc=e}}function oh(e){const t=new N,i=new e,n=i.desc,{f1:s,menu:o,keybinding:r,description:a}=n,l=Yl(n,["f1","menu","keybinding","description"]);if(t.add(Za.registerCommand({id:l.id,handler:(e,...t)=>i.run(e,...t),description:a})),Array.isArray(o))for(const h of o)t.add(th.appendMenuItem(h.id,Object.assign({command:Object.assign(Object.assign({},l),{precondition:null===h.precondition?void 0:l.precondition})},h)));else o&&t.add(th.appendMenuItem(o.id,Object.assign({command:Object.assign(Object.assign({},l),{precondition:null===o.precondition?void 0:l.precondition})},o)));if(s&&(t.add(th.appendMenuItem(Ql.CommandPalette,{command:l,when:l.precondition})),t.add(th.addCommand(l))),Array.isArray(r))for(const h of r)t.add(jl.registerKeybindingRule(Object.assign(Object.assign({},h),{id:l.id,when:l.precondition?ul.and(l.precondition,h.when):h.when})));else r&&t.add(jl.registerKeybindingRule(Object.assign(Object.assign({},r),{id:l.id,when:l.precondition?ul.and(l.precondition,r.when):r.when})));return t}const rh=Pa("telemetryService"),ah=Pa("logService");var lh;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(lh||(lh={}));const hh=lh.Info;class dh extends E{constructor(){super(...arguments),this.level=hh,this._onDidChangeLogLevel=this._register(new U),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==lh.Off&&this.level<=e}}class ch extends dh{constructor(e=hh,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(lh.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(lh.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(lh.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(lh.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(lh.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}dispose(){}}class uh extends dh{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose()}}new Tl("logLevel",function(e){switch(e){case lh.Trace:return"trace";case lh.Debug:return"debug";case lh.Info:return"info";case lh.Warning:return"warn";case lh.Error:return"error";case lh.Off:return"off"}}(lh.Info));class gh{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?ul.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};jl.registerKeybindingRule(i)}}Za.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){th.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class ph extends gh{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(Rl).contextMatchesRules(null!=i?i:void 0))return n(e,o,t)}))}runCommand(e,t){return fh.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class _h extends fh{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=Ql.EditorContext),t.title||(t.title=e.label),t.when=ul.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(_h.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(rh).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class vh extends _h{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e{var i,s;const o=e.get(Rl),r=e.get(ah);if(o.contextMatchesRules(null!==(i=this.desc.precondition)&&void 0!==i?i:void 0))return this.runEditorCommand(e,n,...t);r.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,null===(s=this.desc.precondition)||void 0===s?void 0:s.serialize())}))}}function Ch(e,t){Za.registerCommand(e,(function(e,...i){const n=e.get(Oa),[s,o]=i;jr(an.isUri(s)),jr(Ba.isIPosition(o));const r=e.get(Wa).getModel(s);if(r){const e=Ba.lift(o);return n.invokeFunction(t,r,e,...i.slice(2))}return e.get(Va).createModelReference(s).then((e=>new Promise(((s,r)=>{try{s(n.invokeFunction(t,e.object.textEditorModel,Ba.lift(o),i.slice(2)))}catch(a){r(a)}})).finally((()=>{e.dispose()}))))}))}function wh(e){return Dh.INSTANCE.registerEditorCommand(e),e}function yh(e){const t=new e;return Dh.INSTANCE.registerEditorAction(t),t}function Sh(e){return Dh.INSTANCE.registerEditorAction(e),e}function Lh(e,t,i){Dh.INSTANCE.registerEditorContribution(e,t,i)}var kh;!function(e){e.getEditorCommand=function(e){return Dh.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return Dh.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return Dh.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return Dh.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return Dh.INSTANCE.getDiffEditorContributions()}}(kh||(kh={}));class Dh{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function xh(e){return e.register(),e}Dh.INSTANCE=new Dh,Ul.add("editor.contributions",Dh.INSTANCE);const Nh=xh(new ph({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:Ql.MenubarEditMenu,group:"1_do",title:ue(0,"&&Undo"),order:1},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Undo"),order:1}]}));xh(new mh(Nh,{id:"default:undo",precondition:void 0}));const Eh=xh(new ph({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:Ql.MenubarEditMenu,group:"1_do",title:ue(0,"&&Redo"),order:2},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Redo"),order:1}]}));xh(new mh(Eh,{id:"default:redo",precondition:void 0}));const Ih=xh(new ph({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:Ql.MenubarSelectionMenu,group:"1_basic",title:ue(0,"&&Select All"),order:1},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Select All"),order:1}]}));class Mh{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return Mh.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Mh.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return Mh.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return Mh.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return Mh.plusRange(this,e)}static plusRange(e,t){let i,n,s,o;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new Mh(i,n,s,o)}intersectRanges(e){return Mh.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn;const r=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,h=t.endColumn;return il?(s=l,o=h):s===l&&(o=Math.min(o,h)),i>s||i===s&&n>o?null:new Mh(i,n,s,o)}equalsRange(e){return Mh.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Mh.getEndPosition(this)}static getEndPosition(e){return new Ba(e.endLineNumber,e.endColumn)}getStartPosition(){return Mh.getStartPosition(this)}static getStartPosition(e){return new Ba(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Mh(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Mh(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Mh.collapseToStart(this)}static collapseToStart(e){return new Mh(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return Mh.collapseToEnd(this)}static collapseToEnd(e){return new Mh(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new Mh(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new Mh(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Mh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}class Th extends Mh{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Th.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new Th(this.startLineNumber,this.startColumn,e,t):new Th(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Ba(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Ba(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new Th(e,t,this.endLineNumber,this.endColumn):new Th(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new Th(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new Th(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Th(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Th(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ph=function(e,t){return function(i,n){t(i,n,e)}},Fh=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Bh=new Tl("selectionAnchorSet",!1);let Wh=Ah=class{static get(e){return e.getContribution(Ah.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Bh.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations((t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Th.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new Ia).appendText(ue(0,"Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),Os(ue(0,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Th.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations((t=>{t.removeDecoration(e),this.decorationId=void 0})),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Wh.ID="editor.contrib.selectionAnchorController",Wh=Ah=Oh([Ph(1,Rl)],Wh);Lh(Wh.ID,Wh,4),yh(class extends _h{constructor(){super({id:"editor.action.setSelectionAnchor",label:ue(0,"Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2080),weight:100}})}run(e,t){var i;return Fh(this,void 0,void 0,(function*(){null===(i=Wh.get(t))||void 0===i||i.setSelectionAnchor()}))}}),yh(class extends _h{constructor(){super({id:"editor.action.goToSelectionAnchor",label:ue(0,"Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:Bh})}run(e,t){var i;return Fh(this,void 0,void 0,(function*(){null===(i=Wh.get(t))||void 0===i||i.goToSelectionAnchor()}))}}),yh(class extends _h{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:ue(0,"Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:Bh,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2089),weight:100}})}run(e,t){var i;return Fh(this,void 0,void 0,(function*(){null===(i=Wh.get(t))||void 0===i||i.selectFromAnchorToCursor()}))}}),yh(class extends _h{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:ue(0,"Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:Bh,kbOpts:{kbExpr:Rh.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return Fh(this,void 0,void 0,(function*(){null===(i=Wh.get(t))||void 0===i||i.cancelSelectionAnchor()}))}});const Vh=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var Hh;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||(t instanceof zh||!(!t||"object"!=typeof t)&&("boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested))},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:B.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Vh})}(Hh||(Hh={}));class zh{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Vh:(this._emitter||(this._emitter=new U),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Uh{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new zh),this._token}cancel(){this._token?this._token instanceof zh&&this._token.cancel():this._token=Hh.Cancelled}dispose(e=!1){var t;e&&this.cancel(),null===(t=this._parentListener)||void 0===t||t.dispose(),this._token?this._token instanceof zh&&this._token.dispose():this._token=Hh.None}}const Kh=Symbol("MicrotaskDelay");var jh=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},qh=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,s){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,s,(t=e[i](t)).done,t.value)}))}}};function $h(e){return!!e&&"function"==typeof e.then}function Gh(e){const t=new Uh,i=e(t.token),n=new Promise(((e,n)=>{const s=t.token.onCancellationRequested((()=>{s.dispose(),t.dispose(),n(new c)}));Promise.resolve(i).then((i=>{s.dispose(),t.dispose(),e(i)}),(e=>{s.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return n.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return n.finally(e)}}}function Zh(e,t,i){return new Promise(((n,s)=>{const o=t.onCancellationRequested((()=>{o.dispose(),n(i)}));e.then(n,s).finally((()=>o.dispose()))}))}class Yh{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{if(this.queuedPromise=null,this.isDisposed)return;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}dispose(){this.isDisposed=!0}}class Xh{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{var e;this.deferred=null,null===(e=this.doResolve)||void 0===e||e.call(this,null)};return this.deferred=t===Kh?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){var e;return!!(null===(e=this.deferred)||void 0===e?void 0:e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&(null===(e=this.doReject)||void 0===e||e.call(this,new c),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class Qh{constructor(e){this.delayer=new Xh(e),this.throttler=new Yh}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function Jh(e,t){return t?new Promise(((i,n)=>{const s=setTimeout((()=>{o.dispose(),i()}),e),o=t.onCancellationRequested((()=>{clearTimeout(s),o.dispose(),n(new c)}))})):Gh((t=>Jh(e,t)))}function ed(e,t=0,i){const n=setTimeout((()=>{e(),i&&s.dispose()}),t),s=x((()=>{clearTimeout(n),null==i||i.deleteAndLeak(s)}));return null==i||i.add(s),s}function td(e,t=e=>!!e,i=null){let n=0;const s=e.length,o=()=>{if(n>=s)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):o()))};return o()}class id{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class nd{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class sd{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;null===(e=this.runner)||void 0===e||e.call(this)}}let od;od="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{qe((()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,i-Date.now())}))}));let t=!1;return{dispose(){t||(t=!0)}}}:(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}};class rd{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=od((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class ad{get isRejected(){var e;return 1===(null===(e=this.outcome)||void 0===e?void 0:e.outcome)}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()}))}error(e){return new Promise((t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()}))}cancel(){return this.error(new c)}}var ld;!function(e){e.settled=function(e){return jh(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))},e.withAsyncBody=function(e){return new Promise(((t,i)=>jh(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(n){i(n)}}))))}}(ld||(ld={}));class hd{static fromArray(e){return new hd((t=>{t.emitMany(e)}))}static fromPromise(e){return new hd((t=>jh(this,void 0,void 0,(function*(){t.emitMany(yield e)}))))}static fromPromises(e){return new hd((t=>jh(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>jh(this,void 0,void 0,(function*(){return t.emitOne(yield e)})))))}))))}static merge(e){return new hd((t=>jh(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>{var i,n,s;return jh(this,void 0,void 0,(function*(){var o,r,a,l;try{for(i=!0,n=qh(e);!(o=(s=yield n.next()).done);i=!0){l=s.value,i=!1;const e=l;t.emitOne(e)}}catch(h){r={error:h}}finally{try{i||o||!(a=n.return)||(yield a.call(n))}finally{if(r)throw r.error}}}))})))}))))}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new U,queueMicrotask((()=>jh(this,void 0,void 0,(function*(){const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{yield Promise.resolve(e(t)),this.resolve()}catch(i){this.reject(i)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))))}[Symbol.asyncIterator](){let e=0;return{next:()=>jh(this,void 0,void 0,(function*(){for(;;){if(2===this._state)throw this._error;if(ejh(this,void 0,void 0,(function*(){var n,s,o,r;try{for(var a,l=!0,h=qh(e);!(n=(a=yield h.next()).done);l=!0){r=a.value,l=!1;const e=r;i.emitOne(t(e))}}catch(d){s={error:d}}finally{try{l||n||!(o=h.return)||(yield o.call(h))}finally{if(s)throw s.error}}}))))}map(e){return hd.map(this,e)}static filter(e,t){return new hd((i=>jh(this,void 0,void 0,(function*(){var n,s,o,r;try{for(var a,l=!0,h=qh(e);!(n=(a=yield h.next()).done);l=!0){r=a.value,l=!1;const e=r;t(e)&&i.emitOne(e)}}catch(d){s={error:d}}finally{try{l||n||!(o=h.return)||(yield o.call(h))}finally{if(s)throw s.error}}}))))}filter(e){return hd.filter(this,e)}static coalesce(e){return hd.filter(e,(e=>!!e))}coalesce(){return hd.coalesce(this)}static toPromise(e){var t,i,n,s,o,r,a;return jh(this,void 0,void 0,(function*(){const l=[];try{for(t=!0,i=qh(e);n=yield i.next(),!(s=n.done);t=!0){a=n.value,t=!1;const e=a;l.push(e)}}catch(h){o={error:h}}finally{try{t||s||!(r=i.return)||(yield r.call(i))}finally{if(o)throw o.error}}return l}))}toPromise(){return hd.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}hd.EMPTY=hd.fromArray([]);class dd extends hd{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function cd(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.entries(e).forEach((([e,i])=>{t[e]=i&&"object"==typeof i?cd(i):i})),t}const ud=Object.prototype.hasOwnProperty;function gd(e,t){return pd(e,t,new Set)}function pd(e,t,i){if(Kr(e))return e;const n=t(e);if(void 0!==n)return n;if(Array.isArray(e)){const n=[];for(const s of e)n.push(pd(s,t,i));return n}if(Fr(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const s in e)ud.call(e,s)&&(n[s]=pd(e[s],t,i));return i.delete(e),n}return e}function md(e,t,i=!0){return Fr(e)?(Fr(t)&&Object.keys(t).forEach((n=>{n in e?i&&(Fr(e[n])&&Fr(t[n])?md(e[n],t[n],i):e[n]=t[n]):e[n]=t[n]})),e):t}function fd(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;ie===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n0))return e;n=e-1}}return-(i+1)}(e.length,(n=>i(e[n],t)))}function Td(e,t,i){if((e|=0)>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],s=[],o=[],r=[];for(const a of t){const e=i(a,n);e<0?s.push(a):e>0?o.push(a):r.push(a)}return e!!e))}function Fd(e){let t=0;for(let i=0;i0}function Vd(e,t=e=>e){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function Hd(e,t){return e.length>0?e[0]:t}function zd(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let s=i;st;s--)n.push(s);return n}function Ud(e,t,i){const n=e.slice(0,t),s=e.slice(t);return n.concat(i,s)}function Kd(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function jd(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function qd(e,t){for(const i of t)e.push(i)}function $d(e){return Array.isArray(e)?e:[e]}function Gd(e,t,i,n){const s=Zd(e,t);let o=e.splice(s,i);return void 0===o&&(o=[]),function(e,t,i){const n=Zd(e,t),s=e.length,o=i.length;e.length=s+o;for(let r=s-1;r>=n;r--)e[r+o]=e[r];for(let r=0;rt(e(i),e(n))}!function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(yd||(yd={}));const Xd=(e,t)=>e-t,Qd=(e,t)=>Xd(e?1:0,t?1:0);function Jd(e){return(t,i)=>-e(t,i)}class ec{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class tc{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new tc((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new tc((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||yd.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}function ic(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}tc.empty=new tc((e=>{}));class nc{constructor(e,t,i,n=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=ic(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class sc{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=ic(Math.max(Math.min(1,t),0),3),this.l=ic(Math.max(Math.min(1,i),0),3),this.a=ic(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,o=Math.max(t,i,n),r=Math.min(t,i,n);let a=0,l=0;const h=(r+o)/2,d=o-r;if(d>0){switch(l=Math.min(h<=.5?d/(2*h):d/(2-2*h),1),o){case t:a=(i-n)/d+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:s}=e;let o,r,a;if(0===i)o=r=a=n;else{const e=n<.5?n*(1+i):n+i-n*i,s=2*n-e;o=sc._hue2rgb(s,e,t+1/3),r=sc._hue2rgb(s,e,t),a=sc._hue2rgb(s,e,t-1/3)}return new nc(Math.round(255*o),Math.round(255*r),Math.round(255*a),s)}}class oc{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=ic(Math.max(Math.min(1,t),0),3),this.v=ic(Math.max(Math.min(1,i),0),3),this.a=ic(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),o=s-Math.min(t,i,n),r=0===s?0:o/s;let a;return a=0===o?0:s===t?((i-n)/o%6+6)%6:s===i?(n-t)/o+2:(t-i)/o+4,new oc(Math.round(60*a),r,s,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,o=n*i,r=o*(1-Math.abs(t/60%2-1)),a=n-o;let[l,h,d]=[0,0,0];return t<60?(l=o,h=r):t<120?(l=r,h=o):t<180?(h=o,d=r):t<240?(h=r,d=o):t<300?(l=r,d=o):t<=360&&(l=o,d=r),l=Math.round(255*(l+a)),h=Math.round(255*(h+a)),d=Math.round(255*(d+a)),new nc(l,h,d,s)}}class rc{static fromHex(e){return rc.Format.CSS.parseHex(e)||rc.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:sc.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:oc.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof nc)this.rgba=e;else if(e instanceof sc)this._hsla=e,this.rgba=sc.toRGBA(e);else{if(!(e instanceof oc))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=oc.toRGBA(e)}}equals(e){return!!e&&nc.equals(this.rgba,e.rgba)&&sc.equals(this.hsla,e.hsla)&&oc.equals(this.hsva,e.hsva)}getRelativeLuminance(){return ic(.2126*rc._relativeLuminanceForComponent(this.rgba.r)+.7152*rc._relativeLuminanceForComponent(this.rgba.g)+.0722*rc._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()=t){return l-tt))return new dc(e,t)}static ofLength(e){return new dc(0,e)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new f(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new dc(this.start+e,this.endExclusive+e)}deltaStart(e){return new dc(this.start+e,this.endExclusive)}deltaEnd(e){return new dc(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString())).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length),0)}}function uc(e,t,i){const n=function(e,t,i=e.length-1){for(let n=i;n>=0;n--){if(t(e[n]))return n}return-1}(e,t);if(-1!==n)return e[n]}function gc(e,t){const i=pc(e,t);return-1===i?void 0:e[i]}function pc(e,t,i=0,n=e.length){let s=i,o=n;for(;s0&&(i=s)}return i}function vc(e,t){if(0===e.length)return-1;let i=0;for(let n=1;n0&&(i=n)}return i}fc.assertInvariants=!1;class bc{static fromRange(e){return new bc(e.startLineNumber,e.endLineNumber)}static joinMany(e){if(0===e.length)return[];let t=new Cc(e[0].slice());for(let i=1;it)throw new f(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),i=pc(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=gc(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let i=0,n=0,s=null;for(;i=o.startLineNumber?s=new bc(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(t.push(s),s=o)}return null!==s&&t.push(s),new Cc(t)}subtractFrom(e){const t=mc(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),i=pc(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)return new Cc([e]);const n=[];let s=e.startLineNumber;for(let o=t;os&&n.push(new bc(s,e.startLineNumber)),s=e.endLineNumberExclusive}return se.toString())).join(", ")}getIntersection(e){const t=[];let i=0,n=0;for(;it.delta(e))))}}const wc={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}},yc=Pa("languageService"),Sc="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";const Lc=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of Sc)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function kc(e){let t=Lc;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const Dc=new O;function xc(e,t,i,n,s){if(s||(s=v.first(Dc)),i.length>s.maxLen){let o=e-s.maxLen/2;return o<0?o=0:n+=o,xc(e,t,i=i.substring(o,e+s.maxLen/2),n,s)}const o=Date.now(),r=e-1-n;let a=-1,l=null;for(let h=1;!(Date.now()-o>=s.timeBudget);h++){const e=r-s.windowSize*h;t.lastIndex=Math.max(0,e);const n=Nc(t,i,r,a);if(!n&&l)break;if(l=n,e<=0)break;a=e}if(l){const e={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function Nc(e,t,i,n){let s;for(;s=e.exec(t);){const t=s.index||0;if(t<=i&&e.lastIndex>=i)return s;if(n>0&&t>n)return null}return null}var Ec;Dc.unshift({maxLen:1e3,windowSize:15,timeBudget:150}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(Ec||(Ec={}));class Ic{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t0&&e.getLanguageId(r-1)===s;)r--;return new Ac(e,s,r,o+1,e.getStartOffset(r),e.getEndOffset(o))}class Ac{constructor(e,t,i,n,s,o){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=o}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function Oc(e){return!!(3&e)}class Pc{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new Ic(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new Ic({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new Ic({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:Pc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:Pc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}Pc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t",Pc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t";const Fc="undefined"!=typeof Buffer;new Gs((()=>new Uint8Array(256)));let Bc,Wc,Vc,Hc;class zc{static wrap(e){return Fc&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new zc(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return Fc?this.buffer.toString():(Bc||(Bc=new TextDecoder),Bc.decode(this.buffer))}}function Uc(e,t){return(e[t+0]|0)>>>0|e[t+1]<<8>>>0}function Kc(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function jc(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function qc(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function $c(e,t){return e[t]}function Gc(e,t,i){e[i]=t}function Zc(){return Wc||(Wc=new TextDecoder("UTF-16LE")),Wc}function Yc(){return Hc||(Hc=Ye()?Zc():(Vc||(Vc=new TextDecoder("UTF-16BE")),Vc)),Hc}function Xc(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?function(e,t,i){const n=[];let s=0;for(let o=0;o=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let r=0;r{const[i,n]=e,[s,o]=t;return i===s||i===o||n===s||n===o},s=(e,n)=>{const s=Math.min(e,n),o=Math.max(e,n);for(let r=0;r0&&o.push({open:n,close:s})}return o}(t);this.brackets=i.map(((t,n)=>new Jc(e,n,t.open,t.close,function(e,t,i,n){let s=[];s=s.concat(e),s=s.concat(t);for(let o=0,r=s.length;o=0&&n.push(t);for(const t of o.close)t.indexOf(e)>=0&&n.push(t)}}function iu(e,t){return e.length-t.length}function nu(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function su(e){const t=/^[\w ]+$/.test(e);return e=Js(e),t?`\\b${e}\\b`:e}function ou(e){return no(`(${e.map(su).join(")|(")})`,!0)}const ru=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return Yc().decode(t)}(e)),t}}();class au{static _findPrevBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const o=i.length-(s.index||0),r=s[0].length,a=n+o;return new Mh(t,a-r+1,t,a+1)}static findPrevBracketInRange(e,t,i,n,s){const o=ru(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,o,n)}static findNextBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const o=s.index||0,r=s[0].length;if(0===r)return null;const a=n+o;return new Mh(t,a+1,t,a+1+r)}static findNextBracketInRange(e,t,i,n,s){const o=i.substring(n,s);return this.findNextBracketInText(e,t,o,n)}}class lu{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return Vd(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if(Oc(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,r=au.findPrevBracketInRange(s,1,o,0,o.length);if(!r)return null;const a=o.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function hu(e){return e.global&&(e.lastIndex=0),!0}class du{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&hu(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&hu(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&hu(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&hu(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class cu{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=cu._createOpenBracketRegExp(e[0]),i=cu._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let s=0,o=this._regExpRules.length;s!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return e.action}if(e>=2&&i.length>0&&n.length>0)for(let s=0,o=this._brackets.length;s=2&&i.length>0)for(let s=0,o=this._brackets.length;s0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};Ul.add(Su,Lu);const ku="base.contributions.configuration",Du={properties:{},patternProperties:{}},xu={properties:{},patternProperties:{}},Nu={properties:{},patternProperties:{}},Eu={properties:{},patternProperties:{}},Iu={properties:{},patternProperties:{}},Mu={properties:{},patternProperties:{}},Tu="vscode://schemas/settings/resourceLanguage",Ru=Ul.as(Su);const Au="\\[([^\\]]+)\\]",Ou=new RegExp(Au,"g"),Pu=`^(${Au})+$`,Fu=new RegExp(Pu);function Bu(e){const t=[];if(Fu.test(e)){let i=Ou.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=Ou.exec(e)}}return Vd(t)}const Wu=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new U,this._onDidUpdateConfiguration=new U,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:ue(0,"Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},Ru.registerSchema(Tu,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),Ru.registerSchema(Tu,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var i;const n=[];for(const{overrides:s,source:o}of e)for(const e in s)if(t.add(e),Fu.test(e)){const t=this.configurationDefaultsOverrides.get(e),r=null!==(i=null==t?void 0:t.valuesSources)&&void 0!==i?i:new Map;if(o)for(const i of Object.keys(s[e]))r.set(i,o);const a=Object.assign(Object.assign({},(null==t?void 0:t.value)||{}),s[e]);this.configurationDefaultsOverrides.set(e,{source:o,value:a,valuesSources:r});const l={type:"object",default:a,description:ue(0,"Configure settings to be overridden for the {0} language.",e.replace(/[\[\]]/g,"")),$ref:Tu,defaultDefaultValue:a,source:Pr(o)?void 0:o,defaultValueSource:o};n.push(...Bu(e)),this.configurationProperties[e]=l,this.defaultLanguageConfigurationOverridesNode.properties[e]=l}else{this.configurationDefaultsOverrides.set(e,{value:s[e],source:o});const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.doRegisterOverrideIdentifiers(n)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,s=3,o){var r;s=Kr(e.scope)?s:e.scope;const a=e.properties;if(a)for(const h in a){const e=a[h];t&&Vu(h,e)?delete a[h]:(e.source=i,e.defaultDefaultValue=a[h].default,this.updatePropertyDefaultValue(h,e),Fu.test(h)?e.scope=void 0:(e.scope=Kr(e.scope)?s:e.scope,e.restricted=Kr(e.restricted)?!!(null==n?void 0:n.includes(h)):e.restricted),!a[h].hasOwnProperty("included")||a[h].included?(this.configurationProperties[h]=a[h],(null===(r=a[h].policy)||void 0===r?void 0:r.name)&&this.policyConfigurations.set(a[h].policy.name,h),!a[h].deprecationMessage&&a[h].markdownDeprecationMessage&&(a[h].deprecationMessage=a[h].markdownDeprecationMessage),o.add(h)):(this.excludedConfigurationProperties[h]=a[h],delete a[h]))}const l=e.allOf;if(l)for(const h of l)this.validateAndRegisterProperties(h,t,i,n,s,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const t in i)this.updateSchema(t,i[t]);const n=e.allOf;null==n||n.forEach(t)};t(e)}updateSchema(e,t){switch(Du.properties[e]=t,t.scope){case 1:xu.properties[e]=t;break;case 2:Nu.properties[e]=t;break;case 6:Eu.properties[e]=t;break;case 3:Iu.properties[e]=t;break;case 4:Mu.properties[e]=t;break;case 5:Mu.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:ue(0,"Configure editor settings to be overridden for a language."),errorMessage:ue(0,"This setting does not support per-language configuration."),$ref:Tu};this.updatePropertyDefaultValue(t,i),Du.properties[t]=i,xu.properties[t]=i,Nu.properties[t]=i,Eu.properties[t]=i,Iu.properties[t]=i,Mu.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:ue(0,"Configure editor settings to be overridden for a language."),errorMessage:ue(0,"This setting does not support per-language configuration."),$ref:Tu};Du.patternProperties[Pu]=e,xu.patternProperties[Pu]=e,Nu.patternProperties[Pu]=e,Eu.patternProperties[Pu]=e,Iu.patternProperties[Pu]=e,Mu.patternProperties[Pu]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=null==i?void 0:i.value,s=null==i?void 0:i.source;zr(n)&&(n=t.defaultDefaultValue,s=void 0),zr(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=s}};function Vu(e,t){var i,n,s,o;return e.trim()?Fu.test(e)?ue(0,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==Wu.getConfigurationProperties()[e]?ue(0,"Cannot register '{0}'. This property is already registered.",e):(null===(i=t.policy)||void 0===i?void 0:i.name)&&void 0!==Wu.getPolicyConfigurations().get(null===(n=t.policy)||void 0===n?void 0:n.name)?ue(0,"Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,null===(s=t.policy)||void 0===s?void 0:s.name,Wu.getPolicyConfigurations().get(null===(o=t.policy)||void 0===o?void 0:o.name)):null:ue(0,"Cannot register an empty property")}Ul.add(ku,Wu);const Hu=new class{constructor(){this._onDidChangeLanguages=new U,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t{const t=new Set;return{info:new qu(this,e,t),closing:t}})),s=new $s((e=>{const t=new Set,i=new Set;return{info:new $u(this,e,t,i),opening:t,openingColorized:i}}));for(const[r,a]of i){const e=n.get(r),t=s.get(a);e.closing.add(t.info),t.opening.add(e.info)}const o=t.colorizedBracketPairs?Ku(t.colorizedBracketPairs):i.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[r,a]of o){const e=n.get(r),t=s.get(a);e.closing.add(t.info),t.openingColorized.add(e.info),t.opening.add(e.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...s.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function Ku(e){return e.filter((([e,t])=>""!==e&&""!==t))}class ju{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class qu extends ju{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class $u extends ju{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var Gu=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Zu=function(e,t){return function(i,n){t(i,n,e)}};class Yu{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const Xu=Pa("languageConfigurationService");let Qu=class extends E{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new ag),this.onDidChangeEmitter=this._register(new U),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(Ju));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new Yu(void 0));else for(const i of n)this.languageService.isRegisteredLanguageId(i)&&(this.configurations.delete(i),this.onDidChangeEmitter.fire(new Yu(i)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new Yu(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let s=t.getLanguageConfiguration(e);if(!s){if(!n.isRegisteredLanguageId(e))return new lg(e,{});s=new lg(e,{})}const o=function(e,t){const i=t.getValue(Ju.brackets,{overrideIdentifier:e}),n=t.getValue(Ju.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:eg(i),colorizedBracketPairs:eg(n)}}(s.languageId,i),r=sg([s.underlyingConfig,o]);return new lg(s.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};Qu=Gu([Zu(0,uu),Zu(1,yc)],Qu);const Ju={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function eg(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function tg(e,t,i){let n=ro(e.getLineContent(t));return n.length>i-1&&(n=n.substring(0,i-1)),n}function ig(e,t,i){e.tokenization.forceTokenization(t);return Rc(e.tokenization.getLineTokens(t),void 0===i?e.getLineMaxColumn(t)-1:i-1)}class ng{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new og(e,t,++this._order);return this._entries.push(i),this._resolved=null,x((()=>{for(let e=0;ee.configuration))))}}function sg(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class og{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class rg{constructor(e){this.languageId=e}}class ag extends E{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._register(this.register(zu,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new ng(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new rg(e)),x((()=>{s.dispose(),this._onDidChange.fire(new rg(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}}class lg{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new cu(this.underlyingConfig):null,this.comments=lg._handleComments(this.underlyingConfig),this.characterPair=new Pc(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||Lc,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new du(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new Uu(e,this.underlyingConfig)}getWordDefinition(){return kc(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new eu(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new lu(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new Mc(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}Cu(Xu,Qu,1);class hg{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}}class dg{constructor(e,t,i,n,s,o){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=s,this.bracketPairNode=o}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class cg extends dg{constructor(e,t,i,n,s,o,r){super(e,t,i,n,s,o),this.minVisibleColumnIndentation=r}}class ug{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}ug.zero=new ug(0,0);function gg(e){return 0===e}const pg=Math.pow(2,26);function mg(e,t){return e*pg+t}function fg(e){const t=e,i=Math.floor(t/pg);return new ug(i,t-i*pg)}function _g(e,t){let i=e+t;return t>=pg&&(i-=e%pg),i}function vg(e,t){return e.reduce(((e,i)=>_g(e,t(i))),0)}function bg(e,t){return e===t}function Cg(e,t){const i=e,n=t;if(n-i<=0)return 0;const s=Math.floor(i/pg),o=Math.floor(n/pg),r=n-o*pg;if(s===o){return mg(0,r-(i-s*pg))}return mg(o-s,r)}function wg(e,t){return e=t}function Lg(e){return mg(e.lineNumber-1,e.column-1)}function kg(e,t){const i=e,n=Math.floor(i/pg),s=i-n*pg,o=t,r=Math.floor(o/pg);return new Mh(n+1,s+1,r+1,o-r*pg+1)}class Dg{static fromModelContentChanges(e){const t=e.map((e=>{const t=Mh.lift(e.range);return new Dg(Lg(t.getStartPosition()),Lg(t.getEndPosition()),function(e){const t=so(e);return mg(t.length-1,t[t.length-1].length)}(e.text))})).reverse();return t}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${fg(this.startOffset)}...${fg(this.endOffset)}) -> ${fg(this.newLength)}`}}class xg{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Ng.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:Cg(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?mg(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):mg(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=fg(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?mg(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):mg(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(0===n){const e=1<e};class Tg{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}class Rg{get length(){return this._length}constructor(e){this._length=e}}class Ag extends Rg{static create(e,t,i){let n=e.length;return t&&(n=_g(n,t.length)),i&&(n=_g(n,i.length)),new Ag(n,e,t,i,t?t.missingOpeningBracketIds:Ig.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,s){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=s}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new Ag(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(_g(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class Og extends Rg{static create23(e,t,i,n=!1){let s=e.length,o=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(s=_g(s,t.length),o=o.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");s=_g(s,i.length),o=o.merge(i.missingOpeningBracketIds)}return n?new Fg(s,e.listHeight+1,e,t,i,o):new Pg(s,e.listHeight+1,e,t,i,o)}static getEmpty(){return new Wg(0,0,[],Ig.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){this.throwIfImmutable();if(0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){const e=t.childrenLength;if(0===e)throw new f;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;1&n&&(s+="font-style: italic;"),2&n&&(s+="font-weight: bold;");let o="";return 4&n&&(o+=" underline"),8&n&&(o+=" line-through"),o&&(s+=`text-decoration:${o};`),s}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}class qg{constructor(e,t,i,n,s){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=s}}class $g{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new Gg(this.textModel,this.bracketTokens),this._offset=0,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return mg(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=_g(this._offset,e);const t=fg(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=_g(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class Gg{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=e.length,e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,s=n.getCount();let o=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(s=e,o=t,r=this.lineIdx,a=this.lineCharOffset,s!==r?mg(r-s,a):mg(0,a-o));var s,o,r,a;return new qg(n,0,-1,Ig.getEmpty(),new zg(n))}}class Zg{constructor(e,t){this.text=e,this._offset=0,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,s=[];let o,r=0,a=0,l=0,h=0;const d=[];for(let g=0;g<60;g++)d.push(new qg(mg(0,g),0,-1,Ig.getEmpty(),new zg(mg(0,g))));const c=[];for(let g=0;g<60;g++)c.push(new qg(mg(1,g),0,-1,Ig.getEmpty(),new zg(mg(1,g))));if(n)for(n.lastIndex=0;null!==(o=n.exec(e));){const e=o.index,i=o[0];if("\n"===i)r++,a=e+1;else{if(l!==e){let t;if(h===r){const i=e-l;if(ifunction(e){let t=Js(e);/^[\w ]+/.test(e)&&(t=`\\b${t}`);/[\w ]+$/.test(e)&&(t=`${t}\\b`);return t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class Xg{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=Yg.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Qg(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const n=i>>1;for(let s=0;s=3?e[2]:null,t)}function Jg(e,t){return Math.abs(e.listHeight-t.listHeight)}function ep(e,t){return e.listHeight===t.listHeight?Og.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const n=[];let s;for(;;){if(t.listHeight===i.listHeight){s=t;break}if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let o=n.length-1;o>=0;o--){const e=n[o];s?e.childrenLength>=3?s=Og.create23(e.unappendChild(),s,null,!1):(e.appendChildOfSameHeight(s),s=void 0):e.handleChildrenChanged()}return s?Og.create23(e,s,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const n=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let s=t;for(let o=n.length-1;o>=0;o--){const e=n[o];s?e.childrenLength>=3?s=Og.create23(s,e.unprependChild(),null,!1):(e.prependChildOfSameHeight(s),s=void 0):e.handleChildrenChanged()}return s?Og.create23(s,e,null,!1):e}(t,e)}class tp{constructor(e){this.lastOffset=0,this.nextNodes=[e],this.offsets=[0],this.idxs=[]}readLongestNodeAt(e,t){if(wg(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=np(this.nextNodes);if(!i)return;const n=np(this.offsets);if(wg(e,n))return;if(wg(n,e))if(_g(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=ip(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=ip(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=np(this.offsets),t=np(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=np(this.nextNodes),n=ip(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push(_g(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function ip(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function np(e){return e.length>0?e[e.length-1]:void 0}function sp(e,t,i,n){return new op(e,t,i,n).parseDocument()}class op{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new tp(i):void 0,this.positionMapper=new xg(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ig.getEmpty(),0);return e||(e=Og.getEmpty()),e}parseList(e,t){const i=[];for(;;){let n=this.tryReadChildFromCache(e);if(!n){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}4===n.kind&&0===n.childrenLength||i.push(n)}const n=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t=2?Qg(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),s=i();if(!s)return n;for(let o=i();o;o=i())Jg(n,s)<=Jg(s,o)?(n=ep(n,s),s=o):s=ep(s,o);return ep(n,s)}(i):Qg(i,this.createImmutableLists);return n}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!gg(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>{if(null!==t&&!wg(i.length,t))return!1;return i.canBeReused(e)}));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new Kg(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new zg(i.length);const n=e.merge(i.bracketIds),s=this.parseList(n,t+1),o=this.tokenizer.peek();return o&&2===o.kind&&(o.bracketId===i.bracketId||o.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),Ag.create(i.astNode,s,o.astNode)):Ag.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}function rp(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=new ec(lp(e)),n=lp(t);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let s=i.dequeue();function o(e){if(void 0===e){const e=i.takeWhile((e=>!0))||[];return s&&e.unshift(s),e}const t=[];for(;s&&!gg(e);){const[n,o]=s.splitAt(e);t.push(n),e=Cg(n.lengthAfter,e),s=null!=o?o:i.dequeue()}return gg(e)||t.push(new ap(!1,e,e)),t}const r=[];function a(e,t,i){if(r.length>0&&bg(r[r.length-1].endOffset,e)){const e=r[r.length-1];r[r.length-1]=new Dg(e.startOffset,t,_g(e.newLength,i))}else r.push({startOffset:e,endOffset:t,newLength:i})}let l=0;for(const h of n){const e=o(h.lengthBefore);if(h.modified){const t=_g(l,vg(e,(e=>e.lengthBefore)));a(l,t,h.lengthAfter),l=t}else for(const t of e){const e=l;l=_g(l,t.lengthBefore),t.modified&&a(e,l,t.lengthAfter)}}return r}class ap{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=Cg(e,this.lengthAfter);return bg(t,0)?[this,void 0]:this.modified?[new ap(this.modified,this.lengthBefore,e),new ap(this.modified,0,t)]:[new ap(this.modified,e,e),new ap(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${fg(this.lengthBefore)} -> ${fg(this.lengthAfter)}`}}function lp(e){const t=[];let i=0;for(const n of e){const e=Cg(i,n.startOffset);gg(e)||t.push(new ap(!1,e,e));const s=Cg(n.startOffset,n.endOffset);t.push(new ap(!0,s,n.newLength)),i=n.endOffset}return t}class hp extends E{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new U,this.denseKeyProvider=new Tg,this.brackets=new Xg(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new Zg(this.textModel.getValue(),e);this.initialAstWithoutTokens=sp(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new Dg(mg(e.fromLineNumber-1,0),mg(e.toLineNumber,0),mg(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Dg.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=rp(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=rp(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t;return sp(new $g(this.textModel,this.brackets),e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=mg(e.startLineNumber-1,e.startColumn-1),n=mg(e.endLineNumber-1,e.endColumn-1);return new tc((e=>{const s=this.initialAstWithoutTokens||this.astWithTokens;up(s,0,s.length,i,n,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=Lg(e.getStartPosition()),n=Lg(e.getEndPosition());return new tc((e=>{const s=this.initialAstWithoutTokens||this.astWithTokens,o=new gp(e,t,this.textModel);pp(s,0,s.length,i,n,o,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return cp(t,0,t.length,Lg(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return dp(t,0,t.length,Lg(e))}}function dp(e,t,i,n){if(4===e.kind||2===e.kind){const s=[];for(const n of e.children)i=_g(t,n.length),s.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=s.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:o}=s[t];if(wg(i,n)){const s=dp(e.children[t],i,o,n);if(s)return s}}return null}if(3===e.kind)return null;if(1===e.kind){const n=kg(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function cp(e,t,i,n){if(4===e.kind||2===e.kind){for(const s of e.children){if(wg(n,i=_g(t,s.length))){const e=cp(s,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=kg(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function up(e,t,i,n,s,o,r,a,l,h,d=!1){if(r>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let d=0;d200)return!0;let h=!0;if(2===e.kind){let d=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),d=t,t++,a.set(e.openingBracket.text,t)}const c=_g(t,e.openingBracket.length);let u=-1;if(o.includeMinIndentation&&(u=e.computeMinIndentation(t,o.textModel)),h=o.push(new cg(kg(t,i),kg(t,c),e.closingBracket?kg(_g(c,(null===(l=e.child)||void 0===l?void 0:l.length)||0),i):void 0,r,d,e,u)),t=c,h&&e.child){const l=e.child;if(i=_g(t,l.length),yg(t,s)&&Sg(i,n)&&(h=pp(l,t,i,n,s,o,r+1,a),!h))return!1}null==a||a.set(e.openingBracket.text,d)}else{let i=t;for(const t of e.children){const e=i;if(i=_g(i,t.length),yg(e,s)&&yg(n,i)&&(h=pp(t,e,i,n,s,o,r,a),!h))return!1}}return h}class mp extends E{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new I),this.onDidChangeEmitter=new U,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId))||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())})))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const i=new N;this.bracketPairsTree.value=(e=i.add(new hp(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||tc.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||tc.empty}getBracketsInRange(e,t=!1){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(i=this.bracketPairsTree.value)||void 0===i?void 0:i.object.getBracketsInRange(e,t))||tc.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(Mh.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),o=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!o)return null;const r=o.textIsBracket[t];return r?vp(this._findMatchingBracketUp(r,n,fp(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(Mh.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy(Yd((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),Mh.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=fp(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),o=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let l=n-1;l>=0;l--){const e=t.getEndOffset(l);if(e<=r)break;if(Oc(t.getStandardTokenType(l))||t.getLanguageId(l)!==o){r=e;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let l=n+1;l=a)break;if(Oc(t.getStandardTokenType(l))||t.getLanguageId(l)!==o){a=e;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),o=n.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(o)).brackets;if(r&&!Oc(n.getStandardTokenType(o))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,o),h=null;for(;;){const n=au.findNextBracketInRange(r.forwardRegex,i,s,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=s.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof _p)return null;h=i}}a=n.endColumn-1}if(h)return h}if(o>0&&n.getStartOffset(o)===e.column-1){const r=o-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!Oc(n.getStandardTokenType(r))){const{searchStartOffset:o,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),h=au.findPrevBracketInRange(a.reversedRegex,i,s,o,l);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const e=s.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),i=this._matchFoundBracket(h,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof _p?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof _p?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,s=e.reversedRegex;let o=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return _p.INSTANCE;const h=au.findPrevBracketInRange(s,t,n,a,l);if(!h)break;const d=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return h;l=h.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const e=this.textModel.tokenization.getLineTokens(l),i=e.getCount(),s=this.textModel.getLineContent(l);let o=i-1,r=s.length,h=s.length;l===t.lineNumber&&(o=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,h=t.column-1);let d=!0;for(;o>=0;o--){const t=e.getLanguageId(o)===n&&!Oc(e.getStandardTokenType(o));if(t)d?r=e.getStartOffset(o):(r=e.getStartOffset(o),h=e.getEndOffset(o));else if(d&&r!==h){const e=a(l,s,r,h);if(e)return e}d=t}if(d&&r!==h){const e=a(l,s,r,h);if(e)return e}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,s=e.forwardRegex;let o=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return _p.INSTANCE;const h=au.findNextBracketInRange(s,t,n,a,l);if(!h)break;const d=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return h;a=h.endColumn-1}return null},l=this.textModel.getLineCount();for(let h=t.lineNumber;h<=l;h++){const e=this.textModel.tokenization.getLineTokens(h),i=e.getCount(),s=this.textModel.getLineContent(h);let o=0,r=0,l=0;h===t.lineNumber&&(o=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,l=t.column-1);let d=!0;for(;o=1;r--){const e=this.textModel.tokenization.getLineTokens(r),t=e.getCount(),a=this.textModel.getLineContent(r);let l=t-1,h=a.length,d=a.length;if(r===i.lineNumber){l=e.findTokenIndexAtOffset(i.column-1),h=i.column-1,d=i.column-1;const t=e.getLanguageId(l);n!==t&&(n=t,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,o=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let c=!0;for(;l>=0;l--){const t=e.getLanguageId(l);if(n!==t){if(s&&o&&c&&h!==d){const e=au.findPrevBracketInRange(s.reversedRegex,r,a,h,d);if(e)return this._toFoundBracket(o,e);c=!1}n=t,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,o=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const i=!!s&&!Oc(e.getStandardTokenType(l));if(i)c?h=e.getStartOffset(l):(h=e.getStartOffset(l),d=e.getEndOffset(l));else if(o&&s&&c&&h!==d){const e=au.findPrevBracketInRange(s.reversedRegex,r,a,h,d);if(e)return this._toFoundBracket(o,e)}c=i}if(o&&s&&c&&h!==d){const e=au.findPrevBracketInRange(s.reversedRegex,r,a,h,d);if(e)return this._toFoundBracket(o,e)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let s=null,o=null,r=null;for(let a=i.lineNumber;a<=n;a++){const e=this.textModel.tokenization.getLineTokens(a),t=e.getCount(),n=this.textModel.getLineContent(a);let l=0,h=0,d=0;if(a===i.lineNumber){l=e.findTokenIndexAtOffset(i.column-1),h=i.column-1,d=i.column-1;const t=e.getLanguageId(l);s!==t&&(s=t,o=this.languageConfigurationService.getLanguageConfiguration(s).brackets,r=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let c=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=fp(t),s=this.textModel.getLineCount(),o=new Map;let r=[];const a=(e,t)=>{if(!o.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(n&&++l%100==0&&!n())return _p.INSTANCE;const a=au.findNextBracketInRange(e.forwardRegex,t,i,s,o);if(!a)break;const h=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[h];if(d&&(d.isOpen(h)?r[d.index]++:d.isClose(h)&&r[d.index]--,-1===r[d.index]))return this._matchFoundBracket(a,d,!1,n);s=a.endColumn-1}return null};let d=null,c=null;for(let u=i.lineNumber;u<=s;u++){const e=this.textModel.tokenization.getLineTokens(u),t=e.getCount(),n=this.textModel.getLineContent(u);let s=0,o=0,r=0;if(u===i.lineNumber){s=e.findTokenIndexAtOffset(i.column-1),o=i.column-1,r=i.column-1;const t=e.getLanguageId(s);d!==t&&(d=t,c=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,c))}let l=!0;for(;s!0;{const t=Date.now();return()=>Date.now()-t<=e}}class _p{constructor(){this._searchCanceledBrand=void 0}}function vp(e){return e instanceof _p?null:e}function bp(e){return`--vscode-${e.replace(/\./g,"-")}`}function Cp(e){return`var(${bp(e)})`}_p.INSTANCE=new _p;const wp="base.contributions.colors";const yp=new class{constructor(){this._onDidChangeSchema=new U,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,s){const o={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:s};this.colorsById[e]=o;const r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(r.deprecationMessage=s),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){return D_(i.defaults[t.type],t)}}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function Sp(e,t,i,n,s){return yp.registerColor(e,t,i,n,s)}Ul.add(wp,yp);const Lp=Sp("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},ue(0,"Overall foreground color. This color is only used if not overridden by a component.")),kp=(Sp("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},ue(0,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),Sp("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},ue(0,"Overall foreground color for error messages. This color is only used if not overridden by a component."))),Dp=(Sp("descriptionForeground",{light:"#717171",dark:S_(Lp,.7),hcDark:S_(Lp,.7),hcLight:S_(Lp,.7)},ue(0,"Foreground color for description text providing additional information, for example for a label.")),Sp("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},ue(0,"The default color for icons in the workbench."))),xp=Sp("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},ue(0,"Overall border color for focused elements. This color is only used if not overridden by a component.")),Np=Sp("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},ue(0,"An extra border around elements to separate them from others for greater contrast.")),Ep=Sp("contrastActiveBorder",{light:null,dark:null,hcDark:xp,hcLight:xp},ue(0,"An extra border around active elements to separate them from others for greater contrast.")),Ip=(Sp("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},ue(0,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),Sp("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:rc.black,hcLight:"#292929"},ue(0,"Color for text separators.")),Sp("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},ue(0,"Foreground color for links in text."))),Mp=(Sp("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},ue(0,"Foreground color for links in text when clicked on and on mouse hover.")),Sp("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},ue(0,"Foreground color for preformatted text segments.")),Sp("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},ue(0,"Background color for block quotes in text.")),Sp("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:rc.white,hcLight:"#292929"},ue(0,"Border color for block quotes in text.")),Sp("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:rc.black,hcLight:"#F2F2F2"},ue(0,"Background color for code blocks in text.")),Sp("widget.shadow",{dark:S_(rc.black,.36),light:S_(rc.black,.16),hcDark:null,hcLight:null},ue(0,"Shadow color of widgets such as find/replace inside the editor."))),Tp=Sp("widget.border",{dark:null,light:null,hcDark:Np,hcLight:Np},ue(0,"Border color of widgets such as find/replace inside the editor.")),Rp=Sp("input.background",{dark:"#3C3C3C",light:rc.white,hcDark:rc.black,hcLight:rc.white},ue(0,"Input box background.")),Ap=Sp("input.foreground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"Input box foreground.")),Op=Sp("input.border",{dark:null,light:null,hcDark:Np,hcLight:Np},ue(0,"Input box border.")),Pp=Sp("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:Np,hcLight:Np},ue(0,"Border color of activated options in input fields.")),Fp=(Sp("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},ue(0,"Background color of activated options in input fields.")),Sp("inputOption.activeBackground",{dark:S_(xp,.4),light:S_(xp,.2),hcDark:rc.transparent,hcLight:rc.transparent},ue(0,"Background hover color of options in input fields."))),Bp=Sp("inputOption.activeForeground",{dark:rc.white,light:rc.black,hcDark:Lp,hcLight:Lp},ue(0,"Foreground color of activated options in input fields.")),Wp=(Sp("input.placeholderForeground",{light:S_(Lp,.5),dark:S_(Lp,.5),hcDark:S_(Lp,.7),hcLight:S_(Lp,.7)},ue(0,"Input box foreground color for placeholder text.")),Sp("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:rc.black,hcLight:rc.white},ue(0,"Input validation background color for information severity."))),Vp=Sp("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:Lp},ue(0,"Input validation foreground color for information severity.")),Hp=Sp("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:Np,hcLight:Np},ue(0,"Input validation border color for information severity.")),zp=Sp("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:rc.black,hcLight:rc.white},ue(0,"Input validation background color for warning severity.")),Up=Sp("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:Lp},ue(0,"Input validation foreground color for warning severity.")),Kp=Sp("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:Np,hcLight:Np},ue(0,"Input validation border color for warning severity.")),jp=Sp("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:rc.black,hcLight:rc.white},ue(0,"Input validation background color for error severity.")),qp=Sp("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:Lp},ue(0,"Input validation foreground color for error severity.")),$p=Sp("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:Np,hcLight:Np},ue(0,"Input validation border color for error severity.")),Gp=Sp("dropdown.background",{dark:"#3C3C3C",light:rc.white,hcDark:rc.black,hcLight:rc.white},ue(0,"Dropdown background.")),Zp=Sp("dropdown.listBackground",{dark:null,light:null,hcDark:rc.black,hcLight:rc.white},ue(0,"Dropdown list background.")),Yp=Sp("dropdown.foreground",{dark:"#F0F0F0",light:Lp,hcDark:rc.white,hcLight:Lp},ue(0,"Dropdown foreground.")),Xp=Sp("dropdown.border",{dark:Gp,light:"#CECECE",hcDark:Np,hcLight:Np},ue(0,"Dropdown border.")),Qp=Sp("button.foreground",{dark:rc.white,light:rc.white,hcDark:rc.white,hcLight:rc.white},ue(0,"Button foreground color.")),Jp=Sp("button.separator",{dark:S_(Qp,.4),light:S_(Qp,.4),hcDark:S_(Qp,.4),hcLight:S_(Qp,.4)},ue(0,"Button separator color.")),em=Sp("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},ue(0,"Button background color.")),tm=Sp("button.hoverBackground",{dark:y_(em,.2),light:w_(em,.2),hcDark:em,hcLight:em},ue(0,"Button background color when hovering.")),im=Sp("button.border",{dark:Np,light:Np,hcDark:Np,hcLight:Np},ue(0,"Button border color.")),nm=Sp("button.secondaryForeground",{dark:rc.white,light:rc.white,hcDark:rc.white,hcLight:Lp},ue(0,"Secondary button foreground color.")),sm=Sp("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:rc.white},ue(0,"Secondary button background color.")),om=Sp("button.secondaryHoverBackground",{dark:y_(sm,.2),light:w_(sm,.2),hcDark:null,hcLight:null},ue(0,"Secondary button background color when hovering.")),rm=Sp("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:rc.black,hcLight:"#0F4A85"},ue(0,"Badge background color. Badges are small information labels, e.g. for search results count.")),am=Sp("badge.foreground",{dark:rc.white,light:"#333",hcDark:rc.white,hcLight:rc.white},ue(0,"Badge foreground color. Badges are small information labels, e.g. for search results count.")),lm=Sp("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},ue(0,"Scrollbar shadow to indicate that the view is scrolled.")),hm=Sp("scrollbarSlider.background",{dark:rc.fromHex("#797979").transparent(.4),light:rc.fromHex("#646464").transparent(.4),hcDark:S_(Np,.6),hcLight:S_(Np,.4)},ue(0,"Scrollbar slider background color.")),dm=Sp("scrollbarSlider.hoverBackground",{dark:rc.fromHex("#646464").transparent(.7),light:rc.fromHex("#646464").transparent(.7),hcDark:S_(Np,.8),hcLight:S_(Np,.8)},ue(0,"Scrollbar slider background color when hovering.")),cm=Sp("scrollbarSlider.activeBackground",{dark:rc.fromHex("#BFBFBF").transparent(.4),light:rc.fromHex("#000000").transparent(.6),hcDark:Np,hcLight:Np},ue(0,"Scrollbar slider background color when clicked on.")),um=Sp("progressBar.background",{dark:rc.fromHex("#0E70C0"),light:rc.fromHex("#0E70C0"),hcDark:Np,hcLight:Np},ue(0,"Background color of the progress bar that can show for long running operations.")),gm=(Sp("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},ue(0,"Foreground color of error squigglies in the editor."))),pm=Sp("editorError.border",{dark:null,light:null,hcDark:rc.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},ue(0,"If set, color of double underlines for errors in the editor.")),mm=(Sp("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},ue(0,"Foreground color of warning squigglies in the editor."))),fm=Sp("editorWarning.border",{dark:null,light:null,hcDark:rc.fromHex("#FFCC00").transparent(.8),hcLight:rc.fromHex("#FFCC00").transparent(.8)},ue(0,"If set, color of double underlines for warnings in the editor.")),_m=(Sp("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},ue(0,"Foreground color of info squigglies in the editor."))),vm=Sp("editorInfo.border",{dark:null,light:null,hcDark:rc.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},ue(0,"If set, color of double underlines for infos in the editor.")),bm=Sp("editorHint.foreground",{dark:rc.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},ue(0,"Foreground color of hint squigglies in the editor.")),Cm=(Sp("editorHint.border",{dark:null,light:null,hcDark:rc.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},ue(0,"If set, color of double underlines for hints in the editor.")),Sp("sash.hoverBorder",{dark:xp,light:xp,hcDark:xp,hcLight:xp},ue(0,"Border color of active sashes.")),Sp("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:rc.black,hcLight:rc.white},ue(0,"Editor background color."))),wm=Sp("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:rc.white,hcLight:Lp},ue(0,"Editor default foreground color.")),ym=(Sp("editorStickyScroll.background",{light:Cm,dark:Cm,hcDark:Cm,hcLight:Cm},ue(0,"Sticky scroll background color for the editor")),Sp("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:rc.fromHex("#0F4A85").transparent(.1)},ue(0,"Sticky scroll on hover background color for the editor")),Sp("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:rc.white},ue(0,"Background color of editor widgets, such as find/replace."))),Sm=Sp("editorWidget.foreground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"Foreground color of editor widgets, such as find/replace.")),Lm=Sp("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:Np,hcLight:Np},ue(0,"Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),km=Sp("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},ue(0,"Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),Dm=Sp("quickInput.background",{dark:ym,light:ym,hcDark:ym,hcLight:ym},ue(0,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),xm=Sp("quickInput.foreground",{dark:Sm,light:Sm,hcDark:Sm,hcLight:Sm},ue(0,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Nm=Sp("quickInputTitle.background",{dark:new rc(new nc(255,255,255,.105)),light:new rc(new nc(0,0,0,.06)),hcDark:"#000000",hcLight:rc.white},ue(0,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),Em=Sp("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:rc.white,hcLight:"#0F4A85"},ue(0,"Quick picker color for grouping labels.")),Im=Sp("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:rc.white,hcLight:"#0F4A85"},ue(0,"Quick picker color for grouping borders.")),Mm=Sp("keybindingLabel.background",{dark:new rc(new nc(128,128,128,.17)),light:new rc(new nc(221,221,221,.4)),hcDark:rc.transparent,hcLight:rc.transparent},ue(0,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Tm=Sp("keybindingLabel.foreground",{dark:rc.fromHex("#CCCCCC"),light:rc.fromHex("#555555"),hcDark:rc.white,hcLight:Lp},ue(0,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Rm=Sp("keybindingLabel.border",{dark:new rc(new nc(51,51,51,.6)),light:new rc(new nc(204,204,204,.4)),hcDark:new rc(new nc(111,195,223)),hcLight:Np},ue(0,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Am=Sp("keybindingLabel.bottomBorder",{dark:new rc(new nc(68,68,68,.6)),light:new rc(new nc(187,187,187,.4)),hcDark:new rc(new nc(111,195,223)),hcLight:Lp},ue(0,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),Om=Sp("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},ue(0,"Color of the editor selection.")),Pm=Sp("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:rc.white},ue(0,"Color of the selected text for high contrast.")),Fm=Sp("editor.inactiveSelectionBackground",{light:S_(Om,.5),dark:S_(Om,.5),hcDark:S_(Om,.7),hcLight:S_(Om,.5)},ue(0,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Bm=Sp("editor.selectionHighlightBackground",{light:k_(Om,Cm,.3,.6),dark:k_(Om,Cm,.3,.6),hcDark:null,hcLight:null},ue(0,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Wm=(Sp("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color for regions with the same content as the selection.")),Sp("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},ue(0,"Color of the current search match."))),Vm=Sp("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},ue(0,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Hm=Sp("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},ue(0,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),zm=Sp("editor.findMatchBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of the current search match.")),Um=Sp("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of the other search matches.")),Km=Sp("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:S_(Ep,.4),hcLight:S_(Ep,.4)},ue(0,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),jm=(Sp("searchEditor.findMatchBackground",{light:S_(Vm,.66),dark:S_(Vm,.66),hcDark:Vm,hcLight:Vm},ue(0,"Color of the Search Editor query matches.")),Sp("searchEditor.findMatchBorder",{light:S_(Um,.66),dark:S_(Um,.66),hcDark:Um,hcLight:Um},ue(0,"Border color of the Search Editor query matches.")),Sp("search.resultsInfoForeground",{light:Lp,dark:S_(Lp,.65),hcDark:Lp,hcLight:Lp},ue(0,"Color of the text in the search viewlet's completion message.")),Sp("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},ue(0,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editorHoverWidget.background",{light:ym,dark:ym,hcDark:ym,hcLight:ym},ue(0,"Background color of the editor hover."))),qm=(Sp("editorHoverWidget.foreground",{light:Sm,dark:Sm,hcDark:Sm,hcLight:Sm},ue(0,"Foreground color of the editor hover.")),Sp("editorHoverWidget.border",{light:Lm,dark:Lm,hcDark:Lm,hcLight:Lm},ue(0,"Border color of the editor hover."))),$m=(Sp("editorHoverWidget.statusBarBackground",{dark:y_(jm,.2),light:w_(jm,.05),hcDark:ym,hcLight:ym},ue(0,"Background color of the editor hover status bar.")),Sp("editorLink.activeForeground",{dark:"#4E94CE",light:rc.blue,hcDark:rc.cyan,hcLight:"#292929"},ue(0,"Color of active links."))),Gm=Sp("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:rc.white,hcLight:rc.black},ue(0,"Foreground color of inline hints")),Zm=Sp("editorInlayHint.background",{dark:S_(rm,.1),light:S_(rm,.1),hcDark:S_(rc.white,.1),hcLight:S_(rm,.1)},ue(0,"Background color of inline hints")),Ym=Sp("editorInlayHint.typeForeground",{dark:Gm,light:Gm,hcDark:Gm,hcLight:Gm},ue(0,"Foreground color of inline hints for types")),Xm=Sp("editorInlayHint.typeBackground",{dark:Zm,light:Zm,hcDark:Zm,hcLight:Zm},ue(0,"Background color of inline hints for types")),Qm=Sp("editorInlayHint.parameterForeground",{dark:Gm,light:Gm,hcDark:Gm,hcLight:Gm},ue(0,"Foreground color of inline hints for parameters")),Jm=Sp("editorInlayHint.parameterBackground",{dark:Zm,light:Zm,hcDark:Zm,hcLight:Zm},ue(0,"Background color of inline hints for parameters")),ef=(Sp("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},ue(0,"The color used for the lightbulb actions icon.")),Sp("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The color used for the lightbulb auto fix actions icon.")),new rc(new nc(155,185,85,.2))),tf=new rc(new nc(255,0,0,.2)),nf=Sp("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},ue(0,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),sf=Sp("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},ue(0,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),of=(Sp("diffEditor.insertedLineBackground",{dark:ef,light:ef,hcDark:null,hcLight:null},ue(0,"Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("diffEditor.removedLineBackground",{dark:tf,light:tf,hcDark:null,hcLight:null},ue(0,"Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color for the margin where lines got inserted.")),Sp("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color for the margin where lines got removed.")),Sp("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Diff overview ruler foreground for inserted content."))),rf=Sp("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Diff overview ruler foreground for removed content.")),af=(Sp("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},ue(0,"Outline color for the text that got inserted.")),Sp("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},ue(0,"Outline color for text that got removed.")),Sp("diffEditor.border",{dark:null,light:null,hcDark:Np,hcLight:Np},ue(0,"Border color between the two text editors.")),Sp("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},ue(0,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Sp("diffEditor.unchangedRegionBackground",{dark:"#3e3e3e",light:"#e4e4e4",hcDark:null,hcLight:null},ue(0,"The background color of unchanged blocks in the diff editor.")),Sp("diffEditor.unchangedRegionForeground",{dark:"#a3a2a2",light:"#4d4c4c",hcDark:null,hcLight:null},ue(0,"The foreground color of unchanged blocks in the diff editor.")),Sp("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},ue(0,"The background color of unchanged code in the diff editor.")),Sp("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),lf=Sp("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),hf=Sp("list.focusOutline",{dark:xp,light:xp,hcDark:Ep,hcLight:Ep},ue(0,"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),df=Sp("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),cf=Sp("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:rc.fromHex("#0F4A85").transparent(.1)},ue(0,"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),uf=Sp("list.activeSelectionForeground",{dark:rc.white,light:rc.white,hcDark:null,hcLight:null},ue(0,"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),gf=Sp("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),pf=Sp("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:rc.fromHex("#0F4A85").transparent(.1)},ue(0,"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),mf=Sp("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ff=Sp("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),_f=Sp("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),vf=Sp("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),bf=Sp("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:rc.white.transparent(.1),hcLight:rc.fromHex("#0F4A85").transparent(.1)},ue(0,"List/Tree background when hovering over items using the mouse.")),Cf=Sp("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"List/Tree foreground when hovering over items using the mouse.")),wf=Sp("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},ue(0,"List/Tree drag and drop background when moving items around using the mouse.")),yf=Sp("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:xp,hcLight:xp},ue(0,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),Sf=Sp("list.focusHighlightForeground",{dark:yf,light:(Lf=cf,kf=yf,Df="#BBE7FF",{op:6,if:Lf,then:kf,else:Df}),hcDark:yf,hcLight:yf},ue(0,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var Lf,kf,Df;Sp("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},ue(0,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),Sp("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},ue(0,"Foreground color of list items containing errors.")),Sp("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},ue(0,"Foreground color of list items containing warnings."));const xf=Sp("listFilterWidget.background",{light:w_(ym,0),dark:y_(ym,0),hcDark:ym,hcLight:ym},ue(0,"Background color of the type filter widget in lists and trees.")),Nf=Sp("listFilterWidget.outline",{dark:rc.transparent,light:rc.transparent,hcDark:"#f38518",hcLight:"#007ACC"},ue(0,"Outline color of the type filter widget in lists and trees.")),Ef=Sp("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:Np,hcLight:Np},ue(0,"Outline color of the type filter widget in lists and trees, when there are no matches.")),If=Sp("listFilterWidget.shadow",{dark:Mp,light:Mp,hcDark:Mp,hcLight:Mp},ue(0,"Shadow color of the type filter widget in lists and trees.")),Mf=(Sp("list.filterMatchBackground",{dark:Vm,light:Vm,hcDark:null,hcLight:null},ue(0,"Background color of the filtered match.")),Sp("list.filterMatchBorder",{dark:Um,light:Um,hcDark:Np,hcLight:Ep},ue(0,"Border color of the filtered match.")),Sp("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},ue(0,"Tree stroke color for the indentation guides."))),Tf=Sp("tree.inactiveIndentGuidesStroke",{dark:S_(Mf,.4),light:S_(Mf,.4),hcDark:S_(Mf,.4),hcLight:S_(Mf,.4)},ue(0,"Tree stroke color for the indentation guides that are not active.")),Rf=Sp("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},ue(0,"Table border color between columns.")),Af=Sp("tree.tableOddRowsBackground",{dark:S_(Lp,.04),light:S_(Lp,.04),hcDark:null,hcLight:null},ue(0,"Background color for odd table rows.")),Of=(Sp("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},ue(0,"List/Tree foreground color for items that are deemphasized. ")),Sp("checkbox.background",{dark:Gp,light:Gp,hcDark:Gp,hcLight:Gp},ue(0,"Background color of checkbox widget."))),Pf=(Sp("checkbox.selectBackground",{dark:ym,light:ym,hcDark:ym,hcLight:ym},ue(0,"Background color of checkbox widget when the element it's in is selected.")),Sp("checkbox.foreground",{dark:Yp,light:Yp,hcDark:Yp,hcLight:Yp},ue(0,"Foreground color of checkbox widget."))),Ff=Sp("checkbox.border",{dark:Xp,light:Xp,hcDark:Xp,hcLight:Xp},ue(0,"Border color of checkbox widget.")),Bf=(Sp("checkbox.selectBorder",{dark:Dp,light:Dp,hcDark:Dp,hcLight:Dp},ue(0,"Border color of checkbox widget when the element it's in is selected.")),Sp("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,ue(0,"Please use quickInputList.focusBackground instead"))),Wf=Sp("quickInputList.focusForeground",{dark:uf,light:uf,hcDark:uf,hcLight:uf},ue(0,"Quick picker foreground color for the focused item.")),Vf=Sp("quickInputList.focusIconForeground",{dark:gf,light:gf,hcDark:gf,hcLight:gf},ue(0,"Quick picker icon foreground color for the focused item.")),Hf=Sp("quickInputList.focusBackground",{dark:L_(Bf,cf),light:L_(Bf,cf),hcDark:null,hcLight:null},ue(0,"Quick picker background color for the focused item.")),zf=Sp("menu.border",{dark:null,light:null,hcDark:Np,hcLight:Np},ue(0,"Border color of menus.")),Uf=Sp("menu.foreground",{dark:Yp,light:Yp,hcDark:Yp,hcLight:Yp},ue(0,"Foreground color of menu items.")),Kf=Sp("menu.background",{dark:Gp,light:Gp,hcDark:Gp,hcLight:Gp},ue(0,"Background color of menu items.")),jf=Sp("menu.selectionForeground",{dark:uf,light:uf,hcDark:uf,hcLight:uf},ue(0,"Foreground color of the selected menu item in menus.")),qf=Sp("menu.selectionBackground",{dark:cf,light:cf,hcDark:cf,hcLight:cf},ue(0,"Background color of the selected menu item in menus.")),$f=Sp("menu.selectionBorder",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of the selected menu item in menus.")),Gf=Sp("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:Np,hcLight:Np},ue(0,"Color of a separator menu item in menus.")),Zf=Sp("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},ue(0,"Toolbar background when hovering over actions using the mouse")),Yf=(Sp("toolbar.hoverOutline",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Toolbar outline when hovering over actions using the mouse")),Sp("toolbar.activeBackground",{dark:y_(Zf,.1),light:w_(Zf,.1),hcDark:null,hcLight:null},ue(0,"Toolbar background when holding the mouse over actions")),Sp("editor.snippetTabstopHighlightBackground",{dark:new rc(new nc(124,124,124,.3)),light:new rc(new nc(10,50,100,.2)),hcDark:new rc(new nc(124,124,124,.3)),hcLight:new rc(new nc(10,50,100,.2))},ue(0,"Highlight background color of a snippet tabstop.")),Sp("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Highlight border color of a snippet tabstop.")),Sp("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Highlight background color of the final tabstop of a snippet.")),Sp("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new rc(new nc(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},ue(0,"Highlight border color of the final tabstop of a snippet.")),Sp("breadcrumb.foreground",{light:S_(Lp,.8),dark:S_(Lp,.8),hcDark:S_(Lp,.8),hcLight:S_(Lp,.8)},ue(0,"Color of focused breadcrumb items."))),Xf=Sp("breadcrumb.background",{light:Cm,dark:Cm,hcDark:Cm,hcLight:Cm},ue(0,"Background color of breadcrumb items.")),Qf=Sp("breadcrumb.focusForeground",{light:w_(Lp,.2),dark:y_(Lp,.1),hcDark:y_(Lp,.1),hcLight:y_(Lp,.1)},ue(0,"Color of focused breadcrumb items.")),Jf=Sp("breadcrumb.activeSelectionForeground",{light:w_(Lp,.2),dark:y_(Lp,.1),hcDark:y_(Lp,.1),hcLight:y_(Lp,.1)},ue(0,"Color of selected breadcrumb items.")),e_=(Sp("breadcrumbPicker.background",{light:ym,dark:ym,hcDark:ym,hcLight:ym},ue(0,"Background color of breadcrumb item picker.")),rc.fromHex("#40C8AE").transparent(.5)),t_=rc.fromHex("#40A6FF").transparent(.5),i_=rc.fromHex("#606060").transparent(.4),n_=.4,s_=Sp("merge.currentHeaderBackground",{dark:e_,light:e_,hcDark:null,hcLight:null},ue(0,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),o_=(Sp("merge.currentContentBackground",{dark:S_(s_,n_),light:S_(s_,n_),hcDark:S_(s_,n_),hcLight:S_(s_,n_)},ue(0,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("merge.incomingHeaderBackground",{dark:t_,light:t_,hcDark:null,hcLight:null},ue(0,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),r_=(Sp("merge.incomingContentBackground",{dark:S_(o_,n_),light:S_(o_,n_),hcDark:S_(o_,n_),hcLight:S_(o_,n_)},ue(0,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("merge.commonHeaderBackground",{dark:i_,light:i_,hcDark:null,hcLight:null},ue(0,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),a_=(Sp("merge.commonContentBackground",{dark:S_(r_,n_),light:S_(r_,n_),hcDark:S_(r_,n_),hcLight:S_(r_,n_)},ue(0,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},ue(0,"Border color on headers and the splitter in inline merge-conflicts."))),l_=(Sp("editorOverviewRuler.currentContentForeground",{dark:S_(s_,1),light:S_(s_,1),hcDark:a_,hcLight:a_},ue(0,"Current overview ruler foreground for inline merge-conflicts.")),Sp("editorOverviewRuler.incomingContentForeground",{dark:S_(o_,1),light:S_(o_,1),hcDark:a_,hcLight:a_},ue(0,"Incoming overview ruler foreground for inline merge-conflicts.")),Sp("editorOverviewRuler.commonContentForeground",{dark:S_(r_,1),light:S_(r_,1),hcDark:a_,hcLight:a_},ue(0,"Common ancestor overview ruler foreground for inline merge-conflicts.")),Sp("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},ue(0,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),h_=Sp("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},ue(0,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),d_=Sp("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},ue(0,"Minimap marker color for find matches."),!0),c_=Sp("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},ue(0,"Minimap marker color for repeating editor selections."),!0),u_=Sp("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},ue(0,"Minimap marker color for the editor selection."),!0),g_=Sp("minimap.infoHighlight",{dark:_m,light:_m,hcDark:vm,hcLight:vm},ue(0,"Minimap marker color for infos.")),p_=Sp("minimap.warningHighlight",{dark:mm,light:mm,hcDark:fm,hcLight:fm},ue(0,"Minimap marker color for warnings.")),m_=Sp("minimap.errorHighlight",{dark:new rc(new nc(255,18,18,.7)),light:new rc(new nc(255,18,18,.7)),hcDark:new rc(new nc(255,50,50,1)),hcLight:"#B5200D"},ue(0,"Minimap marker color for errors.")),f_=Sp("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Minimap background color.")),__=Sp("minimap.foregroundOpacity",{dark:rc.fromHex("#000f"),light:rc.fromHex("#000f"),hcDark:rc.fromHex("#000f"),hcLight:rc.fromHex("#000f")},ue(0,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),v_=(Sp("minimapSlider.background",{light:S_(hm,.5),dark:S_(hm,.5),hcDark:S_(hm,.5),hcLight:S_(hm,.5)},ue(0,"Minimap slider background color.")),Sp("minimapSlider.hoverBackground",{light:S_(dm,.5),dark:S_(dm,.5),hcDark:S_(dm,.5),hcLight:S_(dm,.5)},ue(0,"Minimap slider background color when hovering.")),Sp("minimapSlider.activeBackground",{light:S_(cm,.5),dark:S_(cm,.5),hcDark:S_(cm,.5),hcLight:S_(cm,.5)},ue(0,"Minimap slider background color when clicked on.")),Sp("problemsErrorIcon.foreground",{dark:gm,light:gm,hcDark:gm,hcLight:gm},ue(0,"The color used for the problems error icon."))),b_=Sp("problemsWarningIcon.foreground",{dark:mm,light:mm,hcDark:mm,hcLight:mm},ue(0,"The color used for the problems warning icon.")),C_=Sp("problemsInfoIcon.foreground",{dark:_m,light:_m,hcDark:_m,hcLight:_m},ue(0,"The color used for the problems info icon."));Sp("charts.foreground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color used in charts.")),Sp("charts.lines",{dark:S_(Lp,.5),light:S_(Lp,.5),hcDark:S_(Lp,.5),hcLight:S_(Lp,.5)},ue(0,"The color used for horizontal lines in charts.")),Sp("charts.red",{dark:gm,light:gm,hcDark:gm,hcLight:gm},ue(0,"The red color used in chart visualizations.")),Sp("charts.blue",{dark:_m,light:_m,hcDark:_m,hcLight:_m},ue(0,"The blue color used in chart visualizations.")),Sp("charts.yellow",{dark:mm,light:mm,hcDark:mm,hcLight:mm},ue(0,"The yellow color used in chart visualizations.")),Sp("charts.orange",{dark:d_,light:d_,hcDark:d_,hcLight:d_},ue(0,"The orange color used in chart visualizations.")),Sp("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},ue(0,"The green color used in chart visualizations.")),Sp("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},ue(0,"The purple color used in chart visualizations."));function w_(e,t){return{op:0,value:e,factor:t}}function y_(e,t){return{op:1,value:e,factor:t}}function S_(e,t){return{op:2,value:e,factor:t}}function L_(...e){return{op:4,values:e}}function k_(e,t,i,n){return{op:5,value:e,background:t,factor:i,transparency:n}}function D_(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?rc.fromHex(e):t.getColor(e):e instanceof rc?e:"object"==typeof e?function(e,t){var i,n,s,o;switch(e.op){case 0:return null===(i=D_(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=D_(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(s=D_(e.value,t))||void 0===s?void 0:s.transparent(e.factor);case 3:{const i=D_(e.background,t);return i?null===(o=D_(e.value,t))||void 0===o?void 0:o.makeOpaque(i):D_(e.value,t)}case 4:for(const i of e.values){const e=D_(i,t);if(e)return e}return;case 6:return D_(t.defines(e.if)?e.then:e.else,t);case 5:{const i=D_(e.value,t);if(!i)return;const n=D_(e.background,t);return n?i.isDarkerThan(n)?rc.getLighterColor(i,n,e.factor).transparent(e.transparency):rc.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw Vl()}}(e,t):void 0}const x_="vscode://schemas/workbench-colors",N_=Ul.as(Su);N_.registerSchema(x_,yp.getColorSchema());const E_=new sd((()=>N_.notifySchemaChanged(x_)),200);var I_;function M_(e){return e===I_.HIGH_CONTRAST_DARK||e===I_.HIGH_CONTRAST_LIGHT}function T_(e){return e===I_.DARK||e===I_.HIGH_CONTRAST_DARK}yp.onDidChangeSchema((()=>{E_.isScheduled()||E_.schedule()})),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST_DARK="hcDark",e.HIGH_CONTRAST_LIGHT="hcLight"}(I_||(I_={}));const R_=Pa("themeService");function A_(e){return{id:e}}function O_(e){switch(e){case I_.DARK:return"vs-dark";case I_.HIGH_CONTRAST_DARK:return"hc-black";case I_.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const P_="base.contributions.theming";const F_=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new U}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),x((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function B_(e){return F_.onColorThemeChange(e)}Ul.add(P_,F_);class W_ extends E{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const V_=Sp("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color for the highlight of line at the cursor position.")),H_=Sp("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:Np},ue(0,"Background color for the border around the line at the cursor position.")),z_=(Sp("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},ue(0,"Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Background color of the border around highlighted ranges."),!0),Sp("editor.symbolHighlightBackground",{dark:Vm,light:Vm,hcDark:null,hcLight:null},ue(0,"Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Background color of the border around highlighted symbols."),!0),Sp("editorCursor.foreground",{dark:"#AEAFAD",light:rc.black,hcDark:rc.white,hcLight:"#0F4A85"},ue(0,"Color of the editor cursor."))),U_=Sp("editorCursor.background",null,ue(0,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),K_=Sp("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},ue(0,"Color of whitespace characters in the editor.")),j_=Sp("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:rc.white,hcLight:"#292929"},ue(0,"Color of editor line numbers.")),q_=Sp("editorIndentGuide.background",{dark:K_,light:K_,hcDark:K_,hcLight:K_},ue(0,"Color of the editor indentation guides."),!1,ue(0,"'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),$_=Sp("editorIndentGuide.activeBackground",{dark:K_,light:K_,hcDark:K_,hcLight:K_},ue(0,"Color of the active editor indentation guides."),!1,ue(0,"'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),G_=Sp("editorIndentGuide.background1",{dark:q_,light:q_,hcDark:q_,hcLight:q_},ue(0,"Color of the editor indentation guides (1).")),Z_=Sp("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (2).")),Y_=Sp("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (3).")),X_=Sp("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (4).")),Q_=Sp("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (5).")),J_=Sp("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the editor indentation guides (6).")),ev=Sp("editorIndentGuide.activeBackground1",{dark:$_,light:$_,hcDark:$_,hcLight:$_},ue(0,"Color of the active editor indentation guides (1).")),tv=Sp("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (2).")),iv=Sp("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (3).")),nv=Sp("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (4).")),sv=Sp("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (5).")),ov=Sp("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Color of the active editor indentation guides (6).")),rv=Sp("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:Ep,hcLight:Ep},ue(0,"Color of editor active line number"),!1,ue(0,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),av=(Sp("editorLineNumber.activeForeground",{dark:rv,light:rv,hcDark:rv,hcLight:rv},ue(0,"Color of editor active line number")),Sp("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Color of the final editor line when editor.renderFinalNewline is set to dimmed."))),lv=(Sp("editorRuler.foreground",{dark:"#5A5A5A",light:rc.lightgrey,hcDark:rc.white,hcLight:"#292929"},ue(0,"Color of the editor rulers.")),Sp("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},ue(0,"Foreground color of editor CodeLens")),Sp("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},ue(0,"Background color behind matching brackets")),Sp("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:Np,hcLight:Np},ue(0,"Color for matching brackets boxes")),Sp("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},ue(0,"Color of the overview ruler border."))),hv=Sp("editorOverviewRuler.background",null,ue(0,"Background color of the editor overview ruler.")),dv=(Sp("editorGutter.background",{dark:Cm,light:Cm,hcDark:Cm,hcLight:Cm},ue(0,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Sp("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:rc.fromHex("#fff").transparent(.8),hcLight:Np},ue(0,"Border color of unnecessary (unused) source code in the editor.")),Sp("editorUnnecessaryCode.opacity",{dark:rc.fromHex("#000a"),light:rc.fromHex("#0007"),hcDark:null,hcLight:null},ue(0,"Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."))),cv=(Sp("editorGhostText.border",{dark:null,light:null,hcDark:rc.fromHex("#fff").transparent(.8),hcLight:rc.fromHex("#292929").transparent(.8)},ue(0,"Border color of ghost text in the editor.")),Sp("editorGhostText.foreground",{dark:rc.fromHex("#ffffff56"),light:rc.fromHex("#0007"),hcDark:null,hcLight:null},ue(0,"Foreground color of the ghost text in the editor.")),Sp("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},ue(0,"Background color of the ghost text in the editor.")),new rc(new nc(0,122,204,.6))),uv=Sp("editorOverviewRuler.rangeHighlightForeground",{dark:cv,light:cv,hcDark:cv,hcLight:cv},ue(0,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),gv=Sp("editorOverviewRuler.errorForeground",{dark:new rc(new nc(255,18,18,.7)),light:new rc(new nc(255,18,18,.7)),hcDark:new rc(new nc(255,50,50,1)),hcLight:"#B5200D"},ue(0,"Overview ruler marker color for errors.")),pv=Sp("editorOverviewRuler.warningForeground",{dark:mm,light:mm,hcDark:fm,hcLight:fm},ue(0,"Overview ruler marker color for warnings.")),mv=Sp("editorOverviewRuler.infoForeground",{dark:_m,light:_m,hcDark:vm,hcLight:vm},ue(0,"Overview ruler marker color for infos.")),fv=Sp("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},ue(0,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),_v=Sp("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},ue(0,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),vv=Sp("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},ue(0,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),bv=Sp("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),Cv=Sp("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),wv=Sp("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),yv=Sp("editorBracketHighlight.unexpectedBracket.foreground",{dark:new rc(new nc(255,18,18,.8)),light:new rc(new nc(255,18,18,.8)),hcDark:new rc(new nc(255,50,50,1)),hcLight:""},ue(0,"Foreground color of unexpected brackets.")),Sv=Sp("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Lv=Sp("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),kv=Sp("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Dv=Sp("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),xv=Sp("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Nv=Sp("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Ev=Sp("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Iv=Sp("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),Mv=Sp("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),Tv=Sp("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Rv=Sp("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),Av=Sp("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},ue(0,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));Sp("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},ue(0,"Border color used to highlight unicode characters.")),Sp("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},ue(0,"Background color used to highlight unicode characters."));B_(((e,t)=>{const i=e.getColor(Cm),n=e.getColor(V_),s=n&&!n.isTransparent()?n:i;s&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${s}; }`)}));class Ov extends E{constructor(e){super(),this.textModel=e,this.colorProvider=new Pv,this.onDidChangeEmitter=new U,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){if(n)return[];if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];return this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray()}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new Mh(1,1,this.textModel.getLineCount(),1),e,t):[]}}class Pv{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}function Fv(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}B_(((e,t)=>{const i=[fv,_v,vv,bv,Cv,wv],n=new Pv;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(yv)}; }`);const s=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let o=0;o<30;o++){const e=s[o%s.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(o)} { color: ${e}; }`)}}));class Bv{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Fv(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Fv(this.oldText)}")`:`(replace@${this.oldPosition} "${Fv(this.oldText)}" with "${Fv(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;qc(e,n,i),i+=4;for(let s=0;s0&&(this.changes=(o=this.changes,r=t,null===o||0===o.length?r:new Wv(o,r).compress())),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(qc(e,t?t.length:0,i),i+=4,t)for(const n of t)qc(e,n.selectionStartLineNumber,i),i+=4,qc(e,n.selectionStartColumn,i),i+=4,qc(e,n.positionLineNumber,i),i+=4,qc(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=jc(e,t);t+=4;for(let s=0;se.toString())).join(", ")}matchesResource(e){return(an.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Hv}append(e,t,i,n,s){this._data instanceof Hv&&this._data.append(e,t,i,n,s)}close(){this._data instanceof Hv&&(this._data=this._data.serialize())}open(){this._data instanceof Hv||(this._data=Hv.deserialize(this._data))}undo(){if(an.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Hv&&(this._data=this._data.serialize());const e=Hv.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(an.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Hv&&(this._data=this._data.serialize());const e=Hv.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Hv&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Uv{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const e=Vv(n.resource);this._editStackElementsMap.set(e,n)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=Vv(e);return this._editStackElementsMap.has(t)}setModel(e){const t=Vv(an.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=Vv(e.uri);if(this._editStackElementsMap.has(t)){return this._editStackElementsMap.get(t).canAppend(e)}return!1}append(e,t,i,n,s){const o=Vv(e.uri);this._editStackElementsMap.get(o).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=Vv(e);if(this._editStackElementsMap.has(t)){return this._editStackElementsMap.get(t).heapSize()}return 0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${ba(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function Kv(e){return"\n"===e.getEOL()?0:1}function jv(e){return!!e&&(e instanceof zv||e instanceof Uv)}class qv{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);jv(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);jv(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(jv(i)&&i.canAppend(this._model))return i;const n=new zv(ue(0,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],Kv(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const s=this._getOrCreateEditStackElement(e,n),o=this._model.applyEdits(t,!0),r=qv._computeCursorState(i,o),a=o.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),s.append(this._model,a.map((e=>e.textChange)),Kv(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(Dre){return r(Dre),null}}}class $v extends E{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function Gv(e,t){let i=0,n=0;const s=e.length;for(;nn)throw new f("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide);let r=-2,a=-1,l=-2,h=-1;const d=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,h=-1;for(let t=e;t=0){l=t,h=e;break}}}};let c=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===c){c=-1,u=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){c=t,u=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}};let _=0,v=!0,b=0,C=!0,w=0,y=0;for(let f=0;v||C;f++){const s=e-f,r=e+f;f>1&&(s<1||s1&&(r>n||r>i)&&(C=!1),f>5e4&&(v=!1,C=!1);let g=-1;if(v&&s>=1){const e=this._computeIndentLevel(s-1);e>=0?(l=s-1,h=e,g=Math.ceil(e/this.textModel.getOptions().indentSize)):(d(s),g=this._getIndentLevelForWhitespaceLine(o,a,h))}let S=-1;if(C&&r<=n){const e=this._computeIndentLevel(r-1);e>=0?(c=r-1,u=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(r),S=this._getIndentLevelForWhitespaceLine(o,u,p))}if(0!==f){if(1===f){if(r<=n&&S>=0&&y+1===S){v=!1,_=r,b=r,w=S;continue}if(s>=1&&g>=0&&g-1===y){C=!1,_=s,b=s,w=g;continue}if(_=e,b=e,w=y,0===w)return{startLineNumber:_,endLineNumber:b,indent:w}}v&&(g>=w?_=s:v=!1),C&&(S>=w?b=r:C=!1)}else y=g}return{startLineNumber:_,endLineNumber:b,indent:w}}getLinesBracketGuides(e,t,i,n){var s;const o=[];for(let c=e;c<=t;c++)o.push([]);const r=!0,a=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new Mh(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let l;if(i&&a.length>0){l=null===(s=uc((e<=i.lineNumber&&i.lineNumber<=t?a:this.textModel.bracketPairs.getBracketPairsInRange(Mh.fromPositions(i)).toArray()).filter((e=>Mh.strictContainsPosition(e.range,i))),(e=>r)))||void 0===s?void 0:s.range}const h=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,d=new Jv;for(const c of a){if(!c.closingBracketRange)continue;const i=l&&c.range.equalsRange(l);if(!i&&!n.includeInactive)continue;const s=d.getInlineClassName(c.nestingLevel,c.nestingLevelOfEqualBracketType,h)+(n.highlightActive&&i?" "+d.activeClassName:""),r=c.openingBracketRange.getStartPosition(),a=c.closingBracketRange.getStartPosition(),u=n.horizontalGuides===Zv.Enabled||n.horizontalGuides===Zv.EnabledForActive&&i;if(c.range.startLineNumber===c.range.endLineNumber){u&&o[c.range.startLineNumber-e].push(new Yv(-1,c.openingBracketRange.getEndPosition().column,s,new Xv(!1,a.column),-1,-1));continue}const g=this.getVisibleColumnFromPosition(a),p=this.getVisibleColumnFromPosition(c.openingBracketRange.getStartPosition()),m=Math.min(p,g,c.minVisibleColumnIndentation+1);let f=!1;oo(this.textModel.getLineContent(c.closingBracketRange.startLineNumber))=e&&p>m&&o[r.lineNumber-e].push(new Yv(m,-1,s,new Xv(!1,r.column),-1,-1)),a.lineNumber<=t&&g>m&&o[a.lineNumber-e].push(new Yv(m,-1,s,new Xv(!f,a.column),-1,-1)))}for(const c of o)c.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return o}getVisibleColumnFromPosition(e){return lc.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide),r=new Array(t-e+1);let a=-2,l=-1,h=-2,d=-1;for(let c=e;c<=t;c++){const t=c-e,s=this._computeIndentLevel(c-1);if(s>=0)a=c-1,l=s,r[t]=Math.ceil(s/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=c-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==h&&(-2===h||h=0){h=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,l,d)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t0&&a>0)return;if(l>0&&h>0)return;const d=Math.abs(a-h),c=Math.abs(r-l);if(0===d)return s.spacesDiff=c,void(c>0&&0<=l-1&&l-10?s++:m>1&&o++,tb(r,a,l,p,d),d.looksLikeAlignment&&(!i||t!==d.spacesDiff))continue;const _=d.spacesDiff;_<=8&&h[_]++,r=l,a=p}let c=i;s!==o&&(c=s{const i=h[t];i>e&&(e=i,u=t)})),4===u&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(u=2)}return{insertSpaces:c,tabSize:u}}function nb(e){return(1&e.metadata)>>>0}function sb(e,t){e.metadata=254&e.metadata|t}function ob(e){return(2&e.metadata)>>>1==1}function rb(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function ab(e){return(4&e.metadata)>>>2==1}function lb(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function hb(e){return(64&e.metadata)>>>6==1}function db(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function cb(e,t){e.metadata=231&e.metadata|t<<3}function ub(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class gb{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,sb(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,lb(this,!1),db(this,!1),cb(this,1),ub(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,rb(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;lb(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),db(this,null!==this.options.glyphMarginClassName),cb(this,this.options.stickiness),ub(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const pb=new gb(null,0,0);pb.parent=pb,pb.left=pb,pb.right=pb,sb(pb,0);class mb{constructor(){this.root=pb,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,o){return this.root===pb?[]:function(e,t,i,n,s,o,r){let a=e.root,l=0,h=0,d=0,c=0;const u=[];let g=0;for(;a!==pb;)if(ob(a))rb(a.left,!1),rb(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!ob(a.left)){if(h=l+a.maxEnd,hi)rb(a,!0);else{if(c=l+a.end,c>=t){a.setCachedOffsets(d,c,o);let e=!0;n&&a.ownerId&&a.ownerId!==n&&(e=!1),s&&ab(a)&&(e=!1),r&&!hb(a)&&(e=!1),e&&(u[g++]=a)}rb(a,!0),a.right===pb||ob(a.right)||(l+=a.delta,a=a.right)}}return rb(e.root,!1),u}(this,e,t,i,n,s,o)}search(e,t,i,n){return this.root===pb?[]:function(e,t,i,n,s){let o=e.root,r=0,a=0,l=0;const h=[];let d=0;for(;o!==pb;){if(ob(o)){rb(o.left,!1),rb(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==pb&&!ob(o.left)){o=o.left;continue}a=r+o.start,l=r+o.end,o.setCachedOffsets(a,l,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&ab(o)&&(e=!1),s&&!hb(o)&&(e=!1),e&&(h[d++]=o),rb(o,!0),o.right===pb||ob(o.right)||(r+=o.delta,o=o.right)}return rb(e.root,!1),h}(this,e,t,i,n)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let s=0;for(;i!==pb;)ob(i)?(rb(i.left,!1),rb(i.right,!1),i=i.parent):i.left===pb||ob(i.left)?(i.ownerId===t&&(n[s++]=i),rb(i,!0),i.right===pb||ob(i.right)||(i=i.right)):i=i.left;return rb(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==pb;)ob(t)?(rb(t.left,!1),rb(t.right,!1),t=t.parent):t.left===pb||ob(t.left)?t.right===pb||ob(t.right)?(i[n++]=t,rb(t,!0)):t=t.right:t=t.left;return rb(e.root,!1),i}(this)}insert(e){vb(this,e),this._normalizeDeltaIfNecessary()}delete(e){bb(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,o=i.end+n;i.setCachedOffsets(s,o,t)}acceptReplace(e,t,i,n){const s=function(e,t,i){let n=e.root,s=0,o=0,r=0,a=0;const l=[];let h=0;for(;n!==pb;)if(ob(n))rb(n.left,!1),rb(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;else{if(!ob(n.left)){if(o=s+n.maxEnd,oi?rb(n,!0):(a=s+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[h++]=n),rb(n,!0),n.right===pb||ob(n.right)||(s+=n.delta,n=n.right))}return rb(e.root,!1),l}(this,e,e+t);for(let o=0,r=s.length;oi?(s.start+=l,s.end+=l,s.delta+=l,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0),rb(s,!0)):(rb(s,!0),s.right===pb||ob(s.right)||(o+=s.delta,s=s.right))}rb(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let o=0,r=s.length;oi)&&(1!==n&&(2===n||t))}function _b(e,t,i,n,s){const o=function(e){return(24&e.metadata)>>>3}(e),r=0===o||2===o,a=1===o||2===o,l=i-t,h=n,d=Math.min(l,h),c=e.start;let u=!1;const g=e.end;let p=!1;t<=c&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=s?1:l>0?2:0;!u&&fb(c,r,t,e)&&(u=!0),!p&&fb(g,a,t,e)&&(p=!0)}if(d>0&&!s){const e=l>h?2:0;!u&&fb(c,r,t+d,e)&&(u=!0),!p&&fb(g,a,t+d,e)&&(p=!0)}{const n=s?1:0;!u&&fb(c,r,i,n)&&(e.start=t+h,u=!0),!p&&fb(g,a,i,n)&&(e.end=t+h,p=!0)}const m=h-l;u||(e.start=Math.max(0,c+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function vb(e,t){if(e.root===pb)return t.parent=pb,t.left=pb,t.right=pb,sb(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const s=t.start,o=t.end;for(;;){if(Db(s,o,n.start+i,n.end+i)<0){if(n.left===pb){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===pb){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}}t.parent=n,t.left=pb,t.right=pb,sb(t,1)}(e,t),kb(t.parent);let i=t;for(;i!==e.root&&1===nb(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===nb(t)?(sb(i.parent,0),sb(t,0),sb(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,wb(e,i)),sb(i.parent,0),sb(i.parent.parent,1),yb(e,i.parent.parent))}else{const t=i.parent.parent.left;1===nb(t)?(sb(i.parent,0),sb(t,0),sb(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,yb(e,i)),sb(i.parent,0),sb(i.parent.parent,1),wb(e,i.parent.parent))}return sb(e.root,0),t}function bb(e,t){let i,n;if(t.left===pb?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===pb?(i=t.left,n=t):(n=function(e){for(;e.left!==pb;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,sb(i,0),t.detach(),Cb(),Lb(i),void(e.root.parent=pb);const s=1===nb(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,sb(n,nb(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==pb&&(n.left.parent=n),n.right!==pb&&(n.right.parent=n)),t.detach(),s)return kb(i.parent),n!==t&&(kb(n),kb(n.parent)),void Cb();let o;for(kb(i),kb(i.parent),n!==t&&(kb(n),kb(n.parent));i!==e.root&&0===nb(i);)i===i.parent.left?(o=i.parent.right,1===nb(o)&&(sb(o,0),sb(i.parent,1),wb(e,i.parent),o=i.parent.right),0===nb(o.left)&&0===nb(o.right)?(sb(o,1),i=i.parent):(0===nb(o.right)&&(sb(o.left,0),sb(o,1),yb(e,o),o=i.parent.right),sb(o,nb(i.parent)),sb(i.parent,0),sb(o.right,0),wb(e,i.parent),i=e.root)):(o=i.parent.left,1===nb(o)&&(sb(o,0),sb(i.parent,1),yb(e,i.parent),o=i.parent.left),0===nb(o.left)&&0===nb(o.right)?(sb(o,1),i=i.parent):(0===nb(o.left)&&(sb(o.right,0),sb(o,1),wb(e,o),o=i.parent.left),sb(o,nb(i.parent)),sb(i.parent,0),sb(o.left,0),yb(e,i.parent),i=e.root));sb(i,0),Cb()}function Cb(){pb.parent=pb,pb.delta=0,pb.start=0,pb.end=0}function wb(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==pb&&(i.left.parent=t),i.parent=t.parent,t.parent===pb?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,Lb(t),Lb(i)}function yb(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==pb&&(i.right.parent=t),i.parent=t.parent,t.parent===pb?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,Lb(t),Lb(i)}function Sb(e){let t=e.end;if(e.left!==pb){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==pb){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function Lb(e){e.maxEnd=Sb(e)}function kb(e){for(;e!==pb;){const t=Sb(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function Db(e,t,i,n){return e===i?t-n:e-i}class xb{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Nb)return Eb(this.right);let e=this;for(;e.parent!==Nb&&e.parent.left!==e;)e=e.parent;return e.parent===Nb?Nb:e.parent}prev(){if(this.left!==Nb)return Ib(this.left);let e=this;for(;e.parent!==Nb&&e.parent.right!==e;)e=e.parent;return e.parent===Nb?Nb:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Nb=new xb(null,0);function Eb(e){for(;e.left!==Nb;)e=e.left;return e}function Ib(e){for(;e.right!==Nb;)e=e.right;return e}function Mb(e){return e===Nb?0:e.size_left+e.piece.length+Mb(e.right)}function Tb(e){return e===Nb?0:e.lf_left+e.piece.lineFeedCnt+Tb(e.right)}function Rb(){Nb.parent=Nb}function Ab(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==Nb&&(i.left.parent=t),i.parent=t.parent,t.parent===Nb?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function Ob(e,t){const i=t.left;t.left=i.right,i.right!==Nb&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===Nb?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Pb(e,t){let i,n;if(t.left===Nb?(n=t,i=n.right):t.right===Nb?(n=t,i=n.left):(n=Eb(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),Rb(),void(e.root.parent=Nb);const s=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Wb(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Wb(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==Nb&&(n.left.parent=n),n.right!==Nb&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Wb(e,n)),t.detach(),i.parent.left===i){const t=Mb(i),n=Tb(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const s=t-i.parent.size_left,o=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,Bb(e,i.parent,s,o)}}if(Wb(e,i.parent),s)return void Rb();let o;for(;i!==e.root&&0===i.color;)i===i.parent.left?(o=i.parent.right,1===o.color&&(o.color=0,i.parent.color=1,Ab(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,Ob(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,Ab(e,i.parent),i=e.root)):(o=i.parent.left,1===o.color&&(o.color=0,i.parent.color=1,Ob(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,Ab(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,Ob(e,i.parent),i=e.root));i.color=0,Rb()}function Fb(e,t){for(Wb(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Ab(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Ob(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&Ob(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Ab(e,t.parent.parent))}e.root.color=0}function Bb(e,t,i,n){for(;t!==e.root&&t!==Nb;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Wb(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=Mb((t=t.parent).left)-t.size_left,n=Tb(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}function Vb(e){return e<0?0:e>255?255:0|e}function Hb(e){return e<0?0:e>4294967295?4294967295:0|e}Nb.parent=Nb,Nb.left=Nb,Nb.right=Nb,Nb.color=0;class zb{constructor(e){const t=Vb(e);this._defaultValue=t,this._asciiMap=zb._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=Vb(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Ub{constructor(){this._actual=new zb(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}class Kb extends zb{constructor(e){super(0);for(let t=0,i=e.length;t(t.hasOwnProperty(i)||(t[i]=e(i)),t[i])}((e=>new Kb(e)));class qb{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=no(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(n){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new Dd(t,this.wordSeparators?jb(this.wordSeparators):null,i?this.searchString:null)}}function $b(e,t,i){if(!i)return new Ld(e,null);const n=[];for(let s=0,o=t.length;s=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class Zb{static findMatches(e,t,i,n,s){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new Xb(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let r,a,l=0;if(n?(l=n.findLineFeedCountBeforeOffset(s),r=t+s+l):r=t+s,n){const e=n.findLineFeedCountBeforeOffset(s+o.length)-l;a=r+o.length+e}else a=r+o.length;const h=e.getPositionAt(r),d=e.getPositionAt(a);return new Mh(h.lineNumber,h.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,i,n,s){const o=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new Gb(r):null,l=[];let h,d=0;for(i.reset(0);h=i.next(r);)if(l[d++]=$b(this._getMultilineMatchRange(e,o,r,a,h.index,h[0]),h,n),d>=s)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,s){const o=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s),o}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s);for(let l=t.startLineNumber+1;l=a))return s;return s}const h=new Xb(e.wordSeparators,e.regex);let d;h.reset(0);do{if(d=h.next(t),d&&(o[s++]=$b(new Mh(i,d.index+1+n,i,d.index+1+d[0].length+n),d,r),s>=a))return s}while(d);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new Xb(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,o,n):this._doFindNextMatchLineByLine(e,i,o,n)}static _doFindNextMatchMultiline(e,t,i,n){const s=new Ba(t.lineNumber,1),o=e.getOffsetAt(s),r=e.getLineCount(),a=e.getValueInRange(new Mh(s.lineNumber,s.column,r,e.getLineMaxColumn(r)),1),l="\r\n"===e.getEOL()?new Gb(a):null;i.reset(t.column-1);const h=i.next(a);return h?$b(this._getMultilineMatchRange(e,o,a,l,h.index,h[0]),h,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new Ba(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o),a=this._findFirstMatchInLine(i,r,o,t.column,n);if(a)return a;for(let l=1;l<=s;l++){const t=(o+l-1)%s,r=e.getLineContent(t+1),a=this._findFirstMatchInLine(i,r,t+1,1,n);if(a)return a}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const o=e.next(t);return o?$b(new Mh(i,o.index+1,i,o.index+1+o[0].length),o,s):null}static findPreviousMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new Xb(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,o,n):this._doFindPreviousMatchLineByLine(e,i,o,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const s=this._doFindMatchesMultiline(e,new Mh(1,1,t.lineNumber,t.column),i,n,9990);if(s.length>0)return s[s.length-1];const o=e.getLineCount();return t.lineNumber!==o||t.column!==e.getLineMaxColumn(o)?this._doFindPreviousMatchMultiline(e,new Ba(o,e.getLineMaxColumn(o)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,o,n);if(a)return a;for(let l=1;l<=s;l++){const t=(s+o-l-1)%s,r=e.getLineContent(t+1),a=this._findLastMatchInLine(i,r,t+1,n);if(a)return a}return null}static _findLastMatchInLine(e,t,i,n){let s,o=null;for(e.reset(0);s=e.next(t);)o=$b(new Mh(i,s.index+1,i,s.index+1+s[0].length),s,n);return o}}function Yb(e,t,i,n,s){return function(e,t,i,n,s){if(0===n)return!0;const o=t.charCodeAt(n-1);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,s)&&function(e,t,i,n,s){if(n+s===i)return!0;const o=t.charCodeAt(n+s);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n+s-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,s)}class Xb{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const n=i.index,s=i[0].length;if(n===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){So(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=s,!this._wordSeparators||Yb(this._wordSeparators,e,t,n,s))return i}while(i);return null}}const Qb=65535;function Jb(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class eC{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function tC(e,t=!0){const i=[0];let n=1;for(let s=0,o=e.length;s(e!==Nb&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class oC{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class rC{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new nC("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Nb,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let s=0,o=e.length;s0){e[s].lineStarts||(e[s].lineStarts=tC(e[s].buffer));const t=new iC(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),n=this.rbInsertRight(n,t)}this._searchCache=new oC(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=Qb,i=t-Math.floor(21845),n=2*i;let s="",o=0;const r=[];if(this.iterate(this.root,(t=>{const a=this.getNodeContent(t),l=a.length;if(o<=i||o+l0){const t=s.replace(/\r\n|\r|\n/g,e);r.push(new nC(t,tC(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new sC(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==Nb;)if(n.left!==Nb&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;return i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1)}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==Nb;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,0===s.index){const e=this.getOffsetAt(i+1,1);return new Ba(i+1,n-e+1)}return new Ba(i+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===Nb){const t=this.getOffsetAt(i+1,1);return new Ba(i+1,n-e-t+1)}t=t.right}return new Ba(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(s+e.remainder,s+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let o=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==Nb;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){o+=e.substring(n,n+t.remainder);break}o+=e.substr(n,i.piece.length),i=i.next()}return o}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(s=>{if(s===Nb)return!0;const o=s.piece;let r=o.length;if(0===r)return!0;const a=this._buffers[o.bufferIndex].buffer,l=this._buffers[o.bufferIndex].lineStarts,h=o.start.line,d=o.end.line;let c=l[h]+o.start.column;if(n&&(10===a.charCodeAt(c)&&(c++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(h===d)return this._EOLNormalized||13!==a.charCodeAt(c+r-1)?i+=a.substr(c,r):(n=!0,i+=a.substr(c,r-1)),!0;i+=this._EOLNormalized?a.substring(c,Math.max(c,l[h+1]-this._EOLLength)):a.substring(c,l[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=h+1;ne+g,t.reset(0)):(_=c.buffer,v=e=>e,t.reset(g));do{if(m=t.next(_),m){if(v(m.index)>=p)return h;this.positionInBuffer(e,v(m.index)-u,f);const t=this.getLineFeedCnt(e.piece.bufferIndex,s,f),o=f.line===s.line?f.column-s.column+n:f.column+1,r=o+m[0].length;if(d[h++]=$b(new Mh(i+t,o,i+t,r),m,a),v(m.index)+m[0].length>=p)return h;if(h>=l)return h}}while(m);return h}findMatchesLineByLine(e,t,i,n){const s=[];let o=0;const r=new Xb(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let h=this.positionInBuffer(a.node,a.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,h,d,t,i,n,o,s),s;let c=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,h,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[h.line+l],p=c===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(u,r,c,p,h,this.positionInBuffer(u,g-d),t,i,n,o,s),o>=n)return s;c+=l}const d=c===e.startLineNumber?e.startColumn-1:0;if(c===e.endLineNumber){const a=this.getLineContent(c).substring(d,e.endColumn-1);return o=this._findMatchesInLine(t,r,a,e.endLineNumber,d,o,s,i,n),s}if(o=this._findMatchesInLine(t,r,this.getLineContent(c).substr(d),c,d,o,s,i,n),o>=n)return s;c++,a=this.nodeAt2(c,1),u=a.node,h=this.positionInBuffer(a.node,a.remainder)}if(c===e.endLineNumber){const a=c===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(c).substring(a,e.endColumn-1);return o=this._findMatchesInLine(t,r,l,e.endLineNumber,a,o,s,i,n),s}const g=c===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(l.node,r,c,g,h,d,t,i,n,o,s),s}_findMatchesInLine(e,t,i,n,s,o,r,a,l){const h=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let c=-a;for(;-1!==(c=i.indexOf(t,c+a));)if((!h||Yb(h,i,d,c,a))&&(r[o++]=new Ld(new Mh(n,c+1+s,n,c+1+a+s),null),o>=l))return o;return o}let d;t.reset(0);do{if(d=t.next(i),d&&(r[o++]=$b(new Mh(n,d.index+1+s,n,d.index+1+d[0].length+s),d,a),o>=l))return o}while(d);return o}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Nb){const{node:i,remainder:n,nodeStartOffset:s}=this.nodeAt(e),o=i.piece,r=o.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&o.end.line===this._lastChangeBufferPos.line&&o.end.column===this._lastChangeBufferPos.column&&s+o.length===e&&t.lengthe){const e=[];let s=new iC(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),this.offsetInBuffer(r,o.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){if(10===this.nodeCharCodeAt(i,n)){const e={line:s.start.line+1,column:0};s=new iC(s.bufferIndex,e,s.end,this.getLineFeedCnt(s.bufferIndex,e,s.end),s.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){if(13===this.nodeCharCodeAt(i,n-1)){const s=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,s),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a)}else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);s.length>0&&this.rbInsertRight(i,s);let h=i;for(let t=0;t=0;o--)s=this.rbInsertLeft(s,n[o]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let o=1;o=d))break;a=h+1}return i?(i.line=h,i.column=r-c,null):{line:h,column:r-c}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],o=n[i.line]+i.column;if(s>o+1)return i.line-t.line;const r=o-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tQb){const t=[];for(;e.length>Qb;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,Qb),e=e.substring(Qb));const s=tC(n);t.push(new iC(this._buffers.length,{line:0,column:0},{line:s.length-1,column:n.length-s[s.length-1]},s.length-1,n.length)),this._buffers.push(new nC(n,s))}const i=tC(e);return t.push(new iC(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new nC(e,i)),t}let t=this._buffers[0].buffer.length;const i=tC(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return s+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:s,nodeStartLineNumber:o-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),s=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=s.substring(o+t,o+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,s+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==Nb;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(o,o+s-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==Nb;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==s)return{index:t,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),o=t,r=this.offsetInBuffer(i.bufferIndex,o),a=this.getLineFeedCnt(i.bufferIndex,i.start,o),l=a-n,h=r-s,d=i.length+h;e.piece=new iC(i.bufferIndex,i.start,o,a,d),Bb(this,e,h,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),o=t,r=this.getLineFeedCnt(i.bufferIndex,o,i.end),a=r-n,l=s-this.offsetInBuffer(i.bufferIndex,o),h=i.length+l;e.piece=new iC(i.bufferIndex,o,i.end,r,h),Bb(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,s=n.start,o=n.end,r=n.length,a=n.lineFeedCnt,l=t,h=this.getLineFeedCnt(n.bufferIndex,n.start,l),d=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new iC(n.bufferIndex,n.start,l,h,d),Bb(this,e,d-r,h-a);const c=new iC(n.bufferIndex,i,o,this.getLineFeedCnt(n.bufferIndex,i,o),this.offsetInBuffer(n.bufferIndex,o)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,c);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=tC(t,!1);for(let c=0;ce)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==Nb;)if(i.left!==Nb&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),o=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,o),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Nb;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===Nb||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;if(n===i.length-1)return!1;return!(i[n+1]>s+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(s)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==Nb&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;s=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new iC(e.piece.bufferIndex,e.piece.start,s,r,o),Bb(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new iC(t.piece.bufferIndex,a,t.piece.end,h,l),Bb(this,t,-1,-1),0===t.piece.length&&i.push(t);const d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let c=0;ce.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=o;const u=this._doApplyEdits(a);let g=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),g=[];for(let e=0,t=d.length;e0&&d[e-1].lineNumber===t)continue;const i=d[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===oo(n)&&g.push(t)}}return this._onDidChangeContent.fire(),new xd(c,u,g)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new Mh(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let o=i.startLineNumber,r=i.startColumn;const a=[];for(let u=0,g=e.length;u0&&a.push(i.text),o=n.endLineNumber,r=n.endColumn}const l=a.join(""),[h,d,c]=ac(l);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:l,eolCount:h,firstLineLength:d,lastLineLength:c,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(aC._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;h=1===e?new Mh(a,l,a,l+r.firstLineLength):new Mh(a,l,a+e-1,r.lastLineLength+1)}else h=new Mh(a,l,a,l);i=h.endLineNumber,n=h.endColumn,t.push(h),s=r}return t}static _sortOpsAscending(e,t){const i=Mh.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=Mh.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class lC{constructor(e,t,i,n,s,o,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=o,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let s=0,o=i.length;s=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,s=0,o=0,r=!0;for(let l=0,h=t.length;l126)&&(r=!1)}const a=new eC(Jb(e),n,s,o,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new nC(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=Eo(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=Ro(e)))}finish(e=!0){return this._finish(),new lC(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=tC(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var dC,cC,uC,gC,pC=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class mC extends E{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return pC(this,void 0,void 0,(function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}))}_create(){return pC(this,void 0,void 0,(function*(){const e=yield this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}))}}class fC{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class _C{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class vC{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}!function(e){const t=new Map;t.set(0,Qr.symbolMethod),t.set(1,Qr.symbolFunction),t.set(2,Qr.symbolConstructor),t.set(3,Qr.symbolField),t.set(4,Qr.symbolVariable),t.set(5,Qr.symbolClass),t.set(6,Qr.symbolStruct),t.set(7,Qr.symbolInterface),t.set(8,Qr.symbolModule),t.set(9,Qr.symbolProperty),t.set(10,Qr.symbolEvent),t.set(11,Qr.symbolOperator),t.set(12,Qr.symbolUnit),t.set(13,Qr.symbolValue),t.set(15,Qr.symbolEnum),t.set(14,Qr.symbolConstant),t.set(15,Qr.symbolEnum),t.set(16,Qr.symbolEnumMember),t.set(17,Qr.symbolKeyword),t.set(27,Qr.symbolSnippet),t.set(18,Qr.symbolText),t.set(19,Qr.symbolColor),t.set(20,Qr.symbolFile),t.set(21,Qr.symbolReference),t.set(22,Qr.symbolCustomColor),t.set(23,Qr.symbolFolder),t.set(24,Qr.symbolTypeParameter),t.set(25,Qr.account),t.set(26,Qr.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=Qr.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(dC||(dC={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(cC||(cC={}));class bC{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return Mh.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}!function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(uC||(uC={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(gC||(gC={}));const CC={17:ue(0,"array"),16:ue(0,"boolean"),4:ue(0,"class"),13:ue(0,"constant"),8:ue(0,"constructor"),9:ue(0,"enumeration"),21:ue(0,"enumeration member"),23:ue(0,"event"),7:ue(0,"field"),0:ue(0,"file"),11:ue(0,"function"),10:ue(0,"interface"),19:ue(0,"key"),5:ue(0,"method"),1:ue(0,"module"),2:ue(0,"namespace"),20:ue(0,"null"),15:ue(0,"number"),18:ue(0,"object"),24:ue(0,"operator"),3:ue(0,"package"),6:ue(0,"property"),14:ue(0,"string"),22:ue(0,"struct"),25:ue(0,"type parameter"),12:ue(0,"variable")};var wC,yC,SC;!function(e){const t=new Map;t.set(0,Qr.symbolFile),t.set(1,Qr.symbolModule),t.set(2,Qr.symbolNamespace),t.set(3,Qr.symbolPackage),t.set(4,Qr.symbolClass),t.set(5,Qr.symbolMethod),t.set(6,Qr.symbolProperty),t.set(7,Qr.symbolField),t.set(8,Qr.symbolConstructor),t.set(9,Qr.symbolEnum),t.set(10,Qr.symbolInterface),t.set(11,Qr.symbolFunction),t.set(12,Qr.symbolVariable),t.set(13,Qr.symbolConstant),t.set(14,Qr.symbolString),t.set(15,Qr.symbolNumber),t.set(16,Qr.symbolBoolean),t.set(17,Qr.symbolArray),t.set(18,Qr.symbolObject),t.set(19,Qr.symbolKey),t.set(20,Qr.symbolNull),t.set(21,Qr.symbolEnumMember),t.set(22,Qr.symbolStruct),t.set(23,Qr.symbolEvent),t.set(24,Qr.symbolOperator),t.set(25,Qr.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=Qr.symbolProperty),i}}(wC||(wC={}));class LC{static fromValue(e){switch(e){case"comment":return LC.Comment;case"imports":return LC.Imports;case"region":return LC.Region}return new LC(e)}constructor(e){this.value=e}}LC.Comment=new LC("comment"),LC.Imports=new LC("imports"),LC.Region=new LC("region"),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&("string"==typeof e.id&&"string"==typeof e.title)}}(yC||(yC={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(SC||(SC={}));class kC{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then((e=>{e&&e.dispose()}))}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const DC=new class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),x((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new mC(this,e,t);return this._factories.set(e,n),x((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}getOrCreate(e){return pC(this,void 0,void 0,(function*(){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))}))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},xC=new class{clone(){return this}equals(e){return this===e}};function NC(e,t){return new _C([new fC(0,"",e)],t)}function EC(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(32768|e|2<<24)>>>0,new vC(i,null===t?xC:t)}class IC{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(0===t)return void this.insert(e,i);if(0===i)return void this.delete(e,t);const n=this._store.slice(0,e),s=this._store.slice(e+t),o=function(e,t){const i=[];for(let n=0;n=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let n=0;n0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new MC(e,[t]))}finalize(){return this._tokens}}class RC{static createEmpty(e,t){const i=RC.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new RC(n,e,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}equals(e){return e instanceof RC&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let o=n;o0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=jg.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return jg.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return jg.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return jg.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return jg.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return jg.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return RC.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new AC(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let n=0;n>>1)-1;for(;it&&(n=s)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const s=new Array;let o=0;for(;;){const r=to){n+=this._text.substring(o,a.offset);const e=this._tokens[1+(t<<1)];s.push(n.length,e),o=a.offset}n+=a.text,s.push(n.length,a.tokenMetadata),i++}}return new RC(new Uint32Array(s),n,this._languageIdCodec)}}RC.defaultTokenMetadata=33587200;class AC{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let s=this._firstTokenIndex,o=e.getCount();s=i)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof AC&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class OC{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new FC(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class PC extends OC{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();for(;;){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const s=this._textModel.getLineContent(n.lineNumber),o=VC(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n.startState);e.add(n.lineNumber,o.tokens),this.store.setEndState(n.lineNumber,o.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),o=s.substring(0,e.column-1)+t+s.substring(e.column-1),r=VC(this._languageIdCodec,n,this.tokenizationSupport,o,!0,i),a=new RC(r.tokens,o,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,s=e.column,o=this.getStartState(n);if(!o)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,s-1)+i+r.substring(s-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),h=VC(this._languageIdCodec,l,this.tokenizationSupport,a,!0,o);return new RC(h.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&r>=1;r--){const e=this._textModel.getLineFirstNonWhitespaceColumn(r);if(0!==e&&(e0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class WC{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new dc(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new dc(i.start,e):this._ranges.splice(t,1,new dc(i.start,e),new dc(e+1,i.endExclusive))}}addRange(e){dc.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function VC(e,t,i,n,s,o){let a=null;if(i)try{a=i.tokenizeEncoded(n,s,o.clone())}catch(Dre){r(Dre)}return a||(a=EC(e.encodeLanguageId(t),o)),RC.convertToEndOffset(a.tokens,n.length),a}class HC{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,od((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){var t;const i=null===(t=this._tokenizerWithStateStore)||void 0===t?void 0:t.getFirstInvalidLine();return i?(this._tokenizerWithStateStore.updateTokensUntilLine(e,i.lineNumber),i.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new bc(e,t))}}const zC=new Uint32Array(0).buffer;class UC{static deleteBeginning(e,t){return null===e||e===zC?e:UC.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===zC)return e;const i=KC(e),n=i[i.length-2];return UC.delete(e,t,n)}static delete(e,t,i){if(null===e||e===zC||t===i)return e;const n=KC(e),s=n.length>>>1;if(0===t&&n[n.length-2]===i)return zC;const o=RC.findIndexInTokensArray(n,t),r=o>0?n[o-1<<1]:0;if(il&&(n[a++]=e,n[a++]=n[1+(c<<1)],l=e)}if(a===n.length)return e;const d=new Uint32Array(a);return d.set(n.subarray(0,a),0),d.buffer}static append(e,t){if(t===zC)return e;if(e===zC)return t;if(null===e)return e;if(null===t)return null;const i=KC(e),n=KC(t),s=n.length>>>1,o=new Uint32Array(i.length+n.length);o.set(i,0);let r=i.length;const a=i[i.length-2];for(let l=0;l>>1;let o=RC.findIndexInTokensArray(n,t);if(o>0){n[o-1<<1]===t&&o--}for(let r=o;r0}getTokens(e,t,i){let n=null;if(t1&&(t=jg.getLanguageId(n[1])!==e),!t)return zC}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=qC(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let n=0;n=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=UC.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=UC.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=UC.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=UC.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=UC.insert(this._lineTokens[n],e.column-1,i))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const i=[];for(let n=0,s=e.length;n>>0}class $C{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),s=t[t.length-1].getRange();if(!n||!s)return e;i=e.plusRange(n).plusRange(s)}let n=null;for(let s=0,o=this._pieces.length;si.endLineNumber){n=n||{index:s};break}if(e.removeTokens(i),e.isEmpty()){this._pieces.splice(s,1),s--,o--;continue}if(e.endLineNumberi.endLineNumber){n=n||{index:s};continue}const[t,r]=e.split(i);t.isEmpty()?n=n||{index:s}:r.isEmpty()||(this._pieces.splice(s,1,t,r),s++,o++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=Ud(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=i[$C._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const s=t.getCount(),o=n.getCount();let r=0;const a=[];let l=0,h=0;const d=(e,t)=>{e!==h&&(h=e,a[l++]=e,a[l++]=t)};for(let c=0;c>>0,l=~a>>>0;for(;rt)){for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}n=s-1}}return i}acceptEdit(e,t,i,n,s){for(const o of this._pieces)o.acceptEdit(e,t,i,n,s)}}class GC extends $v{constructor(e,t,i,n,s,o){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this._bracketPairsTextModelPart=n,this._languageId=s,this._attachedViews=o,this._semanticTokens=new $C(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new U),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new U),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new U),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new ZC(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews)),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(this.grammarTokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,i,n]=ac(t.text);this._semanticTokens.acceptEdit(t.range,e,i,n,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new f("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this.grammarTokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[o,r]=GC._findLanguageBoundaries(n,s),a=xc(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(s>0&&o===t.column-1){const[o,r]=GC._findLanguageBoundaries(n,s-1),a=xc(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let s=e.getLineContent().length;for(let o=t,r=e.getCount();o{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let i=this._attachedViewStates.get(e);i||(i=new YC((()=>this.refreshRanges(i.lineRanges))),this._attachedViewStates.set(e,i)),i.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){var t;this._tokens.flush(),null===(t=this._debugBackgroundTokens)||void 0===t||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new FC(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const[i,n]=(()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=DC.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(Dre){return r(Dre),[null,null]}return[e,t]})();if(this._tokenizer=i&&n?new PC(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{if(2===this._backgroundTokenizationState)return;this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(e,t)=>{var i;if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&(null===(i=this._tokenizer)||void 0===i||i.store.setEndState(e,t))}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new HC(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),(null==i?void 0:i.backgroundTokenizerShouldOnlyVerifyTokens)&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new jC(this._languageIdCodec),this._debugBackgroundStates=new FC(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:e=>{var t;null===(t=this._debugBackgroundTokens)||void 0===t||t.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{var i;null===(i=this._debugBackgroundStates)||void 0===i||i.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;null===(e=this._defaultBackgroundTokenizer)||void 0===e||e.handleChanges()}handleDidChangeContent(e){var t,i,n;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const i of e.changes){const[e,n]=ac(i.text);this._tokens.acceptEdit(i.range,e,n),null===(t=this._debugBackgroundTokens)||void 0===t||t.acceptEdit(i.range,e,n)}null===(i=this._debugBackgroundStates)||void 0===i||i.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=bc.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var i,n;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const s=new TC,{heuristicTokens:o}=this._tokenizer.tokenizeHeuristically(s,e,t),r=this.setTokens(s.finalize());if(o)for(const a of r.changes)null===(i=this._backgroundTokenizer.value)||void 0===i||i.requestTokens(a.fromLineNumber,a.toLineNumber+1);null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.checkFinished()}forceTokenization(e){var t,i;const n=new TC;null===(t=this._tokenizer)||void 0===t||t.updateTokensUntilLine(n,e),this.setTokens(n.finalize()),null===(i=this._defaultBackgroundTokenizer)||void 0===i||i.checkFinished()}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;const i=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,i);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const s=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,i);!n.equals(s)&&(null===(t=this._debugBackgroundTokenizer.value)||void 0===t?void 0:t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new Ba(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}class YC extends E{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new sd((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Id(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class XC{constructor(){this.changeType=1}}class QC{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new QC(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new QC(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}}class JC{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class ew{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class tw{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class iw{constructor(){this.changeType=5}}class nw{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},uw=function(e,t){return function(i,n){t(i,n,e)}};function gw(e,t){let i;var n;return"string"==typeof e?i=function(e){const t=new hC;return t.acceptChunk(e),t.finish()}(e):i=(n=e)&&"function"==typeof n.read?function(e){const t=new hC;let i;for(;"string"==typeof(i=e.read());)t.acceptChunk(i);return t.finish()}(e):e,i.create(t)}let pw=0;class mw{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const fw=()=>{throw new Error("Invalid change accessor")};let _w=dw=class extends E{static resolveOptions(e,t){if(t.detectIndentation){const i=ib(e,t.tabSize,t.insertSpaces);return new Sd({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Sd(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return D(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,s,o,r){super(),this._undoRedoService=s,this._languageService=o,this._languageConfigurationService=r,this._onWillDispose=this._register(new U),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Iw((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new U),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new U),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new U),this._eventEmitter=this._register(new Mw),this._languageSelectionListener=this._register(new I),this._deltaDecorationCallCnt=0,this._attachedViews=new Tw,pw++,this.id="$model"+pw,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource=null==n?an.parse("inmemory://model/"+pw):n,this._attachedEditorCount=0;const{textBuffer:a,disposable:l}=gw(e,i.defaultEOL);this._buffer=a,this._bufferDisposable=l,this._options=dw.resolveOptions(this._buffer,i);const h="string"==typeof t?t:t.languageId;"string"!=typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new mp(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Qv(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Ov(this)),this._tokenizationTextModelPart=new GC(this._languageService,this._languageConfigurationService,this,this._bracketPairs,h,this._attachedViews);const d=this._buffer.getLineCount(),c=this._buffer.getValueLengthInRange(new Mh(1,1,d,this._buffer.getLineLength(d)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=c>dw.LARGE_FILE_SIZE_THRESHOLD||d>dw.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=c>dw.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=c>dw._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=Bo(pw),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Cw,this._commandManager=new qv(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(h)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new aC([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=E.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new ow(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw u();const{textBuffer:t,disposable:i}=gw(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,o,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:s,isRedoing:o,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Cw,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new nw([new XC],this._versionId,!1,!1),this._createContentChanged2(new Mh(1,1,s,o),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new nw([new iw],this._versionId,!1,!1),this._createContentChanged2(new Mh(1,1,s,o),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,s=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new Sd({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:o});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=ib(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),hc(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(To.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new f("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new mw(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new f("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new f("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor("number"!=typeof i||isNaN(i)?1:i),o=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(s<1)s=1,o=1;else if(s>t)s=t,o=this.getLineMaxColumn(s);else if(o<=1)o=1;else{const e=this.getLineMaxColumn(s);o>=e&&(o=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),h=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,h=1;else if(l>t)l=t,h=this.getLineMaxColumn(l);else if(h<=1)h=1;else{const e=this.getLineMaxColumn(l);h>=e&&(h=e)}return i===s&&n===o&&r===l&&a===h&&e instanceof Mh&&!(e instanceof Th)?e:new Mh(s,o,l,h)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){if(Co(this._buffer.getLineCharCode(e,t-2)))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),s=Math.floor("number"!=typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(n<1)return new Ba(1,1);if(n>o)return new Ba(o,this.getLineMaxColumn(o));if(s<=1)return new Ba(n,1);const r=this.getLineMaxColumn(n);if(s>=r)return new Ba(n,r);if(1===i){if(Co(this._buffer.getLineCharCode(n,s-2)))return new Ba(n,s-1)}return new Ba(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof Ba&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(s,o,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,r=Co(e),a=Co(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof Mh&&!(e instanceof Th)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,s=t.column,o=i.lineNumber,r=i.column;{const e=s>1?this._buffer.getLineCharCode(n,s-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,i=Co(e),a=Co(t);return i||a?n===o&&s===r?new Mh(n,s-1,o,r-1):i&&a?new Mh(n,s-1,o,r+1):i?new Mh(n,s-1,o,r):new Mh(n,s,o,r+1):new Mh(n,s,o,r)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new Mh(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,o,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>Mh.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let h;if(l.push(a.reduce(((e,t)=>Mh.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new qb(e,i,n,s).parseSearchRequest();if(!t)return[];h=e=>this.findMatchesLineByLine(e,t,o,r)}else h=t=>Zb.findMatches(this,new qb(e,i,n,s),t,o,r);return l.map(h).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new qb(e,i,n,s).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new Mh(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),h=this.findMatchesLineByLine(l,t,o,1);return Zb.findNextMatch(this,new qb(e,i,n,s),r,o),h.length>0?h[0]:(l=new Mh(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),h=this.findMatchesLineByLine(l,t,o,1),h.length>0?h[0]:null)}return Zb.findNextMatch(this,new qb(e,i,n,s),r,o)}findPreviousMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);return Zb.findPreviousMatch(this,new qb(e,i,n,s),r,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof kd?e:new kd(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,s=e.length;ts.endLineNumber,r=s.startLineNumber>t.endLineNumber;if(!n&&!r){o=!0;break}}if(!o){n=!1;break}}if(n)for(let e=0,s=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&!(n===t.startLineNumber&&t.startColumn===s&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){o=!1;break}}if(o){const e=new Mh(n,1,n,s);t.push(new kd(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const s=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new Mh(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new Mh(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),o=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==o.length){for(let i=0,n=o.length;i=0;t--){const i=a+t,n=g+t;v.takeFromEndWhile((e=>e.lineNumber>n));const s=v.takeFromEndWhile((e=>e.lineNumber===n));e.push(new JC(i,this.getLineContent(n),s))}if(ce.lineNumbere.lineNumber===t))}e.push(new tw(n+1,a+d,h,l))}t+=u}this._emitContentChangedEvent(new nw(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:o,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===n.reverseEdits?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map((e=>new JC(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new sw(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Ew(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(Dre){r(Dre)}return i.addDecoration=fw,i.changeDecoration=fw,i.changeDecorationOptions=fw,i.removeDecoration=fw,i.deltaDecorations=fw,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),r(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Nw[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),r=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,r,s),n.setOptions(Nw[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;ithis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1,s=!1){const o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),a=Math.min(o,Math.max(1,t)),l=this.getLineMaxColumn(a),h=new Mh(r,1,a,l),d=this._getDecorationsInRange(h,i,n,s);return qd(d,this._decorationProvider.getDecorationsInRange(h,i,n)),d}getDecorationsInRange(e,t=0,i=!1,n=!1,s=!1){const o=this.validateRange(e),r=this._getDecorationsInRange(o,t,i,s);return qd(r,this._decorationProvider.getDecorationsInRange(o,t,i,n)),r}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return QC.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const s=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,s,o,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),o=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),s=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}n!==s?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const s=this.getVersionId(),o=t.length;let r=0;const a=i.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const h=new Array(a);for(;rthis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};function vw(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function bw(e){return!!e.options.after||!!e.options.before}_w._MODEL_SYNC_LIMIT=52428800,_w.LARGE_FILE_SIZE_THRESHOLD=20971520,_w.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,_w.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456,_w.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:wc.tabSize,indentSize:wc.indentSize,insertSpaces:wc.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:wc.trimAutoWhitespace,largeFileOptimizations:wc.largeFileOptimizations,bracketPairColorizationOptions:wc.bracketPairColorizationOptions},_w=dw=cw([uw(4,rw),uw(5,yc),uw(6,Xu)],_w);class Cw{constructor(){this._decorationsTree0=new mb,this._decorationsTree1=new mb,this._injectedTextDecorationsTree=new mb}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s,o){const r=e.getVersionId(),a=this._intervalSearch(t,i,n,s,r,o);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,s,o){const r=this._decorationsTree0.intervalSearch(e,t,i,n,s,o),a=this._decorationsTree1.intervalSearch(e,t,i,n,s,o),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s,o);return r.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const s=e.getVersionId(),o=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,s,!1);return this._ensureNodesHaveRanges(e,o).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n,s){const o=e.getVersionId(),r=this._search(t,i,n,o,s);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n,s){if(i)return this._decorationsTree1.search(e,t,n,s);{const i=this._decorationsTree0.search(e,t,n,s),o=this._decorationsTree1.search(e,t,n,s),r=this._injectedTextDecorationsTree.search(e,t,n,s);return i.concat(o).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){bw(e)?this._injectedTextDecorationsTree.insert(e):vw(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){bw(e)?this._injectedTextDecorationsTree.delete(e):vw(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){bw(e)?this._injectedTextDecorationsTree.resolveNode(e,t):vw(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function ww(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class yw{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Sw extends yw{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:vd.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class Lw{constructor(e){var t;this.position=null!==(t=null==e?void 0:e.position)&&void 0!==t?t:bd.Left}}class kw extends yw{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?rc.fromHex(e):t.getColor(e.id)}}class Dw{static from(e){return e instanceof Dw?e:new Dw(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class xw{static register(e){return new xw(e)}static createDynamic(e){return new xw(e)}constructor(e){var t,i,n,s,o,r;this.description=e.description,this.blockClassName=e.blockClassName?ww(e.blockClassName):null,this.blockDoesNotCollapse=null!==(t=e.blockDoesNotCollapse)&&void 0!==t?t:null,this.blockIsAfterEnd=null!==(i=e.blockIsAfterEnd)&&void 0!==i?i:null,this.blockPadding=null!==(n=e.blockPadding)&&void 0!==n?n:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?ww(e.className):null,this.shouldFillLineOnLineBreak=null!==(s=e.shouldFillLineOnLineBreak)&&void 0!==s?s:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Sw(e.overviewRuler):null,this.minimap=e.minimap?new kw(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Lw(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?ww(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?ww(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?ww(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?ww(e.marginClassName):null,this.inlineClassName=e.inlineClassName?ww(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?ww(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?ww(e.afterContentClassName):null,this.after=e.after?Dw.from(e.after):null,this.before=e.before?Dw.from(e.before):null,this.hideInCommentTokens=null!==(o=e.hideInCommentTokens)&&void 0!==o&&o,this.hideInStringTokens=null!==(r=e.hideInStringTokens)&&void 0!==r&&r}}xw.EMPTY=xw.register({description:"empty"});const Nw=[xw.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),xw.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),xw.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),xw.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Ew(e){return e instanceof xw?e:xw.createDynamic(e)}class Iw extends E{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new U),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Mw extends E{constructor(){super(),this._fastEmitter=this._register(new U),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new U),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}class Tw{constructor(){this._onDidChangeVisibleRanges=new U,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Rw((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Rw{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map((e=>new bc(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}const Aw=Sp("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},ue(0,"Overview ruler marker color for matching brackets."));class Ow{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Pw extends E{static get(e){return e.getContribution(Pw.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new sd((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let s=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?s=n[1].getStartPosition():n[1].containsPosition(i)&&(s=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)s=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(s=t.range.getStartPosition())}}return s?new Th(s.lineNumber,s.column,s.lineNumber,s.column):new Th(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const s=n.getStartPosition();let o=t.bracketPairs.matchBracket(s);if(!o&&(o=t.bracketPairs.findEnclosingBrackets(s),!o)){const e=t.bracketPairs.findNextBracket(s);e&&e.range&&(o=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,a=null;if(o){o.sort(Mh.compareRangesUsingStarts);const[t,i]=o;if(r=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(s)){const e=r;r=a,a=e}}r&&a&&i.push(new Th(r.lineNumber,r.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach((i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())}))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let o=0;for(let d=0,c=e.length;d1&&s.sort(Ba.compare);const r=[];let a=0,l=0;const h=n.length;for(let d=0,c=s.length;d!0,Bw=()=>!1,Ww=e=>" "===e||"\t"===e;class Vw{static shouldRecreate(e){return e.hasChanged(143)||e.hasChanged(129)||e.hasChanged(37)||e.hasChanged(76)||e.hasChanged(78)||e.hasChanged(79)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(127)||e.hasChanged(50)||e.hasChanged(90)}constructor(e,t,i,n){var s;this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,r=o.get(143),a=o.get(50);this.readOnly=o.get(90),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(115),this.lineHeight=a.lineHeight,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=o.get(127),this.wordSeparators=o.get(129),this.emptySelectionClipboard=o.get(37),this.copyWithSyntaxHighlighting=o.get(25),this.multiCursorMergeOverlapping=o.get(76),this.multiCursorPaste=o.get(78),this.multiCursorLimit=o.get(79),this.autoClosingBrackets=o.get(6),this.autoClosingComments=o.get(7),this.autoClosingQuotes=o.get(11),this.autoClosingDelete=o.get(9),this.autoClosingOvertype=o.get(10),this.autoSurround=o.get(14),this.autoIndent=o.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(const d of l)this.surroundingPairs[d.open]=d.close;const h=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=null!==(s=null==h?void 0:h.blockCommentStartToken)&&void 0!==s?s:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(const e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=Rc(t,i-1),s=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return hc(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return Ww;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return Fw;case"never":return Bw}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return lc.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=lc.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),s=e.getLineMinColumn(t);if(no?o:n}}class Hw{static fromModelState(e){return new zw(e)}static fromViewState(e){return new Uw(e)}static fromModelSelection(e){const t=Th.liftSelection(e),i=new Kw(Mh.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return Hw.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;is,l=n>o,h=no)continue;if(pn)continue;if(g0&&n--,$w.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let a=s;a<=o;a++){const i=t.getLineMaxColumn(a),s=e.visibleColumnFromColumn(t,new Ba(a,i));n=Math.max(n,s)}let r=i.toViewVisualColumn;return re.getLineMinColumn(t.lineNumber))return t.delta(void 0,-xo(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new Ba(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),o=Jw.atomicPosition(s,t.column-1,i,0);if(-1!==o&&o+1>=n)return new Ba(t.lineNumber,o+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?ty.leftPositionAtomicSoftTabs(t,i,e.tabSize):ty.leftPosition(t,i);return new ey(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let o,r;if(i.hasSelection()&&!n)o=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(s-1)),a=t.normalizePosition(ty.clipPositionColumn(n,t),0),l=ty.left(e,t,a);o=l.lineNumber,r=l.column}return i.move(n,o,r,0)}static clipPositionColumn(e,t){return new Ba(e.lineNumber,ty.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return ih?(i=h,n=r?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,l),s=u?0:l-lc.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==a){const e=new Ba(i,n),o=t.normalizePosition(e,a);s+=n-o.column,i=o.lineNumber,n=o.column}return new ey(i,n,s)}static down(e,t,i,n,s,o,r){return this.vertical(e,t,i,n,s,i+o,r,4)}static moveDown(e,t,i,n,s){let o,r;i.hasSelection()&&!n?(o=i.selection.endLineNumber,r=i.selection.endColumn):(o=i.position.lineNumber,r=i.position.column);let a,l=0;do{a=ty.down(e,t,o+l,r,i.leftoverVisibleColumns,s,!0);if(t.normalizePosition(new Ba(a.lineNumber,a.column),2).lineNumber>o)break}while(l++<10&&o+l1&&this._isBlankLine(t,s);)s--;for(;s>1&&!this._isBlankLine(t,s);)s--;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,i,n){const s=t.getLineCount();let o=i.position.lineNumber;for(;o=d.length+1)return!1;const c=d.charAt(h.column-2),u=n.get(c);if(!u)return!1;if(qw(c)){if("never"===i)return!1}else if("never"===t)return!1;const g=d.charAt(h.column-1);let p=!1;for(const e of u)e.open===c&&e.close===g&&(p=!0);if(!p)return!1;if("auto"===e){let e=!1;for(let t=0,i=r.length;t1){const e=t.getLineContent(n.lineNumber),s=oo(e),o=-1===s?e.length+1:s+1;if(n.column<=o){const e=i.visibleColumnFromColumn(t,n),s=lc.prevIndentTabStop(e,i.indentSize),o=i.columnFromVisibleColumn(t,n.lineNumber,s);return new Mh(n.lineNumber,o,n.lineNumber,n.column)}}return Mh.fromPositions(iy.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=Ho(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new Ba(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let s=null;i.sort(((e,t)=>Ba.compare(e.getStartPosition(),t.getEndPosition())));for(let o=0,r=i.length;o1&&(null==s?void 0:s.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,a=t.getLineMaxColumn(e.lineNumber-1),l=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,a=1,l=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber));const d=new Mh(i,a,l,h);s=d,d.isEmpty()?n[o]=null:n[o]=new Gw(d,"")}else n[o]=null;else n[o]=new Gw(r,"")}return new jw(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class ny{static _createWord(e,t,i,n,s){return{start:n,end:s,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let s=i.column-2;s>=0;s--){const i=e.charCodeAt(s),o=t.get(i);if(0===o){if(2===n)return this._createWord(e,n,o,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(2===o){if(1===n)return this._createWord(e,n,o,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(1===o&&0!==n)return this._createWord(e,n,o,s+1,this._findEndOfWord(e,t,n,s+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const s=e.length;for(let o=n;o=0;s--){const n=e.charCodeAt(s),o=t.get(n);if(1===o)return s+1;if(1===i&&2===o)return s+1;if(2===i&&0===o)return s+1}return 0}static moveWordLeft(e,t,i,n){let s=i.lineNumber,o=i.column;1===o&&s>1&&(s-=1,o=t.getLineMaxColumn(s));let r=ny._findPreviousWordOnLine(e,t,new Ba(s,o));if(0===n)return new Ba(s,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=ny._findPreviousWordOnLine(e,t,new Ba(s,r.start+1))),new Ba(s,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=ny._findPreviousWordOnLine(e,t,new Ba(s,r.start+1));return new Ba(s,r?r.start+1:1)}return r&&o<=r.end+1&&(r=ny._findPreviousWordOnLine(e,t,new Ba(s,r.start+1))),new Ba(s,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(1===t.column)return i>1?new Ba(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let o=t.column-1;o>1;o--){const e=s.charCodeAt(o-2),t=s.charCodeAt(o-1);if(95===e&&95!==t)return new Ba(i,o);if(45===e&&45!==t)return new Ba(i,o);if((po(e)||go(e))&&mo(t))return new Ba(i,o);if(mo(e)&&mo(t)&&o+1=a.start+1&&(a=ny._findNextWordOnLine(e,t,new Ba(s,a.end+1))),o=a?a.start+1:t.getLineMaxColumn(s);return new Ba(s,o)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i1?l=1:(a--,l=n.getLineMaxColumn(a)):(h&&l<=h.end+1&&(h=ny._findPreviousWordOnLine(i,n,new Ba(a,h.start+1))),h?l=h.end+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a))),new Mh(a,l,r.lineNumber,r.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new Ba(i.positionLineNumber,i.positionColumn),s=this._deleteInsideWordWhitespace(t,n);return s||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let s=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,s))return null;let o=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,o))return null;for(;s>0&&this._charAtIsWhitespace(i,s-1);)s--;for(;o+11?new Mh(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new Mh(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,o=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},l=ny._findPreviousWordOnLine(e,t,i);if(l&&o(l))return a(l);const h=ny._findNextWordOnLine(e,t,i);return h&&o(h)?a(h):l&&h?r(l.end+1,h.start+1):l?r(l.start+1,l.end+1):h?r(h.start+1,h.end+1):r(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=ny._moveWordPartLeft(e,i);return new Mh(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=c.start+1&&(c=ny._findNextWordOnLine(i,n,new Ba(a,c.end+1))),c?l=c.start+1:lBoolean(e)))}class ry{static addCursorDown(e,t,i){const n=[];let s=0;for(let o=0,r=t.length;ot&&(i=t,n=e.model.getLineMaxColumn(i)),Hw.fromModelState(new Kw(new Mh(o.lineNumber,1,i,n),2,0,new Ba(i,n),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumbera){const i=e.getLineCount();let n=r.lineNumber+1,s=1;return n>i&&(n=i,s=e.getLineMaxColumn(n)),Hw.fromViewState(t.viewState.move(!0,n,s,0))}{const e=t.modelState.selectionStart.getEndPosition();return Hw.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const s=e.model.validatePosition(n);return Hw.fromModelState(ny.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new Hw(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return Hw.fromViewState(new Kw(new Mh(i,n,i,n),0,0,new Ba(i,n),0))}static moveTo(e,t,i,n,s){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,s)}const o=e.model.validatePosition(n),r=s?e.coordinatesConverter.validateViewPosition(new Ba(s.lineNumber,s.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);return Hw.fromViewState(t.viewState.move(i,r.lineNumber,r.column,0))}static simpleMove(e,t,i,n,s,o){switch(i){case 0:return 4===o?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return 4===o?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return 2===o?this._moveUpByViewLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return 2===o?this._moveDownByViewLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return 2===o?t.map((t=>Hw.fromViewState(ty.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>Hw.fromModelState(ty.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===o?t.map((t=>Hw.fromViewState(ty.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>Hw.fromModelState(ty.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,s){const o=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 14:{const i=[];for(let s=0,r=t.length;si.endLineNumber-1?i.endLineNumber-1:sHw.fromViewState(ty.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let s=0,o=t.length;sHw.fromViewState(ty.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let s=0,o=t.length;s1&&0===s.firstCharOffset){const e=ig(t,i.startLineNumber-1);e.languageId===s.languageId&&(h=e.getLineContent())}const d=o.onEnter(e,h,a,l);if(!d)return null;const c=d.indentAction;let u=d.appendText;const g=d.removeText||0;u?c===Ec.Indent&&(u="\t"+u):u=c===Ec.Indent||c===Ec.IndentOutdent?"\t":"";let p=tg(t,i.startLineNumber,i.startColumn);return g&&(p=p.substring(0,p.length-g)),{indentAction:c,appendText:u,removeText:g,indentation:p}}!function(e){e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:function(e){if(!Fr(e))return!1;const t=e;return!!Pr(t.to)&&(!(!zr(t.select)&&!Hr(t.select))&&(!(!zr(t.by)&&!Pr(t.by))&&!(!zr(t.value)&&!Wr(t.value))))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=function(t){if(!t.to)return null;let i;switch(t.to){case e.RawDirection.Left:i=0;break;case e.RawDirection.Right:i=1;break;case e.RawDirection.Up:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.PrevBlankLine:i=4;break;case e.RawDirection.NextBlankLine:i=5;break;case e.RawDirection.WrappedLineStart:i=6;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:i=7;break;case e.RawDirection.WrappedLineColumnCenter:i=8;break;case e.RawDirection.WrappedLineEnd:i=9;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:i=10;break;case e.RawDirection.ViewPortTop:i=11;break;case e.RawDirection.ViewPortBottom:i=13;break;case e.RawDirection.ViewPortCenter:i=12;break;case e.RawDirection.ViewPortIfOutside:i=14;break;default:return null}let n=0;switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Character:n=3;break;case e.RawUnit.HalfLine:n=4}return{direction:i,unit:n,select:!!t.select,value:t.value||1}}}(ay||(ay={}));var hy,dy=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cy=function(e,t){return function(i,n){t(i,n,e)}};const uy=Object.create(null);function gy(e,t){if(t<=0)return"";uy[e]||(uy[e]=["",e]);const i=uy[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let py=hy=class{static unshiftIndent(e,t,i,n,s){const o=lc.visibleColumnFromColumn(e,t,i);if(s){const e=gy(" ",n);return gy(e,lc.prevIndentTabStop(o,n)/n)}return gy("\t",lc.prevRenderTabStop(o,i)/i)}static shiftIndent(e,t,i,n,s){const o=lc.visibleColumnFromColumn(e,t,i);if(s){const e=gy(" ",n);return gy(e,lc.nextIndentTabStop(o,n)/n)}return gy("\t",lc.nextRenderTabStop(o,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;1===this._selection.endColumn&&i!==n&&(n-=1);const{tabSize:s,indentSize:o,insertSpaces:r}=this._opts,a=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,h=0;for(let d=i;d<=n;d++,l=h){h=0;const n=e.getLineContent(d);let c,u=oo(n);if((!this._opts.isUnshift||0!==n.length&&0!==u)&&(a||this._opts.isUnshift||0!==n.length)){if(-1===u&&(u=n.length),d>1){if(lc.visibleColumnFromColumn(n,u+1,s)%o!=0&&e.tokenization.isCheapToTokenize(d-1)){const t=ly(this._opts.autoIndent,e,new Mh(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)),this._languageConfigurationService);if(t){if(h=l,t.appendText)for(let e=0,i=t.appendText.length;e0&&""===t.getLineContent(l);l--)if(1===l)return{indentation:"",action:null};const r=function(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let s,o=-1;for(s=t-1;s>=1;s--){if(e.tokenization.getLanguageIdAtPosition(s,0)!==n)return o;const t=e.getLineContent(s);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return s;o=s}}return-1}(t,i,o);if(r<0)return null;if(r<1)return{indentation:"",action:null};const a=t.getLineContent(r);if(o.shouldIncrease(a)||o.shouldIndentNextLine(a))return{indentation:ro(a),action:Ec.Indent,line:r};if(o.shouldDecrease(a))return{indentation:ro(a),action:null,line:r};{if(1===r)return{indentation:ro(t.getLineContent(r)),action:null,line:r};const e=r-1,i=o.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:ro(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:ro(t.getLineContent(r)),action:null,line:r};for(let n=r;n>0;n--){const e=t.getLineContent(n);if(o.shouldIncrease(e))return{indentation:ro(e),action:Ec.Indent,line:n};if(o.shouldIndentNextLine(e)){let e=0;for(let i=n-1;i>0;i--)if(!o.shouldIndentNextLine(t.getLineContent(n))){e=i;break}return{indentation:ro(t.getLineContent(e+1)),action:null,line:e+1}}if(o.shouldDecrease(e))return{indentation:ro(e),action:null,line:n}}return{indentation:ro(t.getLineContent(1)),action:null,line:1}}}function vy(e,t,i,n,s,o){if(e<4)return null;const r=o.getLanguageConfiguration(i);if(!r)return null;const a=o.getLanguageConfiguration(i).indentRulesSupport;if(!a)return null;const l=_y(e,t,n,void 0,o),h=t.getLineContent(n);if(l){const i=l.line;if(void 0!==i){let o=!0;for(let e=i;ee.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}class Cy{static indent(e,t,i){if(null===t||null===i)return[];const n=[];for(let s=0,o=i.length;s1){let n;for(n=i-1;n>=1;n--){if(ao(t.getLineContent(n))>=0)break}if(n<1)return null;const o=t.getLineMaxColumn(n),r=ly(e.autoIndent,t,new Mh(n,o,n,o),e.languageConfigurationService);r&&(s=r.indentation+r.appendText)}return n&&(n===Ec.Indent&&(s=Cy.shiftIndent(e,s)),n===Ec.Outdent&&(s=Cy.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="";const o=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,o),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,s,o,r,a)));return new jw(4,l,{shouldPushStackElementBefore:Ly(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,o){if(!t.isEmpty())return null;const r=t.getPosition(),a=Math.max(1,r.column-n),l=Math.min(e.getLineMaxColumn(r.lineNumber),r.column+s),h=new Mh(r.lineNumber,a,r.lineNumber,l);return e.getValueInRange(h)===i&&0===o?null:new Xw(h,i,0,o)}static _typeCommand(e,t,i){return i?new Yw(e,t,!0):new Gw(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return Cy._typeCommand(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const s=ro(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);return Cy._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}const s=ly(e.autoIndent,t,n,e.languageConfigurationService);if(s){if(s.indentAction===Ec.None)return Cy._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===Ec.Indent)return Cy._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===Ec.IndentOutdent){const t=e.normalizeIndentation(s.indentation),o=e.normalizeIndentation(s.indentation+s.appendText),r="\n"+o+"\n"+t;return i?new Yw(n,r,!0):new Xw(n,r,-1,o.length-t.length,!0)}if(s.indentAction===Ec.Outdent){const t=Cy.unshiftIndent(e,s.indentation);return Cy._typeCommand(n,"\n"+e.normalizeIndentation(t+s.appendText),i)}}const o=ro(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);if(e.autoIndent>=4){const s=function(e,t,i,n,s){if(e<4)return null;t.tokenization.forceTokenization(i.startLineNumber);const o=t.tokenization.getLineTokens(i.startLineNumber),r=Rc(o,i.startColumn-1),a=r.getLineContent();let l,h,d=!1;r.firstCharOffset>0&&o.getLanguageId(0)!==r.languageId?(d=!0,l=a.substr(0,i.startColumn-1-r.firstCharOffset)):l=o.getLineContent().substring(0,i.startColumn-1),h=i.isEmpty()?a.substr(i.startColumn-1-r.firstCharOffset):ig(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset);const c=s.getLanguageConfiguration(r.languageId).indentRulesSupport;if(!c)return null;const u=l,g=ro(l),p={tokenization:{getLineTokens:e=>t.tokenization.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i)},getLineContent:e=>e===i.startLineNumber?u:t.getLineContent(e)},m=ro(o.getLineContent()),f=_y(e,p,i.startLineNumber+1,void 0,s);if(!f){const e=d?m:g;return{beforeEnter:e,afterEnter:e}}let _=d?m:f.indentation;return f.action===Ec.Indent&&(_=n.shiftIndent(_)),c.shouldDecrease(h)&&(_=n.unshiftIndent(_)),{beforeEnter:d?m:g,afterEnter:_}}(e.autoIndent,t,n,{unshiftIndent:t=>Cy.unshiftIndent(e,t),shiftIndent:t=>Cy.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(s){let o=e.visibleColumnFromColumn(t,n.getEndPosition());const r=n.endColumn,a=oo(t.getLineContent(n.endLineNumber));if(n=a>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,a+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new Yw(n,"\n"+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return r<=a+1&&(e.insertSpaces||(o=Math.ceil(o/e.indentSize)),t=Math.min(o+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new Xw(n,"\n"+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return Cy._typeCommand(n,"\n"+e.normalizeIndentation(o),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;nCy.shiftIndent(e,t),unshiftIndent:t=>Cy.unshiftIndent(e,t)},e.languageConfigurationService);if(null===o)return null;if(o!==e.normalizeIndentation(s)){const s=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===s?Cy._typeCommand(new Mh(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+n,!1):Cy._typeCommand(new Mh(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+t.getLineContent(i.startLineNumber).substring(s-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let o=0,r=i.length;o2?l.charCodeAt(a.column-2):0)&&h)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open))),r=s.some((e=>t.startsWith(e.close)));return!o&&r}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(const r of s)if(null===o||r.open.length>o.open.length){let e=!0;for(const s of i){if(t.getValueInRange(new Mh(s.lineNumber,s.column-r.open.length+1,s.lineNumber,s.column))+n!==r.open){e=!1;break}}e&&(o=r)}return o}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let s=null;for(const o of n)o.open!==t.open&&t.open.includes(o.open)&&t.close.endsWith(o.close)&&(!s||o.open.length>s.open.length)&&(s=o);return s}static _getAutoClosingPairClose(e,t,i,n,s){for(const u of i)if(!u.isEmpty())return null;const o=i.map((e=>{const t=e.getPosition();return s?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),r=this._findAutoClosingPairOpen(e,t,o.map((e=>new Ba(e.lineNumber,e.beforeColumn))),n);if(!r)return null;let a,l;if(qw(n))a=e.autoClosingQuotes,l=e.shouldAutoCloseBefore.quote;else{!!e.blockCommentStartToken&&r.open.includes(e.blockCommentStartToken)?(a=e.autoClosingComments,l=e.shouldAutoCloseBefore.comment):(a=e.autoClosingBrackets,l=e.shouldAutoCloseBefore.bracket)}if("never"===a)return null;const h=this._findContainedAutoClosingPair(e,r),d=h?h.close:"";let c=!0;for(const u of o){const{lineNumber:i,beforeColumn:s,afterColumn:o}=u,h=t.getLineContent(i),g=h.substring(0,s-1),p=h.substring(o-1);if(p.startsWith(d)||(c=!1),p.length>0){const t=p.charAt(0);if(!Cy._isBeforeClosingBrace(e,p)&&!l(t))return null}if(1===r.open.length&&("'"===n||'"'===n)&&"always"!==a){const t=jb(e.wordSeparators);if(g.length>0){const e=g.charCodeAt(g.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(i))return null;t.tokenization.forceTokenization(i);const m=Rc(t.tokenization.getLineTokens(i),s-1);if(!r.shouldAutoClose(m,s-m.firstCharOffset))return null;const f=r.findNeutralCharacter();if(f){const e=t.tokenization.getTokenTypeIfInsertingCharacter(i,s,f);if(!r.isOK(e))return null}}return c?r.close.substring(0,r.close.length-d.length):r.close}static _runAutoClosingOpenCharType(e,t,i,n,s,o,r){const a=[];for(let l=0,h=n.length;lnew Gw(new Mh(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new jw(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const h=this._getAutoClosingPairClose(t,i,s,a,!0);return null!==h?this._runAutoClosingOpenCharType(e,t,i,s,a,!0,h):null}static typeWithInterceptors(e,t,i,n,s,o,r){if(!e&&"\n"===r){const e=[];for(let t=0,o=s.length;t{const i=e.get(Fa).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=Xn();return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(i),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(Fa).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}!function(e){class t extends xy{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){if(!t.position)return;e.model.pushStackElement();e.setCursorStates(t.source,3,[ry.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&2!==t.revealType&&e.revealPrimaryCursor(t.source,!0,!0)}}e.MoveTo=wh(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=wh(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends xy{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>Hw.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=wh(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if(void 0===n.position||void 0===n.viewPosition||void 0===n.mouseColumn)return null;const s=e.model.validatePosition(n.position),o=e.coordinatesConverter.validateViewPosition(new Ba(n.viewPosition.lineNumber,n.viewPosition.column),s),r=n.doColumnSelect?i.fromViewLineNumber:o.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return $w.columnSelect(e.cursorConfig,e,r,a,o.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=wh(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return $w.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=wh(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return $w.columnSelectRight(e.cursorConfig,e,i)}});class n extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return $w.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=wh(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=wh(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3595,linux:{primary:0}}}));class s extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return $w.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=wh(new s({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=wh(new s({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:3596,linux:{primary:0}}}));class o extends xy{constructor(){super({id:"cursorMove",precondition:void 0,description:ay.description})}runCoreEditorCommand(e,t){const i=ay.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,o._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,s=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return ry.simpleMove(e,t,i.direction,n,s,i.unit);case 11:case 13:case 12:case 14:return ry.viewportMove(e,t,i.direction,n,s);default:return null}}}e.CursorMoveImpl=o,e.CursorMove=wh(new o);class r extends xy{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,ry.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=wh(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=wh(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1039}})),e.CursorRight=wh(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=wh(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1041}})),e.CursorUp=wh(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=wh(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=wh(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:11}})),e.CursorPageUpSelect=wh(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1035}})),e.CursorDown=wh(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=wh(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=wh(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:12}})),e.CursorPageDownSelect=wh(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1036}})),e.CreateCursor=wh(new class extends xy{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?ry.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):ry.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const s=i.modelState?i.modelState.position:null,o=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;io&&(s=o);const r=new Mh(s,1,s,e.model.getLineMaxColumn(s));let a=0;if(i.at)switch(i.at){case Ey.RawAtArgument.Top:a=3;break;case Ey.RawAtArgument.Center:a=1;break;case Ey.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends My{constructor(){super(Ih)}runDOMCommand(e){ne&&(e.focus(),e.select()),e.ownerDocument.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[ry.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=wh(new class extends xy{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[Hw.fromModelSelection(t.selection)]))}})}(Iy||(Iy={}));const Ty=ul.and(Rh.textInputFocus,Rh.columnSelection);function Ry(e,t){jl.registerKeybindingRule({id:e,primary:t,when:Ty,weight:1})}function Ay(e){return e.register(),e}var Oy,Py;Ry(Iy.CursorColumnSelectLeft.id,1039),Ry(Iy.CursorColumnSelectRight.id,1041),Ry(Iy.CursorColumnSelectUp.id,1040),Ry(Iy.CursorColumnSelectPageUp.id,1035),Ry(Iy.CursorColumnSelectDown.id,1042),Ry(Iy.CursorColumnSelectPageDown.id,1036),function(e){class t extends fh{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=wh(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:Rh.writable,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Cy.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=wh(new class extends t{constructor(){super({id:"outdent",precondition:Rh.writable,kbOpts:{weight:0,kbExpr:ul.and(Rh.editorTextFocus,Rh.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Cy.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=wh(new class extends t{constructor(){super({id:"tab",precondition:Rh.writable,kbOpts:{weight:0,kbExpr:ul.and(Rh.editorTextFocus,Rh.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Cy.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=wh(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,s]=iy.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(2)}}),e.DeleteRight=wh(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:Rh.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,s]=iy.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(3)}}),e.Undo=new class extends My{constructor(){super(Nh)}runDOMCommand(e){e.ownerDocument.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(90))return t.getModel().undo()}},e.Redo=new class extends My{constructor(){super(Eh)}runDOMCommand(e){e.ownerDocument.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(90))return t.getModel().redo()}}}(Oy||(Oy={}));class Fy extends gh{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(Fa).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function By(e,t){Ay(new Fy("default:"+e,e)),Ay(new Fy(e,e,t))}By("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),By("replacePreviousChar"),By("compositionType"),By("compositionStart"),By("compositionEnd"),By("paste"),By("cut");class Wy{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||s!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const o=new Mh(i,n-1,i,n),r=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new Mh(i,s,i,s),r)}else{const o=new Mh(i,s,i,s+1),r=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new Mh(i,n,i,n),r)}}computeCursorState(e,t){return this._isMovingLeft?new Th(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Th(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class Vy extends _h{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new Wy(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}yh(class extends Vy{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:ue(0,"Move Selected Text Left"),alias:"Move Selected Text Left",precondition:Rh.writable})}}),yh(class extends Vy{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:ue(0,"Move Selected Text Right"),alias:"Move Selected Text Right",precondition:Rh.writable})}});yh(class extends _h{constructor(){super({id:"editor.action.transposeLetters",label:ue(0,"Transpose Letters"),alias:"Transpose Letters",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const o of s){if(!o.isEmpty())continue;const e=o.startLineNumber,t=o.startColumn,s=i.getLineMaxColumn(e);if(1===e&&(1===t||2===t&&2===s))continue;const r=t===s?o.getPosition():ty.rightPosition(i,o.getPosition().lineNumber,o.getPosition().column),a=ty.leftPosition(i,r),l=ty.leftPosition(i,a),h=i.getValueInRange(Mh.fromPositions(l,a)),d=i.getValueInRange(Mh.fromPositions(a,r)),c=Mh.fromPositions(l,r);n.push(new Gw(c,d+h))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}});class Hy{get event(){return this.emitter.event}constructor(e,t,i){const n=e=>this.emitter.fire(e);this.emitter=new U({onWillAddFirstListener:()=>e.addEventListener(t,n,i),onDidRemoveLastListener:()=>e.removeEventListener(t,n,i)})}dispose(){this.emitter.dispose()}}!function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i=Object.assign({},t),n=Object.assign({},t),s=Object.assign({},t);let o=0;const r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,c()}function h(){1===r.input&&(performance.mark("input/end"),r.input=2)}function d(){1===r.render&&(performance.mark("render/end"),r.render=2)}function c(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",s),o++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/o,max:e.max,min:e.min}}function m(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(h)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(d),c())},e.getAndClearMeasurements=function(){if(0===o)return;const e={keydown:p(t),input:p(i),render:p(n),total:p(s),sampleCount:o};return m(t),m(i),m(n),m(s),o=0,e}}(Py||(Py={}));class zy{constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),s=e.getSelectionEnd();let o;if(t){i.substring(0,n)===t.value.substring(0,t.selectionStart)&&(o=t.newlineCountBeforeSelection)}return new zy(i,n,s,null,o)}collapseSelection(){return this.selectionStart===this.value.length?this:new zy(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,i,n,s,o,r,a,l;if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(null!==(i=null===(t=this.selection)||void 0===t?void 0:t.getStartPosition())&&void 0!==i?i:null,n,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(null!==(s=null===(n=this.selection)||void 0===n?void 0:n.getEndPosition())&&void 0!==s?s:null,t,1)}const h=this.value.substring(this.selectionStart,e);if(-1===h.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(null!==(r=null===(o=this.selection)||void 0===o?void 0:o.getStartPosition())&&void 0!==r?r:null,h,1);const d=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(null!==(l=null===(a=this.selection)||void 0===a?void 0:a.getEndPosition())&&void 0!==l?l:null,d,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;-1!==(s=t.indexOf("\n",s+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min(vo(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(bo(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),o=(e.value.substring(n,e.value.length-s),t.value.substring(n,t.value.length-s)),r=e.selectionStart-n,a=e.selectionEnd-n,l=t.selectionStart-n,h=t.selectionEnd-n;if(l===h){const t=e.selectionStart-n;return{text:o,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}return{text:o,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(vo(e.value,t.value),e.selectionEnd),n=Math.min(bo(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),o=t.value.substring(i,t.value.length-n),r=(e.selectionStart,e.selectionEnd-i),a=(t.selectionStart,t.selectionEnd-i);return{text:o,replacePrevCharCnt:r,replaceNextCharCnt:s.length-r,positionDelta:a-o.length}}}zy.EMPTY=new zy("",0,0,null,void 0);class Uy{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t;return new Mh(i+1,1,i+t+1,1)}static fromEditorSelection(e,t,i,n){const s=500,o=Uy._getPageOfLine(t.startLineNumber,i),r=Uy._getRangeForPage(o,i),a=Uy._getPageOfLine(t.endLineNumber,i),l=Uy._getRangeForPage(a,i);let h=r.intersectRanges(new Mh(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(h,1)>s){const t=e.modifyPosition(h.getEndPosition(),-500);h=Mh.fromPositions(t,h.getEndPosition())}const d=e.getValueInRange(h,1),c=e.getLineCount(),u=e.getLineMaxColumn(c);let g=l.intersectRanges(new Mh(t.endLineNumber,t.endColumn,c,u));if(n&&e.getValueLengthInRange(g,1)>s){const t=e.modifyPosition(g.getStartPosition(),s);g=Mh.fromPositions(g.getStartPosition(),t)}const p=e.getValueInRange(g,1);let m;if(o===a||o+1===a)m=e.getValueInRange(t,1);else{const i=r.intersectRanges(t),n=l.intersectRanges(t);m=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&m.length>1e3&&(m=m.substring(0,s)+String.fromCharCode(8230)+m.substring(m.length-s,m.length)),new zy(d+m+p,d.length,d.length+m.length,t,h.endLineNumber-h.startLineNumber)}}var Ky;!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(Ky||(Ky={}));const jy={forceCopyWithSyntaxHighlighting:!1};class qy{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}qy.INSTANCE=new qy;class $y{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class Gy extends E{get textAreaState(){return this._textAreaState}constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new U),this.onFocus=this._onFocus.event,this._onBlur=this._register(new U),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new U),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new U),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new U),this.onCut=this._onCut.event,this._onPaste=this._register(new U),this.onPaste=this._onPaste.event,this._onType=this._register(new U),this.onType=this._onType.event,this._onCompositionStart=this._register(new U),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new U),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new U),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new U),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new sd((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new sd((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=zy.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let s=null;this._register(this._textArea.onKeyDown((e=>{const t=new St(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),s=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new St(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{const t=new $y;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&s&&s.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===s.code||"ArrowLeft"===s.code))return t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=zy.readFromTextArea(this._textArea,this._textAreaState),i=zy.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=zy.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=zy.readFromTextArea(this._textArea,this._textAreaState),t=zy.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=zy.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=zy.readFromTextArea(this._textArea,this._textAreaState),i=zy.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!Co(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=Zy.getTextData(e.clipboardData);t&&(i=i||qy.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return En(this._textArea.ownerDocument,"selectionchange",(t=>{if(Py.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100)return;if(!this._textAreaState.selection)return;const o=this._textArea.getValue();if(this._textAreaState.value!==o)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(r),h=this._host.deduceModelPosition(l[0],l[1],l[2]),d=this._textAreaState.deduceEditorPosition(a),c=this._host.deduceModelPosition(d[0],d[1],d[2]),u=new Th(h.lineNumber,h.column,c.lineNumber,c.column);this._onSelectionChangeRequest.fire(u)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};qy.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&Zy.setTextData(e.clipboardData,t.text,t.html,i)}}const Zy={getTextData(e){const t=e.getData(yu.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(s){}if(0===t.length&&null===i&&e.files.length>0){return[Array.prototype.slice.call(e.files,0).map((e=>e.name)).join("\n"),null]}return[t,i]},setTextData(e,t,i,n){e.setData(yu.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}};class Yy extends E{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new Hy(this._actual,"keydown")).event,this.onKeyUp=this._register(new Hy(this._actual,"keyup")).event,this.onCompositionStart=this._register(new Hy(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new Hy(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new Hy(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new Hy(this._actual,"beforeinput")).event,this.onInput=this._register(new Hy(this._actual,"input")).event,this.onCut=this._register(new Hy(this._actual,"cut")).event,this.onCopy=this._register(new Hy(this._actual,"copy")).event,this.onPaste=this._register(new Hy(this._actual,"paste")).event,this.onFocus=this._register(new Hy(this._actual,"focus")).event,this.onBlur=this._register(new Hy(this._actual,"blur")).event,this._onSyntheticTap=this._register(new U),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>Py.onKeyDown()))),this._register(this.onBeforeInput((()=>Py.onBeforeInput()))),this._register(this.onInput((()=>Py.onInput()))),this._register(this.onKeyUp((()=>Py.onKeyUp()))),this._register(En(this._actual,Ky.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=Yn(this._actual);return e?e.activeElement===this._actual:!!xn(this._actual)&&this._actual.ownerDocument.activeElement===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let s=null;const o=Yn(n);s=o?o.activeElement:n.ownerDocument.activeElement;const r=s===n,a=n.selectionStart,l=n.selectionEnd;if(r&&a===t&&l===i)ne&&window.parent!==window&&n.focus();else{if(r)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(ne&&window.parent!==window&&n.focus());try{const e=function(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),function(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}(n,e)}catch(Dre){}}}}const Xy=Pa("clipboardService");var Qy=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Jy="9_cutcopypaste",eS=Be||document.queryCommandSupported("cut"),tS=Be||document.queryCommandSupported("copy"),iS=void 0!==navigator.clipboard&&!ne||document.queryCommandSupported("paste");function nS(e){return e.register(),e}const sS=eS?nS(new ph({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Be?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Ql.MenubarEditMenu,group:"2_ccp",title:ue(0,"Cu&&t"),order:1},{menuId:Ql.EditorContext,group:Jy,title:ue(0,"Cut"),when:Rh.writable,order:1},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Cut"),order:1},{menuId:Ql.SimpleEditorContext,group:Jy,title:ue(0,"Cut"),when:Rh.writable,order:1}]})):void 0,oS=tS?nS(new ph({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Be?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Ql.MenubarEditMenu,group:"2_ccp",title:ue(0,"&&Copy"),order:2},{menuId:Ql.EditorContext,group:Jy,title:ue(0,"Copy"),order:2},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Copy"),order:1},{menuId:Ql.SimpleEditorContext,group:Jy,title:ue(0,"Copy"),order:2}]})):void 0;th.appendMenuItem(Ql.MenubarEditMenu,{submenu:Ql.MenubarCopy,title:{value:ue(0,"Copy As"),original:"Copy As"},group:"2_ccp",order:3}),th.appendMenuItem(Ql.EditorContext,{submenu:Ql.EditorContextCopy,title:{value:ue(0,"Copy As"),original:"Copy As"},group:Jy,order:3}),th.appendMenuItem(Ql.EditorContext,{submenu:Ql.EditorContextShare,title:{value:ue(0,"Share"),original:"Share"},group:"11_share",order:-1,when:ul.and(ul.notEquals("resourceScheme","output"),Rh.editorTextFocus)}),th.appendMenuItem(Ql.EditorTitleContext,{submenu:Ql.EditorTitleContextShare,title:{value:ue(0,"Share"),original:"Share"},group:"11_share",order:-1}),th.appendMenuItem(Ql.ExplorerContext,{submenu:Ql.ExplorerContextShare,title:{value:ue(0,"Share"),original:"Share"},group:"11_share",order:-1});const rS=iS?nS(new ph({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Be?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Ql.MenubarEditMenu,group:"2_ccp",title:ue(0,"&&Paste"),order:4},{menuId:Ql.EditorContext,group:Jy,title:ue(0,"Paste"),when:Rh.writable,order:4},{menuId:Ql.CommandPalette,group:"",title:ue(0,"Paste"),order:1},{menuId:Ql.SimpleEditorContext,group:Jy,title:ue(0,"Paste"),when:Rh.writable,order:4}]})):void 0;class aS extends _h{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:ue(0,"Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;!t.getOption(37)&&t.getSelection().isEmpty()||(jy.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),jy.forceCopyWithSyntaxHighlighting=!1)}}function lS(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(Fa).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(37),i=n.getSelection();return i&&i.isEmpty()&&!e||n.getContainerDomNode().ownerDocument.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(Qn().execCommand(t),!0))))}lS(sS,"cut"),lS(oS,"copy"),rS&&(rS.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(Fa),n=e.get(Xy),s=i.getFocusedCodeEditor();if(s&&s.hasTextFocus()){return!(!s.getContainerDomNode().ownerDocument.execCommand("paste")&&We)||Qy(void 0,void 0,void 0,(function*(){const e=yield n.readText();if(""!==e){const t=qy.INSTANCE.get(e);let i=!1,n=null,o=null;t&&(i=s.getOption(37)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),s.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}}))}return!1})),rS.addImplementation(0,"generic-dom",((e,t)=>(Qn().execCommand("paste"),!0)))),tS&&yh(aS);const hS={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0};class dS{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class cS{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class uS{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return pS(e,t)}compute(e,t,i){return i}}class gS{constructor(e,t){this.newValue=e,this.didChange=t}}function pS(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new gS(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&Id(e,t);return new gS(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const s=pS(e[n],t[n]);s.didChange&&(e[n]=s.newValue,i=!0)}return new gS(e,i)}class mS{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return pS(e,t)}validate(e){return this.defaultValue}}class fS{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return pS(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function _S(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class vS extends fS{constructor(e,t,i,n=void 0){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return _S(e,this.defaultValue)}}function bS(e,t,i,n){if(void 0===e)return t;let s=parseInt(e,10);return isNaN(s)?t:(s=Math.max(i,s),s=Math.min(n,s),0|s)}class CS extends fS{static clampedInt(e,t,i,n){return bS(e,t,i,n)}constructor(e,t,i,n,s,o=void 0){void 0!==o&&(o.type="integer",o.default=i,o.minimum=n,o.maximum=s),super(e,t,i,o),this.minimum=n,this.maximum=s}validate(e){return CS.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function wS(e,t,i,n){if(void 0===e)return t;const s=yS.float(e,t);return yS.clamp(s,i,n)}class yS extends fS{static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){void 0!==s&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(yS.float(e,this.defaultValue))}}class SS extends fS{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n=void 0){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return SS.string(e,this.defaultValue)}}function LS(e,t,i,n){return"string"!=typeof e?t:n&&e in n?n[e]:-1===i.indexOf(e)?t:e}class kS extends fS{constructor(e,t,i,n,s=void 0){void 0!==s&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return LS(e,this.defaultValue,this._allowedValues)}}class DS extends uS{constructor(e,t,i,n,s,o,r=void 0){void 0!==r&&(r.type="string",r.enum=s,r.default=n),super(e,t,i,r),this._allowedValues=s,this._convert=o}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var xS;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(xS||(xS={}));class NS extends uS{constructor(){super(51,"fontLigatures",NS.OFF,{anyOf:[{type:"boolean",description:ue(0,"Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:ue(0,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:ue(0,"Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?NS.OFF:"true"===e?NS.ON:e:Boolean(e)?NS.ON:NS.OFF}}NS.OFF='"liga" off, "calt" off',NS.ON='"liga" on, "calt" on';class ES extends uS{constructor(){super(54,"fontVariations",ES.OFF,{anyOf:[{type:"boolean",description:ue(0,"Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:ue(0,"Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:ue(0,"Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?ES.OFF:"true"===e?ES.TRANSLATE:e:Boolean(e)?ES.TRANSLATE:ES.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}ES.OFF="normal",ES.TRANSLATE="translate";class IS extends uS{constructor(){super(53,"fontWeight",US.fontWeight,{anyOf:[{type:"number",minimum:IS.MINIMUM_VALUE,maximum:IS.MAXIMUM_VALUE,errorMessage:ue(0,'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:IS.SUGGESTION_VALUES}],default:US.fontWeight,description:ue(0,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(CS.clampedInt(e,US.fontWeight,IS.MINIMUM_VALUE,IS.MAXIMUM_VALUE))}}IS.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],IS.MINIMUM_VALUE=1,IS.MAXIMUM_VALUE=1e3;class MS extends mS{constructor(){super(143)}compute(e,t,i){return MS.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:Math.floor(e.viewLineCount/s)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const o=t.stableMinimapLayoutInput,r=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.paddingTop===o.paddingTop&&e.paddingBottom===o.paddingBottom&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let c=s>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const u=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,f=e.viewLineCount,_=e.remainingWidth,v=e.isViewportWrapping,b=d?2:3;let C=Math.floor(s*n);const w=C/s;let y=!1,S=!1,L=b*c,k=c/s,D=1;if("fill"===g||"fit"===g){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:o,extraLinesBeyondLastLine:l,desiredRatio:d,minimapLineCount:u}=MS.computeContainedMinimapLineCount({viewLineCount:f,scrollBeyondLastLine:h,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:s});if(f/u>1)y=!0,S=!0,c=1,L=1,k=c/s;else{let n=!1,h=c+1;if("fit"===g){const e=Math.ceil((o+f+l)*L);v&&r&&_<=t.stableFitRemainingWidth?(n=!0,h=t.stableFitMaxMinimapScale):n=e>C}if("fill"===g||n){y=!0;const n=c;L=Math.min(a*s,Math.max(1,Math.floor(1/d))),v&&r&&_<=t.stableFitRemainingWidth&&(h=t.stableFitMaxMinimapScale),c=Math.min(h,Math.max(1,Math.floor(L/b))),c>n&&(D=Math.min(2,c/n)),k=c/s/D,C=Math.ceil(Math.max(i,o+f+l)*L),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=c):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const x=Math.floor(u*k),N=Math.min(x,Math.max(0,Math.floor((_-m-2)*k/(l+k)))+8);let E=Math.floor(s*N);const I=E/s;E=Math.floor(E*D);return{renderMinimap:d?1:2,minimapLeft:"left"===p?0:i-N-m,minimapWidth:N,minimapHeightIsEditorHeight:y,minimapIsSampling:S,minimapScale:c,minimapLineHeight:L,minimapCanvasInnerWidth:E,minimapCanvasInnerHeight:C,minimapCanvasOuterWidth:I,minimapCanvasOuterHeight:w}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,s=0|t.lineHeight,o=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,h=t.viewLineCount,d=e.get(135),c="inherit"===d?e.get(134):d,u="inherit"===c?e.get(130):c,g=e.get(133),p=t.isDominatedByLongLines,m=e.get(57),f=0!==e.get(67).renderType,_=e.get(68),v=e.get(104),b=e.get(83),C=e.get(72),w=e.get(102),y=w.verticalScrollbarSize,S=w.verticalHasArrows,L=w.arrowSize,k=w.horizontalScrollbarSize,D=e.get(43),x="never"!==e.get(109);let N=e.get(65);D&&x&&(N+=16);let E=0;if(f){const e=Math.max(o,_);E=Math.round(e*a)}let I=0;m&&(I=s*t.glyphMarginDecorationLaneCount);let M=0,T=M+I,R=T+E,A=R+N;const O=i-I-E-N;let P=!1,F=!1,B=-1;"inherit"===c&&p?(P=!0,F=!0):"on"===u||"bounded"===u?F=!0:"wordWrapColumn"===u&&(B=g);const W=MS._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:v,paddingTop:b.top,paddingBottom:b.bottom,minimap:C,verticalScrollbarWidth:y,viewLineCount:h,remainingWidth:O,isViewportWrapping:F},t.memory||new cS);0!==W.renderMinimap&&0===W.minimapLeft&&(M+=W.minimapWidth,T+=W.minimapWidth,R+=W.minimapWidth,A+=W.minimapWidth);const V=O-W.minimapWidth,H=Math.max(1,Math.floor((V-y-2)/r)),z=S?L:0;return F&&(B=Math.max(1,H),"bounded"===u&&(B=Math.min(B,g))),{width:i,height:n,glyphMarginLeft:M,glyphMarginWidth:I,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:T,lineNumbersWidth:E,decorationsLeft:R,decorationsWidth:N,contentLeft:A,contentWidth:V,minimap:W,viewportColumn:H,isWordWrapMinified:P,isViewportWrapping:F,wrappingColumn:B,verticalScrollbarWidth:y,horizontalScrollbarHeight:k,overviewRuler:{top:z,width:y,height:n-2*z,right:0}}}}function TS(e){const t=e.get(97);return"editable"===t?e.get(90):"on"!==t}function RS(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const AS="inUntrustedWorkspace",OS="editor.unicodeHighlight.allowedCharacters",PS="editor.unicodeHighlight.invisibleCharacters",FS="editor.unicodeHighlight.nonBasicASCII",BS="editor.unicodeHighlight.ambiguousCharacters",WS="editor.unicodeHighlight.includeComments",VS="editor.unicodeHighlight.includeStrings",HS="editor.unicodeHighlight.allowedLocales";function zS(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const US={fontFamily:Pe?"Menlo, Monaco, 'Courier New', monospace":Fe?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:Pe?12:14,lineHeight:0,letterSpacing:0},KS=[];function jS(e){return KS[e.id]=e,e}const qS={acceptSuggestionOnCommitCharacter:jS(new vS(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:ue(0,"Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:jS(new kS(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",ue(0,"Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:ue(0,"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:jS(new class extends uS{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[ue(0,"Use platform APIs to detect when a Screen Reader is attached"),ue(0,"Optimize for usage with a Screen Reader"),ue(0,"Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:ue(0,"Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:jS(new CS(3,"accessibilityPageSize",10,1,1073741824,{description:ue(0,"Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:jS(new SS(4,"ariaLabel",ue(0,"Editor content"))),ariaRequired:jS(new vS(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:jS(new vS(8,"screenReaderAnnounceInlineSuggestion",!0,{description:ue(0,"Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:jS(new kS(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",ue(0,"Use language configurations to determine when to autoclose brackets."),ue(0,"Autoclose brackets only when the cursor is to the left of whitespace."),""],description:ue(0,"Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:jS(new kS(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",ue(0,"Use language configurations to determine when to autoclose comments."),ue(0,"Autoclose comments only when the cursor is to the left of whitespace."),""],description:ue(0,"Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:jS(new kS(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",ue(0,"Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:ue(0,"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:jS(new kS(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",ue(0,"Type over closing quotes or brackets only if they were automatically inserted."),""],description:ue(0,"Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:jS(new kS(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",ue(0,"Use language configurations to determine when to autoclose quotes."),ue(0,"Autoclose quotes only when the cursor is to the left of whitespace."),""],description:ue(0,"Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:jS(new DS(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[ue(0,"The editor will not insert indentation automatically."),ue(0,"The editor will keep the current line's indentation."),ue(0,"The editor will keep the current line's indentation and honor language defined brackets."),ue(0,"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),ue(0,"The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:ue(0,"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:jS(new vS(13,"automaticLayout",!1)),autoSurround:jS(new kS(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[ue(0,"Use language configurations to determine when to automatically surround selections."),ue(0,"Surround with quotes but not brackets."),ue(0,"Surround with brackets but not quotes."),""],description:ue(0,"Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:jS(new class extends uS{constructor(){const e={enabled:wc.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:wc.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:ue(0,"Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:ue(0,"Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:_S(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}),bracketPairGuides:jS(new class extends uS{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[ue(0,"Enables bracket pair guides."),ue(0,"Enables bracket pair guides only for the active bracket pair."),ue(0,"Disables bracket pair guides.")],default:e.bracketPairs,description:ue(0,"Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[ue(0,"Enables horizontal guides as addition to vertical bracket pair guides."),ue(0,"Enables horizontal guides only for the active bracket pair."),ue(0,"Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:ue(0,"Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:ue(0,"Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:ue(0,"Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[ue(0,"Highlights the active indent guide."),ue(0,"Highlights the active indent guide even if bracket guides are highlighted."),ue(0,"Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:ue(0,"Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:zS(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:zS(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:_S(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:_S(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:zS(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}),stickyTabStops:jS(new vS(115,"stickyTabStops",!1,{description:ue(0,"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:jS(new vS(17,"codeLens",!0,{description:ue(0,"Controls whether the editor shows CodeLens.")})),codeLensFontFamily:jS(new SS(18,"codeLensFontFamily","",{description:ue(0,"Controls the font family for CodeLens.")})),codeLensFontSize:jS(new CS(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:ue(0,"Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:jS(new vS(20,"colorDecorators",!0,{description:ue(0,"Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:jS(new kS(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[ue(0,"Make the color picker appear both on click and hover of the color decorator"),ue(0,"Make the color picker appear on hover of the color decorator"),ue(0,"Make the color picker appear on click of the color decorator")],description:ue(0,"Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:jS(new CS(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:ue(0,"Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:jS(new vS(22,"columnSelection",!1,{description:ue(0,"Enable that the selection with the mouse and keys is doing column selection.")})),comments:jS(new class extends uS{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:ue(0,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:ue(0,"Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:_S(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_S(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:jS(new vS(24,"contextmenu",!0)),copyWithSyntaxHighlighting:jS(new vS(25,"copyWithSyntaxHighlighting",!0,{description:ue(0,"Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:jS(new DS(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:ue(0,"Control the cursor animation style.")})),cursorSmoothCaretAnimation:jS(new kS(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[ue(0,"Smooth caret animation is disabled."),ue(0,"Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),ue(0,"Smooth caret animation is always enabled.")],description:ue(0,"Controls whether the smooth caret animation should be enabled.")})),cursorStyle:jS(new DS(28,"cursorStyle",xS.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return xS.Line;case"block":return xS.Block;case"underline":return xS.Underline;case"line-thin":return xS.LineThin;case"block-outline":return xS.BlockOutline;case"underline-thin":return xS.UnderlineThin}}),{description:ue(0,"Controls the cursor style.")})),cursorSurroundingLines:jS(new CS(29,"cursorSurroundingLines",0,0,1073741824,{description:ue(0,"Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:jS(new kS(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[ue(0,"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),ue(0,"`cursorSurroundingLines` is enforced always.")],markdownDescription:ue(0,"Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:jS(new CS(31,"cursorWidth",0,0,1073741824,{markdownDescription:ue(0,"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:jS(new vS(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:jS(new vS(33,"disableMonospaceOptimizations",!1)),domReadOnly:jS(new vS(34,"domReadOnly",!1)),dragAndDrop:jS(new vS(35,"dragAndDrop",!0,{description:ue(0,"Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:jS(new class extends vS{constructor(){super(37,"emptySelectionClipboard",!0,{description:ue(0,"Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:jS(new class extends uS{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:ue(0,"Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:ue(0,"Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[ue(0,"Show the drop selector widget after a file is dropped into the editor."),ue(0,"Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),showDropSelector:LS(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}),stickyScroll:jS(new class extends uS{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:ue(0,"Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:ue(0,"Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:ue(0,"Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),maxLineCount:CS.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:LS(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:_S(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}),experimentalWhitespaceRendering:jS(new kS(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[ue(0,"Use a new rendering method with svgs."),ue(0,"Use a new rendering method with font characters."),ue(0,"Use the stable rendering method.")],description:ue(0,"Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:jS(new SS(39,"extraEditorClassName","")),fastScrollSensitivity:jS(new yS(40,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:ue(0,"Scrolling speed multiplier when pressing `Alt`.")})),find:jS(new class extends uS{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:ue(0,"Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[ue(0,"Never seed search string from the editor selection."),ue(0,"Always seed search string from the editor selection, including word at cursor position."),ue(0,"Only seed search string from the editor selection.")],description:ue(0,"Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[ue(0,"Never turn on Find in Selection automatically (default)."),ue(0,"Always turn on Find in Selection automatically."),ue(0,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:ue(0,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:ue(0,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Pe},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:ue(0,"Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:ue(0,"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:_S(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":LS(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":LS(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_S(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_S(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_S(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:jS(new vS(42,"fixedOverflowWidgets",!1)),folding:jS(new vS(43,"folding",!0,{description:ue(0,"Controls whether the editor has code folding enabled.")})),foldingStrategy:jS(new kS(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[ue(0,"Use a language-specific folding strategy if available, else the indentation-based one."),ue(0,"Use the indentation-based folding strategy.")],description:ue(0,"Controls the strategy for computing folding ranges.")})),foldingHighlight:jS(new vS(45,"foldingHighlight",!0,{description:ue(0,"Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:jS(new vS(46,"foldingImportsByDefault",!1,{description:ue(0,"Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:jS(new CS(47,"foldingMaximumRegions",5e3,10,65e3,{description:ue(0,"The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:jS(new vS(48,"unfoldOnClickAfterEndOfLine",!1,{description:ue(0,"Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:jS(new SS(49,"fontFamily",US.fontFamily,{description:ue(0,"Controls the font family.")})),fontInfo:jS(new class extends mS{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:jS(new NS),fontSize:jS(new class extends fS{constructor(){super(52,"fontSize",US.fontSize,{type:"number",minimum:6,maximum:100,default:US.fontSize,description:ue(0,"Controls the font size in pixels.")})}validate(e){const t=yS.float(e,this.defaultValue);return 0===t?US.fontSize:yS.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:jS(new IS),fontVariations:jS(new ES),formatOnPaste:jS(new vS(55,"formatOnPaste",!1,{description:ue(0,"Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:jS(new vS(56,"formatOnType",!1,{description:ue(0,"Controls whether the editor should automatically format the line after typing.")})),glyphMargin:jS(new vS(57,"glyphMargin",!0,{description:ue(0,"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:jS(new class extends uS{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[ue(0,"Show Peek view of the results (default)"),ue(0,"Go to the primary result and show a Peek view"),ue(0,"Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:ue(0,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:ue(0,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:ue(0,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:ue(0,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:ue(0,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:ue(0,"Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:ue(0,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,o;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:LS(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:LS(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:LS(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:LS(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(s=r.multipleImplementations)&&void 0!==s?s:LS(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(o=r.multipleReferences)&&void 0!==o?o:LS(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:SS.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:SS.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:SS.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:SS.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:SS.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:jS(new vS(59,"hideCursorInOverviewRuler",!1,{description:ue(0,"Controls whether the cursor should be hidden in the overview ruler.")})),hover:jS(new class extends uS{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:ue(0,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:ue(0,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:ue(0,"Controls the delay in milliseconds after thich the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:ue(0,"Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),delay:CS.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_S(t.sticky,this.defaultValue.sticky),hidingDelay:CS.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:_S(t.above,this.defaultValue.above)}}}),inDiffEditor:jS(new vS(61,"inDiffEditor",!1)),letterSpacing:jS(new yS(63,"letterSpacing",US.letterSpacing,(e=>yS.clamp(e,-5,20)),{description:ue(0,"Controls the letter spacing in pixels.")})),lightbulb:jS(new class extends uS{constructor(){const e={enabled:!0};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Enables the Code Action lightbulb in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;return{enabled:_S(e.enabled,this.defaultValue.enabled)}}}),lineDecorationsWidth:jS(new class extends uS{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){if("string"==typeof e&&/^\d+(\.\d+)?ch$/.test(e)){return-parseFloat(e.substring(0,e.length-2))}return CS.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?CS.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}),lineHeight:jS(new class extends yS{constructor(){super(66,"lineHeight",US.lineHeight,(e=>yS.clamp(e,0,150)),{markdownDescription:ue(0,"Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:jS(new class extends uS{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[ue(0,"Line numbers are not rendered."),ue(0,"Line numbers are rendered as absolute number."),ue(0,"Line numbers are rendered as distance in lines to cursor position."),ue(0,"Line numbers are rendered every 10 lines.")],default:"on",description:ue(0,"Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:jS(new CS(68,"lineNumbersMinChars",5,1,300)),linkedEditing:jS(new vS(69,"linkedEditing",!1,{description:ue(0,"Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:jS(new vS(70,"links",!0,{description:ue(0,"Controls whether the editor should detect links and make them clickable.")})),matchBrackets:jS(new kS(71,"matchBrackets","always",["always","near","never"],{description:ue(0,"Highlight matching brackets.")})),minimap:jS(new class extends uS{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:ue(0,"Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[ue(0,"The minimap has the same size as the editor contents (and might scroll)."),ue(0,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),ue(0,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:ue(0,"Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:ue(0,"Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:ue(0,"Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:ue(0,"Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:ue(0,"Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:ue(0,"Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),autohide:_S(t.autohide,this.defaultValue.autohide),size:LS(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:LS(t.side,this.defaultValue.side,["right","left"]),showSlider:LS(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_S(t.renderCharacters,this.defaultValue.renderCharacters),scale:CS.clampedInt(t.scale,1,1,3),maxColumn:CS.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:jS(new kS(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:jS(new yS(74,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:ue(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:jS(new vS(75,"mouseWheelZoom",!1,{markdownDescription:ue(0,"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:jS(new vS(76,"multiCursorMergeOverlapping",!0,{description:ue(0,"Merge multiple cursors when they are overlapping.")})),multiCursorModifier:jS(new DS(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?Pe?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[ue(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),ue(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:ue(0,"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:jS(new kS(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[ue(0,"Each cursor pastes a single line of the text."),ue(0,"Each cursor pastes the full text.")],markdownDescription:ue(0,"Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:jS(new CS(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:ue(0,"Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:jS(new vS(80,"occurrencesHighlight",!0,{description:ue(0,"Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:jS(new vS(81,"overviewRulerBorder",!0,{description:ue(0,"Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:jS(new CS(82,"overviewRulerLanes",3,0,3)),padding:jS(new class extends uS{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:ue(0,"Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:ue(0,"Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:CS.clampedInt(t.top,0,0,1e3),bottom:CS.clampedInt(t.bottom,0,0,1e3)}}}),pasteAs:jS(new class extends uS{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:ue(0,"Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:ue(0,"Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[ue(0,"Show the paste selector widget after content is pasted into the editor."),ue(0,"Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),showPasteSelector:LS(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}),parameterHints:jS(new class extends uS{constructor(){const e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:ue(0,"Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),cycle:_S(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:jS(new kS(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[ue(0,"Focus the tree when opening peek"),ue(0,"Focus the editor when opening peek")],description:ue(0,"Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:jS(new vS(87,"definitionLinkOpensInPeek",!1,{description:ue(0,"Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:jS(new class extends uS{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[ue(0,"Quick suggestions show inside the suggest widget"),ue(0,"Quick suggestions show as ghost text"),ue(0,"Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:ue(0,"Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:ue(0,"Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:ue(0,"Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:ue(0,"Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,s=["on","inline","off"];let o,r,a;return o="boolean"==typeof t?t?"on":"off":LS(t,this.defaultValue.other,s),r="boolean"==typeof i?i?"on":"off":LS(i,this.defaultValue.comments,s),a="boolean"==typeof n?n?"on":"off":LS(n,this.defaultValue.strings,s),{other:o,comments:r,strings:a}}}),quickSuggestionsDelay:jS(new CS(89,"quickSuggestionsDelay",10,0,1073741824,{description:ue(0,"Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:jS(new vS(90,"readOnly",!1)),readOnlyMessage:jS(new class extends uS{constructor(){super(91,"readOnlyMessage",undefined)}validate(e){return e&&"object"==typeof e?e:this.defaultValue}}),renameOnType:jS(new vS(92,"renameOnType",!1,{description:ue(0,"Controls whether the editor auto renames on type."),markdownDeprecationMessage:ue(0,"Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:jS(new vS(93,"renderControlCharacters",!0,{description:ue(0,"Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:jS(new kS(94,"renderFinalNewline",Fe?"dimmed":"on",["off","on","dimmed"],{description:ue(0,"Render last line number when the file ends with a newline.")})),renderLineHighlight:jS(new kS(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",ue(0,"Highlights both the gutter and the current line.")],description:ue(0,"Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:jS(new vS(96,"renderLineHighlightOnlyWhenFocus",!1,{description:ue(0,"Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:jS(new kS(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:jS(new kS(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",ue(0,"Render whitespace characters except for single spaces between words."),ue(0,"Render whitespace characters only on selected text."),ue(0,"Render only trailing whitespace characters."),""],description:ue(0,"Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:jS(new CS(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:jS(new vS(100,"roundedSelection",!0,{description:ue(0,"Controls whether selections should have rounded corners.")})),rulers:jS(new class extends uS{constructor(){const e=[],t={type:"number",description:ue(0,"Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:ue(0,"Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:ue(0,"Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"==typeof i)t.push({column:CS.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:CS.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:jS(new class extends uS{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[ue(0,"The vertical scrollbar will be visible only when necessary."),ue(0,"The vertical scrollbar will always be visible."),ue(0,"The vertical scrollbar will always be hidden.")],default:"auto",description:ue(0,"Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[ue(0,"The horizontal scrollbar will be visible only when necessary."),ue(0,"The horizontal scrollbar will always be visible."),ue(0,"The horizontal scrollbar will always be hidden.")],default:"auto",description:ue(0,"Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:ue(0,"The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:ue(0,"The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:ue(0,"Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=CS.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=CS.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:CS.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:RS(t.vertical,this.defaultValue.vertical),horizontal:RS(t.horizontal,this.defaultValue.horizontal),useShadows:_S(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_S(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_S(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_S(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_S(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:CS.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:CS.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:_S(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:jS(new CS(103,"scrollBeyondLastColumn",4,0,1073741824,{description:ue(0,"Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:jS(new vS(104,"scrollBeyondLastLine",!0,{description:ue(0,"Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:jS(new vS(105,"scrollPredominantAxis",!0,{description:ue(0,"Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:jS(new vS(106,"selectionClipboard",!0,{description:ue(0,"Controls whether the Linux primary clipboard should be supported."),included:Fe})),selectionHighlight:jS(new vS(107,"selectionHighlight",!0,{description:ue(0,"Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:jS(new vS(108,"selectOnLineNumbers",!0)),showFoldingControls:jS(new kS(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[ue(0,"Always show the folding controls."),ue(0,"Never show the folding controls and reduce the gutter size."),ue(0,"Only show the folding controls when the mouse is over the gutter.")],description:ue(0,"Controls when the folding controls on the gutter are shown.")})),showUnused:jS(new vS(110,"showUnused",!0,{description:ue(0,"Controls fading out of unused code.")})),showDeprecated:jS(new vS(138,"showDeprecated",!0,{description:ue(0,"Controls strikethrough deprecated variables.")})),inlayHints:jS(new class extends uS{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:ue(0,"Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[ue(0,"Inlay hints are enabled"),ue(0,"Inlay hints are showing by default and hide when holding {0}",Pe?"Ctrl+Option":"Ctrl+Alt"),ue(0,"Inlay hints are hidden by default and show when holding {0}",Pe?"Ctrl+Option":"Ctrl+Alt"),ue(0,"Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:ue(0,"Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:ue(0,"Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:ue(0,"Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return"boolean"==typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:LS(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:CS.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:SS.string(t.fontFamily,this.defaultValue.fontFamily),padding:_S(t.padding,this.defaultValue.padding)}}}),snippetSuggestions:jS(new kS(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[ue(0,"Show snippet suggestions on top of other suggestions."),ue(0,"Show snippet suggestions below other suggestions."),ue(0,"Show snippets suggestions with other suggestions."),ue(0,"Do not show snippet suggestions.")],description:ue(0,"Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:jS(new class extends uS{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:ue(0,"Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:ue(0,"Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:_S(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:_S(e.selectSubwords,this.defaultValue.selectSubwords)}:this.defaultValue}}),smoothScrolling:jS(new vS(113,"smoothScrolling",!1,{description:ue(0,"Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:jS(new CS(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:jS(new class extends uS{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[ue(0,"Insert suggestion without overwriting text right of the cursor."),ue(0,"Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:ue(0,"Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:ue(0,"Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:ue(0,"Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:ue(0,"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[ue(0,"Always select a suggestion when automatically triggering IntelliSense."),ue(0,"Never select a suggestion when automatically triggering IntelliSense."),ue(0,"Select a suggestion only when triggering IntelliSense from a trigger character."),ue(0,"Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:ue(0,"Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:ue(0,"Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:ue(0,"Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:ue(0,"Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:ue(0,"Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:ue(0,"Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:ue(0,"This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:ue(0,"This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:ue(0,"When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:LS(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_S(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_S(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_S(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_S(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:LS(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:_S(t.showIcons,this.defaultValue.showIcons),showStatusBar:_S(t.showStatusBar,this.defaultValue.showStatusBar),preview:_S(t.preview,this.defaultValue.preview),previewMode:LS(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:_S(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:_S(t.showMethods,this.defaultValue.showMethods),showFunctions:_S(t.showFunctions,this.defaultValue.showFunctions),showConstructors:_S(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:_S(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:_S(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:_S(t.showFields,this.defaultValue.showFields),showVariables:_S(t.showVariables,this.defaultValue.showVariables),showClasses:_S(t.showClasses,this.defaultValue.showClasses),showStructs:_S(t.showStructs,this.defaultValue.showStructs),showInterfaces:_S(t.showInterfaces,this.defaultValue.showInterfaces),showModules:_S(t.showModules,this.defaultValue.showModules),showProperties:_S(t.showProperties,this.defaultValue.showProperties),showEvents:_S(t.showEvents,this.defaultValue.showEvents),showOperators:_S(t.showOperators,this.defaultValue.showOperators),showUnits:_S(t.showUnits,this.defaultValue.showUnits),showValues:_S(t.showValues,this.defaultValue.showValues),showConstants:_S(t.showConstants,this.defaultValue.showConstants),showEnums:_S(t.showEnums,this.defaultValue.showEnums),showEnumMembers:_S(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_S(t.showKeywords,this.defaultValue.showKeywords),showWords:_S(t.showWords,this.defaultValue.showWords),showColors:_S(t.showColors,this.defaultValue.showColors),showFiles:_S(t.showFiles,this.defaultValue.showFiles),showReferences:_S(t.showReferences,this.defaultValue.showReferences),showFolders:_S(t.showFolders,this.defaultValue.showFolders),showTypeParameters:_S(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_S(t.showSnippets,this.defaultValue.showSnippets),showUsers:_S(t.showUsers,this.defaultValue.showUsers),showIssues:_S(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:jS(new class extends uS{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:ue(0,"Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover"],enumDescriptions:[ue(0,"Show the inline suggestion toolbar whenever an inline suggestion is shown."),ue(0,"Show the inline suggestion toolbar when hovering over an inline suggestion.")],description:ue(0,"Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:ue(0,"Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_S(t.enabled,this.defaultValue.enabled),mode:LS(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:LS(t.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:_S(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:_S(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}),inlineCompletionsAccessibilityVerbose:jS(new vS(147,"inlineCompletionsAccessibilityVerbose",!1,{description:ue(0,"Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:jS(new CS(118,"suggestFontSize",0,0,1e3,{markdownDescription:ue(0,"Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:jS(new CS(119,"suggestLineHeight",0,0,1e3,{markdownDescription:ue(0,"Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:jS(new vS(120,"suggestOnTriggerCharacters",!0,{description:ue(0,"Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:jS(new kS(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[ue(0,"Always select the first suggestion."),ue(0,"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),ue(0,"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:ue(0,"Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:jS(new kS(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[ue(0,"Tab complete will insert the best matching suggestion when pressing tab."),ue(0,"Disable tab completions."),ue(0,"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:ue(0,"Enables tab completions.")})),tabIndex:jS(new CS(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:jS(new class extends uS{constructor(){const e={nonBasicASCII:AS,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:AS,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[FS]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,AS],default:e.nonBasicASCII,description:ue(0,"Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[PS]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:ue(0,"Controls whether characters that just reserve space or have no width at all are highlighted.")},[BS]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:ue(0,"Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[WS]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,AS],default:e.includeComments,description:ue(0,"Controls whether characters in comments should also be subject to Unicode highlighting.")},[VS]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,AS],default:e.includeStrings,description:ue(0,"Controls whether characters in strings should also be subject to Unicode highlighting.")},[OS]:{restricted:!0,type:"object",default:e.allowedCharacters,description:ue(0,"Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[HS]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:ue(0,"Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(fd(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&e&&(fd(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new gS(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:zS(t.nonBasicASCII,AS,[!0,!1,AS]),invisibleCharacters:_S(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:_S(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:zS(t.includeComments,AS,[!0,!1,AS]),includeStrings:zS(t.includeStrings,AS,[!0,!1,AS]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[n,s]of Object.entries(e))!0===s&&(i[n]=!0);return i}}),unusualLineTerminators:jS(new kS(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[ue(0,"Unusual line terminators are automatically removed."),ue(0,"Unusual line terminators are ignored."),ue(0,"Unusual line terminators prompt to be removed.")],description:ue(0,"Remove unusual line terminators that might cause problems.")})),useShadowDOM:jS(new vS(126,"useShadowDOM",!0)),useTabStops:jS(new vS(127,"useTabStops",!0,{description:ue(0,"Inserting and deleting whitespace follows tab stops.")})),wordBreak:jS(new kS(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[ue(0,"Use the default line break rule."),ue(0,"Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:ue(0,"Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:jS(new SS(129,"wordSeparators",Sc,{description:ue(0,"Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:jS(new kS(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[ue(0,"Lines will never wrap."),ue(0,"Lines will wrap at the viewport width."),ue(0,"Lines will wrap at `#editor.wordWrapColumn#`."),ue(0,"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:ue(0,"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:jS(new SS(131,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;\xa2\xb0\u2032\u2033\u2030\u2103\u3001\u3002\uff61\uff64\uffe0\uff0c\uff0e\uff1a\uff1b\uff1f\uff01\uff05\u30fb\uff65\u309d\u309e\u30fd\u30fe\u30fc\u30a1\u30a3\u30a5\u30a7\u30a9\u30c3\u30e3\u30e5\u30e7\u30ee\u30f5\u30f6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308e\u3095\u3096\u31f0\u31f1\u31f2\u31f3\u31f4\u31f5\u31f6\u31f7\u31f8\u31f9\u31fa\u31fb\u31fc\u31fd\u31fe\u31ff\u3005\u303b\uff67\uff68\uff69\uff6a\uff6b\uff6c\uff6d\uff6e\uff6f\uff70\u201d\u3009\u300b\u300d\u300f\u3011\u3015\uff09\uff3d\uff5d\uff63")),wordWrapBreakBeforeCharacters:jS(new SS(132,"wordWrapBreakBeforeCharacters","([{\u2018\u201c\u3008\u300a\u300c\u300e\u3010\u3014\uff08\uff3b\uff5b\uff62\xa3\xa5\uff04\uffe1\uffe5+\uff0b")),wordWrapColumn:jS(new CS(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:ue(0,"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:jS(new kS(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:jS(new kS(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:jS(new class extends mS{constructor(){super(140)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(73)?n.push("mouse-default"):"copy"===t.get(73)&&n.push("mouse-copy"),t.get(110)&&n.push("showUnused"),t.get(138)&&n.push("showDeprecated"),n.join(" ")}}),defaultColorDecorators:jS(new vS(145,"defaultColorDecorators",!1,{markdownDescription:ue(0,"Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:jS(new class extends mS{constructor(){super(141)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:jS(new vS(142,"tabFocusMode",!1,{markdownDescription:ue(0,"Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:jS(new MS),wrappingInfo:jS(new class extends mS{constructor(){super(144)}compute(e,t,i){const n=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}),wrappingIndent:jS(new class extends uS{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[ue(0,"No indentation. Wrapped lines begin at column 1."),ue(0,"Wrapped lines get the same indentation as the parent."),ue(0,"Wrapped lines get +1 indentation toward the parent."),ue(0,"Wrapped lines get +2 indentation toward the parent.")],description:ue(0,"Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return 2===t.get(2)?0:i}}),wrappingStrategy:jS(new class extends uS{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[ue(0,"Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),ue(0,"Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:ue(0,"Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return LS(e,"simple",["simple","advanced"])}compute(e,t,i){return 2===t.get(2)?"advanced":i}})},$S=Object.freeze({id:"editor",order:5,type:"object",title:ue(0,"Editor"),scope:5}),GS=Object.assign(Object.assign({},$S),{properties:{"editor.tabSize":{type:"number",default:wc.tabSize,minimum:1,markdownDescription:ue(0,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:ue(0,'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:wc.insertSpaces,markdownDescription:ue(0,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:wc.detectIndentation,markdownDescription:ue(0,"Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:wc.trimAutoWhitespace,description:ue(0,"Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:wc.largeFileOptimizations,description:ue(0,"Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:ue(0,"Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[ue(0,"Only suggest words from the active document."),ue(0,"Suggest words from all open documents of the same language."),ue(0,"Suggest words from all open documents.")],description:ue(0,"Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[ue(0,"Semantic highlighting enabled for all color themes."),ue(0,"Semantic highlighting disabled for all color themes."),ue(0,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:ue(0,"Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:ue(0,"Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:ue(0,"Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:ue(0,"Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:ue(0,"Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:ue(0,"Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:ue(0,"Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:ue(0,"The opening bracket character or string sequence.")},{type:"string",description:ue(0,"The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:ue(0,"Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:ue(0,"The opening bracket character or string sequence.")},{type:"string",description:ue(0,"The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:hS.maxComputationTime,description:ue(0,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:hS.maxFileSize,description:ue(0,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:hS.renderSideBySide,description:ue(0,"Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:hS.renderSideBySideInlineBreakpoint,description:ue(0,"If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:hS.useInlineViewWhenSpaceIsLimited,description:ue(0,"If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:hS.renderMarginRevertIcon,description:ue(0,"When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:hS.ignoreTrimWhitespace,description:ue(0,"When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:hS.renderIndicators,description:ue(0,"Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:hS.diffCodeLens,description:ue(0,"Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:hS.diffWordWrap,markdownEnumDescriptions:[ue(0,"Lines will never wrap."),ue(0,"Lines will wrap at the viewport width."),ue(0,"Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:hS.diffAlgorithm,markdownEnumDescriptions:[ue(0,"Uses the legacy diffing algorithm."),ue(0,"Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:hS.hideUnchangedRegions.enabled,markdownDescription:ue(0,"Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:hS.hideUnchangedRegions.revealLineCount,markdownDescription:ue(0,"Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:hS.hideUnchangedRegions.minimumLineCount,markdownDescription:ue(0,"Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:hS.hideUnchangedRegions.contextLineCount,markdownDescription:ue(0,"Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:hS.experimental.showMoves,markdownDescription:ue(0,"Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:hS.experimental.showEmptyDecorations,description:ue(0,"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}});for(const xre of KS){const e=xre.schema;if(void 0!==e)if(void 0!==(ZS=e).type||void 0!==ZS.anyOf)GS.properties[`editor.${xre.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(GS.properties[t]=e[t])}var ZS;let YS=null;function XS(){return null===YS&&(YS=Object.create(null),Object.keys(GS.properties).forEach((e=>{YS[e]=!0}))),YS}Ul.as(ku).registerConfiguration(GS);const QS=Pa("IWorkspaceEditService");class JS{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(eL.is(e))return eL.lift(e);if(tL.is(e))return tL.lift(e);throw new Error("Unsupported edit")}))}}class eL extends JS{static is(e){return e instanceof eL||Fr(e)&&an.isUri(e.resource)&&Fr(e.textEdit)}static lift(e){return e instanceof eL?e:new eL(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class tL extends JS{static is(e){return e instanceof tL||Fr(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof tL?e:new tL(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const iL=Pa("ILanguageFeaturesService"),nL=Pa("IEditorCancelService"),sL=new Tl("cancellableOperation",!1,ue(0,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Cu(nL,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:sL.bindTo(e.get(Rl)),tokens:new O}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class oL extends Uh{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(nL).add(e,this)))}dispose(){this._unregister(),super.dispose()}}wh(new class extends fh{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:sL})}runEditorCommand(e,t){e.get(nL).cancel(t)}});class rL{constructor(e,t){if(this.flags=t,1&this.flags){const t=e.getModel();this.modelVersionId=t?Xs("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;4&this.flags?this.position=e.getPosition():this.position=null,2&this.flags?this.selection=e.getSelection():this.selection=null,8&this.flags?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof rL))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&(this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&(!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))))}validate(e){return this._equals(new rL(e,this.flags))}}class aL extends oL{constructor(e,t,i,n){super(e,n),this._listener=new N,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&Mh.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&Mh.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class lL extends Uh{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}var hL;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(hL||(hL={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(s){return s?fo(t,s)?e.Error:fo(i,s)||fo("warn",s)?e.Warning:fo(n,s)?e.Info:e.Ignore:e.Ignore},e.toString=function(s){switch(s){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(hL||(hL={}));const dL=hL;var cL=dL;const uL=Pa("notificationService");const gL=Pa("progressService");Object.freeze({total(){},worked(){},done(){}});class pL{constructor(e,t){this.callback=e,this.report=(null==t?void 0:t.async)?this._reportAsync.bind(this):this._reportSync.bind(this)}_reportSync(e){this._value=e,this.callback(this._value)}_reportAsync(e){Promise.resolve(this._lastTask).finally((()=>{this._value=e;const t=this.callback(this._value);this._lastTask=Promise.resolve(t).finally((()=>this._lastTask=void 0))}))}}pL.None=Object.freeze({report(){}});const mL=Pa("editorProgressService");var fL,_L=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class vL{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+vL.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new vL(this.value+vL.sep+e)}}function bL(e,t,i){return!!t.contains(e)&&(!i||!t.contains(i))}vL.sep=".",vL.None=new vL("@@none@@"),vL.Empty=new vL(""),vL.QuickFix=new vL("quickfix"),vL.Refactor=new vL("refactor"),vL.RefactorExtract=vL.Refactor.append("extract"),vL.RefactorInline=vL.Refactor.append("inline"),vL.RefactorMove=vL.Refactor.append("move"),vL.RefactorRewrite=vL.Refactor.append("rewrite"),vL.Notebook=new vL("notebook"),vL.Source=new vL("source"),vL.SourceOrganizeImports=vL.Source.append("organizeImports"),vL.SourceFixAll=vL.Source.append("fixAll"),vL.SurroundWith=vL.Refactor.append("surround"),function(e){e.Refactor="refactor",e.RefactorPreview="refactor preview",e.Lightbulb="lightbulb",e.Default="other (default)",e.SourceAction="source action",e.QuickFix="quick fix action",e.FixAll="fix all",e.OrganizeImports="organize imports",e.AutoFix="auto fix",e.QuickFixHover="quick fix hover window",e.OnSave="save participants",e.ProblemsView="problems view"}(fL||(fL={}));class CL{static fromUser(e,t){return e&&"object"==typeof e?new CL(CL.getKindFromUser(e,t.kind),CL.getApplyFromUser(e,t.apply),CL.getPreferredUser(e)):new CL(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new vL(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class wL{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}resolve(e){var t;return _L(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(i){a(i)}t&&(this.action.edit=t.edit)}return this}))}}var yL=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const SL="editor.action.codeAction",LL="editor.action.quickFix",kL="editor.action.autoFix",DL="editor.action.refactor",xL="editor.action.sourceAction",NL="editor.action.organizeImports",EL="editor.action.fixAll";class IL extends E{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Wd(e.diagnostics)?Wd(t.diagnostics)?IL.codeActionsPreferredComparator(e,t):-1:Wd(t.diagnostics)?1:IL.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(IL.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&vL.QuickFix.contains(new vL(e.kind))&&!!e.isPreferred))}}const ML={actions:[],documentation:void 0};function TL(e,t,i,n,s,o){var r;return yL(this,void 0,void 0,(function*(){const l=n.filter||{},h=Object.assign(Object.assign({},l),{excludes:[...l.excludes||[],vL.Notebook]}),c={only:null===(r=l.include)||void 0===r?void 0:r.value,trigger:n.type},u=new lL(t,o),g=2===n.type,p=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>function(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>bL(t,i,e.include)))||!e.includeSourceActions&&vL.Source.contains(t))}(i,new vL(e))))))}(e,t,g?h:l),m=new N,f=p.map((e=>yL(this,void 0,void 0,(function*(){try{s.report(e);const n=yield e.provideCodeActions(t,i,c,u.token);if(n&&m.add(n),u.token.isCancellationRequested)return ML;const o=((null==n?void 0:n.actions)||[]).filter((e=>e&&function(e,t){const i=t.kind?new vL(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>bL(i,t,e.include)))||!e.includeSourceActions&&i&&vL.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}(l,e))),r=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new vL(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const s of t)if(s.kind)for(const e of n)if(e.kind.contains(new vL(s.kind)))return e.command;return}(e,o,l.include);return{actions:o.map((t=>new wL(t,e))),documentation:r}}catch(n){if(d(n))throw n;return a(n),ML}})))),_=e.onDidChange((()=>{Id(e.all(t),p)||u.cancel()}));try{const i=yield Promise.all(f),s=i.map((e=>e.actions)).flat(),o=[...Pd(i.map((e=>e.documentation))),...RL(e,t,n,s)];return new IL(s,o,m)}finally{_.dispose(),u.dispose()}}))}function*RL(e,t,i,n){var s,o,r;if(t&&n.length)for(const a of e.all(t))a._getAdditionalMenuItems&&(yield*null===(s=a._getAdditionalMenuItems)||void 0===s?void 0:s.call(a,{trigger:i.type,only:null===(r=null===(o=i.filter)||void 0===o?void 0:o.include)||void 0===r?void 0:r.value},n.map((e=>e.action))))}var AL;function OL(e,t,i,n,s=Hh.None){var o;return yL(this,void 0,void 0,(function*(){const r=e.get(QS),a=e.get(Ga),l=e.get(rh),h=e.get(uL);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),yield t.resolve(s),!s.isCancellationRequested){if(null===(o=t.action.edit)||void 0===o?void 0:o.edits.length){if(!(yield r.apply(t.action.edit,{editor:null==n?void 0:n.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==AL.OnSave,showPreview:null==n?void 0:n.preview})).isApplied)return}if(t.action.command)try{yield a.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(d){const e=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(d);h.error("string"==typeof e?e:ue(0,"An unknown error occurred while applying the code action"))}}}))}!function(e){e.OnSave="onSave",e.FromProblemsView="fromProblemsView",e.FromCodeActions="fromCodeActions"}(AL||(AL={})),Za.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,s){return yL(this,void 0,void 0,(function*(){if(!(t instanceof an))throw u();const{codeActionProvider:o}=e.get(iL),r=e.get(Wa).getModel(t);if(!r)throw u();const a=Th.isISelection(i)?Th.liftSelection(i):Mh.isIRange(i)?r.validateRange(i):void 0;if(!a)throw u();const l="string"==typeof n?new vL(n):void 0,h=yield TL(o,r,a,{type:1,triggerAction:fL.Default,filter:{includeSourceActions:!0,include:l}},pL.None,Hh.None),d=[],c=Math.min(h.validActions.length,"number"==typeof s?s:0);for(let e=0;ee.action))}finally{setTimeout((()=>h.dispose()),100)}}))}));const PL=Pa("keybindingService");var FL,BL=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},WL=function(e,t){return function(i,n){t(i,n,e)}};let VL=FL=class{constructor(e){this.keybindingService=e}getResolver(){const e=new Gs((()=>this.keybindingService.getKeybindings().filter((e=>FL.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===NL?t={kind:vL.SourceOrganizeImports.value}:e.command===EL&&(t={kind:vL.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},CL.fromUser(t,{kind:vL.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new vL(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};VL.codeActionCommands=[DL,SL,xL,NL,EL],VL=FL=BL([WL(0,PL)],VL);Sp("symbolIcon.arrayForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.booleanForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},ue(0,"The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.colorForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.constantForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},ue(0,"The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},ue(0,"The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},ue(0,"The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.fileForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.folderForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},ue(0,"The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.keyForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.keywordForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},ue(0,"The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.moduleForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.namespaceForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.nullForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.numberForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.objectForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.operatorForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.packageForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.propertyForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.referenceForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.snippetForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.stringForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.structForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.textForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.typeParameterForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.unitForeground",{dark:Lp,light:Lp,hcDark:Lp,hcLight:Lp},ue(0,"The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sp("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},ue(0,"The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const HL=Object.freeze({kind:vL.Empty,title:ue(0,"More Actions...")}),zL=Object.freeze([{kind:vL.QuickFix,title:ue(0,"Quick Fix")},{kind:vL.RefactorExtract,title:ue(0,"Extract"),icon:Qr.wrench},{kind:vL.RefactorInline,title:ue(0,"Inline"),icon:Qr.wrench},{kind:vL.RefactorRewrite,title:ue(0,"Rewrite"),icon:Qr.wrench},{kind:vL.RefactorMove,title:ue(0,"Move"),icon:Qr.wrench},{kind:vL.SurroundWith,title:ue(0,"Surround With"),icon:Qr.symbolSnippet},{kind:vL.Source,title:ue(0,"Source Action"),icon:Qr.symbolFile},HL]);function UL(e,t,i){let n=null,s=null;if("function"==typeof i.value?(n="value",s=i.value,0!==s.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",s=i.get),!s)throw new Error("not supported");const o=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:s.apply(this,e)}),this[o]}}var KL,jL=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(KL||(KL={}));class qL extends E{constructor(){super(),this.dispatched=!1,this.targets=new O,this.ignoreTargets=new O,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(En(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(En(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(En(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){if(!qL.isTouchDevice())return E.None;qL.INSTANCE||(qL.INSTANCE=S(new qL));return x(qL.INSTANCE.targets.push(e))}static ignoreTarget(e){if(!qL.isTouchDevice())return E.None;qL.INSTANCE||(qL.INSTANCE=S(new qL));return x(qL.INSTANCE.ignoreTargets.push(e))}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=qL.HOLD_DELAY&&Math.abs(o.initialPageX-Ed(o.rollingPageX))<30&&Math.abs(o.initialPageY-Ed(o.rollingPageY))<30){const e=this.newGestureEvent(KL.Contextmenu,o.initialTarget);e.pageX=Ed(o.rollingPageX),e.pageY=Ed(o.rollingPageY),this.dispatchEvent(e)}else if(1===i){const e=Ed(o.rollingPageX),i=Ed(o.rollingPageY),n=Ed(o.rollingTimestamps)-o.rollingTimestamps[0],s=e-o.rollingPageX[0],r=i-o.rollingPageY[0],a=[...this.targets].filter((e=>o.initialTarget instanceof Node&&e.contains(o.initialTarget)));this.inertia(a,t,Math.abs(s)/n,s>0?1:-1,e,Math.abs(r)/n,r>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(KL.End,o.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===KL.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>qL.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==KL.Change&&e.type!==KL.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(const t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,i,n,s,o,r,a){this.handle=An((()=>{const l=Date.now(),h=l-t;let d=0,c=0,u=!0;i+=qL.SCROLL_FRICTION*h,o+=qL.SCROLL_FRICTION*h,i>0&&(u=!1,d=n*i*h),o>0&&(u=!1,c=r*o*h);const g=this.newGestureEvent(KL.Change);g.translationX=d,g.translationY=c,e.forEach((e=>e.dispatchEvent(g))),u||this.inertia(e,l,i,n,s+d,o,r,a+c)}))}onTouchMove(e){const t=Date.now();for(let i=0,n=e.changedTouches.length;i3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(n.pageX),s.rollingPageY.push(n.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}qL.SCROLL_FRICTION=-.005,qL.HOLD_DELAY=700,qL.CLEAR_TAP_COUNT_TIME=400,jL([UL],qL,"isTouchDevice",null);var $L,GL,ZL=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},YL=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Hidden={type:0};e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(GL||(GL={}));let XL=$L=class extends E{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new U),this.onClick=this._onClick.event,this._state=GL.Hidden,this._domNode=fs("div.lightBulbWidget"),this._register(qL.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),this._register(Tn(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=Hn(this._domNode),n=this._editor.getOption(66);let s=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{1&~e.buttons||this.hide()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(64)&&!this._editor.getOption(64).enabled&&this.hide()}))),this._register(B.runAndSubscribe(t.onDidUpdateKeybindings,(()=>{var e,i,n,s;this._preferredKbLabel=null!==(i=null===(e=t.lookupKeybinding(kL))||void 0===e?void 0:e.getLabel())&&void 0!==i?i:void 0,this._quickFixKbLabel=null!==(s=null===(n=t.lookupKeybinding(LL))||void 0===n?void 0:n.getLabel())&&void 0!==s?s:void 0,this._updateLightBulbTitleAndIcon()})))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(64).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:o,column:r}=s.validatePosition(i),a=s.getOptions().tabSize,l=n.get(50),h=Gv(s.getLineContent(o),a),d=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let c=o;if(!(l.spaceWidth*h>22))if(o>1&&!d(o-1))c-=1;else if(d(o+1)){if(r*l.spaceWidth<22)return this.hide()}else c+=1;this.state=new GL.Showing(e,t,i,{position:{lineNumber:c,column:1},preference:$L._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==GL.Hidden&&(this.state=GL.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){1===this.state.type&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...ea.asClassNameArray(Qr.lightBulb)),this._domNode.classList.add(...ea.asClassNameArray(Qr.lightbulbAutofix)),this._preferredKbLabel)?this.title=ue(0,"Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):(this._domNode.classList.remove(...ea.asClassNameArray(Qr.lightbulbAutofix)),this._domNode.classList.add(...ea.asClassNameArray(Qr.lightBulb)),this._quickFixKbLabel?this.title=ue(0,"Show Code Actions ({0})",this._quickFixKbLabel):this.title=ue(0,"Show Code Actions"))}set title(e){this._domNode.title=e}};function QL(e,t={}){const i=JL(t);return tk(i,function(e,t){const i={type:1,children:[]};let n=0,s=i;const o=[],r=new ek(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==nk(r.peek(),t);if(i&&(e=r.next()),!i&&ik(e,t)&&e===r.peek()){r.advance(),2===s.type&&(s=o.pop());const i=nk(e,t);if(s.type===i||5===s.type&&6===i)s=o.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),s.children.push(e),o.push(s),s=e}}else if("\n"===e)2===s.type&&(s=o.pop()),s.children.push({type:8});else if(2!==s.type){const t={type:2,content:e};s.children.push(t),o.push(s),s=t}else s.content+=e}2===s.type&&(s=o.pop());o.length;return i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function JL(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}XL.ID="editor.contrib.lightbulbWidget",XL._posPref=[0],XL=$L=ZL([YL(1,PL)],XL);class ek{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function tk(e,t,i,n){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(7===t.type&&n)s=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(Mn(e,"click",(e=>{i.callback(String(t.index),e)}))),s=e}else 8===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach((e=>{tk(s,e,i,n)}))}function ik(e,t){return 0!==nk(e,t)}function nk(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}const sk=new RegExp(`(\\\\)?\\$\\((${ea.iconNameExpression}(?:${ea.iconModifierExpression})?)\\)`,"g");function ok(e){const t=new Array;let i,n=0,s=0;for(;null!==(i=sk.exec(e));){s=i.index||0,ne.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var o=/[&<>"']/,r=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,h={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(e){return h[e]};function c(e,t){if(t){if(o.test(e))return e.replace(r,d)}else if(a.test(e))return e.replace(l,d);return e}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g;function m(e,t){e="string"==typeof e?e:e.source,t=t||"";var i={replace:function(t,n){return n=(n=n.source||n).replace(p,"$1"),e=e.replace(t,n),i},getRegex:function(){return new RegExp(e,t)}};return i}var f=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function v(e,t,i){if(e){var n;try{n=decodeURIComponent(g(i)).replace(f,"").toLowerCase()}catch(Dre){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!_.test(i)&&(i=function(e,t){b[" "+e]||(C.test(e)?b[" "+e]=e+"/":b[" "+e]=D(e,"/",!0));var i=-1===(e=b[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(w,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(y,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(Dre){return null}return i}var b={},C=/^[^:]+:\/*[^/]*$/,w=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/,S={exec:function(){}};function L(e){for(var t,i,n=1;n=0&&"\\"===i[s];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>t)i.splice(t);else for(;i.length1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function E(e,t,i,n){var s=t.href,o=t.title?c(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;var a={type:"link",raw:i,href:s,title:o,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,a}return{type:"image",raw:i,href:s,title:o,text:c(r)}}var I=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},i.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:D(i,"\n")}}},i.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},i.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=D(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}},i.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},i.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var i=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}},i.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,s,o,r,a,l,h,d,c,u,g,p,m=t[1].trim(),f=m.length>1,_={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?"\\d{1,9}\\"+m.slice(-1):"\\"+m,this.options.pedantic&&(m=f?m:"[*+-]");for(var v=new RegExp("^( {0,3}"+m+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(p=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),d=t[2].split("\n",1)[0],c=e.split("\n",1)[0],this.options.pedantic?(r=2,g=d.trimLeft()):(r=(r=t[2].search(/[^ ]/))>4?1:r,g=d.slice(r),r+=t[1].length),l=!1,!d&&/^ *$/.test(c)&&(i+=c+"\n",e=e.substring(c.length+1),p=!0),!p)for(var b=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),C=new RegExp("^ {0,"+Math.min(3,r-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),w=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:```|~~~)"),y=new RegExp("^ {0,"+Math.min(3,r-1)+"}#");e&&(d=u=e.split("\n",1)[0],this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!w.test(d))&&!y.test(d)&&!b.test(d)&&!C.test(e);){if(d.search(/[^ ]/)>=r||!d.trim())g+="\n"+d.slice(r);else{if(l)break;g+="\n"+d}l||d.trim()||(l=!0),i+=u+"\n",e=e.substring(u.length+1)}_.loose||(h?_.loose=!0:/\n *\n *$/.test(i)&&(h=!0)),this.options.gfm&&(s=/^\[[ xX]\] /.exec(g))&&(o="[ ] "!==s[0],g=g.replace(/^\[[ xX]\] +/,"")),_.items.push({type:"list_item",raw:i,task:!!s,checked:o,loose:!1,text:g}),_.raw+=i}_.items[_.items.length-1].raw=i.trimRight(),_.items[_.items.length-1].text=g.trimRight(),_.raw=_.raw.trimRight();var S=_.items.length;for(a=0;a1)return!0;return!1}));!_.loose&&L.length&&k&&(_.loose=!0,_.items[a].loose=!0)}return _}},i.html=function(e){var t=this.rules.block.html.exec(e);if(t){var i={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var n=this.options.sanitizer?this.options.sanitizer(t[0]):c(t[0]);i.type="paragraph",i.text=n,i.tokens=this.lexer.inline(n)}return i}},i.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},i.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:k(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,s,o,r,a=i.align.length;for(n=0;n/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):c(t[0]):t[0]}},i.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;var n=D(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var s=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var i=e.length,n=0,s=0;s-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var r=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);l&&(r=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^$/.test(i)?r.slice(1):r.slice(1,-1)),E(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}},i.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return E(i,n,i[0],this.lexer)}},i.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var s=n[1]||n[2]||"";if(!s||s&&(""===i||this.rules.inline.punctuation.exec(i))){var o,r,a=n[0].length-1,l=a,h=0,d="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=d.exec(t));)if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(r=o.length,n[3]||n[4])l+=r;else if(!((n[5]||n[6])&&a%3)||(a+r)%3){if(!((l-=r)>0)){if(r=Math.min(r,r+l+h),Math.min(a,r)%2){var c=e.slice(1,a+n.index+r);return{type:"em",raw:e.slice(0,a+n.index+r+1),text:c,tokens:this.lexer.inlineTokens(c)}}var u=e.slice(2,a+n.index+r-1);return{type:"strong",raw:e.slice(0,a+n.index+r+1),text:u,tokens:this.lexer.inlineTokens(u)}}}else h+=r}}},i.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return n&&s&&(i=i.substring(1,i.length-1)),i=c(i,!0),{type:"codespan",raw:t[0],text:i}}},i.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},i.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}},i.autolink=function(e,t){var i,n,s=this.rules.inline.autolink.exec(e);if(s)return n="@"===s[2]?"mailto:"+(i=c(this.options.mangle?t(s[1]):s[1])):i=c(s[1]),{type:"link",raw:s[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},i.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,s;if("@"===i[2])s="mailto:"+(n=c(this.options.mangle?t(i[0]):i[0]));else{var o;do{o=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(o!==i[0]);n=c(i[0]),s="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}},i.inlineText=function(e,t){var i,n=this.rules.inline.text.exec(e);if(n)return i=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):c(n[0]):n[0]:c(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}},t}(),M={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:S,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};M.def=m(M.def).replace("label",M._label).replace("title",M._title).getRegex(),M.bullet=/(?:[*+-]|\d{1,9}[.)])/,M.listItemStart=m(/^( *)(bull) */).replace("bull",M.bullet).getRegex(),M.list=m(M.list).replace(/bull/g,M.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+M.def.source+")").getRegex(),M._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",M._comment=/|$)/,M.html=m(M.html,"i").replace("comment",M._comment).replace("tag",M._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M.paragraph=m(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.blockquote=m(M.blockquote).replace("paragraph",M.paragraph).getRegex(),M.normal=L({},M),M.gfm=L({},M.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),M.gfm.table=m(M.gfm.table).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.gfm.paragraph=m(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",M.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.pedantic=L({},M.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",M._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:S,paragraph:m(M.normal._paragraph).replace("hr",M.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",M.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var T={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:S,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:S,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}T._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",T.punctuation=m(T.punctuation).replace(/punctuation/g,T._punctuation).getRegex(),T.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,T.escapedEmSt=/\\\*|\\_/g,T._comment=m(M._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),T.emStrong.lDelim=m(T.emStrong.lDelim).replace(/punct/g,T._punctuation).getRegex(),T.emStrong.rDelimAst=m(T.emStrong.rDelimAst,"g").replace(/punct/g,T._punctuation).getRegex(),T.emStrong.rDelimUnd=m(T.emStrong.rDelimUnd,"g").replace(/punct/g,T._punctuation).getRegex(),T._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,T._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,T._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,T.autolink=m(T.autolink).replace("scheme",T._scheme).replace("email",T._email).getRegex(),T._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,T.tag=m(T.tag).replace("comment",T._comment).replace("attribute",T._attribute).getRegex(),T._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,T._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,T._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,T.link=m(T.link).replace("label",T._label).replace("href",T._href).replace("title",T._title).getRegex(),T.reflink=m(T.reflink).replace("label",T._label).replace("ref",M._label).getRegex(),T.nolink=m(T.nolink).replace("ref",M._label).getRegex(),T.reflinkSearch=m(T.reflinkSearch,"g").replace("reflink",T.reflink).replace("nolink",T.nolink).getRegex(),T.normal=L({},T),T.pedantic=L({},T.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",T._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",T._label).getRegex()}),T.gfm=L({},T.normal,{escape:m(T.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\0?t[t.length-1].raw+="\n":t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?t.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else if(s=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,i=e.slice(1),n=void 0;r.options.extensions.startBlock.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}(),this.state.top&&(i=this.tokenizer.paragraph(s)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i),o=s.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,t},r.inline=function(e,t){return void 0===t&&(t=[]),this.inlineQueue.push({src:e,tokens:t}),t},r.inlineTokens=function(e,t){var i,n,s,o=this;void 0===t&&(t=[]);var r,a,l,h=e;if(this.tokens.links){var d=Object.keys(this.tokens.links);if(d.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(h));)d.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,r.index)+"["+N("a",r[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(h));)h=h.slice(0,r.index)+"["+N("a",r[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(h));)h=h.slice(0,r.index)+"++"+h.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(i=n.call({lexer:o},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,h,l))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,A))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,A))){if(s=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,i=e.slice(1),n=void 0;o.options.extensions.startInline.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}(),i=this.tokenizer.inlineText(s,R))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(i.raw.length),t.push(i);return t},n=i,o=[{key:"rules",get:function(){return{block:M,inline:T}}}],(s=null)&&t(n.prototype,s),o&&t(n,o),Object.defineProperty(n,"prototype",{writable:!1}),i}(),P=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var s=this.options.highlight(e,n);null!=s&&s!==e&&(i=!0,e=s)}return e=e.replace(/\n$/,"")+"\n",n?'
    '+(i?e:c(e,!0))+"
    \n":"
    "+(i?e:c(e,!0))+"
    \n"},i.blockquote=function(e){return"
    \n"+e+"
    \n"},i.html=function(e){return e},i.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},i.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},i.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},i.listitem=function(e){return"
  • "+e+"
  • \n"},i.checkbox=function(e){return" "},i.paragraph=function(e){return"

    "+e+"

    \n"},i.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},i.tablerow=function(e){return"\n"+e+"\n"},i.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},i.strong=function(e){return""+e+""},i.em=function(e){return""+e+""},i.codespan=function(e){return""+e+""},i.br=function(){return this.options.xhtml?"
    ":"
    "},i.del=function(e){return""+e+""},i.link=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"},i.image=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">"},i.text=function(e){return e},t}(),F=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),B=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),W=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new P,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new F,this.slugger=new B}t.parse=function(e,i){return new t(i).parse(e)},t.parseInline=function(e,i){return new t(i).parseInline(e)};var i=t.prototype;return i.parse=function(e,t){void 0===t&&(t=!0);var i,n,s,o,r,a,l,h,d,c,u,p,m,f,_,v,b,C,w,y="",S=e.length;for(i=0;i0&&"paragraph"===_.tokens[0].type?(_.tokens[0].text=C+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&"text"===_.tokens[0].tokens[0].type&&(_.tokens[0].tokens[0].text=C+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:C}):f+=C),f+=this.parse(_.tokens,m),d+=this.renderer.listitem(f,b,v);y+=this.renderer.list(d,u,p);continue;case"html":y+=this.renderer.html(c.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":for(d=c.tokens?this.parseInline(c.tokens):c.text;i+1An error occurred:

    "+c(e.message+"",!0)+"
    ";throw e}try{var l=O.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(V.walkTokens(l,t.walkTokens)).then((function(){return W.parse(l,t)})).catch(a);V.walkTokens(l,t.walkTokens)}return W.parse(l,t)}catch(Dre){a(Dre)}}V.options=V.setOptions=function(t){var i;return L(V.defaults,t),i=V.defaults,e.defaults=i,V},V.getDefaults=s,V.defaults=e.defaults,V.use=function(){for(var e=arguments.length,t=new Array(e),i=0;iAn error occurred:

    "+c(Dre.message+"",!0)+"
    ";throw Dre}},V.Parser=W,V.parser=W.parse,V.Renderer=P,V.TextRenderer=F,V.Lexer=O,V.lexer=O.lex,V.Tokenizer=I,V.Slugger=B,V.parse=V;var H=V.options,z=V.setOptions,U=V.use,K=V.walkTokens,j=V.parseInline,q=V,$=W.parse,G=O.lex;e.Lexer=O,e.Parser=W,e.Renderer=P,e.Slugger=B,e.TextRenderer=F,e.Tokenizer=I,e.getDefaults=s,e.lexer=G,e.marked=V,e.options=H,e.parse=q,e.parseInline=j,e.parser=$,e.setOptions=z,e.use=U,e.walkTokens=K,Object.defineProperty(e,"__esModule",{value:!0})},e.amd?e(0,i):"object"==typeof exports?i(exports):i((t="undefined"!=typeof globalThis?globalThis:t||self).marked={})}();hk.Lexer||exports.Lexer,hk.Parser||exports.Parser,hk.Renderer||exports.Renderer,hk.Slugger||exports.Slugger,hk.TextRenderer||exports.TextRenderer,hk.Tokenizer||exports.Tokenizer,hk.getDefaults||exports.getDefaults,hk.lexer||exports.lexer;var dk=hk.marked||exports.marked;hk.options||exports.options,hk.parse||exports.parse,hk.parseInline||exports.parseInline,hk.parser||exports.parser,hk.setOptions||exports.setOptions,hk.use||exports.use,hk.walkTokens||exports.walkTokens;function ck(e){let t=JSON.parse(e);return t=gk(t),t}function uk(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function gk(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return an.revive(e);case 2:return new RegExp(e.source,e.flags);case 17:return new Date(e.source)}if(e instanceof zc||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i{let n=[],s=[];return e&&(({href:e,dimensions:n}=function(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),s=e?e[1]:"",o=i?i[1]:"",r=isFinite(parseInt(o)),a=isFinite(parseInt(s));r&&t.push(`width="${o}"`),a&&t.push(`height="${s}"`)}return{href:e,dimensions:t}}(e)),s.push(`src="${Ra(e)}"`)),i&&s.push(`alt="${Ra(i)}"`),t&&s.push(`title="${Ra(t)}"`),n.length&&(s=s.concat(n)),""},paragraph:e=>`

    ${e}

    `,link:(e,t,i)=>"string"!=typeof e?"":(e===i&&(i=Aa(i)),t="string"==typeof t?Ra(Aa(t)):"",`
    /g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${t||e}">${i}`)});function mk(e,t={},i={}){var n,s;const o=new N;let a=!1;const l=JL(t),h=function(t){let i;try{i=ck(decodeURIComponent(t))}catch(Dre){}return i?(i=gd(i,(t=>e.uris&&e.uris[t]?an.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},d=function(t,i){const n=e.uris&&e.uris[t];let s=an.revive(n);return i?t.startsWith(vn.data+":")?t:(s||(s=an.parse(t)),wn.uriToBrowserUri(s).toString(!0)):s?an.parse(t).toString()===s.toString()?t:(s.query&&(s=s.with({query:h(s.query)})),s.toString()):t},c=new dk.Renderer;c.image=pk.image,c.link=pk.link,c.paragraph=pk.paragraph;const u=[],g=[];if(t.codeBlockRendererSync?c.code=(e,i)=>{const n=lk.nextId(),s=t.codeBlockRendererSync(fk(i),e);return g.push([n,s]),`
    ${Qs(e)}
    `}:t.codeBlockRenderer&&(c.code=(e,i)=>{const n=lk.nextId(),s=t.codeBlockRenderer(fk(i),e);return u.push(s.then((e=>[n,e]))),`
    ${Qs(e)}
    `}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let s=n.dataset.href;s&&(e.baseUri&&(s=_k(an.from(e.baseUri),s)),t.actionHandler.callback(s,i))}catch(s){r(s)}finally{i.preventDefault()}},n=t.actionHandler.disposables.add(new Hy(l,"click")),s=t.actionHandler.disposables.add(new Hy(l,"auxclick"));t.actionHandler.disposables.add(B.any(n.event,s.event)((e=>{const t=new Nt(e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(En(l,"keydown",(e=>{const t=new St(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(i.sanitizer=t=>(e.isTrusted?t.match(/^(]+>)|(<\/\s*span>)$/):void 0)?t:"",i.sanitize=!0,i.silent=!0),i.renderer=c;let p=null!==(n=e.value)&&void 0!==n?n:"";let m;if(p.length>1e5&&(p=`${p.substr(0,1e5)}\u2026`),e.supportThemeIcons&&(p=p.replace(na,(e=>`\\${e}`))),t.fillInIncompleteTokens){const e=Object.assign(Object.assign({},dk.defaults),i),t=function(e){let t,i;for(t=0;t"string"==typeof e?e:e.outerHTML)).join("")}const f=(new DOMParser).parseFromString(vk(e,m),"text/html");if(f.body.querySelectorAll("img").forEach((t=>{const i=t.getAttribute("src");if(i){let s=i;try{e.baseUri&&(s=_k(an.from(e.baseUri),s))}catch(n){}t.src=d(s,!0)}})),f.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=d(i,!1);e.baseUri&&(n=_k(an.from(e.baseUri),i)),t.dataset.href=n}})),l.innerHTML=vk(e,f.body.innerHTML),u.length>0)Promise.all(u).then((e=>{var i,n;if(a)return;const s=new Map(e),o=l.querySelectorAll("div[data-code]");for(const t of o){const e=s.get(null!==(i=t.dataset.code)&&void 0!==i?i:"");e&&us(t,e)}null===(n=t.asyncRenderCallback)||void 0===n||n.call(t)}));else if(g.length>0){const e=new Map(g),t=l.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(null!==(s=i.dataset.code)&&void 0!==s?s:"");t&&us(i,t)}}if(t.asyncRenderCallback)for(const r of l.getElementsByTagName("img")){const e=o.add(En(r,"load",(()=>{e.dispose(),t.asyncRenderCallback()})))}return{element:l,dispose:()=>{a=!0,o.dispose()}}}function fk(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function _k(e,t){return/^\w[\w\d+.-]*:/.test(t)?t:e.path.endsWith("/")?ka(e,t).toString():ka(wa(e),t).toString()}function vk(e,t){const{config:i,allowedSchemes:n}=function(e){const t=[vn.http,vn.https,vn.mailto,vn.data,vn.file,vn.vscodeFileResource,vn.vscodeRemote,vn.vscodeRemoteResource];e.isTrusted&&t.push(vn.command);return{config:{ALLOWED_TAGS:[...Ls],ALLOWED_ATTR:bk,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}(e);Di("uponSanitizeAttribute",((e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName);else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}));const s=function(e,t=!1){const i=document.createElement("a");return Di("afterSanitizeAttributes",(n=>{for(const s of["href","src"])if(n.hasAttribute(s)){const o=n.getAttribute(s);if("href"===s&&o.startsWith("#"))continue;if(i.href=o,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===s&&i.href.startsWith("data:"))continue;n.removeAttribute(s)}}})),x((()=>{xi("afterSanitizeAttributes")}))}(n);try{return ki(t,Object.assign(Object.assign({},i),{RETURN_TRUSTED_TYPE:!0}))}finally{xi("uponSanitizeAttribute"),s.dispose()}}const bk=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function Ck(e){return"string"==typeof e?e:function(e){var t;let i=null!==(t=e.value)&&void 0!==t?t:"";i.length>1e5&&(i=`${i.substr(0,1e5)}\u2026`);const n=dk.parse(i,{renderer:yk.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(e=>{var t;return null!==(t=wk.get(e))&&void 0!==t?t:e}));return vk({isTrusted:!1},n).toString()}(e)}const wk=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),yk=new Gs((()=>{const e=new dk.Renderer;return e.code=e=>e,e.blockquote=e=>e,e.html=e=>"",e.heading=(e,t,i)=>e+"\n",e.hr=()=>"",e.list=(e,t)=>e,e.listitem=e=>e+"\n",e.paragraph=e=>e+"\n",e.table=(e,t)=>e+t+"\n",e.tablerow=e=>e,e.tablecell=(e,t)=>e+" ",e.strong=e=>e,e.em=e=>e,e.codespan=e=>e,e.br=()=>"\n",e.del=e=>e,e.image=(e,t,i)=>"",e.text=e=>e,e.link=(e,t,i)=>i,e}));function Sk(e){let t="";return e.forEach((e=>{t+=e.raw})),t}function Lk(e){for(const t of e.tokens)if("text"===t.type){const i=t.raw.split("\n"),n=i[i.length-1];if(n.includes("`"))return Dk(e);if(n.includes("**"))return Tk(e,"**");if(n.match(/\*\w/))return xk(e);if(n.match(/(^|\s)__\w/))return Mk(e);if(n.match(/(^|\s)_\w/))return Nk(e);if(n.match(/(^|\s)\[.*\]\(\w*/))return Ek(e);if(n.match(/(^|\s)\[\w/))return Ik(e)}}function kk(e){const t=Sk(e);return dk.lexer(t+"\n```")}function Dk(e){return Tk(e,"`")}function xk(e){return Tk(e,"*")}function Nk(e){return Tk(e,"_")}function Ek(e){return Tk(e,")")}function Ik(e){return Tk(e,"](about:blank)")}function Mk(e){return Tk(e,"__")}function Tk(e,t){const i=Sk(Array.isArray(e)?e:[e]);return dk.lexer(i+t)[0]}function Rk(e){const t=Sk(e),i=t.split("\n");let n,s=!1;for(let o=0;o0){const e=s?i.slice(0,-1).join("\n"):t,o=!!e.match(/\|\s*$/),r=e+(o?"":"|")+`\n|${" --- |".repeat(n)}`;return dk.lexer(r)}}function Ak(e,t){var i;const n=globalThis.MonacoEnvironment;if(null==n?void 0:n.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(s){return void r(s)}try{return null===(i=window.trustedTypes)||void 0===i?void 0:i.createPolicy(e,t)}catch(s){return void r(s)}}class Ok{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=Pk(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=Pk(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=Pk(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=Pk(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=Pk(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=Pk(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=Pk(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=Pk(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=Pk(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=Pk(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=Pk(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function Pk(e){return"number"==typeof e?`${e}px`:e}function Fk(e){return new Ok(e)}function Bk(e,t){e instanceof Ok?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}var Wk=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Vk={getInitialState:()=>xC,tokenizeEncoded:(e,t,i)=>EC(0,i)};function Hk(e,t,i,n,s,o,r){let a="
    ",l=n,h=0,d=!0;for(let c=0,u=t.getCount();c0;)r&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="\ufffd",d=!1;break;case 13:g+="​",d=!1;break;case 32:r&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,u>s||l>=s)break}return a+="
    ",a}function zk(e,t,i){let n='
    ';const s=so(e);let o=i.getInitialState();for(let r=0,a=s.length;r0&&(n+="
    ");const a=i.tokenizeEncoded(e,!0,o);RC.convertToEndOffset(a.tokens,e.length);const l=new RC(a.tokens,e,t).inflate();let h=0;for(let t=0,i=l.getCount();t${Qs(e.substring(h,s))}`,h=s}o=a.endState}return n+="
    ",n}const Uk=Pa("openerService");function Kk(e,t){return an.isUri(e)?fo(e.scheme,t):_o(e,t+":")}function jk(e,...t){return t.some((t=>Kk(e,t)))}var qk,$k=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Gk=function(e,t){return function(i,n){t(i,n,e)}},Zk=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Yk=qk=class{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new U,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e){return{element:document.createElement("span"),dispose:()=>{}}}const n=new N,s=n.add(mk(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(e,t)=>Zk(this,void 0,void 0,(function*(){var i,n,s;let o;e?o=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(o=null===(i=this._options.editor.getModel())||void 0===i?void 0:i.getLanguageId()),o||(o=zu);const r=yield function(e,t,i){return Wk(this,void 0,void 0,(function*(){if(!i)return zk(t,e.languageIdCodec,Vk);const n=yield DC.getOrCreate(i);return zk(t,e.languageIdCodec,n||Vk)}))}(this._languageService,t,o),a=document.createElement("span");if(a.innerHTML=null!==(s=null===(n=qk._ttpTokenizer)||void 0===n?void 0:n.createHTML(r))&&void 0!==s?s:r,this._options.editor){Bk(a,this._options.editor.getOption(50))}else this._options.codeBlockFontFamily&&(a.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(a.style.fontSize=this._options.codeBlockFontSize),a})),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:t=>Xk(this._openerService,t,e.isTrusted),disposables:t}}}};function Xk(e,t,i){return Zk(this,void 0,void 0,(function*(){try{return yield e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Qk(i)})}catch(Dre){return r(Dre),!1}}))}function Qk(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}Yk._ttpTokenizer=Ak("tokenizeToString",{createHTML:e=>e}),Yk=qk=$k([Gk(1,yc),Gk(2,Uk)],Yk);var Jk,eD=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},tD=function(e,t){return function(i,n){t(i,n,e)}};let iD=Jk=class{static get(e){return e.getContribution(Jk.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new I,this._messageListeners=new N,this._mouseOverMessage=!1,this._editor=e,this._visible=Jk.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;null===(e=this._message)||void 0===e||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;Os(Ta(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=Ta(e)?mk(e,{actionHandler:{callback:t=>Xk(this._openerService,t,Ta(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new nD(this._editor,t,"string"==typeof e?e:this._message.element),this._messageListeners.add(B.debounce(this._editor.onDidBlurEditorText,((e,t)=>t),0)((()=>{this._mouseOverMessage||this._messageWidget.value&&qn(Xn(),this._messageWidget.value.getDomNode())||this.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(En(this._messageWidget.value.getDomNode(),os.MOUSE_ENTER,(()=>this._mouseOverMessage=!0),!0)),this._messageListeners.add(En(this._messageWidget.value.getDomNode(),os.MOUSE_LEAVE,(()=>this._mouseOverMessage=!1),!0)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new Mh(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(nD.fadeOut(this._messageWidget.value))}};iD.ID="editor.contrib.messageController",iD.MESSAGE_VISIBLE=new Tl("messageVisible",!1,ue(0,"Whether the editor is currently showing an inline message")),iD=Jk=eD([tD(1,Rl),tD(2,Uk)],iD);wh(new(fh.bindToContribution(iD.get))({id:"leaveEditorMessage",precondition:iD.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class nD{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");"string"==typeof n?(o.classList.add("message"),o.textContent=n):(n.classList.add("message"),o.appendChild(n)),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}Lh(iD.ID,iD,4);const sD={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:yu.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"};var oD=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class rD{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t,i){var n;return oD(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(void 0===e||Pr(e)||e instanceof HTMLElement)s=e;else if($r(e.markdown)){this._hoverWidget||this.show(ue(0,"Loading..."),t),this._cancellationTokenSource=new Uh;const i=this._cancellationTokenSource.token;if(s=yield e.markdown(i),void 0===s&&(s=e.markdownNotSupportedFallback),this.isDisposed||i.isCancellationRequested)return}else s=null!==(n=e.markdown)&&void 0!==n?n:e.markdownNotSupportedFallback;this.show(s,t,i)}))}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s=Object.assign({content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n},i);this._hoverWidget=this.hoverDelegate.showHover(s,t)}null==n||n.dispose()}hasContent(e){return!!e&&(!Ta(e)||!!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}function aD(e,t,i,n){let s,o;const r=(t,i)=>{var n;const r=void 0!==o;t&&(null==o||o.dispose(),o=void 0),i&&(null==s||s.dispose(),s=void 0),r&&(null===(n=e.onDidHideHover)||void 0===n||n.call(e))},a=(s,r,a)=>new id((()=>oD(this,void 0,void 0,(function*(){o&&!o.isDisposed||(o=new rD(e,a||t,s>0),yield o.update(i,r,n))}))),s),l=En(t,os.MOUSE_OVER,(()=>{if(s)return;const i=new N;i.add(En(t,os.MOUSE_LEAVE,(e=>r(!1,e.fromElement===t)),!0));i.add(En(t,os.MOUSE_DOWN,(()=>r(!0,!0)),!0));const n={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{n.x=e.x+10,e.target instanceof HTMLElement&&e.target.classList.contains("action-label")&&r(!0,!0)};i.add(En(t,os.MOUSE_MOVE,e,!0))}i.add(a(e.delay,!1,n)),s=i}),!0);return{show:e=>{r(!1,!0),a(0,e)},hide:()=>{r(!0,!0)},update:(e,t)=>oD(this,void 0,void 0,(function*(){i=e,yield null==o?void 0:o.update(i,void 0,t)})),dispose:()=>{l.dispose(),r(!0,!0)}}}class lD{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}function hD(e,t,i){return Math.min(Math.max(e,t),i)}class dD{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class cD{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{try{e.releasePointerCapture(t)}catch(i){}})))}catch(r){o=window}this._hooks.add(En(o,os.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(En(o,os.POINTER_UP,(e=>this.stopMonitoring(!0))))}}class pD extends E{onclick(e,t){this._register(En(e,os.CLICK,(e=>t(new Nt(e)))))}onmousedown(e,t){this._register(En(e,os.MOUSE_DOWN,(e=>t(new Nt(e)))))}onmouseover(e,t){this._register(En(e,os.MOUSE_OVER,(e=>t(new Nt(e)))))}onmouseleave(e,t){this._register(En(e,os.MOUSE_LEAVE,(e=>t(new Nt(e)))))}onkeydown(e,t){this._register(En(e,os.KEY_DOWN,(e=>t(new St(e)))))}onkeyup(e,t){this._register(En(e,os.KEY_UP,(e=>t(new St(e)))))}oninput(e,t){this._register(En(e,os.INPUT,t))}onblur(e,t){this._register(En(e,os.BLUR,t))}onfocus(e,t){this._register(En(e,os.FOCUS,t))}ignoreGesture(e){return qL.ignoreTarget(e)}}const mD=11;class fD extends pD{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...ea.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new gD),this._register(Mn(this.bgDomNode,os.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(Mn(this.domNode,os.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new nd),this._pointerdownScheduleRepeatTimer=this._register(new id)}_arrowPointerDown(e){if(!(e.target&&e.target instanceof Element))return;this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet((()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault()}}class _D extends E{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new id)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{var e;null===(e=this._domNode)||void 0===e||e.setClassName(this._visibleClassName)}),0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,null===(t=this._domNode)||void 0===t||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}class vD extends pD{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new _D(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new gD),this._shouldRender=!0,this.domNode=Fk(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(En(this.domNode.domNode,os.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new fD(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=Fk(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(En(this.slider.domNode,os.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=Hn(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const s=this._sliderOrthogonalPointerPosition(e),o=Math.abs(s-i);if(Oe&&o>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class bD{constructor(e,t,i,n,s,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new bD(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){const o=Math.max(0,i-e),r=Math.max(0,o-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),h=(r-l)/(n-i),d=s*h;return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:h,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=bD._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new Et(null,1,0))}),this._createArrow({className:"scra",icon:Qr.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Et(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class wD extends vD{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new bD(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-mD)/2,i=(t.verticalScrollbarSize-mD)/2;this._createArrow({className:"scra",icon:Qr.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Et(null,0,1))}),this._createArrow({className:"scra",icon:Qr.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Et(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class yD{constructor(e,t,i,n,s,o,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,s|=0,o|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),r+s>o&&(r=o-s),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new yD(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new yD(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:a}}}class SD extends E{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new U),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new yD(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),null===(i=this._smoothScrolling)||void 0===i||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new DD(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=DD.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class LD{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function kD(e,t){const i=t-e;return function(t){return e+i*(1-function(e){return Math.pow(e,3)}(1-t))}}class DD{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e0&&Math.abs(e.deltaY)>0)return 1;let t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}ND.INSTANCE=new ND;class ED extends pD{get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new U),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new U),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,Pe&&(t.className+=" mac");return t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new wD(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new CD(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Fk(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Fk(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Fk(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new id),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=k(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Pe&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Et(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=k(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new Et(e))};this._mouseWheelToDispose.push(En(this._listenOnDomNode,os.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){var t;if(null===(t=e.browserEvent)||void 0===t?void 0:t.defaultPrevented)return;const i=ND.INSTANCE;i.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let t=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&s+t===0?s=t=0:Math.abs(t)>=Math.abs(s)?s=0:t=0),this._options.flipAxes&&([t,s]=[s,t]);const o=!Pe&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!o||s||(s=t,t=0),e.browserEvent&&e.browserEvent.altKey&&(s*=this._options.fastScrollSensitivity,t*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(t){const e=50*t,i=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,i)}if(s){const e=50*s,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}if(a=this._scrollable.validateScrollPosition(a),r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop){this._options.mouseWheelSmoothScroll&&i.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),n=!0}}let s=n;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"",o=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class ID extends ED{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new SD({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>An(e)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class MD extends ED{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class TD extends ED{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new SD({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>An(e)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}))),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}var RD;function AD(e,t){const i=[];for(const n of t){if(e.start>=n.range.end)continue;if(e.end=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],s={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return i(s)||n.push(s),i(o)||n.push(o),n}}(RD||(RD={}));class PD{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=null!=e?e:0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,s=AD({start:0,end:e},this.groups),o=AD({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:OD(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(const n of e){const e=n.range.start,s=n.range.end,o=n.size;i&&o===i.size?i.range.end=s:(i={range:{start:e,end:s},size:o},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(s,r,o),this._size=this._paddingTop+this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e){this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}})),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var BD=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const WD={CurrentDragAndDropData:void 0},VD={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class HD{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class zD{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class UD{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class jD{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:Un(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=VD){var s,o,r,a,l,h,d,c,u,g,p,m,f;if(this.virtualDelegate=t,this.domId="list_id_"+ ++jD.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Xh(50),this.splicing=!1,this.dragOverAnimationStopDisposable=E.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=E.None,this.onDragLeaveTimeout=E.None,this.disposables=new N,this._onDidChangeContentHeight=new U,this._onDidChangeContentWidth=new U,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new PD(null!==(s=n.paddingTop)&&void 0!==s?s:0);for(const _ of i)this.renderers.set(_.templateId,_);this.cache=this.disposables.add(new FD(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=null!==(o=n.horizontalScrolling)&&void 0!==o?o:VD.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=void 0===n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new KD(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";(null!==(r=n.transformOptimization)&&void 0!==r?r:VD.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(qL.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new SD({forceIntegerValues:!0,smoothScrollDuration:null!==(a=n.smoothScrolling)&&void 0!==a&&a?125:0,scheduleAtNextAnimationFrame:e=>An(e)})),this.scrollableElement=this.disposables.add(new MD(this.rowsContainer,{alwaysConsumeMouseWheel:null!==(l=n.alwaysConsumeMouseWheel)&&void 0!==l?l:VD.alwaysConsumeMouseWheel,horizontal:1,vertical:null!==(h=n.verticalScrollMode)&&void 0!==h?h:VD.verticalScrollMode,useShadows:null!==(d=n.useShadows)&&void 0!==d?d:VD.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(En(this.rowsContainer,KL.Change,(e=>this.onTouchChange(e)))),this.disposables.add(En(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add(En(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add(En(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add(En(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add(En(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=null!==(c=n.setRowLineHeight)&&void 0!==c?c:VD.setRowLineHeight,this.setRowHeight=null!==(u=n.setRowHeight)&&void 0!==u?u:VD.setRowHeight,this.supportDynamicHeights=null!==(g=n.supportDynamicHeights)&&void 0!==g?g:VD.supportDynamicHeights,this.dnd=null!==(p=n.dnd)&&void 0!==p?p:this.disposables.add(VD.dnd),this.layout(null===(m=n.initialSize)||void 0===m?void 0:m.height,null===(f=n.initialSize)||void 0===f?void 0:f.width)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t=Object.assign(Object.assign({},null!=t?t:{}),{scrollByPage:e.scrollByPage})),void 0!==e.mouseWheelScrollSensitivity&&(t=Object.assign(Object.assign({},null!=t?t:{}),{mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity})),void 0!==e.fastScrollSensitivity&&(t=Object.assign(Object.assign({},null!=t?t:{}),{fastScrollSensitivity:e.fastScrollSensitivity})),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},o=RD.intersect(n,s),r=new Map;for(let C=o.end-1;C>=o.start;C--){const e=this.items[C];if(e.dragStartDisposable.dispose(),e.checkedDisposable.dispose(),e.row){let t=r.get(e.templateId);t||(t=[],r.set(e.templateId,t));const i=this.renderers.get(e.templateId);i&&i.disposeElement&&i.disposeElement(e.element,C,e.row.templateData,e.size),t.push(e.row)}e.row=null}const a={start:e+t,end:this.items.length},l=RD.intersect(a,n),h=RD.relativeComplement(a,n),d=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:E.None,checkedDisposable:E.None})));let c;0===e&&t>=this.items.length?(this.rangeMap=new PD(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),c=this.items,this.items=d):(this.rangeMap.splice(e,t,d),c=this.items.splice(e,t,...d));const u=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=OD(l,u),m=RD.intersect(g,p);for(let C=m.start;COD(e,u))),v=[{start:e,end:e+i.length},..._].map((e=>RD.intersect(g,e))),b=this.getNextToLastElement(v);for(const C of v)for(let e=C.start;ee.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=An((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){const e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),t=this.rangeMap.positionAt(e.start),i=this.rangeMap.positionAt(e.start+1);if(-1!==i){if((i-t)/2+t{for(const e of l)for(let t=e.start;tn.row.domNode.setAttribute("aria-checked",String(!!e));e(r.value),n.checkedDisposable=r.onDidChange(e)}!s&&n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const a=this.renderers.get(n.templateId);if(!a)throw new Error(`No renderer found for template id ${n.templateId}`);null==a||a.renderElement(n.element,e,n.row.templateData,n.size);const l=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!l,l&&(n.dragStartDisposable=En(n.row.domNode,"dragstart",(e=>this.onDragStart(n.element,l,e)))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=Un(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return B.map(this.disposables.add(new Hy(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return B.map(this.disposables.add(new Hy(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return B.filter(B.map(this.disposables.add(new Hy(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return B.map(this.disposables.add(new Hy(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return B.map(this.disposables.add(new Hy(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return B.map(this.disposables.add(new Hy(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return B.any(B.map(this.disposables.add(new Hy(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),B.map(this.disposables.add(new Hy(this.domNode,KL.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return B.map(this.disposables.add(new Hy(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return B.map(this.disposables.add(new Hy(this.rowsContainer,KL.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){var n,s;if(!i.dataTransfer)return;const o=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(sD.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(o,i)),void 0===e&&(e=String(o.length));const t=fs(".monaco-drag-image");t.textContent=e;const n=(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||document.body})(this.domNode);n.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>n.removeChild(t)),0)}this.domNode.classList.add("dragging"),this.currentDragData=new HD(o),WD.CurrentDragAndDropData=new zD(o),null===(s=(n=this.dnd).onDragStart)||void 0===s||s.call(n,this.currentDragData,i)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),WD.CurrentDragAndDropData&&"vscode-ui"===WD.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(WD.CurrentDragAndDropData)this.currentDragData=WD.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new UD}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof i?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let n;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof i&&0===i.effect?"copy":"move",n="boolean"!=typeof i&&i.feedback?i.feedback:void 0===e.index?[-1]:[e.index],n=Vd(n).filter((e=>e>=-1&&ee-t)),n=-1===n[0]?[-1]:n,s=this.currentDragFeedback,o=n,Array.isArray(s)&&Array.isArray(o)?Id(s,o):s===o)return!0;var s,o;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),-1===n[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=x((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of n){const i=this.items[e];i.dropTarget=!0,null===(t=i.row)||void 0===t||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=x((()=>{var e;for(const t of n){const i=this.items[t];i.dropTarget=!1,null===(e=i.row)||void 0===e||e.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=ed((()=>this.clearDragOverFeedback()),100,this.disposables),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,WD.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,WD.CurrentDragAndDropData=void 0,null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=E.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=Vn(this.domNode).top;this.dragOverAnimationDisposable=function(e){const t=()=>{e(),i=An(t)};let i=An(t);return x((()=>i.dispose()))}(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=ed((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,o;e===this.elementTop(n.start)?(s=n.start,o=0):n.end-n.start>1&&(s=n.start+1,o=this.elementTop(s)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ZD=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class YD{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class XD{get name(){return this._trait}get renderer(){return new YD(this)}constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new U,this.onChange=this._onChange.event}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const s=i.length-t,o=e+t,r=[];let a=0;for(;a=o;)r.push(this.sortedIndexes[a++]+s);const l=this.length+s;if(this.sortedIndexes.length>0&&0===r.length&&l>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:l-1;r.push(Math.min(t,l-1))}this.renderer.splice(e,t,i.length),this._set(r,r),this.length=l}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(mx),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=px(s,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return Md(this.sortedIndexes,e,mx)>=0}dispose(){k(this._onChange)}}GD([UL],XD.prototype,"renderer",null);class QD extends XD{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class JD{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString()));if(0===n.length)return this.trait.splice(e,t,new Array(i.length).fill(!1));const s=new Set(n),o=i.map((e=>s.has(this.identityProvider.getId(e).toString())));this.trait.splice(e,t,o)}}function ex(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function tx(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&(!!e.parentElement&&tx(e.parentElement))}function ix(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&(!!e.parentElement&&ix(e.parentElement))}class nx{get onKeyDown(){return B.chain(this.disposables.add(new Hy(this.view.domNode,"keydown")).event,(e=>e.filter((e=>!ex(e.target))).map((e=>new St(e)))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new N,this.multipleSelectionDisposables=new N,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown((e=>{switch(e.keyCode){case 3:return this.onEnter(e);case 16:return this.onUpArrow(e);case 18:return this.onDownArrow(e);case 11:return this.onPageUpArrow(e);case 12:return this.onPageDownArrow(e);case 9:return this.onEscape(e);case 31:this.multipleSelectionSupport&&(Pe?e.metaKey:e.ctrlKey)&&this.onCtrlA(e)}})))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(zd(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}GD([UL],nx.prototype,"onKeyDown",null),function(e){e[e.Automatic=0]="Automatic",e[e.Trigger=1]="Trigger"}(qD||(qD={})),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}($D||($D={}));const sx=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=98&&e.keyCode<=107||e.keyCode>=85&&e.keyCode<=95)}};class ox{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=$D.Idle,this.mode=qD.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new N,this.disposables=new N,this.updateOptions(e.options)}updateOptions(e){var t,i;null===(t=e.typeNavigationEnabled)||void 0===t||t?this.enable():this.disable(),this.mode=null!==(i=e.typeNavigationMode)&&void 0!==i?i:qD.Automatic}enable(){if(this.enabled)return;let e=!1;const t=B.chain(this.enabledDisposables.add(new Hy(this.view.domNode,"keydown")).event,(t=>t.filter((e=>!ex(e.target))).filter((()=>this.mode===qD.Automatic||this.triggered)).map((e=>new St(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>as(e,!0))).map((e=>e.browserEvent.key)))),i=B.debounce(t,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables);B.reduce(B.any(t,i),((e,t)=>null===t?null:(e||"")+t),void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t((()=>e=!0),void 0,this.enabledDisposables),i((()=>e=!1),void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&Os(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=$D.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===$D.Idle?1:0;this.state=$D.Typing;for(let s=0;s1&&1===n.length)return this.previouslyFocused=i,this.list.setFocus([t]),void this.list.reveal(t)}}}else if(void 0===r||qo(e,r))return this.previouslyFocused=i,this.list.setFocus([t]),void this.list.reveal(t)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class rx{constructor(e,t){this.list=e,this.view=t,this.disposables=new N;const i=B.chain(this.disposables.add(new Hy(t.domNode,"keydown")).event,(e=>e.filter((e=>!ex(e.target))).map((e=>new St(e))))),n=B.chain(i,(e=>e.filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)))));n(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const s=window.getComputedStyle(n);"hidden"!==s.visibility&&"none"!==s.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function ax(e){return Pe?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function lx(e){return e.browserEvent.shiftKey}const hx={isSelectionSingleChangeEvent:ax,isSelectionRangeChangeEvent:lx};class dx{constructor(e){this.list=e,this.disposables=new N,this._onPointer=new U,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||hx),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(qL.addTarget(e.getHTMLElement()))),B.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||hx))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){tx(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(ex(e.browserEvent.target)||tx(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(ex(e.browserEvent.target)||tx(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(ex(e.browserEvent.target)||tx(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=zd(Math.min(i,t),Math.max(i,t)+1),s=this.list.getSelection(),o=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let s=i-1;for(;s>=0&&e[s]===t-(i-s);)n.push(e[s--]);n.reverse(),s=i;for(;s=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){n++,s++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class cx{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,i;const n=this.selectorSuffix&&`.${this.selectorSuffix}`,s=[];e.listBackground&&s.push(`.monaco-list${n} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(s.push(`.monaco-list${n}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),s.push(`.monaco-list${n}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(s.push(`.monaco-list${n}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),s.push(`.monaco-list${n}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(s.push(`.monaco-list${n} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),s.push(`.monaco-list${n} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&s.push(`.monaco-list${n} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(s.push(`.monaco-list${n} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),s.push(`.monaco-list${n} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(s.push(`.monaco-list${n} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),s.push(`.monaco-list${n} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&s.push(`.monaco-list${n} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&s.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&s.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const o=Ss(e.listFocusAndSelectionOutline,Ss(e.listSelectionOutline,null!==(t=e.listFocusOutline)&&void 0!==t?t:""));o&&s.push(`.monaco-list${n}:focus .monaco-list-row.focused.selected { outline: 1px solid ${o}; outline-offset: -1px;}`),e.listFocusOutline&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const r=Ss(e.listSelectionOutline,null!==(i=e.listInactiveFocusOutline)&&void 0!==i?i:"");r&&s.push(`.monaco-list${n} .monaco-list-row.focused.selected { outline: 1px dotted ${r}; outline-offset: -1px; }`),e.listSelectionOutline&&s.push(`.monaco-list${n} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&s.push(`.monaco-list${n} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&s.push(`.monaco-list${n} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&s.push(`\n\t\t\t\t.monaco-list${n}.drop-target,\n\t\t\t\t.monaco-list${n} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${n} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.tableColumnsBorder&&s.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&s.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=s.join("\n")}}const ux={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:rc.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:rc.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:rc.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},gx={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}}};function px(e,t){const i=[];let n=0,s=0;for(;n=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){i.push(e[n]),n++,s++;continue}e[n]e-t;class fx{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let s=0;for(const o of this.renderers)o.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){var s;let o=0;for(const r of this.renderers)null===(s=r.disposeElement)||void 0===s||s.call(r,e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class _x{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof s?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class vx{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var s,o;null===(o=(s=this.dnd).onDragLeave)||void 0===o||o.call(s,e,t,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}dispose(){this.dnd.dispose()}}class bx{get onDidChangeFocus(){return B.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return B.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=B.chain(this.disposables.add(new Hy(this.view.domNode,"keydown")).event,(t=>t.map((e=>new St(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>as(e,!0))).filter((()=>!1)))),i=B.chain(this.disposables.add(new Hy(this.view.domNode,"keyup")).event,(t=>t.forEach((()=>e=!1)).map((e=>new St(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>as(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})))),n=B.chain(this.view.onContextMenu,(t=>t.filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new Nt(i),browserEvent:i})))));return B.any(t,i,n)}get onKeyDown(){return this.disposables.add(new Hy(this.view.domNode,"keydown")).event}get onDidFocus(){return B.signal(this.disposables.add(new Hy(this.view.domNode,"focus",!0)).event)}constructor(e,t,i,n,s=gx){var o,r,a,l;this.user=e,this._options=s,this.focus=new XD("focused"),this.anchor=new XD("anchor"),this.eventBufferer=new Z,this._ariaLabel="",this.disposables=new N,this._onDidDispose=new U,this.onDidDispose=this._onDidDispose.event;const h=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(o=this._options.accessibilityProvider)||void 0===o?void 0:o.getWidgetRole():"list";this.selection=new QD("listbox"!==h);const d=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(d.push(new _x(this.accessibilityProvider)),null===(a=(r=this.accessibilityProvider).onDidChangeActiveDescendant)||void 0===a||a.call(r,this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map((e=>new fx(e.templateId,[...d,e])));const c=Object.assign(Object.assign({},s),{dnd:s.dnd&&new vx(this,s.dnd)});if(this.view=this.createListView(t,i,n,c),this.view.domNode.setAttribute("role",h),s.styleController)this.styleController=s.styleController(this.view.domId);else{const e=Jn(this.view.domNode);this.styleController=new cx(e,this.view.domId)}if(this.spliceable=new lD([new JD(this.focus,this.view,s.identityProvider),new JD(this.selection,this.view,s.identityProvider),new JD(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new rx(this,this.view)),("boolean"!=typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new nx(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||sx;this.typeNavigationController=new ox(this,this.view,s.keyboardNavigationLabelProvider,null!==(l=s.keyboardNavigationEventFilter)&&void 0!==l?l:()=>!0,e),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new jD(e,t,i,n)}createMouseController(e){return new dx(this)}updateOptions(e={}){var t,i;this._options=Object.assign(Object.assign({},this._options),e),null===(t=this.typeNavigationController)||void 0===t||t.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(i=this.keyboardController)||void 0===i||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new uD(this.user,`Invalid start index: ${e}`);if(t<0)throw new uD(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new uD(this.user,`Invalid index ${i}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new uD(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return Hd(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new uD(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findNextIndex(s.length>0?s[0]+e:0,t,n);o>-1&&this.setFocus([o],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);o>-1&&this.setFocus([o],i)}focusNextPage(e,t){return ZD(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{const s=this.view.getScrollTop();let o=s+this.view.renderHeight;i>n&&(o-=this.view.elementHeight(i)),this.view.setScrollTop(o),this.view.getScrollTop()!==s&&(this.setFocus([]),yield Jh(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return ZD(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const s=this.getFocus()[0];if(s!==i&&(void 0===s||s>=i)){const n=this.findNextIndex(i,!1,t);n>-1&&s!==n?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield Jh(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new uD(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(Wr(t)){const e=s-this.view.renderHeight;this.view.setScrollTop(e*hD(t,0,1)+n)}else{const e=n+s,t=i+this.view.renderHeight;n=t||(n=t&&s>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(e){return this.view.getElementDomId(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}GD([UL],bx.prototype,"onDidChangeFocus",null),GD([UL],bx.prototype,"onDidChangeSelection",null),GD([UL],bx.prototype,"onContextMenu",null),GD([UL],bx.prototype,"onKeyDown",null),GD([UL],bx.prototype,"onDidFocus",null);const Cx=fs,wx="selectOption.entry.template";class yx{get templateId(){return wx}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=ds(e,Cx(".option-text")),t.detail=ds(e,Cx(".option-detail")),t.decoratorRight=ds(e,Cx(".option-decorator-right")),t}renderElement(e,t,i){const n=i,s=e.text,o=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=s,n.detail.textContent=o||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class Sx extends E{constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=Sx.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new U,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return wx}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=fs(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=ds(this.selectDropDownContainer,Cx(".select-box-details-pane"));const t=ds(this.selectDropDownContainer,Cx(".select-box-dropdown-container-width-control")),i=ds(t,Cx(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",ds(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=Jn(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(En(this.selectDropDownContainer,os.DRAG_START,(e=>{as(e,!0)})))}registerListeners(){let e;this._register(Mn(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}))),this._register(En(this.selectElement,os.CLICK,(e=>{as(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(En(this.selectElement,os.MOUSE_DOWN,(e=>{as(e)}))),this._register(En(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(En(this.selectElement,"touchend",(t=>{as(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(En(this.selectElement,os.KEY_DOWN,(e=>{const t=new St(e);let i=!1;Pe?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),as(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){Id(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;null===(e=this.selectList)||void 0===e||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){var e,t,i;const n=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",s=null!==(t=this.styles.selectForeground)&&void 0!==t?t:"",o=null!==(i=this.styles.selectBorder)&&void 0!==i?i:"";this.selectElement.style.backgroundColor=n,this.selectElement.style.color=s,this.selectElement.style.borderColor=o}styleList(){var e,t;const i=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",n=Ss(this.styles.selectListBackground,i);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const s=null!==(t=this.styles.focusBorder)&&void 0!==t?t:"";this.selectDropDownContainer.style.outlineColor=s,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch(t){}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach(((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)})),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=Hn(this.selectElement),i=getComputedStyle(this.selectElement),n=parseFloat(i.getPropertyValue("--dropdown-padding-top"))+parseFloat(i.getPropertyValue("--dropdown-padding-bottom")),s=window.innerHeight-t.top-t.height-(this.selectBoxOptions.minBottomMargin||0),o=t.top-Sx.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,r=this.selectElement.offsetWidth,a=this.setWidthControlElement(this.widthControlElement),l=Math.max(a,Math.round(r)).toString()+"px";this.selectDropDownContainer.style.width=l,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const d=this._hasDetails?this._cachedMaxDetailsHeight:0,c=h+n+d,u=Math.floor((s-n-d)/this.getHeight()),g=Math.floor((o-n-d)/this.getHeight());if(e)return!(t.top+t.height>window.innerHeight-22||t.topu&&this.options.length>u?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(t.top+t.height>window.innerHeight-22||t.tops&&(h=u*this.getHeight())}else c>o&&(h=g*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=h+n+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=h+n+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=l,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const s=e.detail?e.detail.length:0,o=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+s+o;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=zn(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=ds(e,Cx(".select-box-dropdown-list-container")),this.listRenderer=new yx,this.selectList=new bx("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>ue(0,"Select Box"),getRole:()=>Pe?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new Hy(this.selectDropDownListContainer,"keydown")),i=B.chain(t.event,(e=>e.filter((()=>this.selectList.length>0)).map((e=>new St(e)))));this._register(B.chain(i,(e=>e.filter((e=>3===e.keyCode))))(this.onEnter,this)),this._register(B.chain(i,(e=>e.filter((e=>2===e.keyCode))))(this.onEnter,this)),this._register(B.chain(i,(e=>e.filter((e=>9===e.keyCode))))(this.onEscape,this)),this._register(B.chain(i,(e=>e.filter((e=>16===e.keyCode))))(this.onUpArrow,this)),this._register(B.chain(i,(e=>e.filter((e=>18===e.keyCode))))(this.onDownArrow,this)),this._register(B.chain(i,(e=>e.filter((e=>12===e.keyCode))))(this.onPageDown,this)),this._register(B.chain(i,(e=>e.filter((e=>11===e.keyCode))))(this.onPageUp,this)),this._register(B.chain(i,(e=>e.filter((e=>14===e.keyCode))))(this.onHome,this)),this._register(B.chain(i,(e=>e.filter((e=>13===e.keyCode))))(this.onEnd,this)),this._register(B.chain(i,(e=>e.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))))(this.onCharacter,this)),this._register(En(this.selectList.getHTMLElement(),os.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>void 0!==e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(En(this.selectDropDownContainer,os.FOCUS_OUT,(e=>{this._isVisible&&!qn(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()}))),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;as(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n{for(let t=0;tthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){if(this.selected>0){as(e,!0);this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onPageUp(e){as(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){as(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){as(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=gt.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(En(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(Mn(this.selectElement,"click",(e=>{as(e,!0)}))),this._register(Mn(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(Mn(this.selectElement,"keydown",(e=>{let t=!1;Pe?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&Id(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Ua)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(qL.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,ne&&this._register(En(e,os.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(sD.TEXT,this._action.label)})))),this._register(En(t,KL.Tap,(e=>this.onClick(e,!0)))),this._register(En(t,os.MOUSE_DOWN,(e=>{i||as(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),Pe&&this._register(En(t,os.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register(En(t,os.CLICK,(e=>{as(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register(En(t,os.DBLCLICK,(e=>{as(e,!0)}))),[os.MOUSE_UP,os.MOUSE_OUT].forEach((e=>{this._register(En(t,e,(e=>{as(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;as(e,!0);const n=Kr(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=aD(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class xx extends Dx{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=ds(this.element,fs("a.action-label"))),this.label&&this.label.setAttribute("role",this.getDefaultAriaRole()),this.options.label&&this.options.keybinding&&this.element&&(ds(this.element,fs("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Ka.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=ue(0,"{0} ({1})",e,this.options.keybinding))),null!=e?e:void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):null===(e=this.label)||void 0===e||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),null===(e=this.element)||void 0===e||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),null===(t=this.element)||void 0===t||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.setAttribute("aria-checked",""),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class Nx extends Dx{constructor(e,t,i,n,s,o,r){super(e,t),this.selectBox=new kx(i,n,s,o,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;null===(e=this.selectBox)||void 0===e||e.focus()}blur(){var e;null===(e=this.selectBox)||void 0===e||e.blur()}render(e){this.selectBox.render(e)}}var Ex=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Ix extends E{constructor(e,t={}){var i,n,s,o,r,a;let l,h;switch(super(),this._actionRunnerDisposables=this._register(new N),this.viewItemDisposables=this._register(new R),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new U),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new U({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new U),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new U),this.onWillRun=this._onWillRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys={keyDown:null!==(o=null===(s=this.options.triggerKeys)||void 0===s?void 0:s.keyDown)&&void 0!==o&&o,keys:null!==(a=null===(r=this.options.triggerKeys)||void 0===r?void 0:r.keys)&&void 0!==a?a:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Ua,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:l=[15],h=[17];break;case 1:l=[16],h=[18],this.domNode.className+=" vertical"}this._register(En(this.domNode,os.KEY_DOWN,(e=>{const t=new St(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;l&&(t.equals(l[0])||t.equals(l[1]))?i=this.focusPrevious():h&&(t.equals(h[0])||t.equals(h[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof Dx&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(En(this.domNode,os.KEY_UP,(e=>{const t=new St(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(hs(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{Xn()!==this.domNode&&qn(Xn(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof Dx&&e.isEnabled()));e instanceof Dx&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof Dx&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){var t;if("number"==typeof e)return null===(t=this.viewItems[e])||void 0===t?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{const i=document.createElement("li");let s;i.className="action-item",i.setAttribute("role","presentation");const o=Object.assign({hoverDelegate:this.options.hoverDelegate},t);this.options.actionViewItemProvider&&(s=this.options.actionViewItemProvider(e,o)),s||(s=new xx(this.context,e,o)),this.options.allowContextMenu||this.viewItemDisposables.set(s,En(i,os.CONTEXT_MENU,(e=>{as(e,!0)}))),s.actionRunner=this._actionRunner,s.setActionContext(this.context),s.render(i),this.focusable&&s instanceof Dx&&0===this.viewItems.length&&s.setFocusable(!0),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(s)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,s),n++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=k(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),Dn(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===Ka.ID));return this.updateFocus(),!0}focusPrevious(e){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===Ka.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&(null===(n=this.viewItems[this.previouslyFocusedItem])||void 0===n||n.blur());const s=void 0!==this.focusedItem&&this.viewItems[this.focusedItem];if(s){let n=!0;$r(s.focus)||(n=!1),this.options.focusOnlyEnabledItems&&$r(s.isEnabled)&&!s.isEnabled()&&(n=!1),s.action.id===Ka.ID&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof Dx){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return Ex(this,void 0,void 0,(function*(){yield this._actionRunner.run(e,t)}))}dispose(){this._context=void 0,this.viewItems=k(this.viewItems),this.getContainer().remove(),super.dispose()}}class Mx{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let s=0,o=t.length;s=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},iN=function(e,t){return function(i,n){t(i,n,e)}},nN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const sN="acceptSelectedCodeAction",oN="previewSelectedCodeAction";class rN{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){var n,s;i.text.textContent=null!==(s=null===(n=e.group)||void 0===n?void 0:n.title)&&void 0!==s?s:""}disposeTemplate(e){}}let aN=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);return{container:e,icon:t,text:i,keybinding:new Wx(e,$e)}}renderElement(e,t,i){var n,s,o;if((null===(n=e.group)||void 0===n?void 0:n.icon)?(i.icon.className=ea.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=Cp(e.group.icon.color.id))):(i.icon.className=ea.asClassName(Qr.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=uN(e.label),i.keybinding.set(e.keybinding),function(e,...t){e?_s(...t):vs(...t)}(!!e.keybinding,i.keybinding.element);const r=null===(s=this._keybindingService.lookupKeybinding(sN))||void 0===s?void 0:s.getLabel(),a=null===(o=this._keybindingService.lookupKeybinding(oN))||void 0===o?void 0:o.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:r&&a?this._supportsPreview&&e.canPreview?i.container.title=ue(0,"{0} to apply, {1} to preview",r,a):i.container.title=ue(0,"{0} to apply",r):i.container.title=""}disposeTemplate(e){}};aN=tN([iN(1,PL)],aN);class lN extends UIEvent{constructor(){super("acceptSelectedAction")}}class hN extends UIEvent{constructor(){super("previewSelectedAction")}}function dN(e){if("action"===e.kind)return e.label}let cN=class extends E{constructor(e,t,i,n,s,o){super(),this._delegate=n,this._contextViewService=s,this._keybindingService=o,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new Uh),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new bx(e,this.domNode,r,[new aN(t,this._keybindingService),new rN],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:dN},accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?uN(null==e?void 0:e.label):"";return e.disabled&&(t=ue(0,"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>ue(0,"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Zx),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this.onFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const n=this._allMenuItems.map(((e,t)=>{const i=document.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0})),s=Math.max(...n,e),o=Math.min(i,.7*document.body.clientHeight);return this._list.layout(o,s),this.domNode.style.height=`${o}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new hN:new lN;this._list.setSelection([i],s)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof hN):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const i=this._list.getFocus();if(0===i.length)return;const n=i[0],s=this._list.element(n);null===(t=(e=this._delegate).onFocus)||void 0===t||t.call(e,s.item)}onListHover(e){return nN(this,void 0,void 0,(function*(){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&"action"===t.kind){const e=yield this._delegate.onHover(t.item,this.cts.token);t.canPreview=e?e.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus("number"==typeof e.index?[e.index]:[])}))}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function uN(e){return e.replace(/\r\n|\r|\n/g," ")}cN=tN([iN(4,Vx),iN(5,PL)],cN);var gN=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},pN=function(e,t){return function(i,n){t(i,n,e)}};Sp("actionBar.toggledBackground",{dark:Fp,light:Fp,hcDark:Fp,hcLight:Fp},ue(0,"Background color for toggled action items in action bar."));const mN={Visible:new Tl("codeActionMenuVisible",!1,ue(0,"Whether the action widget list is visible"))},fN=Pa("actionWidgetService");let _N=class extends E{get isVisible(){return mN.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new I)}show(e,t,i,n,s,o,r){const a=mN.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(cN,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>s,render:e=>(a.set(!0),this._renderWidget(e,l,null!=r?r:[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},o,!1)}acceptSelected(e){var t;null===(t=this._list.value)||void 0===t||t.acceptSelected(e)}focusPrevious(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusPrevious()}focusNext(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusNext()}hide(){var e;null===(e=this._list.value)||void 0===e||e.hide(),this._list.clear()}_renderWidget(e,t,i){var n;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,!this._list.value)throw new Error("List has no value");s.appendChild(this._list.value.domNode);const o=new N,r=document.createElement("div"),a=e.appendChild(r);a.classList.add("context-view-block"),o.add(En(a,os.MOUSE_DOWN,(e=>e.stopPropagation())));const l=document.createElement("div"),h=e.appendChild(l);h.classList.add("context-view-pointerBlock"),o.add(En(h,os.POINTER_MOVE,(()=>h.remove()))),o.add(En(h,os.MOUSE_DOWN,(()=>h.remove())));let d=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(s.appendChild(e.getContainer().parentElement),o.add(e),d=e.getContainer().offsetWidth)}const c=null===(n=this._list.value)||void 0===n?void 0:n.layout(d);s.style.width=`${c}px`;const u=o.add(hs(e));return o.add(u.onDidBlur((()=>this.hide()))),o}_createActionBar(e,t){if(!t.length)return;const i=fs(e),n=new Ix(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;null===(t=this._list.value)||void 0===t||t.hide(e)}};_N=gN([pN(0,Vx),pN(1,Rl),pN(2,Oa)],_N),Cu(fN,_N,1);const vN=1100;var bN,CN;oh(class extends sh{constructor(){super({id:"hideCodeActionWidget",title:{value:ue(0,"Hide action widget"),original:"Hide action widget"},precondition:mN.Visible,keybinding:{weight:vN,primary:9,secondary:[1033]}})}run(e){e.get(fN).hide()}}),oh(class extends sh{constructor(){super({id:"selectPrevCodeAction",title:{value:ue(0,"Select previous action"),original:"Select previous action"},precondition:mN.Visible,keybinding:{weight:vN,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(fN);t instanceof _N&&t.focusPrevious()}}),oh(class extends sh{constructor(){super({id:"selectNextCodeAction",title:{value:ue(0,"Select next action"),original:"Select next action"},precondition:mN.Visible,keybinding:{weight:vN,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(fN);t instanceof _N&&t.focusNext()}}),oh(class extends sh{constructor(){super({id:sN,title:{value:ue(0,"Accept selected action"),original:"Accept selected action"},precondition:mN.Visible,keybinding:{weight:vN,primary:3,secondary:[2137]}})}run(e){const t=e.get(fN);t instanceof _N&&t.acceptSelected()}}),oh(class extends sh{constructor(){super({id:oN,title:{value:ue(0,"Preview selected action"),original:"Preview selected action"},precondition:mN.Visible,keybinding:{weight:vN,primary:2051}})}run(e){const t=e.get(fN);t instanceof _N&&t.acceptSelected(!0)}}),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(bN||(bN={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=ue(0,"Error"),t[e.Warning]=ue(0,"Warning"),t[e.Info]=ue(0,"Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case dL.Error:return e.Error;case dL.Warning:return e.Warning;case dL.Info:return e.Info;case dL.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return dL.Error;case e.Warning:return dL.Warning;case e.Info:return dL.Info;case e.Hint:return dL.Ignore}}}(bN||(bN={})),function(e){const t="";function i(e,i){const n=[t];return e.source?n.push(e.source.replace("\xa6","\\\xa6")):n.push(t),e.code?"string"==typeof e.code?n.push(e.code.replace("\xa6","\\\xa6")):n.push(e.code.value.replace("\xa6","\\\xa6")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(bN.toString(e.severity)):n.push(t),e.message&&i?n.push(e.message.replace("\xa6","\\\xa6")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("\xa6")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(CN||(CN={}));const wN=Pa("markerService");var yN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const SN=new Tl("supportedCodeAction","");class LN extends E{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new id),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._tryAutoTrigger())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>_a(e,t.uri)))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:fL.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),s=t.getLineContent(e);if(0===s.length)return;if(1===n){if(/\s/.test(s[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[n-2])&&/\s/.test(s[n-1]))return}return i}}var kN;!function(e){e.Empty={type:0};e.Triggered=class{constructor(e,t,i){this.trigger=e,this.position=t,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if(d(e))return DN;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(kN||(kN={}));const DN=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class xN extends E{constructor(e,t,i,n,s,o){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=o,this._codeActionOracle=this._register(new I),this._state=kN.Empty,this._onDidChangeState=this._register(new U),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=SN.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(kN.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return!!this._configurationService&&this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickfixes",{resource:null==t?void 0:t.uri})}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(kN.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap((e=>{var t;return null!==(t=e.providedCodeActionKinds)&&void 0!==t?t:[]}));this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new LN(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(kN.Empty);const n=t.selection.getStartPosition(),s=Gh((i=>yN(this,void 0,void 0,(function*(){var n,s,o,r,a,l;if(this._settingEnabledNearbyQuickfixes()&&1===t.trigger.type&&(t.trigger.triggerAction===fL.QuickFix||(null===(s=null===(n=t.trigger.filter)||void 0===n?void 0:n.include)||void 0===s?void 0:s.contains(vL.QuickFix)))){const n=yield TL(this._registry,e,t.selection,t.trigger,pL.None,i);if(i.isCancellationRequested)return DN;if(!(null===(o=n.validActions)||void 0===o?void 0:o.some((e=>!!e.action.kind&&vL.QuickFix.contains(new vL(e.action.kind)))))){const s=this._markerService.read({resource:e.uri});if(s.length>0){const o=t.selection.getPosition();let h=o,d=Number.MAX_VALUE,c=!1;for(const e of s){const t=e.endColumn,i=e.endLineNumber,n=e.startLineNumber;(i===o.lineNumber||n===o.lineNumber)&&Math.abs(o.column-t){e.highlightRange=e.action.isPreferred})),c.push(...d.validActions)),{validActions:c,allActions:n.allActions,documentation:n.documentation,hasAutoFix:n.hasAutoFix,dispose:()=>{n.dispose()}}}}}}return TL(this._registry,e,t.selection,t.trigger,pL.None,i)}))));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(s,250)),this.setState(new kN.Triggered(t.trigger,n,s))}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:fL.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;null===(t=this._codeActionOracle.value)||void 0===t||t.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||this._disposed||this._onDidChangeState.fire(e))}}var NN,EN=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},IN=function(e,t){return function(i,n){t(i,n,e)}},MN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let TN=NN=class extends E{static get(e){return e.getContribution(NN.ID)}constructor(e,t,i,n,s,o,r,a,l,h){super(),this._commandService=r,this._configurationService=a,this._actionWidgetService=l,this._instantiationService=h,this._activeCodeActions=this._register(new I),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new xN(this._editor,s.codeActionProvider,t,i,o,a)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._lightBulbWidget=new Gs((()=>{const e=this._editor.getContribution(XL.ID);return e&&this._register(e.onClick((e=>this.showCodeActionList(e.actions,e,{includeDisabledActions:!1,fromLightbulb:!0})))),e})),this._resolver=n.createInstance(VL),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){var s;if(!this._editor.hasModel())return;null===(s=iD.get(this._editor))||void 0===s||s.closeMessage();const o=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,i){return MN(this,void 0,void 0,(function*(){try{yield this._instantiationService.invokeFunction(OL,e,AL.FromCodeActions,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:fL.QuickFix,filter:{}})}}))}update(e){var t,i,n,s,o,a,l;return MN(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let h;try{h=yield e.actions}catch(Dre){return void r(Dre)}if(!this._disposed)if(null===(i=this._lightBulbWidget.value)||void 0===i||i.update(h,e.trigger,e.position),1===e.trigger.type){if(null===(n=e.trigger.filter)||void 0===n?void 0:n.include){const t=this.tryGetValidActionToApply(e.trigger,h);if(t){try{null===(s=this._lightBulbWidget.value)||void 0===s||s.hide(),yield this._applyCodeAction(t,!1,!1)}finally{h.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,h);if(t&&t.action.disabled)return null===(o=iD.get(this._editor))||void 0===o||o.showMessage(t.action.disabled,e.trigger.context.position),void h.dispose()}}const t=!!(null===(a=e.trigger.filter)||void 0===a?void 0:a.include);if(e.trigger.context&&(!h.allActions.length||!t&&!h.validActions.length))return null===(l=iD.get(this._editor))||void 0===l||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=h,void h.dispose();this._activeCodeActions.value=h,this.showCodeActionList(h,this.toCoords(e.position),{includeDisabledActions:t,fromLightbulb:!1})}else this._actionWidgetService.isVisible?h.dispose():this._activeCodeActions.value=h}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,i){return MN(this,void 0,void 0,(function*(){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const o=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!o.length)return;const r=Ba.isIPosition(t)?this.toCoords(t):t,a={onSelect:(e,t)=>MN(this,void 0,void 0,(function*(){this._applyCodeAction(e,!0,!!t),this._actionWidgetService.hide(),n.clear()})),onHide:()=>{var e;null===(e=this._editor)||void 0===e||e.focus(),n.clear()},onHover:(e,t)=>MN(this,void 0,void 0,(function*(){var i;if(yield e.resolve(t),!t.isCancellationRequested)return{canPreview:!!(null===(i=e.action.edit)||void 0===i?void 0:i.edits.length)}})),onFocus:e=>{var t,i;if(e&&e.highlightRange&&e.action.diagnostics){const s=[{range:e.action.diagnostics[0],options:NN.DECORATION}];n.set(s);const o=e.action.diagnostics[0];Ps(ue(0,"Context: {0} at line {1} and column {2}.",null===(i=null===(t=this._editor.getModel())||void 0===t?void 0:t.getWordAtPosition({lineNumber:o.startLineNumber,column:o.startColumn}))||void 0===i?void 0:i.word,o.startLineNumber,o.startColumn))}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,function(e,t,i){if(!t)return e.map((e=>{var t;return{kind:"action",item:e,group:HL,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title,canPreview:!!(null===(t=e.action.edit)||void 0===t?void 0:t.edits.length)}}));const n=zL.map((e=>({group:e,actions:[]})));for(const o of e){const e=o.action.kind?new vL(o.action.kind):vL.None;for(const t of n)if(t.group.kind.contains(e)){t.actions.push(o);break}}const s=[];for(const o of n)if(o.actions.length){s.push({kind:"header",group:o.group});for(const e of o.actions)s.push({kind:"action",item:e,group:o.group,label:e.action.title,disabled:!!e.action.disabled,keybinding:i(e.action)})}return s}(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,r,s,this._getActionBarActions(e,t,i))}))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=Hn(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}_shouldShowHeaders(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:null==t?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>{var t;return{id:e.id,label:e.title,tooltip:null!==(t=e.tooltip)&&void 0!==t?t:"",class:void 0,enabled:!0,run:()=>{var t;return this._commandService.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}}}));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:ue(0,"Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:ue(0,"Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};function RN(e){return ul.regex(SN.keys()[0],new RegExp("(\\s|^)"+Js(e.value)+"\\b"))}TN.ID="editor.contrib.codeActionController",TN.DECORATION=xw.register({description:"quickfix-highlight",className:"quickfix-edit-highlight"}),TN=NN=EN([IN(1,wN),IN(2,Rl),IN(3,Oa),IN(4,iL),IN(5,mL),IN(6,Ga),IN(7,uu),IN(8,fN),IN(9,Oa)],TN),B_(((e,t)=>{((e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)})(".quickfix-edit-highlight",e.getColor(Vm));const i=e.getColor(Um);i&&t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${M_(e.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)}));const AN={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:ue(0,"Kind of the code action to run.")},apply:{type:"string",description:ue(0,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[ue(0,"Always apply the first returned code action."),ue(0,"Apply the first returned code action if it is the only one."),ue(0,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:ue(0,"Controls if only preferred code actions should be returned.")}}};function ON(e,t,i,n,s=fL.Default){if(e.hasModel()){const o=TN.get(e);null==o||o.manualTriggerAtCurrentPosition(t,s,i,n)}}Lh(TN.ID,TN,3),Lh(XL.ID,XL,4),yh(class extends _h{constructor(){super({id:LL,label:ue(0,"Quick Fix..."),alias:"Quick Fix...",precondition:ul.and(Rh.writable,Rh.hasCodeActionsProvider),kbOpts:{kbExpr:Rh.textInputFocus,primary:2137,weight:100}})}run(e,t){return ON(t,ue(0,"No code actions available"),void 0,void 0,fL.QuickFix)}}),yh(class extends _h{constructor(){super({id:DL,label:ue(0,"Refactor..."),alias:"Refactor...",precondition:ul.and(Rh.writable,Rh.hasCodeActionsProvider),kbOpts:{kbExpr:Rh.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ul.and(Rh.writable,RN(vL.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:AN}]}})}run(e,t,i){const n=CL.fromUser(i,{kind:vL.Refactor,apply:"never"});return ON(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?ue(0,"No preferred refactorings for '{0}' available",i.kind):ue(0,"No refactorings for '{0}' available",i.kind):n.preferred?ue(0,"No preferred refactorings available"):ue(0,"No refactorings available"),{include:vL.Refactor.contains(n.kind)?n.kind:vL.None,onlyIncludePreferredActions:n.preferred},n.apply,fL.Refactor)}}),yh(class extends _h{constructor(){super({id:xL,label:ue(0,"Source Action..."),alias:"Source Action...",precondition:ul.and(Rh.writable,Rh.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ul.and(Rh.writable,RN(vL.Source))},description:{description:"Source Action...",args:[{name:"args",schema:AN}]}})}run(e,t,i){const n=CL.fromUser(i,{kind:vL.Source,apply:"never"});return ON(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?ue(0,"No preferred source actions for '{0}' available",i.kind):ue(0,"No source actions for '{0}' available",i.kind):n.preferred?ue(0,"No preferred source actions available"):ue(0,"No source actions available"),{include:vL.Source.contains(n.kind)?n.kind:vL.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,fL.SourceAction)}}),yh(class extends _h{constructor(){super({id:NL,label:ue(0,"Organize Imports"),alias:"Organize Imports",precondition:ul.and(Rh.writable,RN(vL.SourceOrganizeImports)),kbOpts:{kbExpr:Rh.textInputFocus,primary:1581,weight:100}})}run(e,t){return ON(t,ue(0,"No organize imports action available"),{include:vL.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",fL.OrganizeImports)}}),yh(class extends _h{constructor(){super({id:kL,label:ue(0,"Auto Fix..."),alias:"Auto Fix...",precondition:ul.and(Rh.writable,RN(vL.QuickFix)),kbOpts:{kbExpr:Rh.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return ON(t,ue(0,"No auto fixes available"),{include:vL.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",fL.AutoFix)}}),yh(class extends _h{constructor(){super({id:EL,label:ue(0,"Fix All"),alias:"Fix All",precondition:ul.and(Rh.writable,RN(vL.SourceFixAll))})}run(e,t){return ON(t,ue(0,"No fix all action available"),{include:vL.SourceFixAll,includeSourceActions:!0},"ifSingle",fL.FixAll)}}),wh(new class extends fh{constructor(){super({id:SL,precondition:ul.and(Rh.writable,Rh.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:AN}]}})}runEditorCommand(e,t,i){const n=CL.fromUser(i,{kind:vL.Empty,apply:"ifSingle"});return ON(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?ue(0,"No preferred code actions for '{0}' available",i.kind):ue(0,"No code actions for '{0}' available",i.kind):n.preferred?ue(0,"No preferred code actions available"):ue(0,"No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}),Ul.as(ku).registerConfiguration(Object.assign(Object.assign({},$S),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:ue(0,"Enable/disable showing group headers in the Code Action menu."),default:!0}}})),Ul.as(ku).registerConfiguration(Object.assign(Object.assign({},$S),{properties:{"editor.codeActionWidget.includeNearbyQuickfixes":{type:"boolean",scope:5,description:ue(0,"Enable/disable showing nearest quickfix within a line when not currently on a diagnostic."),default:!1}}}));class PN{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new PN(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}return new PN(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}var FN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class BN{constructor(){this.lenses=[],this._disposables=new N}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function WN(e,t,i){return FN(this,void 0,void 0,(function*(){const n=e.ordered(t),s=new Map,o=new BN,r=n.map(((e,n)=>FN(this,void 0,void 0,(function*(){s.set(e,n);try{const n=yield Promise.resolve(e.provideCodeLenses(t,i));n&&o.add(n,e)}catch(r){a(r)}}))));return yield Promise.all(r),o.lenses=o.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:s.get(e.provider)s.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),o}))}Za.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;jr(an.isUri(i)),jr("number"==typeof n||!n);const{codeLensProvider:s}=e.get(iL),o=e.get(Wa).getModel(i);if(!o)throw u();const r=[],a=new N;return WN(s,o,Hh.None).then((e=>{a.add(e);const t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?r.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(o,i.symbol,Hh.None)).then((e=>r.push(e||i.symbol))));return Promise.all(t)})).then((()=>r)).finally((()=>{setTimeout((()=>a.dispose()),100)}))}));var VN,HN,zN=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",e[e.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"}(VN||(VN={})),function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(HN||(HN={}));class UN extends E{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new j),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=HN.None,this.cache=new Map,this.flushDelayer=this._register(new Qh(UN.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;this._onDidChangeStorage.pause();try{null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.acceptExternal(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.acceptExternal(e,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===HN.Closed)return;let i=!1;if(Kr(t))i=this.cache.delete(e);else{this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0)}i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return Kr(i)?t:i}getBoolean(e,t){const i=this.get(e);return Kr(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return Kr(i)?t:parseInt(i,10)}set(e,t,i=!1){return zN(this,void 0,void 0,(function*(){if(this.state===HN.Closed)return;if(Kr(t))return this.delete(e,i);const n=Fr(t)||Array.isArray(t)?(s=t,JSON.stringify(s,uk)):String(t);var s;return this.cache.get(e)!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()):void 0}))}delete(e,t=!1){return zN(this,void 0,void 0,(function*(){if(this.state===HN.Closed)return;return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return zN(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}doFlush(e){return zN(this,void 0,void 0,(function*(){return this.options.hint===VN.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger((()=>this.flushPending()),e)}))}}UN.DEFAULT_FLUSH_DELAY=100;class KN{constructor(){this.onDidChangeItemsExternal=B.None,this.items=new Map}updateItems(e){var t,i;return zN(this,void 0,void 0,(function*(){null===(t=e.insert)||void 0===t||t.forEach(((e,t)=>this.items.set(t,e))),null===(i=e.delete)||void 0===i||i.forEach((e=>this.items.delete(e)))}))}}const jN="__$__targetStorageMarker",qN=Pa("storageService");var $N;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}($N||($N={}));class GN extends E{constructor(e={flushInterval:GN.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new j),this._onDidChangeTarget=this._register(new j),this._onWillSaveState=this._register(new U),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return B.filter(this._onDidChangeValue.event,(i=>i.scope===e&&(void 0===t||i.key===t)),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===jN){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n,s=!1){Kr(t)?this.remove(e,i,s):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t,s)}))}remove(e,t,i=!1){this.withPausedEmitters((()=>{var n;this.updateKeyTarget(e,t,void 0),null===(n=this.getStorage(t))||void 0===n||n.delete(e,i)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){var s,o;const r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(s=this.getStorage(t))||void 0===s||s.set(jN,JSON.stringify(r),n)):"number"==typeof r[e]&&(delete r[e],null===(o=this.getStorage(t))||void 0===o||o.set(jN,JSON.stringify(r),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?function(e){const t=e.get(jN);if(t)try{return JSON.parse(t)}catch(i){}return Object.create(null)}(t):Object.create(null)}}GN.DEFAULT_FLUSH_INTERVAL=6e4;var ZN=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},YN=function(e,t){return function(i,n){t(i,n,e)}};const XN=Pa("ICodeLensCache");class QN{constructor(e,t){this.lineCount=e,this.data=t}}let JN=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Ks(20,.75);od((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),B.once(e.onWillSaveState)((i=>{i.reason===$N.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new BN;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new QN(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new Mh(e,1,e,11)});const s=new BN;s.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new QN(i.lineCount,s))}}catch(ge){}}};JN=ZN([YN(0,qN)],JN),Cu(XN,JN,1);class eE{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class tE{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+tE._idPool++,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let s=0;s{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:nE},(e=>this._decorationIds[t]=e)),r=r?Mh.plusRange(r,e.symbol.range):Mh.lift(e.symbol.range)})),this._viewZone=new eE(r.startLineNumber-1,s,o),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new tE(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],null==t||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||Mh.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:nE},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;tdE(t,e)),n)):function(e,t){return t=cE(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=uE(i,t),dE(e[i],t))),t)}(e,t);case"string":return uE(e,t);case"boolean":return function(e,t){return cE(e?433:863,t)}(e,t);case"number":return cE(e,t);case"undefined":return cE(937,t);default:return cE(617,t)}var i,n}function cE(e,t){return(t<<5)-t+e|0}function uE(e,t){t=cE(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function pE(e,t=0,i=e.byteLength,n=0){for(let s=0;se.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}class fE{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let n,s,o=this._buffLen,r=this._leftoverHighSurrogate;for(0!==r?(n=r,s=-1,r=0):(n=e.charCodeAt(0),s=0);;){let a=n;if(Co(n)){if(!(s+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),mE(this._h0)+mE(this._h1)+mE(this._h2)+mE(this._h3)+mE(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,pE(this._buff,this._buffLen),this._buffLen>56&&(this._step(),pE(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=fE._bigBlock32,t=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,t.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,gE(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let i,n,s,o=this._h0,r=this._h1,a=this._h2,l=this._h3,h=this._h4;for(let d=0;d<80;d++)d<20?(i=r&a|~r&l,n=1518500249):d<40?(i=r^a^l,n=1859775393):d<60?(i=r&a|r&l|a&l,n=2400959708):(i=r^a^l,n=3395469782),s=gE(o,5)+i+h+n+e.getUint32(4*d,!1)&4294967295,h=l,l=a,a=gE(r,30),r=o,o=s;this._h0=this._h0+o&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+h&4294967295}}fE._bigBlock32=new DataView(new ArrayBuffer(320));const _E=Pa("environmentService");var vE=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},bE=function(e,t){return function(i,n){t(i,n,e)}};const CE=Pa("ILanguageFeatureDebounceService");var wE;!function(e){const t=new WeakMap;let i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(wE||(wE={}));class yE{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class SE{constructor(e,t,i,n,s,o){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=o,this._cache=new Ks(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>dE(wE.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?hD(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new cD(6),this._cache.set(i,n));const s=hD(n.update(t),this._min,this._max);return Kk(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new dD;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){return hD(0|this._overall()||this._default,this._min,this._max)}}let LE=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){var n,s,o;const r=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,a=null!==(s=null==i?void 0:i.max)&&void 0!==s?s:Math.pow(r,2),l=null!==(o=null==i?void 0:i.key)&&void 0!==o?o:void 0,h=`${wE.of(e)},${r}${l?","+l:""}`;let d=this._data.get(h);return d||(this._isDev?d=new SE(this._logService,t,e,0|this._overallAverage()||1.5*r,r,a):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),d=new yE(1.5*r)),this._data.set(h,d)),d}_overallAverage(){const e=new dD;for(const t of this._data.values())e.update(t.default());return e.value}};LE=vE([bE(0,ah),bE(1,_E)],LE),Cu(CE,LE,1);var kE=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},DE=function(e,t){return function(i,n){t(i,n,e)}},xE=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let NE=class{constructor(e,t,i,n,s,o){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=o,this._disposables=new N,this._localToDispose=new N,this._lenses=[],this._oldCodeLensModels=new N,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new sd((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(50)||e.hasChanged(19)||e.hasChanged(18))&&this._updateLensStyle(),e.hasChanged(17)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=.9*this._editor.getOption(52)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",US.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&this._localToDispose.add(ed((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const n of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof n.onDidChange){const e=n.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new sd((()=>{var t;const n=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=Gh((t=>WN(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const s=this._provideCodeLensDebounce.update(e,Date.now()-n);i.delay=s,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),r)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(x((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{var e;this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const s=new iE;i.forEach((e=>{e.dispose(s,t),this._lenses.splice(this._lenses.indexOf(e),1)})),s.commit(e)}))})),i.schedule(),this._resolveCodeLensesScheduler.cancel(),null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidBlurEditorText((()=>{i.cancel()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(x((()=>{if(this._editor.getModel()){const e=PN.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const i of this._lenses){const e=i.getCommand(t);if(e){this._commandService.executeCommand(e.id,...e.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new iE;for(const n of this._lenses)n.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const r of e.lenses){const e=r.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(r):(n=[r],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=PN.capture(this._editor),o=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new iE;let s=0,r=0;for(;rthis._resolveCodeLensesInViewportSoon()))),s++,r++)}for(;sthis._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach((e=>{const s=e.computeIfNecessary(t);s&&(i.push(s),n.push(e))})),0===i.length)return;const s=Date.now(),o=Gh((e=>{const s=i.map(((i,s)=>{const o=new Array(i.length),r=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(o[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{o[n]=e}),a)));return Promise.all(r).then((()=>{e.isCancellationRequested||n[s].isDisposed()||n[s].updateCommands(o)}))}));return Promise.all(s)}));this._resolveCodeLensesPromise=o,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{r(e),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getModel(){var e;return xE(this,void 0,void 0,(function*(){return yield this._getCodeLensModelPromise,yield this._resolveCodeLensesPromise,(null===(e=this._currentCodeLensModel)||void 0===e?void 0:e.isDisposed)?void 0:this._currentCodeLensModel}))}};NE.ID="css.editor.codeLens",NE=kE([DE(1,iL),DE(2,CE),DE(3,Ga),DE(4,uL),DE(5,XN)],NE),Lh(NE.ID,NE,1),yh(class extends _h{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:Rh.hasCodeLensProvider,label:ue(0,"Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return xE(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(lE),n=e.get(Ga),s=e.get(uL),o=t.getSelection().positionLineNumber,r=t.getContribution(NE.ID);if(!r)return;const a=yield r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===o&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const h=yield i.pick(l,{canPickMany:!1,placeHolder:ue(0,"Select a command")});if(!h)return;let d=h.command;if(a.isDisposed){const e=yield r.getModel(),t=null==e?void 0:e.lenses.find((e=>{var t;return e.symbol.range.startLineNumber===o&&(null===(t=e.symbol.command)||void 0===t?void 0:t.title)===d.title}));if(!t||!t.symbol.command)return;d=t.symbol.command}try{yield n.executeCommand(d.id,...d.arguments||[])}catch(c){s.error(c)}}))}});class EE{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new IE(this.x-window.scrollX,this.y-window.scrollY)}}class IE{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new EE(this.clientX+window.scrollX,this.clientY+window.scrollY)}}class ME{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class TE{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function RE(e){const t=Hn(e);return new ME(t.left,t.top,t.width,t.height)}function AE(e,t,i){const n=t.width/e.offsetWidth,s=t.height/e.offsetHeight,o=(i.x-t.x)/n,r=(i.y-t.y)/s;return new TE(o,r)}class OE extends Nt{constructor(e,t,i){super(e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new EE(this.posx,this.posy),this.editorPos=RE(i),this.relativePos=AE(i,this.editorPos,this.pos)}}class PE{constructor(e){this._editorViewDomNode=e}_create(e){return new OE(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return En(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return En(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return En(e,os.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return En(e,os.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return En(e,os.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return En(e,"mousemove",(e=>t(this._create(e))))}}class FE{constructor(e){this._editorViewDomNode=e}_create(e){return new OE(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return En(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return En(e,os.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return En(e,os.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return En(e,"pointermove",(e=>t(this._create(e))))}}class BE extends E{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new gD),this._keydownListener=null}startMonitoring(e,t,i,n,s){this._keydownListener=Mn(e.ownerDocument,"keydown",(e=>{e.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{n(new OE(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),s(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class WE{constructor(e){this._editor=e,this._instanceId=++WE._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new sd((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const n=this._counter++;i=new VE(t,`dyn-rule-${this._instanceId}-${n}`,Zn(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}WE._idPool=0;class VE{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElement=Jn(i),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const n in t){const e=t[n];let s;s="object"==typeof e?Cp(e.id):e;i+=`\n\t${HE(n)}: ${s};`}return i+="\n}",i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function HE(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}const zE="$initialize";let UE=!1;function KE(e){We&&(UE||(UE=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class jE{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class qE{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class $E{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class GE{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class ZE{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class YE{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise(((n,s)=>{this._pendingReplies[i]={resolve:n,reject:s},this._send(new jE(this._workerId,i,e,t))}))}listen(e,t){let i=null;const n=new U({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new $E(this._workerId,i,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new ZE(this._workerId,i)),i=null}});return n.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new qE(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=l(e.detail)),this._send(new qE(this._workerId,t,void 0,l(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new GE(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i{this._protocol.handleMessage(e)}),(e=>{null==n||n(e)}))),this._protocol=new YE({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(Dre){return Promise.reject(Dre)}},handleEvent:(e,t)=>{if(JE(e)){const n=i[e].call(i,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on main thread host.`);return n}if(QE(e)){const t=i[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on main thread host.`);return t}throw new Error(`Malformed event name ${e}`)}}),this._protocol.setWorkerId(this._worker.getId());let s=null;const o=globalThis.require;void 0!==o&&"function"==typeof o.getConfig?s=o.getConfig():void 0!==globalThis.requirejs&&(s=globalThis.requirejs.s.contexts._.config);const r=_d(i);this._onModuleLoaded=this._protocol.sendMessage(zE,[this._worker.getId(),JSON.parse(JSON.stringify(s)),t,r]);const a=(e,t)=>this._request(e,t),l=(e,t)=>this._protocol.listen(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(eI(t,a,l))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}function QE(e){return"o"===e[0]&&"n"===e[1]&&mo(e.charCodeAt(2))}function JE(e){return/^onDynamic/.test(e)&&mo(e.charCodeAt(9))}function eI(e,t,i){const n=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},s=e=>function(t){return i(e,t)},o={};for(const r of e)JE(r)?o[r]=s(r):QE(r)?o[r]=i(r,void 0):o[r]=n(r);return o}const tI=Ak("defaultWorkerFactory",{createScriptURL:e=>e});class iI{constructor(e,t,i,n,s){this.id=t,this.label=i;const o=function(e){const t=globalThis.MonacoEnvironment;if(t){if("function"==typeof t.getWorker)return t.getWorker("workerMain.js",e);if("function"==typeof t.getWorkerUrl){const i=t.getWorkerUrl("workerMain.js",e);return new Worker(tI?tI.createScriptURL(i):i,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(i);"function"==typeof o.then?this.worker=o:this.worker=Promise.resolve(o),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=s,"function"==typeof e.addEventListener&&e.addEventListener("error",s)}))}getId(){return this.id}postMessage(e,t){var i;null===(i=this.worker)||void 0===i||i.then((i=>{try{i.postMessage(e,t)}catch(n){r(n),r(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:n}))}}))}dispose(){var e;null===(e=this.worker)||void 0===e||e.then((e=>e.terminate())),this.worker=null}}class nI{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++nI.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new iI(e,n,this._label||"anonymous"+n,t,(e=>{KE(e),this._webWorkerFailedBeforeError=e,i(e)}))}}nI.LAST_WORKER_ID=0;class sI{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class oI{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new sI(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class dI{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,s,o]=dI._getElements(e),[r,a,l]=dI._getElements(t);this._hasStrings=o&&l,this._originalStringElements=n,this._originalElementsOrHash=s,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(dI._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let s;return i<=n?(aI.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new sI(e,0,i,n-i+1)]):e<=t?(aI.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),s=[new sI(e,t-e+1,i,0)]):(aI.Assert(e===t+1,"originalStart should only be one more than originalEnd"),aI.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const o=[0],r=[0],a=this.ComputeRecursionPoint(e,t,i,n,o,r,s),l=o[0],h=r[0];if(null!==a)return a;if(!s[0]){const o=this.ComputeDiffRecursive(e,l,i,h,s);let r=[];return r=s[0]?[new sI(l+1,t-(l+1)+1,h+1,n-(h+1)+1)]:this.ComputeDiffRecursive(l+1,t,h+1,n,s),this.ConcatenateChanges(o,r)}return[new sI(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p,m,f,_){let v=null,b=null,C=new hI,w=t,y=i,S=u[0]-m[0]-n,L=-1073741824,k=this.m_forwardHistory.length-1;do{const t=S+e;t===w||t=0&&(e=(l=this.m_forwardHistory[k])[0],w=1,y=l.length-1)}while(--k>=-1);if(v=C.getReverseChanges(),_[0]){let e=u[0]+1,t=m[0]+1;if(null!==v&&v.length>0){const i=v[v.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}b=[new sI(e,c-e+1,t,p-t+1)]}else{C=new hI,w=o,y=r,S=u[0]-m[0]-a,L=1073741824,k=f?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+s;e===w||e=h[e+1]?(g=(d=h[e+1]-1)-S-a,d>L&&C.MarkNextChange(),L=d+1,C.AddOriginalElement(d+1,g+1),S=e+1-s):(g=(d=h[e-1])-S-a,d>L&&C.MarkNextChange(),L=d,C.AddModifiedElement(d+1,g+1),S=e-1-s),k>=0&&(s=(h=this.m_reverseHistory[k])[0],w=1,y=h.length-1)}while(--k>=-1);b=C.getChanges()}return this.ConcatenateChanges(v,b)}ComputeRecursionPoint(e,t,i,n,s,o,r){let a=0,l=0,h=0,d=0,c=0,u=0;e--,i--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),p=g+1,m=new Int32Array(p),f=new Int32Array(p),_=n-i,v=t-e,b=e-i,C=t-n,w=(v-_)%2==0;m[_]=e,f[v]=t,r[0]=!1;for(let y=1;y<=g/2+1;y++){let g=0,S=0;h=this.ClipDiagonalBound(_-y,y,_,p),d=this.ClipDiagonalBound(_+y,y,_,p);for(let e=h;e<=d;e+=2){a=e===h||eg+S&&(g=a,S=l),!w&&Math.abs(e-v)<=y-1&&a>=f[e])return s[0]=a,o[0]=l,i<=f[e]&&y<=1448?this.WALKTRACE(_,h,d,b,v,c,u,C,m,f,a,t,s,l,n,o,w,r):null}const L=(g-e+(S-i)-y)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(g,L))return r[0]=!0,s[0]=g,o[0]=S,L>0&&y<=1448?this.WALKTRACE(_,h,d,b,v,c,u,C,m,f,a,t,s,l,n,o,w,r):(e++,i++,[new sI(e,t-e+1,i,n-i+1)]);c=this.ClipDiagonalBound(v-y,y,v,p),u=this.ClipDiagonalBound(v+y,y,v,p);for(let p=c;p<=u;p+=2){a=p===c||p=f[p+1]?f[p+1]-1:f[p-1],l=a-(p-v)-C;const g=a;for(;a>e&&l>i&&this.ElementsAreEqual(a,l);)a--,l--;if(f[p]=a,w&&Math.abs(p-_)<=y&&a<=m[p])return s[0]=a,o[0]=l,g>=m[p]&&y<=1448?this.WALKTRACE(_,h,d,b,v,c,u,C,m,f,a,t,s,l,n,o,w,r):null}if(y<=1447){let e=new Int32Array(d-h+2);e[0]=_-h+1,lI.Copy2(m,h,e,1,d-h+1),this.m_forwardHistory.push(e),e=new Int32Array(u-c+2),e[0]=v-c+1,lI.Copy2(f,c,e,1,u-c+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,h,d,b,v,c,u,C,m,f,a,t,s,l,n,o,w,r)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,s=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,s=i.modifiedStart+i.modifiedLength}const o=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,h=i.modifiedStart-e;if(tl&&(l=d,a=e)}i.originalStart-=a,i.modifiedStart-=a;const h=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],h)&&(e[t-1]=h[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&t>a&&(a=t,l=d,h=e)}return a>0?[l,h]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let s=0;s=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return lI.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],lI.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return lI.Copy(e,0,i,0,e.length),lI.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(aI.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),aI.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const n=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let r=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(r=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new sI(n,s,o,r),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Hb(e),t=Hb(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const s=i.length-e;return t>=s&&(t=s),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Hb(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,s=0,o=0;for(;t<=i;)if(n=t+(i-t)/2|0,s=this.prefixSum[n],o=s-this.values[n],e=s))break;t=n+1}return new gI(n,e-o)}}class uI{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new gI(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=Ud(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;nt&&(t=o),n>i&&(i=n),r>i&&(i=r)}t++,i++;const n=new mI(i,t,0);for(let s=0,o=e.length;s=this._maxCharCode?0:this._states.get(e,t)}}let _I=null;let vI=null;class bI{static _createLink(e,t,i,n,s){let o=s-1;do{const i=t.charCodeAt(o);if(2!==e.get(i))break;o--}while(o>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(o);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&o--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:o+2},url:t.substring(n,o+1)}}static computeLinks(e,t=function(){return null===_I&&(_I=new fI([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),_I}()){const i=function(){if(null===vI){vI=new zb(0);const e=" \t<>'\"\u3001\u3002\uff61\uff64\uff0c\uff0e\uff1a\uff1b\u2018\u3008\u300c\u300e\u3014\uff08\uff3b\uff5b\uff62\uff63\uff5d\uff3d\uff09\u3015\u300f\u300d\u3009\u2019\uff40\uff5e\u2026";for(let i=0;i=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}var wI,yI,SI,LI,kI,DI,xI,NI,EI,II,MI,TI,RI,AI,OI,PI,FI,BI,WI,VI,HI,zI,UI,KI,jI,qI,$I,GI,ZI,YI,XI,QI,JI,eM,tM,iM,nM,sM,oM;CI.INSTANCE=new CI,function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(wI||(wI={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(yI||(yI={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(SI||(SI={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(LI||(LI={})),function(e){e[e.Deprecated=1]="Deprecated"}(kI||(kI={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(DI||(DI={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(xI||(xI={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(NI||(NI={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(EI||(EI={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(II||(II={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(MI||(MI={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.letterSpacing=63]="letterSpacing",e[e.lightbulb=64]="lightbulb",e[e.lineDecorationsWidth=65]="lineDecorationsWidth",e[e.lineHeight=66]="lineHeight",e[e.lineNumbers=67]="lineNumbers",e[e.lineNumbersMinChars=68]="lineNumbersMinChars",e[e.linkedEditing=69]="linkedEditing",e[e.links=70]="links",e[e.matchBrackets=71]="matchBrackets",e[e.minimap=72]="minimap",e[e.mouseStyle=73]="mouseStyle",e[e.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=75]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",e[e.multiCursorModifier=77]="multiCursorModifier",e[e.multiCursorPaste=78]="multiCursorPaste",e[e.multiCursorLimit=79]="multiCursorLimit",e[e.occurrencesHighlight=80]="occurrencesHighlight",e[e.overviewRulerBorder=81]="overviewRulerBorder",e[e.overviewRulerLanes=82]="overviewRulerLanes",e[e.padding=83]="padding",e[e.pasteAs=84]="pasteAs",e[e.parameterHints=85]="parameterHints",e[e.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",e[e.quickSuggestions=88]="quickSuggestions",e[e.quickSuggestionsDelay=89]="quickSuggestionsDelay",e[e.readOnly=90]="readOnly",e[e.readOnlyMessage=91]="readOnlyMessage",e[e.renameOnType=92]="renameOnType",e[e.renderControlCharacters=93]="renderControlCharacters",e[e.renderFinalNewline=94]="renderFinalNewline",e[e.renderLineHighlight=95]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=97]="renderValidationDecorations",e[e.renderWhitespace=98]="renderWhitespace",e[e.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",e[e.roundedSelection=100]="roundedSelection",e[e.rulers=101]="rulers",e[e.scrollbar=102]="scrollbar",e[e.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=104]="scrollBeyondLastLine",e[e.scrollPredominantAxis=105]="scrollPredominantAxis",e[e.selectionClipboard=106]="selectionClipboard",e[e.selectionHighlight=107]="selectionHighlight",e[e.selectOnLineNumbers=108]="selectOnLineNumbers",e[e.showFoldingControls=109]="showFoldingControls",e[e.showUnused=110]="showUnused",e[e.snippetSuggestions=111]="snippetSuggestions",e[e.smartSelect=112]="smartSelect",e[e.smoothScrolling=113]="smoothScrolling",e[e.stickyScroll=114]="stickyScroll",e[e.stickyTabStops=115]="stickyTabStops",e[e.stopRenderingLineAfter=116]="stopRenderingLineAfter",e[e.suggest=117]="suggest",e[e.suggestFontSize=118]="suggestFontSize",e[e.suggestLineHeight=119]="suggestLineHeight",e[e.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",e[e.suggestSelection=121]="suggestSelection",e[e.tabCompletion=122]="tabCompletion",e[e.tabIndex=123]="tabIndex",e[e.unicodeHighlighting=124]="unicodeHighlighting",e[e.unusualLineTerminators=125]="unusualLineTerminators",e[e.useShadowDOM=126]="useShadowDOM",e[e.useTabStops=127]="useTabStops",e[e.wordBreak=128]="wordBreak",e[e.wordSeparators=129]="wordSeparators",e[e.wordWrap=130]="wordWrap",e[e.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=133]="wordWrapColumn",e[e.wordWrapOverride1=134]="wordWrapOverride1",e[e.wordWrapOverride2=135]="wordWrapOverride2",e[e.wrappingIndent=136]="wrappingIndent",e[e.wrappingStrategy=137]="wrappingStrategy",e[e.showDeprecated=138]="showDeprecated",e[e.inlayHints=139]="inlayHints",e[e.editorClassName=140]="editorClassName",e[e.pixelRatio=141]="pixelRatio",e[e.tabFocusMode=142]="tabFocusMode",e[e.layoutInfo=143]="layoutInfo",e[e.wrappingInfo=144]="wrappingInfo",e[e.defaultColorDecorators=145]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"}(TI||(TI={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(RI||(RI={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(AI||(AI={})),function(e){e[e.Left=1]="Left",e[e.Right=2]="Right"}(OI||(OI={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(PI||(PI={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(FI||(FI={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(BI||(BI={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(WI||(WI={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"}(VI||(VI={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(HI||(HI={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(zI||(zI={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(UI||(UI={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(KI||(KI={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(jI||(jI={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(qI||(qI={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}($I||($I={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(GI||(GI={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(ZI||(ZI={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(YI||(YI={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(XI||(XI={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(QI||(QI={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(JI||(JI={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(eM||(eM={})),function(e){e[e.Deprecated=1]="Deprecated"}(tM||(tM={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(iM||(iM={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(nM||(nM={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(sM||(sM={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(oM||(oM={}));class rM{static chord(e,t){return pt(e,t)}}function aM(){return{editor:void 0,languages:void 0,CancellationTokenSource:Uh,Emitter:U,KeyCode:VI,KeyMod:rM,Position:Ba,Range:Mh,Selection:Th,SelectionDirection:QI,MarkerSeverity:HI,MarkerTag:zI,Uri:an,Token:fC}}rM.CtrlCmd=2048,rM.Shift=1024,rM.Alt=512,rM.WinCtrl=256;class lM{static computeUnicodeHighlights(e,t,i){const n=i?i.startLineNumber:1,s=i?i.endLineNumber:e.getLineCount(),o=new hM(t),r=o.getCandidateCodePoints();let a;a="allNonBasicAscii"===r?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(""+`[${Js(Array.from(r).map((e=>String.fromCodePoint(e))).join(""))}]`,"g");const l=new Xb(null,a),h=[];let d,c=!1,u=0,g=0,p=0;e:for(let m=n,f=s;m<=f;m++){const t=e.getLineContent(m),i=t.length;l.reset(0);do{if(d=l.next(t),d){let e=d.index,n=d.index+d[0].length;if(e>0){Co(t.charCodeAt(e-1))&&e--}if(n+1=t){c=!0;break e}h.push(new Mh(m,e+1,m,n+1))}}}while(d)}return{ranges:h,hasMore:c,ambiguousCharacterCount:u,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(e,t){const i=new hM(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),s=i.ambiguousCharacters.getPrimaryConfusable(n),o=Uo.getLocales().filter((e=>!Uo.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}class hM{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Uo.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of Ko.codePoints)dM(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,s=!1;if(t)for(const o of t){const e=o.codePointAt(0),t=Mo(o);n=n||t,t||this.ambiguousCharacters.isAmbiguous(e)||Ko.isInvisibleCharacter(e)||(s=!0)}return!n&&s?0:this.options.invisibleCharacters&&!dM(e)&&Ko.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function dM(e){return" "===e||"\n"===e||"\t"===e}class cM{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class uM{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}class gM{static inverse(e,t,i){const n=[];let s=1,o=1;for(const a of e){const e=new pM(new bc(s,a.original.startLineNumber),new bc(o,a.modified.startLineNumber),void 0);e.modified.isEmpty||n.push(e),s=a.original.endLineNumberExclusive,o=a.modified.endLineNumberExclusive}const r=new pM(new bc(s,t+1),new bc(o,i+1),void 0);return r.modified.isEmpty||n.push(r),n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new gM(this.modified,this.original)}join(e){return new gM(this.original.join(e.original),this.modified.join(e.modified))}}class pM extends gM{constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){var e;return new pM(this.modified,this.original,null===(e=this.innerChanges)||void 0===e?void 0:e.map((e=>e.flip())))}}class mM{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new mM(this.modifiedRange,this.originalRange)}}class fM{computeDiff(e,t,i){var n;const s=new yM(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[];let r=null;for(const a of s.changes){let e,t;e=0===a.originalEndLineNumber?new bc(a.originalStartLineNumber+1,a.originalStartLineNumber+1):new bc(a.originalStartLineNumber,a.originalEndLineNumber+1),t=0===a.modifiedEndLineNumber?new bc(a.modifiedStartLineNumber+1,a.modifiedStartLineNumber+1):new bc(a.modifiedStartLineNumber,a.modifiedEndLineNumber+1);let i=new pM(e,t,null===(n=a.charChanges)||void 0===n?void 0:n.map((e=>new mM(new Mh(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new Mh(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));r&&(r.modified.endLineNumberExclusive!==i.modified.startLineNumber&&r.original.endLineNumberExclusive!==i.original.startLineNumber||(i=new pM(r.original.join(i.original),r.modified.join(i.modified),r.innerChanges&&i.innerChanges?r.innerChanges.concat(i.innerChanges):void 0),o.pop())),o.push(i),r=i}return Hl((()=>zl(o,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class CM{constructor(e,t,i,n,s,o,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),s=t.getStartColumn(e.originalStart),o=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),h=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new CM(n,s,o,r,a,l,h,d)}}class wM{constructor(e,t,i,n,s){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=s}static createFromDiffResult(e,t,i,n,s,o,r){let a,l,h,d,c;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(h=n.getStartLineNumber(t.modifiedStart)-1,d=0):(h=n.getStartLineNumber(t.modifiedStart),d=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),o&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const o=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(o.getElements().length>0&&a.getElements().length>0){let e=_M(o,a,s,!0).changes;r&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,s=e.length;n1&&r>1;){if(e.charCodeAt(i-2)!==t.charCodeAt(r-2))break;i--,r--}(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,i,o+1,1,r)}{let i=LM(e,1),r=LM(t,1);const a=e.length+1,l=t.length+1;for(;i!0;const t=Date.now();return()=>Date.now()-t{i.push(xM.fromOffsetPairs(e?e.getEndExclusives():NM.zero,n?n.getStarts():new NM(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),i}static fromOffsetPairs(e,t){return new xM(new dc(e.offset1,t.offset1),new dc(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new xM(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new xM(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new xM(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new xM(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new xM(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(t&&i)return new xM(t,i)}getStarts(){return new NM(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new NM(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class NM{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}}NM.zero=new NM(0,0),NM.max=new NM(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class EM{isValid(){return!0}}EM.instance=new EM;class IM{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new f("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&a>0&&3===o.get(g-1,a-1)&&(d+=r.get(g-1,a-1)),d+=n?n(g,a):1):d=-1;const c=Math.max(l,h,d);if(c===d){const e=g>0&&a>0?r.get(g-1,a-1):0;r.set(g,a,e+1),o.set(g,a,3)}else c===l?(r.set(g,a,0),o.set(g,a,1)):c===h&&(r.set(g,a,0),o.set(g,a,2));s.set(g,a,c)}const a=[];let l=e.length,h=t.length;function d(e,t){e+1===l&&t+1===h||a.push(new xM(new dc(e+1,l),new dc(t+1,h))),l=e,h=t}let c=e.length-1,u=t.length-1;for(;c>=0&&u>=0;)3===o.get(c,u)?(d(c,u),c--,u--):1===o.get(c,u)?c--:u--;return d(-1,-1),a.reverse(),new DM(a,!1)}}class OM{compute(e,t,i=EM.instance){if(0===e.length||0===t.length)return DM.trivial(e,t);const n=e,s=t;function o(e,t){for(;en.length||u>s.length)continue;const g=o(c,u);a.set(h,g);const p=c===r?l.get(h+1):l.get(h-1);if(l.set(h,g!==c?new PM(p,c,u,g-c):p),a.get(h)===n.length&&a.get(h)-h===s.length)break e}}let d=l.get(h);const c=[];let u=n.length,g=s.length;for(;;){const e=d?d.x+d.length:0,t=d?d.y+d.length:0;if(e===u&&t===g||c.push(new xM(new dc(e,u),new dc(t,g))),!d)break;u=d.x,g=d.y,d=d.prev}return c.reverse(),new DM(c,!1)}}class PM{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class FM{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class BM{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}class WM{constructor(e,t,i){this.lines=e,this.considerWhitespaceChanges=i,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let n=!1;t.start>0&&t.endExclusive>=e.length&&(t=new dc(t.start-1,t.endExclusive),n=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let s=this.lineRange.start;sString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=UM(e>0?this.elements[e-1]:-1),i=UM(et<=e));return new Ba(this.lineRange.start+t+1,e-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(e){return Mh.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!VM(this.elements[e]))return;let t=e;for(;t>0&&VM(this.elements[t-1]);)t--;let i=e;for(;it<=e.start)))&&void 0!==t?t:0,s=null!==(i=function(e,t){const i=mc(e,t);return i===e.length?void 0:e[i]}(this.firstCharOffsetByLine,(t=>e.endExclusive<=t)))&&void 0!==i?i:this.elements.length;return new dc(n,s)}}function VM(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const HM={0:0,1:0,2:0,3:10,4:2,5:3,6:10,7:10};function zM(e){return HM[e]}function UM(e){return 10===e?7:13===e?6:TM(e)?5:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:4}function KM(e,t,i,n,s,o){let{moves:r,excludedChanges:a}=function(e,t,i,n){const s=[],o=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new RM(e.original,t,e))),r=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new RM(e.modified,i,e)))),a=new Set;for(const l of o){let e,t=-1;for(const i of r){const n=l.computeSimilarity(i);n>t&&(t=n,e=i)}if(t>.9&&e&&(r.delete(e),s.push(new gM(l.range,e.range)),a.add(l.source),a.add(e.source)),!n.isValid())return{moves:s,excludedChanges:a}}return{moves:s,excludedChanges:a}}(e,t,i,o);if(!o.isValid())return[];const l=function(e,t,i,n,s,o){const r=[],a=new qs;for(const u of e)for(let e=u.original.startLineNumber;ee.modified.startLineNumber),Xd));for(const u of e){let e=[];for(let t=u.modified.startLineNumber;t{for(const n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===s.endLineNumberExclusive)return n.originalLineRange=new bc(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new bc(n.modifiedLineRange.startLineNumber,s.endLineNumberExclusive),void o.push(n);const i={modifiedLineRange:s,originalLineRange:t};l.push(i),o.push(i)})),e=o}if(!o.isValid())return[]}l.sort(Jd(Yd((e=>e.modifiedLineRange.length),Xd)));const h=new Cc,d=new Cc;for(const u of l){const e=u.modifiedLineRange.startLineNumber-u.originalLineRange.startLineNumber,t=h.subtractFrom(u.modifiedLineRange),i=d.subtractFrom(u.originalLineRange).getWithDelta(e),n=t.getIntersection(i);for(const s of n.ranges){if(s.length<3)continue;const t=s,i=s.delta(-e);r.push(new gM(i,t)),h.addRange(t),d.addRange(i)}}r.sort(Yd((e=>e.original.startLineNumber),Xd));const c=new fc(e);for(let u=0;ue.original.startLineNumber<=t.original.startLineNumber)),a=gc(e,(e=>e.modified.startLineNumber<=t.modified.startLineNumber)),l=Math.max(t.original.startLineNumber-i.original.startLineNumber,t.modified.startLineNumber-a.modified.startLineNumber),g=c.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbern.length||i>s.length)break;if(h.contains(i)||d.contains(e))break;if(!jM(n[e-1],s[i-1],o))break}for(f>0&&(d.addRange(new bc(t.original.startLineNumber-f,t.original.startLineNumber)),h.addRange(new bc(t.modified.startLineNumber-f,t.modified.startLineNumber))),_=0;_n.length||i>s.length)break;if(h.contains(i)||d.contains(e))break;if(!jM(n[e-1],s[i-1],o))break}_>0&&(d.addRange(new bc(t.original.endLineNumberExclusive,t.original.endLineNumberExclusive+_)),h.addRange(new bc(t.modified.endLineNumberExclusive,t.modified.endLineNumberExclusive+_))),(f>0||_>0)&&(r[u]=new gM(new bc(t.original.startLineNumber-f,t.original.endLineNumberExclusive+_),new bc(t.modified.startLineNumber-f,t.modified.endLineNumberExclusive+_)))}return r}(e.filter((e=>!a.has(e))),n,s,t,i,o);return qd(r,l),r=function(e){if(0===e.length)return e;e.sort(Yd((e=>e.original.startLineNumber),Xd));const t=[e[0]];for(let i=1;i=0&&r>=0&&o+r<=2?t[t.length-1]=n.join(s):t.push(s)}return t}(r),r=r.filter((e=>e.original.toOffsetRange().slice(t).map((e=>e.trim())).join("\n").length>=10)),r=function(e,t){const i=new fc(e);return t=t.filter((t=>(i.findLastMonotonous((e=>e.original.endLineNumberExclusivee.modified.endLineNumberExclusive300&&t.length>300)return!1;const n=(new OM).compute(new WM([e],new dc(0,1),!1),new WM([t],new dc(0,1),!1),i);let s=0;const o=xM.invert(n.diffs,e.length);for(const a of o)a.seq1Range.forEach((t=>{TM(e.charCodeAt(t))||s++}));const r=function(t){let i=0;for(let n=0;nt.length?e:t);return s/r>.6&&r>10}function qM(e,t,i){let n=i;return n=function(e,t,i){if(0===i.length)return i;const n=[];n.push(i[0]);for(let o=1;o0&&(r=r.delta(a))}s.push(r)}n.length>0&&s.push(n[n.length-1]);return s}(e,t,n),n=function(e,t,i){if(!e.getBoundaryScore||!t.getBoundaryScore)return i;for(let n=0;n0?i[n-1]:void 0,o=i[n],r=n+1=n.start&&e.seq2Range.start-o>=s.start&&i.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let r=0;for(;e.seq1Range.start+rl&&(l=r,a=h)}return e.delta(a)}class GM{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:ZM(this.lines[e-1]))+(e===this.lines.length?0:ZM(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function ZM(e){let t=0;for(;te===t)))return new cM([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new cM([new pM(new bc(1,e.length+1),new bc(1,t.length+1),[new mM(new Mh(1,1,e.length,e[0].length+1),new Mh(1,1,t.length,t[0].length+1))])],[],!1);const n=0===i.maxComputationTimeMs?EM.instance:new IM(i.maxComputationTimeMs),s=!i.ignoreTrimWhitespace,o=new Map;function r(e){let t=o.get(e);return void 0===t&&(t=o.size,o.set(e,t)),t}const a=e.map((e=>r(e.trim()))),l=t.map((e=>r(e.trim()))),h=new GM(a,e),d=new GM(l,t),c=(()=>h.length+d.length<1700?this.dynamicProgrammingDiffing.compute(h,d,n,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(h,d))();let u=c.diffs,g=c.hitTimeout;u=qM(h,d,u),u=function(e,t,i){let n=i;if(0===n.length)return n;let s,o=0;do{s=!1;const r=[n[0]];for(let a=1;a5||i.seq1Range.length+i.seq2Range.length>5)}d(h,l)?(s=!0,r[r.length-1]=r[r.length-1].join(l)):r.push(l)}n=r}while(o++<10&&s);return n}(h,0,u);const p=[],m=i=>{if(s)for(let o=0;oC.seq1Range.start-f==C.seq2Range.start-_));m(C.seq1Range.start-f),f=C.seq1Range.endExclusive,_=C.seq2Range.endExclusive;const i=this.refineDiff(e,t,C,n,s);i.hitTimeout&&(g=!0);for(const e of i.mappings)p.push(e)}m(e.length-f);const v=XM(p,e,t);let b=[];return i.computeMoves&&(b=this.computeMoves(v,e,t,a,l,n,s)),Hl((()=>{function i(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const i=t[e.lineNumber-1];return!(e.column<1||e.column>i.length+1)}function n(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const s of v){if(!s.innerChanges)return!1;for(const n of s.innerChanges){if(!(i(n.modifiedRange.getStartPosition(),t)&&i(n.modifiedRange.getEndPosition(),t)&&i(n.originalRange.getStartPosition(),e)&&i(n.originalRange.getEndPosition(),e)))return!1}if(!n(s.modified,t)||!n(s.original,e))return!1}return!0})),new cM(v,b,g)}computeMoves(e,t,i,n,s,o,r){return KM(e,t,i,n,s,o).map((e=>{const n=XM(this.refineDiff(t,i,new xM(e.original.toOffsetRange(),e.modified.toOffsetRange()),o,r).mappings,t,i,!0);return new uM(e,n)}))}refineDiff(e,t,i,n,s){const o=new WM(e,i.seq1Range,s),r=new WM(t,i.seq2Range,s),a=o.length+r.length<500?this.dynamicProgrammingDiffing.compute(o,r,n):this.myersDiffingAlgorithm.compute(o,r,n);let l=a.diffs;l=qM(o,r,l),l=function(e,t,i){const n=[];let s;function o(){if(!s)return;const e=s.s1Range.length-s.deleted;s.s2Range.length,s.added,Math.max(s.deleted,s.added)+(s.count-1)>e&&n.push(new xM(s.s1Range,s.s2Range)),s=void 0}for(const r of i){function a(e,t){var i,n,a,l;if(!s||!s.s1Range.containsRange(e)||!s.s2Range.containsRange(t))if(!s||s.s1Range.endExclusive0||t.length>0;){const n=e[0],s=t[0];let o;o=n&&(!s||n.seq1Range.start0&&i[i.length-1].seq1Range.endExclusive>=o.seq1Range.start?i[i.length-1]=i[i.length-1].join(o):i.push(o)}return i}(i,n)}(o,r,l),l=function(e,t,i){const n=[];for(const s of i){const e=n[n.length-1];e&&(s.seq1Range.start-e.seq1Range.endExclusive<=2||s.seq2Range.start-e.seq2Range.endExclusive<=2)?n[n.length-1]=new xM(e.seq1Range.join(s.seq1Range),e.seq2Range.join(s.seq2Range)):n.push(s)}return n}(0,0,l),l=function(e,t,i){let n=i;if(0===n.length)return n;let s,o=0;do{s=!1;const a=[n[0]];for(let l=1;l5||s.length>500)return!1;const o=e.getText(s).trim();if(o.length>20||o.split(/\r\n|\r|\n/).length>1)return!1;const r=e.countLinesIn(i.seq1Range),a=i.seq1Range.length,l=t.countLinesIn(i.seq2Range),c=i.seq2Range.length,u=e.countLinesIn(n.seq1Range),g=n.seq1Range.length,p=t.countLinesIn(n.seq2Range),m=n.seq2Range.length;function f(e){return Math.min(e,130)}return Math.pow(Math.pow(f(40*r+a),1.5)+Math.pow(f(40*l+c),1.5),1.5)+Math.pow(Math.pow(f(40*u+g),1.5)+Math.pow(f(40*p+m),1.5),1.5)>1.3*Math.pow(Math.pow(130,1.5),1.5)}c(d,h)?(s=!0,a[a.length-1]=a[a.length-1].join(h)):a.push(h)}n=a}while(o++<10&&s);const r=[];return function(e,t){for(let i=0;i{let s=i;function o(e){return e.length>0&&e.trim().length<=3&&i.seq1Range.length+i.seq2Range.length>100}const a=e.extendToFullLines(i.seq1Range),l=e.getText(new dc(a.start,i.seq1Range.start));o(l)&&(s=s.deltaStart(-l.length));const h=e.getText(new dc(i.seq1Range.endExclusive,a.endExclusive));o(h)&&(s=s.deltaEnd(h.length));const d=xM.fromOffsetPairs(t?t.getEndExclusives():NM.zero,n?n.getStarts():NM.max),c=s.intersect(d);r.push(c)})),r}(o,r,l);return{mappings:l.map((e=>new mM(o.translateRange(e.seq1Range),r.translateRange(e.seq2Range)))),hitTimeout:a.hitTimeout}}}function XM(e,t,i,n=!1){const s=[];for(const o of Ad(e.map((e=>function(e,t,i){let n=0,s=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+n<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+n<=e.modifiedRange.endLineNumber&&(s=-1);e.modifiedRange.startColumn-1>=i[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+s&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+s&&(n=1);const o=new bc(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+s),r=new bc(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+s);return new pM(o,r,[e])}(e,t,i))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=o[0],t=o[o.length-1];s.push(new pM(e.original.join(t.original),e.modified.join(t.modified),o.map((e=>e.innerChanges[0]))))}return Hl((()=>!(!n&&s.length>0&&s[0].original.startLineNumber!==s[0].modified.startLineNumber)&&zl(s,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusivenew fM,JM=()=>new YM;function eT(e){const t=[];for(const i of e){const e=Number(i);(e||0===e&&""!==i.replace(/\s/g,""))&&t.push(e)}return t}function tT(e,t,i,n){return{red:e/255,blue:i/255,green:t/255,alpha:n}}function iT(e,t){const i=t.index,n=t[0].length;if(!i)return;const s=e.positionAt(i);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:s.lineNumber,endColumn:s.column+n}}function nT(e,t){if(!e)return;const i=rc.Format.CSS.parseHex(t);return i?{range:e,color:tT(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}:void 0}function sT(e,t,i){if(!e||1!==t.length)return;const n=eT(t[0].values());return{range:e,color:tT(n[0],n[1],n[2],i?n[3]:1)}}function oT(e,t,i){if(!e||1!==t.length)return;const n=eT(t[0].values()),s=new rc(new sc(n[0],n[1]/100,n[2]/100,i?n[3]:1));return{range:e,color:tT(s.rgba.r,s.rgba.g,s.rgba.b,s.rgba.a)}}function rT(e,t){return"string"==typeof e?[...e.matchAll(t)]:e.findMatches(t)}function aT(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],i=rT(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(i.length>0)for(const n of i){const i=n.filter((e=>void 0!==e)),s=i[1],o=i[2];if(!o)continue;let r;if("rgb"===s){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=sT(iT(e,n),rT(o,t),!1)}else if("rgba"===s){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=sT(iT(e,n),rT(o,t),!0)}else if("hsl"===s){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=oT(iT(e,n),rT(o,t),!1)}else if("hsla"===s){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=oT(iT(e,n),rT(o,t),!0)}else"#"===s&&(r=nT(iT(e,n),s+o));r&&t.push(r)}return t}(e):[]}var lT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class hT extends pI{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;ithis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class dT{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new hT(an.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,t,i){return lT(this,void 0,void 0,(function*(){const n=this._getModel(e);return n?lM.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}))}computeDiff(e,t,i,n){return lT(this,void 0,void 0,(function*(){const s=this._getModel(e),o=this._getModel(t);return s&&o?dT.computeDiff(s,o,i,n):null}))}static computeDiff(e,t,i,n){const s="advanced"===n?JM():QM(),o=e.getLinesContent(),r=t.getLinesContent(),a=s.computeDiff(o,r,i);function l(e){return e.map((e=>{var t;return[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,null===(t=e.innerChanges)||void 0===t?void 0:t.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]}))}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)]))}}static _modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++){if(e.getLineContent(n)!==t.getLineContent(n))return!1}return!0}computeMoreMinimalEdits(e,t,i){return lT(this,void 0,void 0,(function*(){const n=this._getModel(e);if(!n)return t;const s=[];let o;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return Mh.compareRangesUsingStarts(e.range,t.range);return(e.range?0:1)-(t.range?0:1)}));let r=0;for(let e=1;edT._diffLimit){s.push({range:e,text:a});continue}const r=rI(t,a,i),h=n.offsetAt(Mh.lift(e).getStartPosition());for(const e of r){const t=n.positionAt(h+e.originalStart),i=n.positionAt(h+e.originalStart+e.originalLength),o={text:a.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}};n.getValueInRange(o.range)!==o.text&&s.push(o)}}return"number"==typeof o&&s.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}))}computeLinks(e){return lT(this,void 0,void 0,(function*(){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?bI.computeLinks(e):[]}(t):null}))}computeDefaultDocumentColors(e){return lT(this,void 0,void 0,(function*(){const t=this._getModel(e);return t?aT(t):null}))}textualSuggest(e,t,i,n){return lT(this,void 0,void 0,(function*(){const s=new F,o=new RegExp(i,n),r=new Set;e:for(const i of e){const e=this._getModel(i);if(e)for(const i of e.words(o))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>dT._suggestionsLimit))break e}return{words:Array.from(r),duration:s.elapsed()}}))}computeWordRanges(e,t,i,n){return lT(this,void 0,void 0,(function*(){const s=this._getModel(e);if(!s)return Object.create(null);const o=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;efunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const s of e)n[s]=i(s);return n}(i,((e,t)=>this._host.fhr(e,t))),s={host:n,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve(_d(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(Dre){return Promise.reject(Dre)}}}dT._diffLimit=1e5,dT._suggestionsLimit=1e4,"function"==typeof importScripts&&(globalThis.monaco=aM());const cT=Pa("textResourceConfigurationService"),uT=Pa("textResourcePropertiesService");var gT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},pT=function(e,t){return function(i,n){t(i,n,e)}},mT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const fT=3e5;function _T(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let vT=class extends E{constructor(e,t,i,n,s){super(),this._modelService=e,this._workerManager=this._register(new CT(this._modelService,n)),this._logService=i,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>_T(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(s.completionProvider.register("*",new bT(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return _T(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then((n=>n.computedUnicodeHighlights(e,t,i)))}computeDiff(e,t,i,n){return mT(this,void 0,void 0,(function*(){const s=yield this._workerManager.withWorker().then((s=>s.computeDiff(e,t,i,n)));if(!s)return null;return{identical:s.identical,quitEarly:s.quitEarly,changes:o(s.changes),moves:s.moves.map((e=>new uM(new gM(new bc(e[0],e[1]),new bc(e[2],e[3])),o(e[4]))))};function o(e){return e.map((e=>{var t;return new pM(new bc(e[0],e[1]),new bc(e[2],e[3]),null===(t=e[4])||void 0===t?void 0:t.map((e=>new mM(new Mh(e[0],e[1],e[2],e[3]),new Mh(e[4],e[5],e[6],e[7])))))}))}}))}computeMoreMinimalEdits(e,t,i=!1){if(Wd(t)){if(!_T(this._modelService,e))return Promise.resolve(t);const n=F.create(),s=this._workerManager.withWorker().then((n=>n.computeMoreMinimalEdits(e,t,i)));return s.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed()))),Promise.race([s,Jh(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return _T(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return _T(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};vT=gT([pT(0,Wa),pT(1,cT),pT(2,ah),pT(3,Xu),pT(4,iL)],vT);class bT{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return mT(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)_T(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())_T(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const s=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),o=e.getWordAtPosition(t),r=o?new Mh(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):Mh.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),h=yield l.textualSuggest(n,null==o?void 0:o.word,s);return h?{duration:h.duration,suggestions:h.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}))}}class CT extends E{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime();this._register(new nd).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;(new Date).getTime()-this._lastWorkerUsedTime>fT&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new LT(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class wT extends E{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const e=new nd;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(const e in this._syncedModels)k(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime){e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i)}for(const i of t)this._stopModelSync(i)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new N;s.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),s.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),s.add(x((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],k(t)}}class yT{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class ST{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class LT extends E{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new nI(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new XE(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new ST(this)))}catch(e){KE(e),this._worker=new yT(new dT(new ST(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(KE(e),this._worker=new yT(new dT(new ST(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new wT(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return mT(this,void 0,void 0,(function*(){return this._disposed?Promise.reject(function(){const e=new Error(h);return e.name=e.message,e}()):this._getProxy().then((i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i)))}))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeUnicodeHighlights(e.toString(),t,i)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then((s=>s.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeMoreMinimalEdits(e.toString(),t,i)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then((t=>t.computeDefaultDocumentColors(e.toString())))}textualSuggest(e,t,i){return mT(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),s=i.source,o=i.flags;return n.textualSuggest(e.map((e=>e.toString())),t,s,o)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),o=s.source,r=s.flags;return i.computeWordRanges(e.toString(),t,o,r)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{const s=this._modelService.getModel(e);if(!s)return null;const o=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),r=o.source,a=o.flags;return n.navigateValueSet(e.toString(),t,i,r,a)}))}dispose(){super.dispose(),this._disposed=!0}}const kT=[];function DT(e){kT.push(e)}function xT(){return kT.slice(0)}var NT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ET=function(e,t){return function(i,n){t(i,n,e)}},IT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class MT{constructor(e,t){this._editorWorkerClient=new LT(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return IT(this,void 0,void 0,(function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}))}provideColorPresentations(e,t,i){const n=t.range,s=t.color,o=s.alpha,r=new rc(new nc(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),o)),a=o?rc.Format.CSS.formatRGB(r):rc.Format.CSS.formatRGBA(r),l=o?rc.Format.CSS.formatHSL(r):rc.Format.CSS.formatHSLA(r),h=o?rc.Format.CSS.formatHex(r):rc.Format.CSS.formatHexA(r),d=[];return d.push({label:a,textEdit:{range:n,text:a}}),d.push({label:l,textEdit:{range:n,text:l}}),d.push({label:h,textEdit:{range:n,text:h}}),d}}let TT=class extends E{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new MT(e,t)))}};TT=NT([ET(0,Wa),ET(1,Xu),ET(2,iL)],TT),DT(TT);var RT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function AT(e,t,i,n=!0){return RT(this,void 0,void 0,(function*(){return WT(new PT,e,t,i,n)}))}function OT(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}class PT{constructor(){}compute(e,t,i,n){return RT(this,void 0,void 0,(function*(){const s=yield e.provideDocumentColors(t,i);if(Array.isArray(s))for(const t of s)n.push({colorInfo:t,provider:e});return Array.isArray(s)}))}}class FT{constructor(){}compute(e,t,i,n){return RT(this,void 0,void 0,(function*(){const s=yield e.provideDocumentColors(t,i);if(Array.isArray(s))for(const e of s)n.push({range:e.range,color:[e.color.red,e.color.green,e.color.blue,e.color.alpha]});return Array.isArray(s)}))}}class BT{constructor(e){this.colorInfo=e}compute(e,t,i,n){return RT(this,void 0,void 0,(function*(){const i=yield e.provideColorPresentations(t,this.colorInfo,Hh.None);return Array.isArray(i)&&n.push(...i),Array.isArray(i)}))}}function WT(e,t,i,n,s){return RT(this,void 0,void 0,(function*(){let o,r=!1;const l=[],h=t.ordered(i);for(let t=h.length-1;t>=0;t--){const s=h[t];if(s instanceof MT)o=s;else try{(yield e.compute(s,i,n,l))&&(r=!0)}catch(Dre){a(Dre)}}return r?l:o&&s?(yield e.compute(o,i,n,l),l):[]}))}function VT(e,t){const{colorProvider:i}=e.get(iL),n=e.get(Wa).getModel(t);if(!n)throw u();return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:e.get(uu).getValue("editor.defaultColorDecorators",{resource:t})}}Za.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof an))throw u();const{model:n,colorProviderRegistry:s,isDefaultColorDecoratorsEnabled:o}=VT(e,i);return WT(new FT,s,n,Hh.None,o)})),Za.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,n]=t,{uri:s,range:o}=n;if(!(s instanceof an&&Array.isArray(i)&&4===i.length&&Mh.isIRange(o)))throw u();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=VT(e,s),[h,d,c,g]=i;return WT(new BT({range:o,color:{red:h,green:d,blue:c,alpha:g}}),a,r,Hh.None,l)}));var HT,zT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},UT=function(e,t){return function(i,n){t(i,n,e)}},KT=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const jT=Object.create({});let qT=HT=class extends E{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new N),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new WE(this._editor),this._decoratorLimitReporter=new $T,this._colorDecorationClassRefs=this._register(new N),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:HT.RECOMPUTE_TIME}),this._register(e.onDidChangeModel((()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()}))),this._register(e.onDidChangeModelLanguage((()=>this.updateColors()))),this._register(i.colorProvider.onDidChange((()=>this.updateColors()))),this._register(e.onDidChangeConfiguration((e=>{const t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const i=t!==this._isColorDecoratorsEnabled||e.hasChanged(21),n=e.hasChanged(145);(i||n)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new id,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}beginCompute(){return KT(this,void 0,void 0,(function*(){this._computePromise=Gh((e=>KT(this,void 0,void 0,(function*(){const t=this._editor.getModel();if(!t)return[];const i=new F(!1),n=yield AT(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n}))));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(Dre){r(Dre)}}))}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:xw.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let s=0;sthis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};qT.ID="editor.contrib.colorDetector",qT.RECOMPUTE_TIME=1e3,qT=HT=zT([UT(1,uu),UT(2,iL),UT(3,CE)],qT);class $T{constructor(){this._onDidChange=new U,this._computed=0,this._limited=!1}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}Lh(qT.ID,qT,1);class GT{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new U,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new U,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new U,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let n=0;n({format:e.format,location:e.location.toString()})))}},e.fromJSONObject=function(e){const t=e=>Pr(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>Pr(e.format)&&Pr(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:an.parse(e.location)})))}}}(YT||(YT={}));const XT=new class{constructor(){this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:ue(0,"The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:ue(0,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${ea.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return s}const o={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=o;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;ea.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const s of n.filter((e=>!!e.description)).sort(e))i.push(`||${s.id}|${ea.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter((e=>!ea.isThemeIcon(e.defaults))).sort(e))i.push(`||${s.id}|`);return i.join("\n")}};function QT(e,t,i,n){return XT.registerIcon(e,t,i,n)}function JT(){return XT}Ul.add("base.contributions.icons",XT),function(){const e=Xr();for(const t in e){const i="\\"+e[t].toString(16);XT.registerIcon(t,{fontCharacter:i})}}();const eR="vscode://schemas/icons",tR=Ul.as(Su);tR.registerSchema(eR,XT.getIconSchema());const iR=new sd((()=>tR.notifySchemaChanged(eR)),200);XT.onDidChange((()=>{iR.isScheduled()||iR.schedule()}));const nR=QT("widget-close",Qr.close,ue(0,"Icon for the close action in widgets.")),sR=(QT("goto-previous-location",Qr.arrowUp,ue(0,"Icon for goto previous editor location.")),QT("goto-next-location",Qr.arrowDown,ue(0,"Icon for goto next editor location.")),ea.modify(Qr.sync,"spin"),ea.modify(Qr.loading,"spin"),fs);class oR extends E{constructor(e,t,i,n=!1){super(),this.model=t,this.showingStandaloneColorPicker=n,this._closeButton=null,this._domNode=sR(".colorpicker-header"),ds(e,this._domNode),this._pickedColorNode=ds(this._domNode,sR(".picked-color")),ds(this._pickedColorNode,sR("span.codicon.codicon-color-mode")),this._pickedColorPresentation=ds(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const s=ue(0,"Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",s),this._originalColorNode=ds(this._domNode,sR(".original-color")),this._originalColorNode.style.backgroundColor=rc.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(jm)||rc.white,this._register(i.onDidColorThemeChange((e=>{this.backgroundColor=e.getColor(jm)||rc.white}))),this._register(En(this._pickedColorNode,os.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(En(this._originalColorNode,os.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=rc.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new rR(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=rc.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class rR extends E{constructor(e){super(),this._onClicked=this._register(new U),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),ds(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),ds(this._button,t);ds(t,sR(".button"+ea.asCSSSelector(QT("color-picker-close",Qr.close,ue(0,"Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class aR extends E{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=sR(".colorpicker-body"),ds(e,this._domNode),this._saturationBox=new lR(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new dR(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new cR(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new uR(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new rc(new oc(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new rc(new oc(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new rc(new oc(360===i?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class lR extends E{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new U,this.onColorFlushed=this._onColorFlushed.event,this._domNode=sR(".saturation-wrap"),ds(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",ds(this._domNode,this._canvas),this.selection=sR(".saturation-selection"),ds(this._domNode,this.selection),this.layout(),this._register(En(this._domNode,os.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;this.monitor=this._register(new gD);const t=Hn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=En(e.target.ownerDocument,os.POINTER_UP,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new rc(new oc(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=rc.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class hR extends E{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new U,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=ds(e,sR(".standalone-strip")),this.overlay=ds(this.domNode,sR(".standalone-overlay"))):(this.domNode=ds(e,sR(".strip")),this.overlay=ds(this.domNode,sR(".overlay"))),this.slider=ds(this.domNode,sR(".slider")),this.slider.style.top="0px",this._register(En(this.domNode,os.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._register(new gD),i=Hn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=En(e.target.ownerDocument,os.POINTER_UP,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class dR extends hR{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,s=new rc(new nc(t,i,n,1)),o=new rc(new nc(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${o} 100%)`}getValue(e){return e.hsva.a}}class cR extends hR{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class uR extends E{constructor(e){super(),this._onClicked=this._register(new U),this.onClicked=this._onClicked.event,this._button=ds(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=e=>{this._onClicked.fire()}}get button(){return this._button}}class gR extends pD{constructor(e,t,i,n,s=!1){super(),this.model=t,this.pixelRatio=i,this._register(te.onDidChange((()=>this.layout())));const o=sR(".colorpicker-widget");e.appendChild(o),this.header=this._register(new oR(o,this.model,n,s)),this.body=this._register(new aR(o,this.model,this.pixelRatio,s))}layout(){this.body.layout()}}var pR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},mR=function(e,t){return function(i,n){t(i,n,e)}},fR=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class _R{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let vR=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return hd.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return fR(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=qT.get(this._editor);if(!e)return[];for(const i of t){if(!e.isColorDecoration(i))continue;const t=e.getColorData(i.range.getStartPosition());if(t){return[yield wR(this,this._editor.getModel(),t.colorInfo,t.provider)]}}return[]}))}renderHoverParts(e,t){return yR(this,this._editor,this._themeService,t,e)}};vR=pR([mR(1,R_)],vR);class bR{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let CR=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,i){return fR(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return null;if(!qT.get(this._editor))return null;const n=yield AT(i,this._editor.getModel(),Hh.None);let s=null,o=null;for(const t of n){const i=t.colorInfo;Mh.containsRange(i.range,e.range)&&(s=i,o=t.provider)}const r=null!=s?s:e,a=null!=o?o:t,l=!!s;return{colorHover:yield wR(this,this._editor.getModel(),r,a),foundInEditor:l}}))}updateEditorModel(e){return fR(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=e.model;let i=new Mh(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield LR(this._editor.getModel(),t,this._color,i,e),i=SR(this._editor,i,t))}))}renderHoverParts(e,t){return yR(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};function wR(e,t,i,n){return fR(this,void 0,void 0,(function*(){const s=t.getValueInRange(i.range),{red:o,green:r,blue:a,alpha:l}=i.color,h=new nc(Math.round(255*o),Math.round(255*r),Math.round(255*a),l),d=new rc(h),c=yield OT(t,i,n,Hh.None),u=new GT(d,[],0);return u.colorPresentations=c||[],u.guessColorPresentation(d,s),e instanceof vR?new _R(e,Mh.lift(i.range),u,n):new bR(e,Mh.lift(i.range),u,n)}))}function yR(e,t,i,n,s){if(0===n.length||!t.hasModel())return E.None;if(s.setMinimumDimensions){const e=t.getOption(66)+8;s.setMinimumDimensions(new Wn(302,e))}const o=new N,r=n[0],a=t.getModel(),l=r.model,h=o.add(new gR(s.fragment,l,t.getOption(141),i,e instanceof CR));s.setColorPicker(h);let d=!1,c=new Mh(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);if(e instanceof CR){const t=n[0].model.color;e.color=t,LR(a,l,t,c,r),o.add(l.onColorFlushed((t=>{e.color=t})))}else o.add(l.onColorFlushed((e=>fR(this,void 0,void 0,(function*(){yield LR(a,l,e,c,r),d=!0,c=SR(t,c,l,s)})))));return o.add(l.onDidChangeColor((e=>{LR(a,l,e,c,r)}))),o.add(t.onDidChangeModelContent((e=>{d?d=!1:(s.hide(),t.focus())}))),o}function SR(e,t,i,n){let s,o;if(i.presentation.textEdit){s=[i.presentation.textEdit],o=new Mh(i.presentation.textEdit.range.startLineNumber,i.presentation.textEdit.range.startColumn,i.presentation.textEdit.range.endLineNumber,i.presentation.textEdit.range.endColumn);const t=e.getModel()._setTrackedRange(null,o,3);e.pushUndoStop(),e.executeEdits("colorpicker",s),o=e.getModel()._getTrackedRange(t)||o}else s=[{range:t,text:i.presentation.label,forceMoveMarkers:!1}],o=t.setEndPosition(t.endLineNumber,t.startColumn+i.presentation.label.length),e.pushUndoStop(),e.executeEdits("colorpicker",s);return i.presentation.additionalTextEdits&&(s=[...i.presentation.additionalTextEdits],e.executeEdits("colorpicker",s),n&&n.hide()),e.pushUndoStop(),o}function LR(e,t,i,n,s){return fR(this,void 0,void 0,(function*(){const o=yield OT(e,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},s.provider,Hh.None);t.colorPresentations=o||[]}))}function kR(e,t){return!!e[t]}CR=pR([mR(1,R_)],CR);class DR{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=kR(e.event,t.triggerModifier),this.hasSideBySideModifier=kR(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class xR{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=kR(e,t.triggerModifier)}}class NR{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function ER(e){return"altKey"===e?Pe?new NR(57,"metaKey",6,"altKey"):new NR(5,"ctrlKey",6,"altKey"):Pe?new NR(6,"altKey",57,"metaKey"):new NR(6,"altKey",5,"ctrlKey")}class IR extends E{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new U),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new U),this.onExecute=this._onExecute.event,this._onCancel=this._register(new U),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=null!==(i=null==t?void 0:t.extractLineNumberFromMouseEvent)&&void 0!==i?i:e=>e.target.position?e.target.position.lineNumber:0,this._opts=ER(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(77)){const e=ER(this._editor.getOption(77));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new DR(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new DR(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new DR(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new xR(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new xR(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}const MR=Pa("markerDecorationsService");var TR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},RR=function(e,t){return function(i,n){t(i,n,e)}};let AR=class{constructor(e,t){}dispose(){}};AR.ID="editor.contrib.markerDecorations",AR=TR([RR(1,MR)],AR),Lh(AR.ID,AR,0);class OR extends E{constructor(e,t){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const s=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{requestAnimationFrame((()=>{n=!1,s()}))}};this._resizeObserver=new ResizeObserver((t=>{e=t&&t[0]&&t[0].contentRect?t[0].contentRect:null,i=!0,s()})),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}class PR{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class FR{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");Bk(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");Bk(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");Bk(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const s=[];for(const o of this._requests){let e;0===o.type&&(e=t),2===o.type&&(e=i),1===o.type&&(e=n),e.appendChild(document.createElement("br"));const r=document.createElement("span");FR._render(r,o),e.appendChild(r),s.push(r)}this._container=e,this._testElements=s}static _render(e,t){if(" "===t.chr){let t="\xa0";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;ethis._values[e]))}}const UR=new class extends E{constructor(){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._cache=new zR,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new zR,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=window.setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new HR({pixelRatio:te.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const s=new PR(e,t);return i.push(s),null==n||n.push(s),s}_actualReadFontInfo(e){const t=[],i=[],n=this._createRequest("n",0,t,i),s=this._createRequest("\uff4d",0,t,null),o=this._createRequest(" ",0,t,i),r=this._createRequest("0",0,t,i),a=this._createRequest("1",0,t,i),l=this._createRequest("2",0,t,i),h=this._createRequest("3",0,t,i),d=this._createRequest("4",0,t,i),c=this._createRequest("5",0,t,i),u=this._createRequest("6",0,t,i),g=this._createRequest("7",0,t,i),p=this._createRequest("8",0,t,i),m=this._createRequest("9",0,t,i),f=this._createRequest("\u2192",0,t,i),_=this._createRequest("\uffeb",0,t,null),v=this._createRequest("\xb7",0,t,i),b=this._createRequest(String.fromCharCode(11825),0,t,null),C="|/-_ilm%";for(let k=0,D=8;k.001){y=!1;break}}let L=!0;return y&&_.width!==S&&(L=!1),_.width>f.width&&(L=!1),new HR({pixelRatio:te.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:y,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:L,spaceWidth:o.width,middotWidth:v.width,wsmiddotWidth:b.width,maxDigitWidth:w},!0)}};class KR{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=KR._read(e,this.key);this.migrate(t,(t=>KR._read(e,t)),((t,i)=>KR._write(e,t,i)))}static _read(e,t){if(void 0===e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const s=t.substring(0,n);return e[s]=e[s]||{},void this._write(e[s],t.substring(n+1),i)}e[t]=i}}function jR(e,t){KR.items.push(new KR(e,t))}function qR(e,t){jR(e,((i,n,s)=>{if(void 0!==i)for(const[o,r]of t)if(i===o)return void s(e,r)}))}KR.items=[],qR("wordWrap",[[!0,"on"],[!1,"off"]]),qR("lineNumbers",[[!0,"on"],[!1,"off"]]),qR("cursorBlinking",[["visible","solid"]]),qR("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),qR("renderLineHighlight",[[!0,"line"],[!1,"none"]]),qR("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),qR("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),qR("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),qR("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),qR("autoIndent",[[!1,"advanced"],[!0,"full"]]),qR("matchBrackets",[[!0,"always"],[!1,"never"]]),qR("renderFinalNewline",[[!0,"on"],[!1,"off"]]),qR("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),jR("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))})),jR("renderIndentGuides",((e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))})),jR("highlightActiveIndentGuide",((e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const $R={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};jR("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"==typeof e){for(const n of Object.entries($R)){!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1)}i("suggest.filteredTypes",void 0)}})),jR("quickSuggestions",((e,t,i)=>{if("boolean"==typeof e){const t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}})),jR("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),jR("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))}));const GR=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new U,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}},ZR=Pa("accessibilityService"),YR=new Tl("accessibilityModeEnabled",!1);var XR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},QR=function(e,t){return function(i,n){t(i,n,e)}};let JR=class extends E{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new U),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new cS,this.isSimpleWidget=e,this._containerObserver=this._register(new OR(i,t.dimension)),this._rawOptions=sA(t),this._validatedOptions=nA.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(BR.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(GR.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(UR.onDidChange((()=>this._recomputeOptions()))),this._register(te.onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=nA.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=VR.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:GR.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return nA.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:eA(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:se||ne,pixelRatio:te.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return UR.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=sA(e);nA.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=nA.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};function eA(){let e="";return re||ae||(e+="no-user-select "),re&&(e+="no-minimap-shadow ",e+="enable-user-select "),Pe&&(e+="mac "),e}JR=XR([QR(3,ZR)],JR);class tA{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class iA{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class nA{static validateOptions(e){const t=new tA;for(const i of KS){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new iA;for(const n of KS)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&Id(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!nA._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of KS){const o=!nA._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=o,o&&(n=!0)}return n?new dS(i):null}static applyUpdate(e,t){let i=!1;for(const n of KS)if(t.hasOwnProperty(n.name)){const s=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=s.newValue,i=i||s.didChange}return i}}function sA(e){const t=cd(e);return function(e){KR.items.forEach((t=>t.apply(e)))}(t),t}class oA extends E{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=o.left?n.width=Math.max(n.width,o.left+o.width-n.left):(t[i++]=n,n=o)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let s=0,o=e.length;sr)return null;if((t=Math.min(r,Math.max(0,t)))===(n=Math.min(r,Math.max(0,n)))&&i===s&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return o.markDidDomLayout(),this._createHorizontalRangesFromClientRects(i,o.clientRectDeltaLeft,o.clientRectScale)}t!==n&&n>0&&0===s&&(n--,s=1073741824);let a=e.children[t].firstChild,l=e.children[n].firstChild;if(a&&l||(!a&&0===i&&t>0&&(a=e.children[t-1].firstChild,i=1073741824),!l&&0===s&&n>0&&(l=e.children[n-1].firstChild,s=1073741824)),!a||!l)return null;i=Math.min(a.textContent.length,Math.max(0,i)),s=Math.min(l.textContent.length,Math.max(0,s));const h=this._readClientRects(a,i,l,s,o.endNode);return o.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,o.clientRectDeltaLeft,o.clientRectScale)}}class fA{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n=s||(r[a++]=new fA(Math.max(1,l.startColumn-n+1),Math.min(o+1,l.endColumn-n+1),l.className,l.type));return r}static filter(e,t,i,n){if(0===e.length)return[];const s=[];let o=0;for(let r=0,a=e.length;rt)continue;if(l.isEmpty()&&(0===a.type||3===a.type))continue;const h=l.startLineNumber===t?l.startColumn:i,d=l.endLineNumber===t?l.endColumn:n;s[o++]=new fA(h,d,a.inlineClassName,a.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=fA._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class bA{static normalize(e,t){if(0===t.length)return[];const i=[],n=new vA;let s=0;for(let o=0,r=t.length;o1){Co(e.charCodeAt(a-2))&&a--}if(l>1){Co(e.charCodeAt(l-2))&&l--}const c=a-1,u=l-2;s=n.consumeLowerThan(c,s,i),0===n.count&&(s=c),n.insert(u,h,d)}return n.consumeLowerThan(1073741824,s,i),i}}class CA{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class wA{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class yA{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p,m,f,_,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=r,this.lineTokens=a,this.lineDecorations=l.sort(fA.compare),this.tabSize=h,this.startVisibleColumn=d,this.spaceWidth=c,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=f,this.fontLigatures=_,this.selectionsOnLine=v&&v.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const s=(t<<16|i)>>>0;this._data[e-1]=s,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=LA.getPartIndex(t),n=LA.getCharIndex(t);return new SA(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i)>>>0;let s=0,o=this.length-1;for(;s+1>>1,t=this._data[e];if(t===n)return e;t>n?o=e:s=e}if(s===o)return s;const r=this._data[s],a=this._data[o];if(r===n)return s;if(a===n)return o;const l=LA.getPartIndex(r),h=LA.getCharIndex(r);let d;d=l!==LA.getPartIndex(a)?t:LA.getCharIndex(a);return i-h<=d-i?s:o}}class kA{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function DA(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("");let i=0,n=0,s=0;for(const r of e.lineDecorations)1!==r.type&&2!==r.type||(t.appendString(''),1===r.type&&(s|=1,i++),2===r.type&&(s|=2,n++));t.appendString("");const o=new LA(1,i+n);return o.setColumnInfo(1,i,0,0),new kA(o,!1,s)}return t.appendString(""),new kA(new LA(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,n=e.canUseHalfwidthRightwardsArrow,s=e.containsForeignElements,o=e.lineContent,r=e.len,a=e.isOverflowing,l=e.overflowingCharCount,h=e.parts,d=e.fauxIndentLength,c=e.tabSize,u=e.startVisibleColumn,g=e.containsRTL,p=e.spaceWidth,m=e.renderSpaceCharCode,f=e.renderWhitespace,_=e.renderControlCharacters,v=new LA(r+1,h.length);let b=!1,C=0,w=u,y=0,S=0,L=0;g?t.appendString(''):t.appendString("");for(let k=0,D=h.length;k=d&&(i+=n)}}for(D&&(t.appendString(' style="width:'),t.appendString(String(p*e)),t.appendString('px"')),t.appendASCIICharCode(62);C1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=i;e++)t.appendCharCode(160)}else e=2,i=1,t.appendCharCode(m),t.appendCharCode(8204);y+=e,S+=i,C>=d&&(w+=i)}}else for(t.appendASCIICharCode(62);C=d&&(w+=n)}x?L++:L=0,C>=r&&!b&&e.isPseudoAfter()&&(b=!0,v.setColumnInfo(C+1,k,y,S)),t.appendString("")}b||v.setColumnInfo(r+1,h.length-1,y,S);a&&(t.appendString(''),t.appendString(ue(0,"Show more ({0})",function(e){if(e<1024)return ue(0,"{0} chars",e);if(e<1048576)return`${(e/1024).toFixed(1)} KB`;return`${(e/1024/1024).toFixed(1)} MB`}(l))),t.appendString(""));return t.appendString(""),new kA(v,g,s)}(function(e){const t=e.lineContent;let i,n,s;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(o[r++]=new CA(n,"",0,!1));let a=n;for(let l=0,h=i.getCount();l=s){const i=!!t&&Eo(e.substring(a,s));o[r++]=new CA(s,d,0,i);break}const c=!!t&&Eo(e.substring(a,h));o[r++]=new CA(h,d,0,c),a=h}return o}(t,e.containsRTL,e.lineTokens,e.fauxIndentLength,s);e.renderControlCharacters&&!e.isBasicASCII&&(o=function(e,t){const i=[];let n=new CA(0,"",0,!1),s=0;for(const o of t){const t=o.endIndex;for(;sn.endIndex&&(n=new CA(s,o.type,o.metadata,o.containsRTL),i.push(n)),n=new CA(s+1,"mtkcontrol",o.metadata,!1),i.push(n))}s>n.endIndex&&(n=new CA(t,o.type,o.metadata,o.containsRTL),i.push(n))}return i}(t,o));(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(o=function(e,t,i,n){const s=e.continuesWithWrappedLine,o=e.fauxIndentLength,r=e.tabSize,a=e.startVisibleColumn,l=e.useMonospaceOptimizations,h=e.selectionsOnLine,d=1===e.renderWhitespace,c=3===e.renderWhitespace,u=e.renderSpaceWidth!==e.spaceWidth,g=[];let p=0,m=0,f=n[m].type,_=n[m].containsRTL,v=n[m].endIndex;const b=n.length;let C,w=!1,y=oo(t);-1===y?(w=!0,y=i,C=i):C=ao(t);let S=!1,L=0,k=h&&h[L],D=a%r;for(let N=o;N=k.endOffset&&(L++,k=h&&h[L]),NC)s=!0;else if(9===e)s=!0;else if(32===e)if(d)if(S)s=!0;else{const e=N+1N),s&&c&&(s=w||N>C),s&&_&&N>=y&&N<=C&&(s=!1),S){if(!s||!l&&D>=r){if(u){for(let e=(p>0?g[p-1].endIndex:o)+1;e<=N;e++)g[p++]=new CA(e,"mtkw",1,!1)}else g[p++]=new CA(N,"mtkw",1,!1);D%=r}}else(N===v||s&&N>o)&&(g[p++]=new CA(N,f,0,_),D%=r);for(9===e?D=r:Ao(e)?D+=2:D++,S=s;N===v&&(m++,m0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(x=!0)}else x=!0;if(x)if(u){for(let e=(p>0?g[p-1].endIndex:o)+1;e<=i;e++)g[p++]=new CA(e,"mtkw",1,!1)}else g[p++]=new CA(i,"mtkw",1,!1);else g[p++]=new CA(i,f,0,_);return g}(e,t,s,o));let r=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;th&&(h=e.startOffset,a[l++]=new CA(h,n,d,u)),!(e.endOffset+1<=t)){h=t,a[l++]=new CA(h,n+" "+e.className,d|e.metadata,u);break}h=e.endOffset+1,a[l++]=new CA(h,n+" "+e.className,d|e.metadata,u),r++}t>h&&(h=t,a[l++]=new CA(h,n,d,u))}const d=i[i.length-1].endIndex;if(r=50&&(s[o++]=new CA(h+1,t,r,l),d=h+1,h=-1);d!==a&&(s[o++]=new CA(a,t,r,l))}else s[o++]=i;n=a}else for(let r=0,a=t.length;r50){const t=e.type,r=e.metadata,l=e.containsRTL,h=Math.ceil(a/50);for(let e=1;e=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e)}function MA(e){return e.toString(16).toUpperCase().padStart(4,"0")}const TA=!!Be||!(Fe||ne||re);let RA=!0;class AA{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50),s=i.get(38);this.renderWhitespace="off"===s?i.get(98):"none",this.renderControlCharacters=i.get(93),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(66),this.stopRenderingLineAfter=i.get(116),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class OA{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Fk(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!M_(this._options.themeType)&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const s=i.getViewLineRenderingData(e),o=this._options,r=fA.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let a=null;if(M_(o.themeType)||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:s.minColumn,n=i.endLineNumber===e?i.endColumn:s.maxColumn;t');const h=DA(l,n);n.appendString("");let d=null;return RA&&TA&&s.isBasicASCII&&o.useMonospaceOptimizations&&0===h.containsForeignElements&&(d=new PA(this._renderedViewLine?this._renderedViewLine.domNode:null,l,h.characterMapping)),d||(d=WA(this._renderedViewLine?this._renderedViewLine.domNode:null,l,h.characterMapping,h.containsRTL,h.containsForeignElements)),this._renderedViewLine=d,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof PA}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof PA?this._renderedViewLine.monospaceAssumptionsAreValid():RA}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof PA&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const s=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==s&&t>s+1&&i>s+1)return new pA(!0,[new uA(this.getWidth(n),0)]);-1!==s&&t>s+1&&(t=s+1),-1!==s&&i>s+1&&(i=s+1);const o=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return o&&o.length>0?new pA(!1,o):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}OA.CLASS_NAME="view-line";class PA{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),RA=!1)}return RA}toSlowRenderedLine(){return WA(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const s=this._getColumnPixelOffset(e,t,n),o=this._getColumnPixelOffset(e,i,n);return[new uA(s,o-s)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,s=300*(n+1)+1;let o=-1;if(this._keyColumnPixelOffsetCache&&(o=this._keyColumnPixelOffsetCache[n],-1===o&&(o=this._actualReadPixelOffset(e,s,i),this._keyColumnPixelOffsetCache[n]=o)),-1===o){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(s),a=this._characterMapping.getHorizontalOffset(t);return o+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),s=mA.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return s&&0!==s.length?s[0].left:-1}getColumnOfNodeOffset(e,t){return zA(this._characterMapping,e,t)}}class FA{constructor(e,t,i,n,s){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=s,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,null==e||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const s=this._readPixelOffset(this.domNode,e,t,n);if(-1===s)return null;const o=this._readPixelOffset(this.domNode,e,i,n);return-1===o?null:[new uA(s,o-s)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,s){if(i===n){const n=this._readPixelOffset(e,t,i,s);return-1===n?null:[new uA(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,s)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(n);const t=this._getReadingTarget(e);return t.firstChild?(n.markDidDomLayout(),t.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){const s=this._pixelOffsetCache[i];if(-1!==s)return s;const o=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=o,o}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=mA.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(n);const s=this._characterMapping.getDomPosition(i),o=mA.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n);if(!o||0===o.length)return-1;const r=o[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new uA(0,this.getWidth(n))];const s=this._characterMapping.getDomPosition(t),o=this._characterMapping.getDomPosition(i);return mA.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,o.partIndex,o.charIndex,n)}getColumnOfNodeOffset(e,t){return zA(this._characterMapping,e,t)}}class BA extends FA{_readVisibleRangesForRange(e,t,i,n,s){const o=super._readVisibleRangesForRange(e,t,i,n,s);if(!o||0===o.length||i===n||1===i&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,s);if(-1!==i){const e=o[o.length-1];e.left=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class ZA{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(143),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(66),this.stickyTabStops=n.get(115),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return ZA.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,s=e.viewModel.getLineCount();let o,r=null,a=null;return i.afterLineNumber!==s&&(a=new Ba(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new Ba(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),o=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,eO._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class XA extends YA{constructor(e,t,i,n,s){super(e,t,i,n),this._ctx=e,s?(this.target=s,this.targetPath=aA.collect(s,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columno.contentLeft+o.width)continue;const i=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(i<=s&&s<=i+o.height)return t.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return GA.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.relativePos.x);const o={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};return s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,o):(s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,o)))}return null}static _hitTestViewLines(e,t,i){if(!GA.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new Ba(1,1),QA);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new Ba(i,n),QA)}if(i){if(GA.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),s=JA(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new Ba(i,1),s)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const s=JA(t.mouseContentHorizontalOffset-n),o=new Ba(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}}return t.fulfillUnknown()}const n=eO._doHitTest(e,t);return 1===n.type?eO.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(GA.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Ba(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(GA.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Ba(i,n))}}return null}static _hitTestScrollbar(e,t){if(GA.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Ba(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(143),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return eO._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;return Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){const o=n.lineNumber,r=n.column,a=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>a){const e=JA(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(o,r);if(!l)return t.fulfillUnknown(n);const h=l.left;if(Math.abs(t.mouseContentHorizontalOffset-h)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});const d=[];if(d.push({offset:l.left,column:r}),r>1){const t=e.visibleRangeForPosition(o,r-1);t&&d.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const c=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=c.clientX&&c.clientX<=u.right;let p=null;for(let m=1;ms)){const i=Math.floor((n+s)/2);let o=t.pos.y+(i-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);const r=new EE(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=Yn(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let s=e.elementFromPoint(t,i);if(null!==s){for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;const e=s.getBoundingClientRect(),i=`${window.getComputedStyle(s,null).getPropertyValue("font-style")} ${window.getComputedStyle(s,null).getPropertyValue("font-variant")} ${window.getComputedStyle(s,null).getPropertyValue("font-weight")} ${window.getComputedStyle(s,null).getPropertyValue("font-size")}/${window.getComputedStyle(s,null).getPropertyValue("line-height")} ${window.getComputedStyle(s,null).getPropertyValue("font-family")}`,o=s.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=o.length;else{const e=tO.getInstance();for(let n=0;nthis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;const n=new PE(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=En(this.viewHelper.viewDomNode.ownerDocument,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new OE(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{s=t}))),this._register(En(this.viewHelper.viewDomNode,os.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,s)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=ND.INSTANCE;let t=0,i=BR.getZoomLevel(),n=!1,s=0;function o(e){return Pe?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(En(this.viewHelper.viewDomNode,os.MOUSE_WHEEL,(r=>{if(this.viewController.emitMouseWheel(r),!this._context.configuration.options.get(75))return;const a=new Et(r);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(o(r)){const e=BR.getZoomLevel(),t=a.deltaY>0?1:-1;BR.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=BR.getZoomLevel(),n=o(r),s=0),t=Date.now(),s+=a.deltaY,n&&(BR.setZoomLevel(i+s/5),a.preventDefault(),a.stopPropagation())}),{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(143)){const e=this._context.configuration.options.get(143).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new IE(e,t).toPageCoordinates(),n=RE(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const s=AE(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,s,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=Yn(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){if(this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive())return;e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(h&&(n||o&&r))d(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(a){const n=i.detail;h&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class nO extends E{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new BE(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new sO(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new rO,this._currentSelection=new Th(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const s=this._context.configuration.options;if(!s.get(90)&&s.get(35)&&!s.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posyt.y+t.height){const o=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=ZA.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return $A.createOutsideEditor(s,e,"below",o)}const l=n.getLineNumberAtVerticalOffset(r);return $A.createOutsideEditor(s,new Ba(l,i.getLineMaxColumn(l)),"below",o)}const o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const n=e.posx-t.x-t.width;return $A.createOutsideEditor(s,new Ba(o,i.getLineMaxColumn(o)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return $A.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new Ba(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class sO extends E{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new oO(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class oO extends E{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=o,this._lastTime=Date.now(),this._animationFrameDisposable=An((()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(66),t=this._context.configuration.options.get(143).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(66),t=this._getScrollSpeed()*(this._tick()/1e3)*e,i="above"===this._position.outsidePosition?-t:t;this._context.viewModel.viewLayout.deltaScrollNow(0,i),this._viewHelper.renderNow();const n=this._context.viewLayout.getLinesViewportData(),s="above"===this._position.outsidePosition?n.startLineNumber:n.endLineNumber;let o;{const e=RE(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(143).horizontalScrollbarHeight,i=new EE(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=AE(this._viewHelper.viewDomNode,e,i);o=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}o.position&&o.position.lineNumber===s||(o="above"===this._position.outsidePosition?$A.createOutsideEditor(this._position.mouseColumn,new Ba(s,1),"above",this._position.outsideDistance):$A.createOutsideEditor(this._position.mouseColumn,new Ba(s,this._context.viewModel.getLineMaxColumn(s)),"below",this._position.outsideDistance)),this._dispatchMouse(o,!0,2),this._animationFrameDisposable=An((()=>this._execute()))}}class rO{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>rO.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}rO.CLEAR_MOUSE_DOWN_COUNT_TIME=400;class aO extends iO{constructor(e,t,i){super(e,t,i),this._register(qL.addTarget(this.viewHelper.linesContentDomNode)),this._register(En(this.viewHelper.linesContentDomNode,KL.Tap,(e=>this.onTap(e)))),this._register(En(this.viewHelper.linesContentDomNode,KL.Change,(e=>this.onChange(e)))),this._register(En(this.viewHelper.linesContentDomNode,KL.Contextmenu,(e=>this._onContextMenu(new OE(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(En(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new FE(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new OE(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===t.type&&null!==t.detail.injectedText})}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class lO extends iO{constructor(e,t,i){super(e,t,i),this._register(qL.addTarget(this.viewHelper.linesContentDomNode)),this._register(En(this.viewHelper.linesContentDomNode,KL.Tap,(e=>this.onTap(e)))),this._register(En(this.viewHelper.linesContentDomNode,KL.Change,(e=>this.onChange(e)))),this._register(En(this.viewHelper.linesContentDomNode,KL.Contextmenu,(e=>this._onContextMenu(new OE(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new OE(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(Ky.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class hO extends E{constructor(e,t,i){super(),He&&tt?this.handler=this._register(new aO(e,t,i)):window.TouchEvent?this.handler=this._register(new lO(e,t,i)):this.handler=this._register(new iO(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}class dO extends oA{}class cO extends dO{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Ba(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(66);const t=e.get(67);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(94);const i=e.get(143);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Ba(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=Fe?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getLineCount(),o=[];for(let r=i;r<=n;r++){const e=r-i,n=this._getLineRenderLineNumber(r);if(!n){o[e]="";continue}let a="";if(r===s&&0===this._context.viewModel.getLineLength(r)){if("off"===this._renderFinalNewline){o[e]="";continue}"dimmed"===this._renderFinalNewline&&(a=" dimmed-line-number")}r===this._activeLineNumber&&(a=" active-line-number"),o[e]=`
    ${n}
    `}this._renderResult=o}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}cO.CLASS_NAME="line-numbers",B_(((e,t)=>{const i=e.getColor(j_),n=e.getColor(av);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));class uO extends rA{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=Fk(document.createElement("div")),this._domNode.setClassName(uO.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Fk(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(uO.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}uO.CLASS_NAME="glyph-margin",uO.OUTER_CLASS_NAME="margin";const gO="monaco-mouse-cursor-text";const pO=new class{constructor(){this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}};var mO=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fO=function(e,t){return function(i,n){t(i,n,e)}};class _O{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new Ba(this.modelLineNumber,this.distanceToModelLineStart+1),i=new Ba(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const vO=ne;let bO=class extends rA{constructor(e,t,i,n){super(e),this._keybindingService=n,this._primaryCursorPosition=new Ba(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const s=this._context.configuration.options,o=s.get(143);this._setAccessibilityOptions(s),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=s.get(50),this._lineHeight=s.get(66),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new Th(1,1,1,1)],this._modelSelections=[new Th(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Fk(document.createElement("textarea")),aA.write(this.textArea,6),this.textArea.setClassName(`inputarea ${gO}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:r}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=r*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",ue(0,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=Fk(document.createElement("div")),this.textAreaCover.setPosition("absolute");const a={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},l={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,Oe),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,s=Array.isArray(e)?e.join(t):e;let o,r=null;if(jy.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&s.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(o=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:s,html:o,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(Pe&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new zy(i,i.length,i.length,Mh.fromPositions(t),0)}const t=500;if(Pe&&!e.isEmpty()&&a.getValueLengthInRange(e,0)0)return new zy(i,n,n,Mh.fromPositions(t),0)}return zy.EMPTY}return Uy.fromEditorSelection(a,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},h=this._register(new Yy(this.textArea.domNode));this._textAreaInput=this._register(new Gy(l,h,$e,{isAndroid:le,isChrome:oe,isFirefox:ne,isSafari:re})),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta):this._viewController.type(e.text)}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:s}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),s=e.substring(n+1),o=s.lastIndexOf("\t"),r=s.length-o-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),h=a.column-1-l,d=s.substring(0,s.length-l),{tabSize:c}=this._context.viewModel.model.getOptions(),u=function(e,t,i,n){if(0===t.length)return 0;const s=e.createElement("div");s.style.position="absolute",s.style.top="-50000px",s.style.width="50000px";const o=e.createElement("span");Bk(o,i),o.style.whiteSpace="pre",o.style.tabSize=n*i.spaceWidth+"px",o.append(t),s.appendChild(o),e.body.appendChild(s);const r=o.offsetWidth;return e.body.removeChild(s),r}(this.textArea.domNode.ownerDocument,d,this._fontInfo,c);return{distanceToModelLineStart:h,widthOfHiddenTextBefore:u}})(),{distanceToModelLineEnd:o}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),s=-1===n?e:e.substring(0,n),o=s.indexOf("\t"),r=-1===o?s.length:s.length-o-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,Mh.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new _O(this._context,i.startLineNumber,n,s,o),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${gO} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${gO}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)}))),this._register(pO.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeScreenReaderContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=jb('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,s=e.column,o=!0,r=e.column,a=0;for(;a<50&&(n||o);){if(n&&s<=1&&(n=!1),n){const e=t.charCodeAt(s-2);0!==i.get(e)?n=!1:s--}if(o&&r>t.length&&(o=!1),o){const e=t.charCodeAt(r-1);0!==i.get(e)?o=!1:r++}a++}return[t.substring(s-1,r-1),e.column-s]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=jb(this._context.configuration.options.get(129));let n=e.column,s=0;for(;n>1;){const o=t.charCodeAt(n-2);if(0!==i.get(o)||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Co(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){var t,i,n;if(1===e.get(2)){const e=null===(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))||void 0===t?void 0:t.getAriaLabel(),s=null===(i=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))||void 0===i?void 0:i.getAriaLabel(),o=null===(n=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))||void 0===n?void 0:n.getAriaLabel(),r=ue(0,"The editor is not accessible at this time.");return e?ue(0,"{0} To enable screen reader optimized mode, use {1}",r,e):s?ue(0,"{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",r,s):o?ue(0,"{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",r,o):r}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===qS.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(143).wrappingColumn;if(-1!==i&&1!==this._accessibilitySupport){const t=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=vO?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(66),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=n*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(123))),(e.hasChanged(34)||e.hasChanged(90))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!pO.enabled||e.get(34)&&e.get(90)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new Ba(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),null===(t=this._visibleTextArea)||void 0===t||t.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const s=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,o=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(athis._contentWidth&&(l=this._contentWidth);const h=this._context.viewModel.getViewLineData(i.lineNumber),d=h.tokens.findTokenIndexAtOffset(i.column-1),c=d===h.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(c?h.tokens.getPresentation(d):null);this.textArea.domNode.scrollTop=o*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:s,left:a,width:l,height:this._lineHeight,useCover:!1,color:(DC.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(tthis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const i=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(i<0||i>this._contentHeight)this._renderAtTopLeft();else if(Pe){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=null!==(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)&&void 0!==e?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:vO?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;;){if(i=e.indexOf("\n",i+1),-1===i)break;t++}return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:vO?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;Bk(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?rc.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(57)?i.setClassName("monaco-editor-background textAreaCover "+uO.OUTER_CLASS_NAME):0!==n.get(67).renderType?i.setClassName("monaco-editor-background textAreaCover "+cO.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};bO=mO([fO(3,PL)],bO);class CO{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Iy.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Iy.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Iy.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Iy.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Iy.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Iy.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Iy.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Iy.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Iy.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Iy.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Iy.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Iy.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Iy.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Iy.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class wO{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;null===(t=this.onKeyDown)||void 0===t||t.call(this,e)}emitKeyUp(e){var t;null===(t=this.onKeyUp)||void 0===t||t.call(this,e)}emitContextMenu(e){var t;null===(t=this.onContextMenu)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;null===(t=this.onMouseMove)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;null===(t=this.onMouseLeave)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;null===(t=this.onMouseDown)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;null===(t=this.onMouseUp)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;null===(t=this.onMouseDrag)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;null===(t=this.onMouseDrop)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;null===(e=this.onMouseDropCanceled)||void 0===e||e.call(this)}emitMouseWheel(e){var t;null===(t=this.onMouseWheel)||void 0===t||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return wO.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),5!==i.type&&8!==i.type||(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new Ba(e.afterLineNumber,1)).lineNumber}}}class yO{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new f("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let s=0,o=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===o?(s=i,o=1):o++)}if(e=n&&r<=s&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s){return this._lines.splice(e-this._rendLineNumberStart,s-e+1)}const o=[];for(let d=0;di)continue;const r=Math.max(t,o.fromLineNumber),a=Math.min(i,o.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class SO{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new yO((()=>this._host.createVisibleLine()))}_createDomNode(){const e=Fk(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(143)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;it){const e=t,o=Math.min(i,s.rendLineNumberStart-1);e<=o&&(this._insertLinesBefore(s,e,o,n,t),s.linesLength+=o-e+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,e),s.linesLength-=e)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1i){const e=Math.max(0,i-s.rendLineNumberStart+1),t=s.linesLength-1-e+1;t>0&&(this._removeLinesAfter(s,t),s.linesLength-=t)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const o=e.rendLineNumberStart,r=e.lines;for(let a=t;a<=i;a++){const e=o+a;r[a].layoutLine(e,n[e-s])}}_insertLinesBefore(e,t,i,n,s){const o=[];let r=0;for(let a=t;a<=i;a++)o[r++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;r--){const t=e.lines[r];n[r]&&(t.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");LO._ttPolicy&&(t=LO._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;se}),LO._sb=new Qc(1e5);class kO extends rA{constructor(e){super(e),this._visibleLines=new SO(this),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(50);Bk(this.domNode,t),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),n.appendString(s),n.appendString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class xO extends kO{constructor(e){super(e);const t=this._context.configuration.options.get(143);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(143);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class NO extends kO{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Bk(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;Bk(this.domNode,t.get(50));const i=t.get(143);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class EO extends rA{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Fk(document.createElement("div")),aA.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Fk(document.createElement("div")),aA.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){const t=new IO(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,s){this._widgets[e.getId()].setPosition(t,i,n,s),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class IO{constructor(e,t,i){this._primaryAnchor=new MO(null,null),this._secondaryAnchor=new MO(null,null),this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=Fk(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,s=n.get(143);this._fixedOverflowWidgets=n.get(42),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(66),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(66),e.hasChanged(143)){const e=t.get(143);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){function n(e,t,i){if(!e)return new MO(null,null);const n=t.model.validatePosition(e);if(t.coordinatesConverter.modelPositionIsVisible(n)){const s=t.coordinatesConverter.convertModelPositionToViewPosition(n,null!=i?i:void 0);return new MO(e,s)}return new MO(e,null)}this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity)}_getMaxWidth(){const e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?(null==t?void 0:t.innerWidth)||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const s=e.top,o=s,r=e.top+e.height,a=s-i,l=o>=i,h=r,d=n.viewportHeight-r>=i;let c=e.left;return c+t>n.scrollLeft+n.viewportWidth&&(c=n.scrollLeft+n.viewportWidth-t),cr){const e=l-(r-n);l-=e,i-=e}if(l=22,_=u+i<=g.height-22;return this._fixedOverflowWidgets?{fitsAbove:f,aboveTop:Math.max(c,22),fitsBelow:_,belowTop:u,left:m}:{fitsAbove:f,aboveTop:r,fitsBelow:_,belowTop:a,left:p}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new TO(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,i;return{primary:n(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),secondary:n((null===(t=this._secondaryAnchor.viewPosition)||void 0===t?void 0:t.lineNumber)===(null===(i=this._primaryAnchor.viewPosition)||void 0===i?void 0:i.lineNumber)?this._secondaryAnchor.viewPosition:null,this._affinity,this._lineHeight)};function n(t,i,n){if(!t)return null;const s=e.visibleRangeForPosition(t);if(!s)return null;const o=1===t.column&&3===i?0:s.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new RO(r,o,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let s=t.left;return s=se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&AO(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&AO(this._actual.afterRender,this._actual,this._renderData.position)}}class MO{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class TO{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class RO{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function AO(e,t,...i){try{return e.call(t,...i)}catch(ge){return null}}class OO extends dO{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(143);this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Th(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map((e=>e.positionLineNumber));t.sort(((e,t)=>e-t)),Id(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);return this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let o=0;const r=[];for(let a=i;a<=n;a++){const e=a-i;for(;o=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class PO extends OO{_renderOne(e){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class FO extends OO{_renderOne(e){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}B_(((e,t)=>{const i=e.getColor(V_);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(H_)){const i=e.getColor(H_);i&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),M_(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));class BO extends dO{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let a=0,l=t.length;a{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:Mh.compareRangesUsingStarts(e.range,t.range)}));const s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=[];for(let a=s;a<=o;a++){r[a-s]=""}this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let r=0,a=t.length;r',l=Math.max(e.range.startLineNumber,s),h=Math.min(e.range.endLineNumber,o);for(let t=l;t<=h;t++){i[t-s]+=a}}}_renderNormalDecorations(e,t,i){var n;const s=String(this._lineHeight),o=e.visibleRange.startLineNumber;let r=null,a=!1,l=null,h=!1;for(let d=0,c=t.length;d';a[t]+=d}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class WO extends rA{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,o=s.get(102),r=s.get(74),a=s.get(40),l=s.get(105),h={listenOnDomNode:i.domNode,className:"editor-scrollable "+O_(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:o.scrollByPage};this.scrollbar=this._register(new MD(t.domNode,h,this._context.viewLayout.getScrollable())),aA.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Fk(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(En(i.domNode,"scroll",(e=>d(i.domNode,!0,!0)))),this._register(En(t.domNode,"scroll",(e=>d(t.domNode,!0,!1)))),this._register(En(n.domNode,"scroll",(e=>d(n.domNode,!0,!1)))),this._register(En(this.scrollbarDomNode.domNode,"scroll",(e=>d(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(143);this.scrollbarDomNode.setLeft(t.contentLeft);"right"===e.get(72).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(102)||e.hasChanged(74)||e.hasChanged(40)){const e=this._context.configuration.options,t=e.get(102),i=e.get(74),n=e.get(40),s=e.get(105),o={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:s};this.scrollbar.updateOptions(o)}return e.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+O_(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class VO extends dO{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(144),n=t.get(50);this._lineHeight=t.get(66),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(144),n=t.get(50);return this._lineHeight=t.get(66),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,s;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,h=this._primaryPosition,d=this.getGuidesByLine(o,Math.min(r+1,this._context.viewModel.getLineCount()),h),c=[];for(let u=o;u<=r;u++){const r=u-o,h=d[r];let g="";const p=null!==(i=null===(t=e.visibleRangeForPosition(new Ba(u,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of h){const i=-1===t.column?p+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new Ba(u,t.column)).left;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const o=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(null!==(s=null===(n=e.visibleRangeForPosition(new Ba(u,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==s?s:i+this._spaceWidth)-i:this._spaceWidth;g+=`
    `}c[r]=g}this._renderResult=c}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?Zv.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?Zv.EnabledForActive:Zv.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let o=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);o=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),h=[];for(let d=e;d<=t;d++){const t=new Array;h.push(t);const i=n?n[d-e]:[],c=new ec(i),u=s?s[d-e]:0;for(let e=1;e<=u;e++){const n=(e-1)*l+1,s=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===i.length)&&o<=d&&d<=r&&e===a;t.push(...c.takeWhile((e=>e.visibleColumn!0))||[])}return h}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function HO(e){if(!e||!e.isTransparent())return e}B_(((e,t)=>{const i=[{bracketColor:fv,guideColor:Sv,guideColorActive:Ev},{bracketColor:_v,guideColor:Lv,guideColorActive:Iv},{bracketColor:vv,guideColor:kv,guideColorActive:Mv},{bracketColor:bv,guideColor:Dv,guideColorActive:Tv},{bracketColor:Cv,guideColor:xv,guideColorActive:Rv},{bracketColor:wv,guideColor:Nv,guideColorActive:Av}],n=new Jv,s=[{indentColor:G_,indentColorActive:ev},{indentColor:Z_,indentColorActive:tv},{indentColor:Y_,indentColorActive:iv},{indentColor:X_,indentColorActive:nv},{indentColor:Q_,indentColorActive:sv},{indentColor:J_,indentColorActive:ov}],o=i.map((t=>{var i,n;const s=e.getColor(t.bracketColor),o=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=HO(null!==(i=HO(o))&&void 0!==i?i:null==s?void 0:s.transparent(.3)),l=HO(null!==(n=HO(r))&&void 0!==n?n:s);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(Ur),r=s.map((t=>{const i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),s=HO(i),o=HO(n);if(s&&o)return{indentColor:s,indentColorActive:o}})).filter(Ur);if(o.length>0){for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}));class zO{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class UO{constructor(){this._currentVisibleRange=new Mh(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class KO{constructor(e,t,i,n,s,o,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class jO{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let o=t[0].startLineNumber,r=t[0].endLineNumber;for(let a=1,l=t.length;a{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new sd((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new UO,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(114).enabled,this._maxNumberStickyLines=n.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new OA(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(144)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(144);return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(99),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(114).enabled,this._maxNumberStickyLines=t.get(114).maxLineCount,Bk(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new AA(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++){this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let s=t;s<=i;s++)n=this._visibleLines.getVisibleLine(s).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new KO(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new jO(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new Ba(n,1);const s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(no)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri)return-1;const n=new zO(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=Mh.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const s=[];let o=0;const r=new zO(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Ba(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),h=this._visibleLines.getEndLineNumber();for(let d=n.startLineNumber;d<=n.endLineNumber;d++){if(dh)continue;const e=d===n.startLineNumber?n.startColumn:1,c=d!==n.endLineNumber,u=c?this._context.viewModel.getLineMaxColumn(d):n.endColumn,g=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,e,u,r);if(g){if(t&&dthis._visibleLines.getEndLineNumber())return null;const n=new zO(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new gA(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let o=t;o<=i;o++){const t=this._visibleLines.getVisibleLine(o);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth(null)):s=!1}return s&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const i=this._visibleLines.getVisibleLine(s);if(i.needsMonospaceFontCheck()){const n=i.getWidth(null);n>t&&(t=n,e=s)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=i;s<=n;s++){this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),Fe&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++){if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=s[0].startLineNumber,t=s[0].endLineNumber;for(let i=1,n=s.length;ia){if(!h)return-1;u=d}else if(5===o||6===o)if(6===o&&r<=d&&c<=l)u=r;else{const e=d-Math.max(5*this._lineHeight,.2*a),t=c-a;u=Math.max(t,e)}else if(1===o||2===o)if(2===o&&r<=d&&c<=l)u=r;else{const e=(d+c)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,d,c,3===o,4===o);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(143),n=t.left,s=n+t.width-i.verticalScrollbarWidth;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const a of e.selections){if(a.startLineNumber!==a.endLineNumber)return null;const e=this._visibleRangesForLineRange(a.startLineNumber,a.startColumn,a.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}if(e.minimalReveal||(o=Math.max(0,o-qO.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-o>t.width)return null;return{scrollLeft:this._computeMinimumScrolling(n,s,o,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,s,o){s=!!s,o=!!o;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-r):e:i}}qO.HORIZONTAL_EXTRA_PX=30;class $O{constructor(e,t,i,n){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i),this.zIndex=null!=n?n:0}}class GO{constructor(e,t){this.className=e,this.zIndex=t}}class ZO{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class YO extends dO{_render(e,t,i){const n=[];for(let r=e;r<=t;r++){n[r-e]=new ZO}if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.classNamen)continue;const o=Math.max(e.startLineNumber,i),r=Math.min(s.preference.lane,this._glyphMarginDecorationLaneCount);t.push(new JO(o,r,s.preference.zIndex,s))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.lane===t.lane?e.zIndex===t.zIndex?t.type===e.type?0===e.type&&0===t.type?e.className0;){const e=t.peek();if(!e)break;const n=t.takeWhile((t=>t.lineNumber===e.lineNumber&&t.lane===e.lane));if(!n||0===n.length)break;const s=n[0];if(0===s.type){const e=[];for(const t of n){if(t.zIndex!==s.zIndex||t.type!==s.type)break;0!==e.length&&e[e.length-1]===t.className||e.push(t.className)}i.push(s.accept(e.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,lane:s.lane}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(i.renderInfo){const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+(i.renderInfo.lane-1)*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;ithis._decorationGlyphsToRender.length;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}}}class QO{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new eP(this.lineNumber,this.lane,e)}}class JO{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.widget=n,this.type=1}}class eP{constructor(e,t,i){this.lineNumber=e,this.lane=t,this.combinedClassName=i}}class tP extends YO{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(143);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(143);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let s=0,o=t.length;s',o=[];for(let r=t;r<=i;r++){const e=r-t,i=n[e].getDecorations();let a="";for(const t of i)a+='
    ';s[e]=r}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class nP{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=nP._clamp(e),this.g=nP._clamp(t),this.b=nP._clamp(i),this.a=nP._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}nP.Empty=new nP(0,0,0,0);class sP extends E{static getInstance(){return this._INSTANCE||(this._INSTANCE=S(new sP)),this._INSTANCE}constructor(){super(),this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(DC.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=DC.getColorMap();if(!e)return this._colors=[nP.Empty],void(this._backgroundIsLight=!0);this._colors=[nP.Empty];for(let i=1;i=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}sP._INSTANCE=null;class oP{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class rP{constructor(e,t){this.tabSize=e,this.data=t}}class aP{constructor(e,t,i,n,s,o,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=r}}class lP{constructor(e,t,i,n,s,o,r,a,l,h){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=lP.isBasicASCII(i,o),this.containsRTL=lP.containsRTL(i,this.isBasicASCII,s),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=h}static isBasicASCII(e,t){return!t||Mo(e)}static containsRTL(e,t,i){return!(t||!i)&&Eo(e)}}class hP{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class dP{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new hP(new Mh(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class cP{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class uP{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&Id(e.data,t.data)}static equalsArr(e,t){return Id(e,t,uP.equals)}}const gP=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();class pP{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=pP.soften(e,.8),this.charDataLight=pP.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=h?this.charDataLight:this.charDataNormal,m=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),f=4*e.width,_=r.r,v=r.g,b=r.b,C=s.r-_,w=s.g-v,y=s.b-b,S=Math.max(o,a),L=e.data;let k=m*c*u,D=i*f+4*t;for(let x=0;xe.width||i+d>e.height)return void console.warn("bad render request outside image data");const c=4*e.width,u=s/255*.5,g=o.r,p=o.g,m=o.b,f=g+(n.r-g)*u,_=p+(n.g-p)*u,v=m+(n.b-m)*u,b=Math.max(s,r),C=e.data;let w=i*c+4*t;for(let y=0;y{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=mP[e[i]]<<4|15&mP[e[i+1]];return t},_P={1:_((()=>fP("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:_((()=>fP("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class vP{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=_P[e]?new pP(_P[e](),e):vP.createFromSampleData(vP.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const s of gP)i.fillText(String.fromCharCode(s),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=vP._downsample(e,t);return new pP(i,t)}static _downsampleChar(e,t,i,n,s){const o=1*s,r=2*s;let a=n,l=0;for(let h=0;h0){const e=255/a;for(let t=0;tvP.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=bP._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=bP._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(f_);return i?new nP(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(__);return t?nP._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class CP{constructor(e,t,i,n,s,o,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,o,r,a,l,h,d){const c=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,s-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(s*s/t)),n=Math.max(0,e.minimapHeight-i),o=n/(h-s),d=l*o,c=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new CP(l,h,c,o,d,i,g,1,Math.min(r,u))}let m;if(o&&i!==r){const e=i-t+1;m=Math.floor(e*u/c)}else{const e=s/p;m=Math.floor(e*u/c)}const f=Math.floor(e.paddingTop/p);let _,v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=s/p;v=Math.max(v,e-1)}if(v>0){_=(f+r+v-s/p-1)*u/c}else _=Math.max(0,(f+r)*u/c-m);_=Math.min(e.minimapHeight-m,_);const b=_/(h-s),C=l*b;if(g>=f+r+v){return new CP(l,h,_>0,b,C,m,f,1,r)}{let i,s;i=t>1?t+f:Math.max(1,l/p);let o=Math.max(1,Math.floor(i-C*c/u));ol&&(o=Math.min(o,d.startLineNumber),s=Math.max(s,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?(t-o+s+_)*u/c:l/e.paddingTop*(s+_)*u/c,new CP(l,h,!0,b,v,m,s,o,a)}}}class wP{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}wP.INVALID=new wP(-1);class yP{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new yO((()=>wP.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let i=0,n=t.length;i1){for(let t=0,i=n-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=LP.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let s=0,o=t-e+1;s{e.preventDefault();if(0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=Hn(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderPointerMoveMonitor=new gD,this._sliderPointerDownListener=Mn(this._slider.domNode,os.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=qL.addTarget(this._domNode.domNode),this._sliderTouchStartListener=En(this._domNode.domNode,KL.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=En(this._domNode.domNode,KL.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=Mn(this._domNode.domNode,KL.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i){if(!(e.target&&e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const s=(e,s)=>{const o=Hn(this._domNode.domNode),r=Math.min(Math.abs(s-n),Math.abs(s-o.left),Math.abs(s-o.left-o.width));if(Oe&&r>140)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>s(e.pageY,e.pageX)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new SP(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(u_),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=CP.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(Mh.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,s);const h=new xP(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,h,e,o),this._renderDecorationsLineHighlights(l,i,h,e,o);const d=new xP(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,o,a,r,n),this._renderDecorationsHighlights(l,i,d,e,o,a,r,n)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,h]=t;for(let e=l;e<=h;e++)i.set(e,!0);const d=n.getYForLineNumber(l,s),c=n.getYForLineNumber(h,s);r>=d||(r>o&&e.fillRect(8,o,e.canvas.width,r-o),o=d),r=c}r>o&&e.fillRect(8,o,e.canvas.width,r-o)}_renderDecorationsLineHighlights(e,t,i,n,s){const o=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||l.position!==Cd.Inline)continue;const h=n.intersectWithViewport(a.range);if(!h)continue;const[d,c]=h,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=o.get(u.toString());g||(g=u.transparent(.5).toString(),o.set(u.toString(),g)),e.fillStyle=g;for(let t=d;t<=c;t++){if(i.has(t))continue;i.set(t,!0);const o=n.getYForLineNumber(d,s);e.fillRect(8,o,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,o,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[h,d]=t;for(let c=h;c<=d;c++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,c,s,s,o,r,a)}}_renderDecorationsHighlights(e,t,i,n,s,o,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const h=n.intersectWithViewport(l.range);if(!h)continue;const[d,c]=h,u=t.getColor(this._theme.value);if(u&&!u.isTransparent())for(let g=d;g<=c;g++)switch(t.position){case Cd.Inline:this.renderDecorationOnLine(e,i,l.range,u,n,g,s,s,o,r,a);continue;case Cd.Gutter:{const t=n.getYForLineNumber(g,s),i=2;this.renderDecoration(e,u,i,t,2,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,o,r,a,l,h,d){const c=s.getYForLineNumber(o,a);if(c+r<0||c>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===o?i.startColumn:1,m=g===o?i.endColumn:this._model.getLineMaxColumn(o),f=this.getXOffsetForPosition(t,o,p,l,h,d),_=this.getXOffsetForPosition(t,o,m,l,h,d);this.renderDecoration(e,n,f,c,_-f,r)}getXOffsetForPosition(e,t,i,n,s,o){if(1===i)return 8;if((i-1)*s>=o)return o;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[8];let a=8;for(let e=1;e=o){r[e]=o;break}r[e]=l,a=l}e.set(t,r)}return i-1b?Math.floor((n-b)/2):0,w=c.a/255,y=new nP(Math.round((c.r-d.r)*w+d.r),Math.round((c.g-d.g)*w+d.g),Math.round((c.b-d.b)*w+d.b),255);let S=e.topPaddingLineCount*n;const L=[];for(let x=0,N=i-t+1;x=0&&t_)return;const r=m.charCodeAt(C);if(9===r){const e=c-(C+w)%c;w+=e-1,b+=e*o}else if(32===r)b+=o;else{const c=Ao(r)?2:1;for(let u=0;u_)return}}}}}class xP{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let n=0,s=this._endLineNumber-this._startLineNumber+1;nthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class NP extends rA{constructor(e){super(e);const t=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=Fk(document.createElement("div")),aA.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=Fk(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?(this._updateMaxMinWidth(),!1):(i.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let i=0;const n=Object.keys(this._widgets);for(let s=0,o=n.length;s=3){const t=Math.floor(n/3),i=Math.floor(n/3),s=n-t-i,o=e+t;return[[0,e,o,e,e+t+s,e,o,e],[0,t,s,t+s,i,t+s+i,s+i,t+s+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&rc.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class IP extends rA{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=Fk(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=DC.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new EP(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;te.lineNumber===t.lineNumber))||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,o=this._context.viewLayout,r=n/this._context.viewLayout.getScrollHeight(),a=6*this._settings.pixelRatio|0,l=a/2|0,h=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(h.fillStyle=rc.Format.CSS.formatHexA(e),h.fillRect(0,0,i,n)):(h.clearRect(0,0,i,n),h.fillStyle=rc.Format.CSS.formatHexA(e),h.fillRect(0,0,i,n)):h.clearRect(0,0,i,n);const d=this._settings.x,c=this._settings.w;for(const u of t){const e=u.color,t=u.data;h.fillStyle=e;let i=0,g=0,p=0;for(let u=0,m=t.length/3;un&&(e=n-l),_=e-l,v=e+l}_>p+1||e!==i?(0!==u&&h.fillRect(d[i],g,c[i],p-g),i=e,g=_,p=v):v>p&&(p=v)}h.fillRect(d[i],g,c[i],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],s=this._settings.w[7];h.fillStyle=this._settings.cursorColor;let a=-100,l=-100;for(let d=0,c=this._cursorPositions.length;dn&&(u=n-t);const g=u-t,p=g+e;g>l+1?(0!==d&&h.fillRect(i,a,s,l-a),a=g,l=p):p>l&&(l=p)}h.fillRect(i,a,s,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,n),h.stroke(),h.moveTo(0,0),h.lineTo(i,0),h.stroke())}}class MP{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class TP{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(u=i-g);const p=a.color;let m=this._color2Id[p];m||(m=++this._lastAssignedId,this._color2Id[p]=m,this._id2Color[m]=p);const f=new MP(u-g,u+g,m);a.setColorZone(f),o.push(f)}return this._colorZonesInvalid=!1,o.sort(MP.compare),o}}class AP extends oA{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=Fk(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new RP((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(66)),this._zoneManager.setPixelRatio(i.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(66)&&(this._zoneManager.setLineHeight(t.get(66)),this._render()),e.hasChanged(141)&&(this._zoneManager.setPixelRatio(t.get(141)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,o=0,r=0;for(const a of t){const t=a.colorId,l=a.from,h=a.to;t!==s?(e.fillRect(0,o,n,r-o),s=t,e.fillStyle=i[s],o=l,r=h):r>=l?r=Math.max(r,h):(e.fillRect(0,o,n,r-o),o=l,r=h)}e.fillRect(0,o,n,r-o)}}class OP extends rA{constructor(e){super(e),this.domNode=Fk(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=Fk(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),s--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(143);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(102);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class FP{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class BP{constructor(e,t){this.lineNumber=e,this.ranges=t}}function WP(e){return new FP(e)}function VP(e){return new BP(e.lineNumber,e.ranges.map(WP))}class HP extends dO{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,o=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!s&&e=0;e--)i[e].lineNumber===r&&(o=i[e].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let r=0,a=t.length;r0){const e=t[r-1].ranges[0].left,s=t[r-1].ranges[0].left+t[r-1].ranges[0].width;zP(i-e)e&&(h.top=1),zP(l-s)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const s=!!n[0].ranges[0].startStyle,o=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let h=0,d=n.length;h1,r)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function zP(e){return e<0?-e:e}HP.SELECTION_CLASS_NAME="selected-text",HP.SELECTION_TOP_LEFT="top-left-radius",HP.SELECTION_BOTTOM_LEFT="bottom-left-radius",HP.SELECTION_TOP_RIGHT="top-right-radius",HP.SELECTION_BOTTOM_RIGHT="bottom-right-radius",HP.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",HP.ROUNDED_PIECE_WIDTH=10,B_(((e,t)=>{const i=e.getColor(Pm);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));class UP{constructor(e,t,i,n,s,o,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=o,this.textContentClassName=r}}class KP{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Fk(document.createElement("div")),this._domNode.setClassName(`cursor ${gO}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Bk(this._domNode,i),this._domNode.setDisplay("none"),this._position=new Ba(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),Bk(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=function(e,t){t>0&&wo(e.charCodeAt(t))&&t--;const i=t+Do(e,t);return[i-xo(e,i),i]}(i,t-1);return[new Ba(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="";const[n,s]=this._getGraphemeAwarePosition();if(this._cursorStyle===xS.Line||this._cursorStyle===xS.LineThin){const o=e.visibleRangeForPosition(n);if(!o||o.outsideRenderedLine)return null;let r;this._cursorStyle===xS.Line?(r=bs(this._lineCursorWidth>0?this._lineCursorWidth:2),r>2&&(t=s,i=this._getTokenClassName(n))):r=bs(1);let a=o.left,l=0;r>=2&&a>=1&&(l=1,a-=l);const h=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new UP(h,a,l,r,this._lineHeight,t,i)}const o=e.linesVisibleRangesForRange(new Mh(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],l="\t"===s||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===xS.Block&&(t=s,i=this._getTokenClassName(n));let h=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return this._cursorStyle!==xS.Underline&&this._cursorStyle!==xS.UnderlineThin||(h+=this._lineHeight-2,d=2),new UP(h,a.left,0,l,d,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${gO} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class jP extends rA{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new KP(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Fk(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new id,this._cursorFlatBlinkInterval=new nd,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;it.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),jP.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),jP.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case xS.Line:e+=" cursor-line-style";break;case xS.Block:e+=" cursor-block-style";break;case xS.Underline:e+=" cursor-underline-style";break;case xS.LineThin:e+=" cursor-line-thin-style";break;case xS.BlockOutline:e+=" cursor-block-outline-style";break;case xS.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=e.getColor(z_);if(i){let n=e.getColor(U_);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),M_(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const qP=()=>{throw new Error("Invalid change accessor")};class $P extends rA{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._lineHeight=t.get(66),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=Fk(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Fk(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let s=0,o=n.length;s{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{return e(t)}catch(Dre){r(Dre)}}(e,n),n.addZone=qP,n.removeZone=qP,n.layoutZone=qP})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:Fk(t.domNode),marginDomNode:t.marginDomNode?Fk(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(Dre){r(Dre)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(Dre){r(Dre)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const o of t)this._zones[o.id].isInHiddenArea||(i[o.id]=o,n=!0);const s=Object.keys(this._zones);for(let o=0,r=s.length;oo)continue;const e=t.startLineNumber===o?t.startColumn:i.minColumn,s=t.endLineNumber===o?t.endColumn:i.maxColumn;e=S.endOffset&&(y++,S=i&&i[y]),9!==n&&32!==n)continue;if(c&&!C&&k<=v)continue;if(d&&k>=w&&k<=v&&32===n){const e=k-1>=0?r.charCodeAt(k-1):0,t=k+1=0?r.charCodeAt(k-1):0;if(32===n&&32!==e&&9!==e)continue}if(i&&(!S||S.startOffset>k||S.endOffset<=k))continue;const s=e.visibleRangeForPosition(new Ba(t,k+1));s&&(o?(L=Math.max(L,s.left),b+=9===n?this._renderArrow(u,m,s.left):``):b+=9===n?`
    ${_?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:`
    ${String.fromCharCode(f)}
    `)}return o?(L=Math.round(L+m),``+b+""):b}_renderArrow(e,t,i){const n=e/2,s=i,o={x:0,y:t/7/2},r={x:.8*t,y:o.y},a={x:r.x-.2*r.x,y:r.y+.2*r.x},l={x:a.x+.1*r.x,y:a.y+.1*r.x},h={x:l.x+.35*r.x,y:l.y-.35*r.x};return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class JP{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(98),this.renderWithSVG=!0):(this.renderWhitespace=t.get(98),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(66),this.stopRenderingLineAfter=t.get(116)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}var eF=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},tF=function(e,t){return function(i,n){t(i,n,e)}};let iF=class extends oA{constructor(e,t,i,n,s,o,r){super(),this._instantiationService=r,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Th(1,1,1,1)],this._renderAnimationFrame=null;const a=new CO(t,n,s,e);this._context=new ZP(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(bO,this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=Fk(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Fk(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=Fk(document.createElement("div")),aA.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new WO(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new qO(this._context,this._linesContent),this._viewZones=new $P(this._context),this._viewParts.push(this._viewZones);const l=new IP(this._context);this._viewParts.push(l);const h=new PP(this._context);this._viewParts.push(h);const d=new xO(this._context);this._viewParts.push(d),d.addDynamicOverlay(new PO(this._context)),d.addDynamicOverlay(new HP(this._context)),d.addDynamicOverlay(new VO(this._context)),d.addDynamicOverlay(new BO(this._context)),d.addDynamicOverlay(new QP(this._context));const c=new NO(this._context);this._viewParts.push(c),c.addDynamicOverlay(new FO(this._context)),c.addDynamicOverlay(new iP(this._context)),c.addDynamicOverlay(new tP(this._context)),c.addDynamicOverlay(new cO(this._context)),this._glyphMarginWidgets=new XO(this._context),this._viewParts.push(this._glyphMarginWidgets);const u=new uO(this._context);u.getDomNode().appendChild(this._viewZones.marginDomNode),u.getDomNode().appendChild(c.getDomNode()),u.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(u),this._contentWidgets=new EO(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new jP(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new NP(this._context),this._viewParts.push(this._overlayWidgets);const g=new OP(this._context);this._viewParts.push(g);const p=new XP(this._context);this._viewParts.push(p);const m=new kP(this._context);if(this._viewParts.push(m),l){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(l.getDomNode(),e.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(m.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),o?o.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new hO(this._context,a,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),Py.onRenderStart(),this._renderNow()}_computeGlyphMarginLaneCount(){const e=this._context.viewModel.model;let t=[];t=t.concat(e.getAllMarginDecorations().map((e=>{var t,i;const n=null!==(i=null===(t=e.options.glyphMargin)||void 0===t?void 0:t.position)&&void 0!==i?i:bd.Left;return{range:e.range,lane:n}}))),t=t.concat(this._glyphMarginWidgets.getWidgets().map((t=>({range:e.validateRange(t.preference.range),lane:t.preference.lane})))),t.sort(((e,t)=>Mh.compareRangesUsingStarts(e.range,t.range)));let i=null,n=null;for(const s of t)if(s.lane===bd.Left&&(!i||Mh.compareRangesUsingEnds(i,s.range)<0)&&(i=s.range),s.lane===bd.Right&&(!n||Mh.compareRangesUsingEnds(n,s.range)<0)&&(n=s.range),i&&n){if(i.endLineNumber{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new qA(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Ba(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(143);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+O_(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=Rn(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{return e()}catch(Dre){r(Dre)}}((()=>this._actualRender()))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!xn(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new YP(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new hA(this._context.viewLayout,i,this._viewLines);for(const s of e)s.prepareRender(n);for(const s of e)s.render(n),s.onDidRender()}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new Ba(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?wO.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new AP(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i,n,s,o,r,a,l;this._contentWidgets.setWidgetPosition(e.widget,null!==(i=null===(t=e.position)||void 0===t?void 0:t.position)&&void 0!==i?i:null,null!==(s=null===(n=e.position)||void 0===n?void 0:n.secondaryPosition)&&void 0!==s?s:null,null!==(r=null===(o=e.position)||void 0===o?void 0:o.preference)&&void 0!==r?r:null,null!==(l=null===(a=e.position)||void 0===a?void 0:a.positionAffinity)&&void 0!==l?l:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};iF=eF([tF(6,Oa)],iF);class nF{constructor(e,t,i,n,s,o){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=s,this._contextKeyService=o}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}const sF={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};class oF{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Kw(new Mh(1,1,1,1),0,0,new Ba(1,1),0),new Kw(new Mh(1,1,1,1),0,0,new Ba(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Hw(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?Th.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):Th.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),o=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,o),a=this._validatePositionWithCache(e,s,n,r);return i.equals(o)&&n.equals(r)&&s.equals(a)?t:new Kw(Mh.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,o,t.leftoverVisibleColumns+i.column-o.column)}_setState(e,t,i){if(i&&(i=oF._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),o=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new Kw(i,t.selectionStartKind,n,s,o)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Kw(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Kw(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new Ba(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new Ba(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new Mh(n.lineNumber,n.column,s.lineNumber,s.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Kw(o,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class rF{constructor(e){this.context=e,this.cursors=[new oF(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return function(e,t){return _c(e,((e,i)=>-t(e,i)))}(this.cursors,Yd((e=>e.viewState.position),Ba.compare)).viewState.position}getBottomMostViewPosition(){return function(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=s)}return i}(this.cursors,Yd((e=>e.viewState.position),Ba.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(Hw.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),Mh.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class aF{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class lF{constructor(){this.type=0}}class hF{constructor(){this.type=1}}class dF{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class cF{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class uF{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0)}}class gF{constructor(){this.type=5}}class pF{constructor(e){this.type=6,this.isFocused=e}}class mF{constructor(){this.type=7}}class fF{constructor(){this.type=8}}class _F{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class vF{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class bF{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class CF{constructor(e,t,i,n,s,o,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=o,this.scrollType=r,this.type=12}}class wF{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class yF{constructor(e){this.theme=e,this.type=14}}class SF{constructor(e){this.type=15,this.ranges=e}}class LF{constructor(){this.type=16}}class kF{constructor(){this.type=17}}class DF extends E{constructor(){super(),this._onEvent=this._register(new U),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class xF{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class NF{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new NF(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class EF{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new EF(this.oldHasFocus,e.hasFocus)}}class IF{constructor(e,t,i,n,s,o,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=o,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}attemptToMerge(e){return e.kind!==this.kind?null:new IF(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class MF{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class TF{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class RF{constructor(e,t,i,n,s,o,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=o,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;to&&(n=n.slice(0,o),s=!0);const r=zF.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,s,o){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=Mh.fromPositions(r[0],r[0]),e.emitViewEvent(new CF(t,i,a,l,n,s,o))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const t=Hw.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Hw.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,Hw.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let r=0,a=e.length;r0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const o=zF.from(this._model,this);if(o.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new cF(a,r,i)),!n||n.cursorState.length!==o.cursorState.length||o.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new RF(a,r,l,o.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const s=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;const o=s[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-s[2].length-1,h=n.text.lastIndexOf(a,l-1);if(-1===h)return null;t.push([h,l])}return t}executeEdits(e,t,i,n){let s=null;"snippet"===t&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const o=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(s)for(let i=0,n=s.length;i0&&this._pushAutoClosedAction(o,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=zF.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){r(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return UF.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new qF(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(Cy.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(Cy.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))}),e,o);else if(0!==s){const t=this.getSelections().map((e=>{const t=e.getPosition();return new Th(t.lineNumber,t.column+s,t.lineNumber,t.column+s)}));this.setSelections(e,o,t,0)}}paste(e,t,i,n,s){this._executeEdit((()=>{this._executeEditOperation(Cy.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,s,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(iy.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new jw(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new jw(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class zF{static from(e,t){return new zF(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class KF{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let o=0,r=n.trackedRanges.length;o0&&(o[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,o,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,o=[];for(let r=0;r0?(n[r].sort(s),o[r]=t[r].computeCursorState(e.model,{getInverseEditOperations:()=>n[r],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new Th(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new Th(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):o[r]=e.selectionsBefore[r];return o}));r||(r=e.selectionsBefore);const a=[];for(const l in s)s.hasOwnProperty(l)&&a.push(parseInt(l,10));a.sort(((e,t)=>t-e));for(const l of a)r.splice(l,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{Mh.isEmpty(e)&&""===o||n.push({identifier:{major:t,minor:s++},range:e,text:o,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const l={addEditOperation:o,addTrackedEditOperation:(e,t,i)=>{a=!0,o(e,t,i)},trackSelection:(t,i)=>{const n=Th.liftSelection(t);let s;if(n.isEmpty())if("boolean"==typeof i)s=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);s=n.startColumn===t?2:3}else s=1;const o=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,s);return e.trackedRanges[o]=r,e.trackedRangesDirection[o]=n.getDirection(),o.toString()}};try{i.getEditOperations(e.model,l)}catch(Dre){return r(Dre),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-Mh.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;is.identifier.major?n.identifier.major:s.identifier.major,t[o.toString()]=!0;for(let t=0;t0&&i--}}return t}}class jF{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class qF{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new jF(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=qF._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=qF._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let s=0,o=this._original.length;s>>1;t===e[o].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,s|=0;const o=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new GF(o,e,i,n,s)),o},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const a of i)n.add(a.id);const s=new Map;for(const a of t)s.set(a.id,a);const o=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(s.has(i.id)){const e=s.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=o(this._arr).concat(o(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=ZF.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[s+1].afterLineNumber>=e)return s;i=s+1|0}else n=s-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0;return i+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0))+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e|=0;return this._lineHeight*e+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0))+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,s=t;for(;n=o+i)n=t+1;else{if(e>=o)return t;s=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(n);let o=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,h;-1===r?(r=a,h=o+1,l=0):(h=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let d=s,c=d;const u=5e5;let g=0;s>=u&&(g=Math.floor(s/u)*u,g=Math.floor(g/i)*i,c-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let C=n;C<=o;C++){if(-1===f){(d<=m&&mm)&&(f=C)}for(d+=i,p[C-n]=c,c+=i;h===C;)c+=l,d+=l,r++,r>=a?h=o+1:(h=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(d>=t){o=C;break}}-1===f&&(f=o);const _=0|this.getVerticalOffsetForLineNumber(o);let v=n,b=o;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:o,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=s+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=s)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const s=[];for(let o=i;o<=n;o++){const e=this.getVerticalOffsetForWhitespaceIndex(o),i=this.getHeightForWhitespaceIndex(o);if(e>=t)break;s.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:e,height:i})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}ZF.INSTANCE_COUNT=0;class YF{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class XF extends E{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new U),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new YF(0,0,0,0),this._scrollable=this._register(new SD({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new NF(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class QF extends E{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,s=n.get(143),o=n.get(83);this._linesLayout=new ZF(t,n.get(66),o.top,o.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new XF(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new YF(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(113)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(66)&&this._linesLayout.setLineHeight(t.get(66)),e.hasChanged(83)){const e=t.get(83);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(143)){const e=t.get(143),i=e.contentWidth,n=e.height,s=this._scrollable.getScrollDimensions(),o=s.contentWidth;this._scrollable.setScrollDimensions(new YF(i,s.contentWidth,n,this._getContentHeight(i,n,o)))}else this._updateHeight();e.hasChanged(113)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(102);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(104)?s+=Math.max(0,t-n.get(66)-n.get(83).bottom):s+=this._getHorizontalScrollbarHeight(e,i),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new YF(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new oP(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new oP(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(144),n=e.get(50),s=e.get(143);if(i.isViewportWrapping){const i=e.get(72);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+s.verticalScrollbarWidth:t}{const i=e.get(103)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+s.verticalScrollbarWidth,o,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new YF(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class JF{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,s=e.options;let o;if(s.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new Ba(n.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new Ba(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);o=new Mh(e.lineNumber,e.column,t.lineNumber,t.column)}else o=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new cP(o,s),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new Mh(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,TS(this.configuration.options),t,i),s=e.startLineNumber,o=e.endLineNumber,r=[];let a=0;const l=[];for(let h=s;h<=o;h++)l[h-s]=[];for(let h=0,d=n.length;h1===e))}function iB(e,t){return nB(e,t.range,(e=>2===e))}function nB(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const s=e.tokenization.getLineTokens(n),o=n===t.startLineNumber,r=n===t.endLineNumber;let a=o?s.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1)break}if(!i(s.getStandardTokenType(a)))return!1;a++}}return!0}function sB(e,t){return null===e?t?rB.INSTANCE:aB.INSTANCE:new oB(e,t)}class oB{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let o;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new QC(0,0,e+1,this._projectionData.injectionOptions[t],0)));o=QC.applyInjectedText(e.getLineContent(t),i).substring(n,s)}else o=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(o=hB(this._projectionData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,s,o,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,h=a.injectionOptions;let d,c=null;if(l){c=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,o=a.breakOffsets[i];for(;to)break;if(s0?a.wrappedTextIndentLength:0,r=t+Math.max(d-s,0),l=t+Math.min(c-s,o-s);r!==l&&n.push(new dP(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(c<=o))break;e+=r,t++}}}d=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:h[t].content,tokenMetadata:RC.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let u=i;u0?n.wrappedTextIndentLength:0,o=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(o,r,s);let l=a.getLineContent();i>0&&(l=hB(n.wrappedTextIndentLength)+l);const h=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,c=i+1=lB.length)for(let t=1;t<=e;t++)lB[t]=dB(t);return lB[e]}function dB(e){return new Array(e+1).join(" ")}class cB{constructor(e,t,i,n,s,o,r,a,l,h){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=h,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new pB(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,o=this.createLineBreaksComputer(),r=new ec(QC.fromDecorations(n));for(let p=0;pe.lineNumber===p+1));o.addRequest(i[p],e,t?t[p]:null)}const a=o.finalize(),l=[],h=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Mh.compareRangesUsingStarts);let d=1,c=0,u=-1,g=u+1=d&&e<=c,i=sB(a[p],!t);l[p]=i.getViewLineCount(),this.modelLineProjections[p]=i}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new uI(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(Mh.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,s=t[0].endLineNumber;for(let o=1,r=t.length;os+1?(i.push(new Mh(n,1,s,1)),n=e.startLineNumber,s=e.endLineNumber):e.endLineNumber>s&&(s=e.endLineNumber)}return i.push(new Mh(n,1,s,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Mh.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n({range:e,options:xw.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const s=t;let o=1,r=0,a=-1,l=a+1=o&&e<=r?this.modelLineProjections[d].isVisible()&&(this.modelLineProjections[d]=this.modelLineProjections[d].setVisible(!1),t=!0):(h=!0,this.modelLineProjections[d].isVisible()||(this.modelLineProjections[d]=this.modelLineProjections[d].setVisible(!0),t=!0)),t){const e=this.modelLineProjections[d].getViewLineCount();this.projectedModelLineLineCounts.setValue(d,e)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,s){const o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,h=this.wordBreak===s;if(o&&r&&a&&l&&h)return!1;const d=o&&r&&!a&&l&&h;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=s;let c=null;if(d){c=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),o=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let h=0,d=n.length;hr?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,h=l+r-1,u=h+1,g=u+(s-r)-1,a=!0):st?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,o.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new uB(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Ba(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Ba(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let o=this.getModelStartPositionOfViewLine(i),r=new Array;for(let a=i.modelLineNumber;a<=n.modelLineNumber;a++){const e=this.modelLineProjections[a-1];if(e.isVisible()){const t=a===i.modelLineNumber?i.modelLineWrappedLineIdx:0,s=a===n.modelLineNumber?n.modelLineWrappedLineIdx+1:e.getViewLineCount();for(let e=t;e{if(-1!==e.forWrappedLinesAfterColumn){if(this.modelLineProjections[i.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn).lineNumber>=i.modelLineWrappedLineIdx)return}if(-1!==e.forWrappedLinesBeforeOrAtColumn){if(this.modelLineProjections[i.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn).lineNumberi.modelLineWrappedLineIdx)return}const n=this.convertModelPositionToViewPosition(i.modelLineNumber,e.horizontalLine.endColumn),s=this.modelLineProjections[i.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return s.lineNumber===i.modelLineWrappedLineIdx?new Yv(e.visibleColumn,t,e.className,new Xv(e.horizontalLine.top,n.column),-1,-1):s.lineNumber!!e)))}}return o}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const o=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let h=null;for(let g=a;g<=l;g++){const e=this.modelLineProjections[g];if(e.isVisible()){const t=e.getViewLineNumberOfModelPosition(0,g===a?i.column:1),n=e.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),s=n-t+1;let l=0;s>1&&1===e.getViewLineMinColumn(this.model,g+1,n)&&(l=0===t?1:2),o.push(s),r.push(l),null===h&&(h=new Ba(g+1,0))}else null!==h&&(s=s.concat(this.model.guides.getLinesIndentGuides(h.lineNumber,g)),h=null)}null!==h&&(s=s.concat(this.model.guides.getLinesIndentGuides(h.lineNumber,n.lineNumber)),h=null);const d=t-e+1,c=new Array(d);let u=0;for(let g=0,p=s.length;gt&&(c=!0,d=t-s+1),n.getViewLinesData(this.model,l+1,h,d,s-e,i,a),s+=d,c)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,o=n.remainder,r=this.modelLineProjections[s],a=r.getViewLineMinColumn(this.model,s+1,o),l=r.getViewLineMaxColumn(this.model,s+1,o);tl&&(t=l);const h=r.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new Ba(s+1,h)).equals(i)?new Ba(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new Mh(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new Ba(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Mh(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,s=!1){const o=this.model.validatePosition(new Ba(e,t)),r=o.lineNumber,a=o.column;let l=r-1,h=!1;if(s)for(;l0&&!this.modelLineProjections[l].isVisible();)l--,h=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new Ba(n?0:1,1);const d=1+this.projectedModelLineLineCounts.getPrefixSum(l);let c;return c=h?s?this.modelLineProjections[l].getViewPositionOfModelPosition(d,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(d,a,i),c}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return Mh.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new Mh(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,s){const o=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-o.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new Mh(o.lineNumber,1,r.lineNumber,r.column),t,i,n,s);let a=[];const l=o.lineNumber-1,h=r.lineNumber-1;let d=null;for(let p=l;p<=h;p++){if(this.modelLineProjections[p].isVisible())null===d&&(d=new Ba(p+1,p===l?o.column:1));else if(null!==d){const e=this.model.getLineMaxColumn(p);a=a.concat(this.model.getDecorationsInRange(new Mh(d.lineNumber,d.column,p,e),t,i,n)),d=null}}null!==d&&(a=a.concat(this.model.getDecorationsInRange(new Mh(d.lineNumber,d.column,r.lineNumber,r.column),t,i,n)),d=null),a.sort(((e,t)=>{const i=Mh.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));const c=[];let u=0,g=null;for(const p of a){const e=p.id;g!==e&&(g=e,c[u++]=p)}return c}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class uB{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class gB{constructor(e,t){this.modelRange=e,this.viewLines=t}}class pB{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class mB{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new fB(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new vF(t,i)}onModelLinesInserted(e,t,i,n){return new bF(t,i)}onModelLineChanged(e,t,i){return[!1,new _F(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let s=0;st)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class _B extends E{constructor(e,t,i,n,s,o,r,a,l){if(super(),this.languageConfigurationService=r,this._themeService=a,this._attachedView=l,this.hiddenAreasModel=new CB,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new DF,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new sd((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=vB.create(this.model),this.model.isTooLargeForTokenization())this._lines=new mB(this.model);else{const e=this._configuration.options,t=e.get(50),i=e.get(137),o=e.get(144),r=e.get(136),a=e.get(128);this._lines=new cB(this._editorId,this.model,n,s,t,this.model.getOptions().tabSize,i,o.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new HF(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new QF(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new wF(e)),this._eventDispatcher.emitOutgoingEvent(new IF(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new JF(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(sP.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new LF)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new yF(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new Mh(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new pF(e)),this._eventDispatcher.emitOutgoingEvent(new EF(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new lF)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new hF)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new Ba(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new yB(t,this._viewportStart.startLineDelta)}return new yB(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,s=n.get(50),o=n.get(137),r=n.get(144),a=n.get(136),l=n.get(128);this._lines.setWrappingSettings(s,o,r.wrappingColumn,a,l)&&(e.emitViewEvent(new gF),e.emitViewEvent(new fF),e.emitViewEvent(new uF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(90)&&(this._decorations.reset(),e.emitViewEvent(new uF(null))),e.emitViewEvent(new dF(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),Vw.shouldRecreate(t)&&(this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const s=e instanceof ow?e.rawContentChangedEvent.changes:e.changes,o=e instanceof ow?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of s)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new ec(a);for(const e of s)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new gF),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(o,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),s=this._lines.onModelLinesInserted(o,e.fromLineNumber,e.toLineNumber,n);null!==s&&(t.emitViewEvent(s),this.viewLayout.onLinesInserted(s.fromLineNumber,s.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[s,r,a,h]=this._lines.onModelLineChanged(o,e.lineNumber,i);n=s,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),h&&(t.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber));break}}null!==o&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new fF),t.emitViewEvent(new uF(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof ow&&t.emitOutgoingEvent(new BF(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new mF),this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new FF(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new PF(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new gF),e.emitViewEvent(new fF),e.emitViewEvent(new uF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Vw(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new WF(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new uF(e)),this._eventDispatcher.emitOutgoingEvent(new OF(e))})))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const i=this.hiddenAreasModel.getMergedRanges();if(i===this.previousHiddenAreas)return;this.previousHiddenAreas=i;const n=this._captureStableViewport();let s=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();s=this._lines.setHiddenAreas(i),s&&(e.emitViewEvent(new gF),e.emitViewEvent(new fF),e.emitViewEvent(new uF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),s&&this._eventDispatcher.emitOutgoingEvent(new TF)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(143),t=this._configuration.options.get(66),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),o=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new Mh(s,this.getLineMinColumn(s),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let s=0,o=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let h=0,d=i.length;ha||(ot.toInlineDecoration(e)))]),new lP(o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,i,n,o.tokens,t,s,o.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new rP(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,TS(this._configuration.options)),i=new bB;for(const n of t){const t=n.options,s=t.overviewRuler;if(!s)continue;const o=s.position;if(0===o)continue;const r=s.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,o)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;null==e||e.invalidateCachedColor();const i=t.options.minimap;null==i||i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);return this.model.modifyPosition(i,t)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const s=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(Mh.compareRangesUsingStarts);let s=!1,o=!1;for(const a of e)a.isEmpty()?s=!0:o=!0;if(!o){if(!t)return"";const i=e.map((e=>e.startLineNumber));let s="";for(let e=0;e0&&i[e-1]===i[e]||(s+=this.model.getLineContent(i[e])+n);return s}if(s&&t){const t=[];let n=0;for(const s of e){const e=s.startLineNumber;s.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(s,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const a of e)a.isEmpty()||r.push(this.model.getValueInRange(a,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===zu)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new Mh(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const s=this._configuration.options.get(50),o=this._getColorMap();let r;if(/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===US.fontFamily)r=US.fontFamily;else{r=s.fontFamily,r=r.replace(/"/g,"'");if(!/[,']/.test(r)){/[+ ]/.test(r)&&(r=`'${r}'`)}r=`${r}, ${US.fontFamily}`}return{mode:i,html:`
    `+this._getHTMLToCopy(n,o)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,r=this.getTabSize();let a="";for(let l=i;l<=s;l++){const e=this.model.tokenization.getLineTokens(l),h=e.getLineContent(),d=l===i?n-1:0,c=l===s?o-1:h.length;a+=""===h?"
    ":Hk(h,e.inflate(),t,d,c,r,Oe)}return a}_getColorMap(){const e=DC.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new AF):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,s){this._executeCursorEdit((o=>this._cursor.compositionType(o,e,t,i,n,s)))}paste(e,t,i,n){this._executeCursorEdit((s=>this._cursor.paste(s,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new Mh(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new CF(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new Mh(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new CF(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,s){this._withViewEventsCollector((o=>o.emitViewEvent(new CF(e,!1,i,null,n,t,s))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new kF),this._eventDispatcher.emitOutgoingEvent(new MF))}_withViewEventsCollector(e){try{return e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class vB{static create(e){const t=e._setTrackedRange(null,new Mh(1,1,1,1),1);return new vB(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new Ba(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new Mh(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),o=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=o-s}invalidate(){this._isValid=!1}}class bB{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){const o=this._asMap[e];if(o){const e=o.data,t=e[e.length-3],r=e[e.length-1];if(t===s&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(s,i,n)}else{const o=new uP(e,t,[s,i,n]);this._asMap[e]=o,this.asArray.push(o)}}}class CB{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&wB(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce(((e,t)=>function(e,t){const i=[];let n=0,s=0;for(;n0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let n=0;nthis.injectionOffsets[n];n++)i0?this.breakOffsets[s-1]:0,0===t)if(e<=o)n=s-1;else{if(!(e>r))break;i=s+1}else if(e=r))break;i=s+1}}let r=e-o;return s>0&&(r+=this.wrappedTextIndentLength),new xB(s,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new xB(e-1,this.getMaxOutputOffset(e-1))}else if(1===i){if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength));return(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&kB(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(DB(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!kB(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!DB(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}Vl()}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let s=0;se)break;if(e<=a)return{injectedTextIndex:s,offsetInInputWithInjections:r,length:o};n+=o}}}}function kB(e){return null==e||(e===wd.Right||e===wd.Both)}function DB(e){return null==e||(e===wd.Left||e===wd.Both)}class xB{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new Ba(e+this.outputLineIndex,this.outputOffset+1)}}class NB{static create(e){return new NB(e.get(132),e.get(131))}constructor(e,t){this.classifier=new EB(e,t)}createLineBreaksComputer(e,t,i,n,s){const o=[],r=[],a=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,h=[];for(let e=0,d=o.length;e=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let IB=[],MB=[];function TB(e,t,i,n,s,o,r,a){if(-1===s)return null;const l=i.length;if(l<=1)return null;const h="keepAll"===a,d=t.breakOffsets,c=t.breakOffsetsVisibleColumn,u=FB(i,n,s,o,r),g=s-u,p=IB,m=MB;let f=0,_=0,v=0,b=s;const C=d.length;let w=0;if(w>=0){let e=Math.abs(c[w]-b);for(;w+1=e)break;e=t,w++}}for(;wt&&(t=_,s=v);let r=0,a=0,u=0,y=0;if(s<=b){let v=s,C=0===t?0:i.charCodeAt(t-1),w=0===t?0:e.get(C),S=!0;for(let s=t;s_&&PB(C,w,l,d,h)&&(r=t,a=v),v+=c,v>b){t>_?(u=t,y=v-c):(u=s+1,y=v),v-a>g&&(r=0),S=!1;break}C=l,w=d}if(S){f>0&&(p[f]=d[d.length-1],m[f]=c[d.length-1],f++);break}}if(0===r){let l=s,d=i.charCodeAt(t),c=e.get(d),p=!1;for(let n=t-1;n>=_;n--){const t=n+1,s=i.charCodeAt(n);if(9===s){p=!0;break}let m,f;if(wo(s)?(n--,m=0,f=2):(m=e.get(s),f=Ao(s)?o:1),l<=b){if(0===u&&(u=t,y=l),l<=b-g)break;if(PB(s,m,d,c,h)){r=t,a=l;break}}l-=f,d=s,c=m}if(0!==r){const e=g-(y-a);if(e<=n){const t=i.charCodeAt(u);let s;s=Co(t)?2:AB(t,y,n,o),e-s<0&&(r=0)}}if(p){w--;continue}}if(0===r&&(r=u,a=y),r<=_){const e=i.charCodeAt(_);Co(e)?(r=_+2,a=v+2):(r=_+1,a=v+AB(e,v,n,o))}for(_=r,p[f]=r,v=a,m[f]=a,f++,b=a+g;w<0||w=S)break;S=e,w++}}return 0===f?null:(p.length=f,m.length=f,IB=t.breakOffsets,MB=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=m,t.wrappedTextIndentLength=u,t)}function RB(e,t,i,n,s,o,r,a){const l=QC.applyInjectedText(t,i);let h,d;if(i&&i.length>0?(h=i.map((e=>e.options)),d=i.map((e=>e.column-1))):(h=null,d=null),-1===s)return h?new LB(d,h,[l.length],[],0):null;const c=l.length;if(c<=1)return h?new LB(d,h,[l.length],[],0):null;const u="keepAll"===a,g=FB(l,n,s,o,r),p=s-g,m=[],f=[];let _=0,v=0,b=0,C=s,w=l.charCodeAt(0),y=e.get(w),S=AB(w,0,n,o),L=1;Co(w)&&(S+=1,w=l.charCodeAt(1),y=e.get(w),L++);for(let k=L;kC&&((0===v||S-b>p)&&(v=t,b=S-r),m[_]=v,f[_]=b,_++,C=b+p,v=0),w=i,y=s}return 0!==_||i&&0!==i.length?(m[_]=c,f[_]=S,new LB(d,h,m,f,g)):null}function AB(e,t,i,n){return 9===e?i-t%i:Ao(e)||e<32?n:1}function OB(e,t){return t-e%t}function PB(e,t,i,n,s){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!s&&3===t&&2!==n||!s&&3===n&&1!==t)}function FB(e,t,i,n,s){let o=0;if(0!==s){const r=oo(e);if(-1!==r){for(let i=0;ii&&(o=0)}}return o}const BB=Ak("domLineBreaksComputer",{createHTML:e=>e});class WB{static create(){return new WB}constructor(){}createLineBreaksComputer(e,t,i,n,s){const o=[],r=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t)},finalize:()=>function(e,t,i,n,s,o,r){var a;function l(t){const i=r[t];if(i){const n=QC.applyInjectedText(e[t],i),s=i.map((e=>e.options)),o=i.map((e=>e.column-1));return new LB(o,s,[n.length],[],0)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;ih?(o=0,a=0):l=h-e}const d=n.substr(o),c=VB(d,a,i,l,p,u);m[k]=o,f[k]=a,_[k]=d,v[k]=c[0],b[k]=c[1]}const C=p.build(),w=null!==(a=null==BB?void 0:BB.createHTML(C))&&void 0!==a?a:C;g.innerHTML=w,g.style.position="absolute",g.style.top="10000","keepAll"===o?(g.style.wordBreak="keep-all",g.style.overflowWrap="anywhere"):(g.style.wordBreak="inherit",g.style.overflowWrap="break-word");document.body.appendChild(g);const y=document.createRange(),S=Array.prototype.slice.call(g.children,0),L=[];for(let k=0;ke.options)),a=h.map((e=>e.column-1))):(o=null,a=null),L[k]=new LB(a,o,e,s,i)}return document.body.removeChild(g),L}(o,e,t,i,n,s,r)}}}function VB(e,t,i,n,s,o){if(0!==o){const e=String(o);s.appendString('
    ');const r=e.length;let a=t,l=0;const h=[],d=[];let c=0");for(let u=0;u"),h[u]=l,d[u]=a;const t=c;c=u+1"),h[e.length]=l,d[e.length]=a,s.appendString("
    "),[h,d]}function HB(e,t,i,n){if(i.length<=1)return null;const s=Array.prototype.slice.call(t.children,0),o=[];try{zB(e,s,n,0,null,i.length-1,null,o)}catch(r){return console.log(r),null}return 0===o.length?null:(o.push(i.length),o)}function zB(e,t,i,n,s,o,r,a){if(n===o)return;if(s=s||UB(e,t,i[n],i[n+1]),r=r||UB(e,t,i[o],i[o+1]),Math.abs(s[0].top-r[0].top)<=.1)return;if(n+1===o)return void a.push(o);const l=n+(o-n)/2|0,h=UB(e,t,i[l],i[l+1]);zB(e,t,i,n,s,l,h,a),zB(e,t,i,l,h,o,r,a)}function UB(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}class KB extends E{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new R),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const n of t)this._pending.has(n.id)?r(new Error(`Cannot have two contributions with the same id ${n.id}`)):this._pending.set(n.id,n);this._instantiateSome(0),this._register(od((()=>{this._instantiateSome(1)}))),this._register(od((()=>{this._instantiateSome(2)}))),this._register(od((()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"==typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"==typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register(od((()=>{this._instantiateSome(1)}),50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const i of t)this._instantiateById(i.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"==typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(i){r(i)}}}}var jB,qB=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},$B=function(e,t){return function(i,n){t(i,n,e)}},GB=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let ZB=0;class YB{constructor(e,t,i,n,s,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s,this.attachedView=o}dispose(){k(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let XB=jB=class extends E{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,i,n,s,o,a,l,h,d,c,u){var g;super(),this.languageConfigurationService=c,this._deliveryQueue=new K,this._contributions=this._register(new KB),this._onDidDispose=this._register(new U),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new QB({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new QB({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new JB(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new JB(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new JB(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new JB(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new JB(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new JB(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new U({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),s.willCreateCodeEditor();const p=Object.assign({},t);let m;this._domElement=e,this._overflowWidgetsDomNode=p.overflowWidgetsDomNode,delete p.overflowWidgetsDomNode,this._id=++ZB,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,p,d)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(143)){const e=t.get(143);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=h,this._codeEditorService=s,this._commandService=o,this._themeService=l,this._register(new eW(this,this._contextKeyService)),this._register(new tW(this,this._contextKeyService,u)),this._instantiationService=n.createChild(new SB([Rl,this._contextKeyService])),this._modelData=null,this._focusTracker=new iW(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},m=Array.isArray(i.contributions)?i.contributions:kh.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(const _ of kh.getEditorActions()){if(this._actions.has(_.id)){r(new Error(`Cannot have two actions with the same id ${_.id}`));continue}const e=new nF(_.id,_.label,_.alias,null!==(g=_.precondition)&&void 0!==g?g:void 0,(()=>this._instantiationService.invokeFunction((e=>Promise.resolve(_.runEditorCommand(e,this,null))))),this._contextKeyService);this._actions.set(e.id,e)}const f=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new Ds(this._domElement,{onDragEnter:()=>{},onDragOver:e=>{if(!f())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this.showDropIndicatorAt(t.position)},onDrop:e=>GB(this,void 0,void 0,(function*(){if(!f())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this._onDropIntoEditor.fire({position:t.position,event:e})})),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;null===(t=this._modelData)||void 0===t||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i){return new JR(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return sF.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?ny.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const s={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(n),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(o.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?jB._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?jB._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?jB._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var i;null===(i=this._modelData)||void 0===i||i.viewModel.setHiddenAreas(e.map((e=>Mh.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return lc.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!Ba.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!Mh.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,o,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new Mh(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!Ba.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new Mh(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=Th.isISelection(e),n=Mh.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new Th(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new Mh(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!Mh.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(Mh.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){var e;null===(e=this._getViewModel())||void 0===e||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run(i)).then(void 0,r):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s){if(!this._modelData||0===t.length)return;const o=this._modelData.viewModel,r=o.getSelection().getStartPosition();o.paste(t,i,n,e);const a=o.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new Mh(r.lineNumber,r.column,a.lineNumber,a.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=kh.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,r)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(90)&&(this._modelData.model.pushStackElement(),!0))}popUndoStop(){return!!this._modelData&&(!this._configuration.options.get(90)&&(this._modelData.model.popStackElement(),!0))}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(90))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new nW(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,TS(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,TS(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(143);return{top:jB._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),height:i.get(66)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Bk(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new _B(this._id,this._configuration,e,WB.create(),NB.create(this._configuration.options),(e=>An(e)),this.languageConfigurationService,this._themeService,i);t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=ue(0,"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",this.getOption(79));this._notificationService.prompt(cL.Warning,e,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:ue(0,"Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let s=0,o=t.selections.length;s{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const s={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",s)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const s={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",s)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new wO(e.coordinatesConverter);i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e);return[new iF(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){null==e||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){const t=[{range:new Mh(e.lineNumber,e.column,e.lineNumber,e.column),options:jB.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};XB.dropIntoEditorDecorationOptions=xw.register({description:"workbench-dnd-target",className:"dnd-target"}),XB=jB=qB([$B(3,Oa),$B(4,Fa),$B(5,Ga),$B(6,Rl),$B(7,R_),$B(8,uL),$B(9,ZR),$B(10,Xu),$B(11,iL)],XB);class QB extends E{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new U(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new U(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class JB extends U{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class eW extends E{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Rh.editorSimpleInput.bindTo(t),this._editorFocus=Rh.focus.bindTo(t),this._textInputFocus=Rh.textInputFocus.bindTo(t),this._editorTextFocus=Rh.editorTextFocus.bindTo(t),this._tabMovesFocus=Rh.tabMovesFocus.bindTo(t),this._editorReadonly=Rh.readOnly.bindTo(t),this._inDiffEditor=Rh.inDiffEditor.bindTo(t),this._editorColumnSelection=Rh.columnSelection.bindTo(t),this._hasMultipleSelections=Rh.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Rh.hasNonEmptySelection.bindTo(t),this._canUndo=Rh.canUndo.bindTo(t),this._canRedo=Rh.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._register(GR.onDidChangeTabFocus((e=>this._tabMovesFocus.set(e)))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(GR.getTabFocusMode()),this._editorReadonly.set(e.get(90)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class tW extends E{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=Rh.languageId.bindTo(t),this._hasCompletionItemProvider=Rh.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Rh.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Rh.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Rh.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Rh.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Rh.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Rh.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Rh.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Rh.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Rh.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Rh.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Rh.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Rh.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=Rh.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=Rh.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Rh.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Rh.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Rh.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=Rh.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===vn.walkThroughSnippet)})):this.reset()}}class iW extends E{constructor(e){super(),this._onChange=this._register(new U),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(hs(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}class nW{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations((t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)}))}finally{this._isChangingDecorations=!1}return this._decorationIds}}const sW=encodeURIComponent("");function rW(e){return sW+encodeURIComponent(e.toString())+oW}const aW=encodeURIComponent('');B_(((e,t)=>{const i=e.getColor(gm);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${rW(i)}") repeat-x bottom left; }`);const n=e.getColor(mm);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${rW(n)}") repeat-x bottom left; }`);const s=e.getColor(_m);s&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${rW(s)}") repeat-x bottom left; }`);const o=e.getColor(bm);o&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return aW+encodeURIComponent(e.toString())+lW}(o)}") no-repeat bottom left; }`);const r=e.getColor(dv);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}));var hW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},dW=function(e,t){return function(i,n){t(i,n,e)}};let cW=class extends XB{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),i,s,o,r,a,l,h,d,c,u),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){md(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};cW=hW([dW(4,Oa),dW(5,Fa),dW(6,Ga),dW(7,Rl),dW(8,R_),dW(9,uL),dW(10,ZR),dW(11,Xu),dW(12,iL)],cW);var uW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};var gW;!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(gW||(gW={}));const pW=new U;const mW=new U;class fW{constructor(){this.disposables=new N}get onPointerMove(){return this.disposables.add(new Hy(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new Hy(window,"mouseup")).event}dispose(){this.disposables.dispose()}}uW([UL],fW.prototype,"onPointerMove",null),uW([UL],fW.prototype,"onPointerUp",null);class _W{get onPointerMove(){return this.disposables.add(new Hy(this.el,KL.Change)).event}get onPointerUp(){return this.disposables.add(new Hy(this.el,KL.End)).event}constructor(e){this.el=e,this.disposables=new N}dispose(){this.disposables.dispose()}}uW([UL],_W.prototype,"onPointerMove",null),uW([UL],_W.prototype,"onPointerUp",null);class vW{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}uW([UL],vW.prototype,"onPointerMove",null),uW([UL],vW.prototype,"onPointerUp",null);const bW="pointer-events-disabled";class CW extends E{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=ds(this.el,fs(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(x((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new Hy(this._orthogonalStartDragHandle,"mouseenter")).event((()=>CW.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Hy(this._orthogonalStartDragHandle,"mouseleave")).event((()=>CW.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=ds(this.el,fs(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(x((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new Hy(this._orthogonalEndDragHandle,"mouseenter")).event((()=>CW.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Hy(this._orthogonalEndDragHandle,"mouseleave")).event((()=>CW.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new Xh(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new U),this._onDidStart=this._register(new U),this._onDidChange=this._register(new U),this._onDidReset=this._register(new U),this._onDidEnd=this._register(new U),this.orthogonalStartSashDisposables=this._register(new N),this.orthogonalStartDragHandleDisposables=this._register(new N),this.orthogonalEndSashDisposables=this._register(new N),this.orthogonalEndDragHandleDisposables=this._register(new N),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=ds(e,fs(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),Pe&&this.el.classList.add("mac");const n=this._register(new Hy(this.el,"mousedown")).event;this._register(n((e=>this.onPointerStart(e,new fW)),this));const s=this._register(new Hy(this.el,"dblclick")).event;this._register(s(this.onPointerDoublePress,this));const o=this._register(new Hy(this.el,"mouseenter")).event;this._register(o((()=>CW.onMouseEnter(this))));const r=this._register(new Hy(this.el,"mouseleave")).event;this._register(r((()=>CW.onMouseLeave(this)))),this._register(qL.addTarget(this.el));const a=this._register(new Hy(this.el,KL.Start)).event;this._register(a((e=>this.onPointerStart(e,new _W(this.el))),this));const l=this._register(new Hy(this.el,KL.Tap)).event;let h;this._register(l((e=>{if(h)return clearTimeout(h),h=void 0,void this.onPointerDoublePress(e);clearTimeout(h),h=setTimeout((()=>h=void 0),250)}),this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(pW.event((e=>{this.size=e,this.layout()})))),this._register(mW.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",false),this.layout()}onPointerStart(e,t){as(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new vW(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new vW(t))),!this.state)return;const n=document.getElementsByTagName("iframe");for(const c of n)c.classList.add(bW);const s=e.pageX,o=e.pageY,r=e.altKey,a={startX:s,currentX:s,startY:o,currentY:o,altKey:r};this.el.classList.add("active"),this._onDidStart.fire(a);const l=Jn(this.el),h=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":Pe?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":Pe?"col-resize":"ew-resize",l.textContent=`* { cursor: ${e} !important; }`},d=new N;h(),i||this.onDidEnablementChange.event(h,null,d);t.onPointerMove((e=>{as(e,!1);const t={startX:s,currentX:e.pageX,startY:o,currentY:e.pageY,altKey:r};this._onDidChange.fire(t)}),null,d),t.onPointerUp((e=>{as(e,!1),this.el.removeChild(l),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(const t of n)t.classList.remove(bW)}),null,d),d.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&CW.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&CW.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){CW.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;const i=null!==(t=e.initialTarget)&&void 0!==t?t:e.target;if(i&&i instanceof HTMLElement)return i.classList.contains("orthogonal-drag-handle")?i.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}const wW=new rc(new nc(0,122,204)),yW={showArrow:!0,showFrame:!0,className:"",frameColor:wW,arrowColor:wW,keepEditorSelection:!1};class SW{constructor(e,t,i,n,s,o,r,a){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=r,this.ordinal=a,this._onDomNodeTop=s,this._onComputedHeight=o}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class LW{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class kW{constructor(e){this._editor=e,this._ruleName=kW._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),ns(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){ns(this._ruleName),is(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:Mh.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}kW._IdGenerator=new ak(".arrow-decoration-");class DW{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new N,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=cd(t),md(this.options,yW,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new kW(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}null===(t=this._resizeSash)||void 0===t||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=Mh.isIRange(e)?Mh.lift(e):Mh.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:xw.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),null===(e=this._arrow)||void 0===e||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){t+=2*Math.round(e/3)}if(this.options.showFrame){t+=2*Math.round(e/9)}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const o=document.createElement("div");o.style.overflow="hidden";const r=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const e=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,e)}let a=0,l=0;if(this._arrow&&this.options.showArrow&&(a=Math.round(r/3),this._arrow.height=a,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new SW(o,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e)),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new LW("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const h=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=a+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden"),this._doLayout(h,s),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const t=d.validateRange(new Mh(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new CW(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(66),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}class xW extends Ua{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new U),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=ds(e,fs(".monaco-dropdown")),this._label=ds(this._element,fs(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const s of[os.CLICK,os.MOUSE_DOWN,KL.Tap])this._register(En(this.element,s,(e=>as(e,!0))));for(const s of[os.MOUSE_DOWN,KL.Tap])this._register(En(this._label,s,(e=>{e instanceof MouseEvent&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register(En(this._label,os.KEY_UP,(e=>{const t=new St(e);(t.equals(3)||t.equals(10))&&(as(e,!0),this.visible?this.hide():this.show())})));const n=i(this._label);n&&this._register(n),this._register(qL.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class NW extends xW{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class EW extends Dx{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new U),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=ds(e,fs("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new NW(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),null!=e?e:void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;null===(e=this.dropdownMenu)||void 0===e||e.show()}updateEnabled(){var e,t;const i=!this.action.enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}var IW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},MW=function(e,t){return function(i,n){t(i,n,e)}},TW=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function RW(e,t,i,n,s,o){AW(e.getActions(t),i,!1,"string"==typeof n?e=>e===n:n,s,o)}function AW(e,t,i,n=e=>"navigation"===e,s=()=>!1,o=!1){let r,a;Array.isArray(t)?(r=t,a=t):(r=t.primary,a=t.secondary);const l=new Set;for(const[h,d]of e){let e;n(h)?(e=r,e.length>0&&o&&e.push(new Ka)):(e=a,e.length>0&&e.push(new Ka));for(let t of d){i&&(t=t instanceof nh&&t.alt?t.alt:t);const n=e.push(t);t instanceof ja&&l.add({group:h,action:t,index:n-1})}}for(const{group:h,action:d,index:c}of l){const e=n(h)?r:a,t=d.actions;s(d,h,e.length)&&e.splice(c,1,...t)}}let OW=class extends xx{constructor(e,t,i,n,s,o,r,a){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable,keybinding:null==t?void 0:t.keybinding,hoverDelegate:null==t?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=s,this._themeService=o,this._contextMenuService=r,this._accessibilityService=a,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new I),this._altKey=ks.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return TW(this,void 0,void 0,(function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}))}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{var e;const i=!!(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);i!==this._wantsAltCommand&&(this._wantsAltCommand=i,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register(En(e,"mouseleave",(e=>{t=!1,i()}))),this._register(En(e,"mouseenter",(e=>{t=!0,i()}))),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let s=i?ue(0,"{0} ({1})",n,i):n;if(!this._wantsAltCommand&&(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),n=i?ue(0,"{0} ({1})",e,i):e;s=ue(0,"{0}\n[{1}] {2}",s,Tx.modifierLabels[$e].altKey,n)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const n=this._commandAction.checked&&((s=e.toggled)&&void 0!==s.condition)&&e.toggled.icon?e.toggled.icon:e.icon;var s;if(n)if(ea.isThemeIcon(n)){const e=ea.asClassNameArray(n);i.classList.add(...e),this._itemClassDispose.value=x((()=>{i.classList.remove(...e)}))}else{const e=T_(this._themeService.getColorTheme().type)?ws(n.dark):ws(n.light),t=fs("span");t.style.webkitMask=t.style.mask=`${e} no-repeat 50% 50%`,t.style.background="var(--vscode-icon-foreground)",t.style.display="inline-block",t.style.width="100%",t.style.height="100%",i.appendChild(t),i.classList.add("icon"),this._itemClassDispose.value=D(x((()=>{i.classList.remove("icon"),us(i)})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}}};OW=IW([MW(2,PL),MW(3,uL),MW(4,Rl),MW(5,R_),MW(6,Hx),MW(7,ZR)],OW);let PW=class extends EW{constructor(e,t,i,n,s){var o,r,a;const l=Object.assign(Object.assign({},t),{menuAsChild:null!==(o=null==t?void 0:t.menuAsChild)&&void 0!==o&&o,classNames:null!==(r=null==t?void 0:t.classNames)&&void 0!==r?r:ea.isThemeIcon(e.item.icon)?ea.asClassName(e.item.icon):void 0,keybindingProvider:null!==(a=null==t?void 0:t.keybindingProvider)&&void 0!==a?a:e=>i.lookupKeybinding(e.id)});super(e,{getActions:()=>e.actions},n,l),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),jr(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!ea.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=T_(this._themeService.getColorTheme().type)?ws(i.dark):ws(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};PW=IW([MW(2,PL),MW(3,Hx),MW(4,R_)],PW);let FW=class extends Dx{constructor(e,t,i,n,s,o,r,a){var l,h,d;let c;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=o,this._instaService=r,this._storageService=a,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const u=(null==t?void 0:t.persistLastActionId)?a.get(this._storageKey,1):void 0;u&&(c=e.actions.find((e=>u===e.id))),c||(c=e.actions[0]),this._defaultAction=this._instaService.createInstance(OW,c,{keybinding:this._getDefaultActionKeybindingLabel(c)});const g=Object.assign(Object.assign({keybindingProvider:e=>this._keybindingService.lookupKeybinding(e.id)},t),{menuAsChild:null===(l=null==t?void 0:t.menuAsChild)||void 0===l||l,classNames:null!==(h=null==t?void 0:t.classNames)&&void 0!==h?h:["codicon","codicon-chevron-down"],actionRunner:null!==(d=null==t?void 0:t.actionRunner)&&void 0!==d?d:new Ua});this._dropdown=new EW(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof nh&&this.update(e.action)}))}update(e){var t;(null===(t=this._options)||void 0===t?void 0:t.persistLastActionId)&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(OW,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends Ua{runAction(e,t){return TW(this,void 0,void 0,(function*(){yield e.run(void 0)}))}},this._container&&this._defaultAction.render(cs(this._container,fs(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(null===(t=this._options)||void 0===t?void 0:t.renderKeybindingWithDefaultActionLabel){const t=this._keybindingService.lookupKeybinding(e.id);t&&(i=`(${t.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=fs(".action-container");this._defaultAction.render(ds(this._container,t)),this._register(En(t,os.KEY_DOWN,(e=>{const t=new St(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=fs(".dropdown-action-container");this._dropdown.render(ds(this._container,i)),this._register(En(i,os.KEY_DOWN,(e=>{var t;const i=new St(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};FW=IW([MW(2,PL),MW(3,uL),MW(4,Hx),MW(5,Jl),MW(6,Oa),MW(7,qN)],FW);let BW=class extends Nx{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===Ka.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":e.label,isDisabled:!e.enabled}))),0,t,Xx,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=Cp(Xp)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function WW(e,t,i){return t instanceof nh?e.createInstance(OW,t,i):t instanceof ih?t.item.isSelection?e.createInstance(BW,t):t.item.rememberDefaultAction?e.createInstance(FW,t,Object.assign(Object.assign({},i),{persistLastActionId:!0})):e.createInstance(PW,t,i):void 0}BW=IW([MW(1,Vx)],BW);var VW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},HW=function(e,t){return function(i,n){t(i,n,e)}};const zW=Pa("IPeekViewService");var UW;Cu(zW,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}},1),function(e){e.inPeekEditor=new Tl("inReferenceSearchEditor",!0,ue(0,"Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(UW||(UW={}));let KW=class{constructor(e,t){e instanceof cW&&UW.inPeekEditor.bindTo(t)}dispose(){}};KW.ID="editor.contrib.referenceController",KW=VW([HW(1,Rl)],KW),Lh(KW.ID,KW,0);const jW={headerBackgroundColor:rc.white,primaryHeadingColor:rc.fromHex("#333333"),secondaryHeadingColor:rc.fromHex("#6c6c6cb3")};let qW=class extends DW{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new U,this.onDidClose=this._onDidClose.event,md(this.options,jW,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=fs(".head"),this._bodyElement=fs(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=fs(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),Mn(this._titleElement,"click",(e=>this._onTitleClick(e)))),ds(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=fs("span.filename"),this._secondaryHeading=fs("span.dirname"),this._metaHeading=fs("span.meta"),ds(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=fs(".peekview-actions");ds(this._headElement,i);const n=this._getActionBarOptions();this._actionbarWidget=new Ix(i,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new za("peekview.close",ue(0,"Close"),ea.asClassName(Qr.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:WW.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Dn(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,_s(this._metaHeading)):vs(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(66)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};qW=VW([HW(2,Oa)],qW);const $W=Sp("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:rc.black,hcLight:rc.white},ue(0,"Background color of the peek view title area.")),GW=Sp("peekViewTitleLabel.foreground",{dark:rc.white,light:rc.black,hcDark:rc.white,hcLight:wm},ue(0,"Color of the peek view title.")),ZW=Sp("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},ue(0,"Color of the peek view title info.")),YW=Sp("peekView.border",{dark:_m,light:_m,hcDark:Np,hcLight:Np},ue(0,"Color of the peek view borders and arrow.")),XW=Sp("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:rc.black,hcLight:rc.white},ue(0,"Background color of the peek view result list.")),QW=(Sp("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:rc.white,hcLight:wm},ue(0,"Foreground color for line nodes in the peek view result list.")),Sp("peekViewResult.fileForeground",{dark:rc.white,light:"#1E1E1E",hcDark:rc.white,hcLight:wm},ue(0,"Foreground color for file nodes in the peek view result list.")),Sp("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},ue(0,"Background color of the selected entry in the peek view result list.")),Sp("peekViewResult.selectionForeground",{dark:rc.white,light:"#6C6C6C",hcDark:rc.white,hcLight:wm},ue(0,"Foreground color of the selected entry in the peek view result list.")),Sp("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:rc.black,hcLight:rc.white},ue(0,"Background color of the peek view editor.")));Sp("peekViewEditorGutter.background",{dark:QW,light:QW,hcDark:QW,hcLight:QW},ue(0,"Background color of the gutter in the peek view editor.")),Sp("peekViewEditorStickyScroll.background",{dark:QW,light:QW,hcDark:QW,hcLight:QW},ue(0,"Background color of sticky scroll in the peek view editor.")),Sp("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},ue(0,"Match highlight color in the peek view result list.")),Sp("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},ue(0,"Match highlight color in the peek view editor.")),Sp("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Ep,hcLight:Ep},ue(0,"Match highlight border in the peek view editor."));function JW(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===sF.ICodeEditor}function eV(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===sF.IDiffEditor}function tV(e){return JW(e)?e:eV(e)?e.getModifiedEditor():function(e){return!!e&&"object"==typeof e&&"function"==typeof e.onDidChangeActiveEditor}(e)&&JW(e.activeCodeEditor)?e.activeCodeEditor:null}class iV{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:E.None}}renderElement(e,t,i,n){var s;if(null===(s=i.disposable)||void 0===s||s.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const r=new Uh,a=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class nV{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}class sV{constructor(e,t,i,n,s={}){const o=()=>this.model,r=n.map((e=>new iV(e,o)));this.list=new bx(e,t,i,r,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new nV(e,t.accessibilityProvider)})}(o,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return B.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return B.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return B.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,zd(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}const oV={separatorBorder:rc.transparent};class rV{set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){var i,n;e!==this.visible&&(e?(this.size=hD(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),null===(n=(i=this.view).setVisible)||void 0===n||n.call(i,e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return null===(e=this.view.proportionalLayout)||void 0===e||e}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){this.disposable.dispose()}}class aV extends rV{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class lV extends rV{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var hV,dV;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(hV||(hV={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Auto=function(e){return{type:"auto",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(dV||(dV={}));class cV extends E{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var i,n,s,o,r;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=hV.Idle,this._onDidSashChange=this._register(new U),this._onDidSashReset=this._register(new U),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.inverseAltBehavior=null!==(n=t.inverseAltBehavior)&&void 0!==n&&n,this.proportionalLayout=null===(s=t.proportionalLayout)||void 0===s||s,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=ds(this.el,fs(".sash-container")),this.viewContainer=fs(".split-view-container"),this.scrollable=this._register(new SD({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:An})),this.scrollableElement=this._register(new MD(this.viewContainer,{vertical:0===this.orientation?null!==(o=t.scrollbarVisibility)&&void 0!==o?o:1:2,horizontal:1===this.orientation?null!==(r=t.scrollbarVisibility)&&void 0!==r?r:1:2},this.scrollable));const a=this._register(new Hy(this.viewContainer,"scroll")).event;this._register(a((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),ds(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||oV),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=zr(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let t=0;for(let i=0;i1===this.viewItems[e].priority)),s=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.proportionalLayout?e.size/this.contentSize:void 0)))}onSashStart({sash:e,start:t,alt:i}){for(const r of this.viewItems)r.enabled=!1;const n=this.sashItems.findIndex((t=>t.sash===e)),s=D(En(document.body,"keydown",(e=>o(this.sashDragState.current,e.altKey))),En(document.body,"keyup",(()=>o(this.sashDragState.current,!1)))),o=(e,t)=>{const i=this.viewItems.map((e=>e.size));let o,r,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){if(n===this.sashItems.length-1){const e=this.viewItems[n];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[n+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}}if(!t){const e=zd(n,-1),t=zd(n+1,this.viewItems.length),s=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),a=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),l=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),h=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),d=Math.max(s,h),c=Math.min(l,a),u=this.findFirstSnapIndex(e),g=this.findFirstSnapIndex(t);if("number"==typeof u){const e=this.viewItems[u],t=Math.floor(e.viewMinimumSize/2);o={index:u,limitDelta:e.visible?d-t:d+t,size:e.size}}if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);r={index:g,limitDelta:e.visible?c+t:c-t,size:e.size}}}this.sashDragState={start:e,current:e,index:n,sizes:i,minDelta:a,maxDelta:l,alt:t,snapBefore:o,snapAfter:r,disposable:s}};o(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:o,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const h=e-i,d=this.resize(t,h,n,void 0,void 0,o,r,a,l);if(s){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,s=this.viewItems[n],o=s.size-s.maximumSize,r=s.size-s.minimumSize,a=e?t-1:t+1;this.resize(a,-d,i,void 0,void 0,o,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=hD(t="number"==typeof t?t:e.size,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==hV.Idle)throw new Error("Cant modify splitview");if(this.state=hV.Busy,e<0||e>=this.viewItems.length)return;const i=zd(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],s=i.filter((e=>2===this.viewItems[e].priority)),o=this.viewItems[e];t=hD(t=Math.round(t),o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(n,s),this.state=hV.Idle}distributeViewSizes(){const e=[];let t=0;for(const r of this.viewItems)r.maximumSize-r.minimumSize>0&&(e.push(r),t+=r.size);const i=Math.floor(t/e.length);for(const r of e)r.size=hD(i,r.minimumSize,r.maximumSize);const n=zd(this.viewItems.length),s=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));this.relayout(s,o)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==hV.Idle)throw new Error("Cant modify splitview");this.state=hV.Busy;const s=fs(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const o=e.onDidChange((e=>this.onViewChange(l,e))),r=D(o,x((()=>this.viewContainer.removeChild(s))));let a;"number"==typeof t?a=t:("auto"===t.type&&(t=this.areViewsDistributed()?{type:"distribute"}:{type:"split",index:t.index}),a="split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize);const l=0===this.orientation?new aV(s,e,a,r):new lV(s,e,a,r);if(this.viewItems.splice(i,0,l),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new CW(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new CW(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),s=B.map(t.onDidStart,n)(this.onSashStart,this),o=B.map(t.onDidChange,n)(this.onSashChange,this),r=B.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),a=r(this.onSashEnd,this),l=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=zd(e,-1),n=zd(e+1,this.viewItems.length),s=this.findFirstSnapIndex(i),o=this.findFirstSnapIndex(n);("number"!=typeof s||this.viewItems[s].visible)&&("number"!=typeof o||this.viewItems[o].visible)&&this._onDidSashReset.fire(e)})),h=D(s,o,a,l,t),d={sash:t,disposable:h};this.sashItems.splice(i-1,0,d)}let h;s.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(h=[t.index]),n||this.relayout([i],h),this.state=hV.Idle,n||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,s,o=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,a,l){if(e<0||e>=this.viewItems.length)return 0;const h=zd(e,-1),d=zd(e+1,this.viewItems.length);if(s)for(const y of s)Kd(h,y),Kd(d,y);if(n)for(const y of n)jd(h,y),jd(d,y);const c=h.map((e=>this.viewItems[e])),u=h.map((e=>i[e])),g=d.map((e=>this.viewItems[e])),p=d.map((e=>i[e])),m=h.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),f=h.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),_=0===d.length?Number.POSITIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),v=0===d.length?Number.NEGATIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),b=Math.max(m,v,o),C=Math.min(_,f,r);let w=!1;if(a){const e=this.viewItems[a.index],i=t>=a.limitDelta;w=i!==e.visible,e.setVisible(i,a.size)}if(!w&&l){const e=this.viewItems[l.index],i=te+t.size),0);let i=this.size-t;const n=zd(this.viewItems.length-1,-1),s=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));for(const r of o)Kd(n,r);for(const r of s)jd(n,r);"number"==typeof e&&jd(n,e);for(let r=0;0!==i&&re+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const s=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const o=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let a=0;a0||this.startSnappingEnabled)?e.state=1:d&&t[a]&&(r0)return;if(!e.visible&&e.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=void 0===e?i.size:Math.min(e,i.size),t=void 0===t?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){var e;null===(e=this.sashDragState)||void 0===e||e.disposable.dispose(),k(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[],super.dispose()}}class uV{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=uV.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const s of e){const e=n.get(s.templateId);if(!e)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=ds(e,fs(".monaco-table-tr")),i=[],n=[];for(let o=0;onew gV(e,t))),a={size:r.reduce(((e,t)=>e+t.column.weight),0),views:r.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new cV(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const l=new uV(n,s,(e=>this.splitview.getViewSize(e)));var h;this.list=this.disposables.add(new bx(e,this.domNode,(h=i,{getHeight:e=>h.getHeight(e),getTemplateId:()=>uV.TemplateId}),[l],o)),B.any(...r.map((e=>e.onDidLayout)))((([e,t])=>l.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=n.reduce(((e,t)=>e+t.weight),0),i=n[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=Jn(this.domNode),this.style(ux)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}pV.InstanceCount=0;class mV extends pD{constructor(e){super(),this._onChange=this._register(new U),this.onChange=this._onChange.event,this._onKeyDown=this._register(new U),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...ea.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const fV=ue(0,"Match Case"),_V=ue(0,"Match Whole Word"),vV=ue(0,"Use Regular Expression");class bV extends mV{constructor(e){super({icon:Qr.caseSensitive,title:fV+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class CV extends mV{constructor(e){super({icon:Qr.wholeWord,title:_V+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class wV extends mV{constructor(e){super({icon:Qr.regex,title:vV+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class yV{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class SV{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new yV(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}const LV=fs;class kV extends pD{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new U),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(n=this.options.tooltip)&&void 0!==n?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=ds(e,LV(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",o=ds(this.element,LV(".ibwrapper"));if(this.input=ds(o,LV(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=ds(o,LV("div.mirror")),this.mirror.innerText="\xa0",this.scrollableElement=new ID(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),ds(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new Hy(document,"selectionchange")),i=B.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===o}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this._register(this.ignoreGesture(this.input)),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new Ix(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:jn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if("open"===this.state&&fd(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Ss(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=zn(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{var n,s;if(!this.message)return null;e=ds(i,LV(".monaco-inputbox-container")),t();const o={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?QL(this.message.content,o):function(e,t={}){const i=JL(t);return i.textContent=e,i}(this.message.content,o);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=null!==(n=a.background)&&void 0!==n?n:"",r.style.color=null!==(s=a.foreground)&&void 0!==s?s:"",r.style.border=a.border?`1px solid ${a.border}`:"",ds(e,r),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?ue(0,"Error: {0}",this.message.content):2===this.message.type?ue(0,"Warning: {0}",this.message.content):ue(0,"Info: {0}",this.message.content),Os(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText="\xa0",this.layout()}applyStyles(){var e,t,i;const n=this.options.inputBoxStyles,s=null!==(e=n.inputBackground)&&void 0!==e?e:"",o=null!==(t=n.inputForeground)&&void 0!==t?t:"",r=null!==(i=n.inputBorder)&&void 0!==i?i:"";this.element.style.backgroundColor=s,this.element.style.color=o,this.input.style.backgroundColor="inherit",this.input.style.color=o,this.element.style.border=`1px solid ${Ss(r,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=jn(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;null!==i&&null!==n&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,null===(e=this.actionbar)||void 0===e||e.dispose(),super.dispose()}}class DV extends kV{constructor(e,t,i){const n=ue(0,"for history"),s=` or \u21c5 ${n}`,o=` (\u21c5 ${n})`;super(e,t,i),this._onDidFocus=this._register(new U),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new U),this.onDidBlur=this._onDidBlur.event,this.history=new SV(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?s:o,t=this.placeholder+e;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(o)||e(s)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=null!=e?e:"",Ps(this.value?this.value:ue(0,"Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,Ps(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const xV=ue(0,"input");class NV extends pD{constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new I),this.additionalToggles=[],this._onDidOptionChange=this._register(new U),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new U),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new U),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new U),this._onKeyUp=this._register(new U),this._onCaseSensitiveKeyDown=this._register(new U),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new U),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||xV,this.showCommonFindToggles=!!i.showCommonFindToggles;const n=i.appendCaseSensitiveLabel||"",s=i.appendWholeWordsLabel||"",o=i.appendRegexLabel||"",r=i.history||[],a=!!i.flexibleHeight,l=!!i.flexibleWidth,h=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new DV(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:r,showHistoryHint:i.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:h,inputBoxStyles:i.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new wV(Object.assign({appendTitle:o,isChecked:!1},i.toggleStyles))),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new CV(Object.assign({appendTitle:s,isChecked:!1},i.toggleStyles))),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new bV(Object.assign({appendTitle:n,isChecked:!1},i.toggleStyles))),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(document.activeElement);if(i>=0){let n=-1;t.equals(17)?n=(i+1)%e.length:t.equals(15)&&(n=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):n>=0&&e[n].focus(),as(t,!0)}}}))}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(null==i?void 0:i.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),null==e||e.appendChild(this.domNode),this._register(En(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(En(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,i;this.domNode.classList.remove("disabled"),this.inputBox.enable(),null===(e=this.regex)||void 0===e||e.enable(),null===(t=this.wholeWords)||void 0===t||t.enable(),null===(i=this.caseSensitive)||void 0===i||i.enable();for(const n of this.additionalToggles)n.enable()}disable(){var e,t,i;this.domNode.classList.add("disabled"),this.inputBox.disable(),null===(e=this.regex)||void 0===e||e.disable(),null===(t=this.wholeWords)||void 0===t||t.disable(),null===(i=this.caseSensitive)||void 0===i||i.disable();for(const n of this.additionalToggles)n.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new N;for(const t of null!=e?e:[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,i,n,s,o,r;this.inputBox.paddingRight=e?0:(null!==(i=null===(t=this.caseSensitive)||void 0===t?void 0:t.width())&&void 0!==i?i:0)+(null!==(s=null===(n=this.wholeWords)||void 0===n?void 0:n.width())&&void 0!==s?s:0)+(null!==(r=null===(o=this.regex)||void 0===o?void 0:o.width())&&void 0!==r?r:0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return null!==(t=null===(e=this.caseSensitive)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return null!==(t=null===(e=this.wholeWords)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return null!==(t=null===(e=this.regex)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;null===(e=this.caseSensitive)||void 0===e||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var EV,IV;!function(e){e[e.Expanded=0]="Expanded",e[e.Collapsed=1]="Collapsed",e[e.PreserveOrExpanded=2]="PreserveOrExpanded",e[e.PreserveOrCollapsed=3]="PreserveOrCollapsed"}(EV||(EV={})),function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element",e[e.Filter=3]="Filter"}(IV||(IV={}));class MV extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class TV{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function RV(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function AV(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function OV(e){return"boolean"==typeof e.collapsible}class PV{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new Z,this._onDidChangeCollapseState=new U,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new U,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new U,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new Xh(Kh),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=v.empty(),n={}){if(0===e.length)throw new MV(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,s,o){var r;void 0===n&&(n=v.empty()),void 0===o&&(o=null!==(r=s.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,s);const l=[...n],h=t[t.length-1],d=new dI({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,h),...l,...a.children.slice(h+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(d.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,s);const c=t.slice(0,-1),u=(t,i,n)=>{if(o>0)for(let r=0;rt.originalStart-e.originalStart)))u(g,p,g-(m.originalStart+m.originalLength)),g=m.originalStart,p=m.modifiedStart-h,this.spliceSimple([...c,g],m.originalLength,v.slice(l,p,p+m.modifiedLength),s);u(g,p,g)}spliceSimple(e,t,i=v.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:o}){const{parentNode:r,listIndex:a,revealed:l,visible:h}=this.getParentNodeWithListIndex(e),d=[],c=v.map(i,(e=>this.createTreeNode(e,r,r.visible?1:0,l,d,n))),u=e[e.length-1],g=r.children.length>0;let p=0;for(let v=u;v>=0&&vo.getId(e.element).toString()))):r.lastDiffIds=r.children.map((e=>o.getId(e.element).toString())):r.lastDiffIds=void 0;let C=0;for(const v of b)v.visible&&C++;if(0!==C)for(let v=u+m.length;ve+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(r,_-e),this.list.splice(a,e,d)}if(b.length>0&&s){const e=t=>{s(t),t.children.forEach(e)};b.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:b});const w=r.children.length>0;g!==w&&this.setCollapsible(e.slice(0,-1),w);let y=r;for(;y;){if(2===y.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}y=y.parent}}rerender(e){if(0===e.length)throw new MV(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,s)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),o=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&o&&!OV(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return o}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const o=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=o-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(OV(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!OV(t)&&t.recursive)for(const s of e.children)n=this._setNodeCollapseState(s,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,o){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&s.push(r);const l=e.children||v.empty(),h=n&&0!==a&&!r.collapsed;let d=0,c=1;for(const u of l){const e=this.createTreeNode(u,r,a,h,s,o);r.children.push(e),c+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=d++)}return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=d,r.visible=2===a?d>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=c):(r.renderNodeCount=0,n&&s.pop()),null==o||o(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),0===s)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const o=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===s)e.visibleChildrenCount=0;else{let t=0;for(const o of e.children)r=this._updateNodeAfterFilterChange(o,s,i,n&&!e.collapsed)||r,o.visible&&(o.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===s?r:1===s,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-o):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):RV(i)?(e.filterData=i.data,AV(i.visibility)):(e.filterData=void 0,AV(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new MV(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(e),o=e[e.length-1];if(o<0||o>t.children.length)throw new MV(this.user,"Invalid tree location");const r=t.children[o];return{node:r,listIndex:i,revealed:n,visible:s&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[o,...r]=e;if(o<0||o>t.children.length)throw new MV(this.user,"Invalid tree location");for(let a=0;ae.element))),this.data=e}}function WV(e){return e instanceof HD?new BV(e):e}class VV{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=E.None,this.disposables=new N}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,WV(e),t)}onDragOver(e,t,i,n,s=!0){const o=this.dnd.onDragOver(WV(e),t&&t.element,i,n),r=this.autoExpandNode!==t;if(r&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return o;if(r&&"boolean"!=typeof o&&o.autoExpand&&(this.autoExpandDisposable=ed((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500,this.disposables)),"boolean"==typeof o||!o.accept||void 0===o.bubble||o.feedback){if(!s){return{accept:"boolean"==typeof o?o:o.accept,effect:"boolean"==typeof o?void 0:o.effect,feedback:[i]}}return o}if(1===o.bubble){const i=this.modelProvider(),s=i.getNodeLocation(t),o=i.getParentNodeLocation(s),r=i.getNode(o),a=o&&i.getListIndex(o);return this.onDragOver(e,r,a,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),h=a.getListIndex(l),d=a.getListRenderCount(l);return Object.assign(Object.assign({},o),{feedback:zd(h,h+d)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(WV(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}class HV{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;null===(n=(i=this.delegate).setDynamicHeight)||void 0===n||n.call(i,e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(FV||(FV={}));class zV{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new N,this.onDidChange=B.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class UV{constructor(e,t,i,n,s,o={}){var r;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=UV.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=E.None,this.disposables=new N,this.templateId=e.templateId,this.updateOptions(o),B.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),null===(r=e.onDidChangeTwistieState)||void 0===r||r.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){const t=hD(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if(void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==FV.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new N;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=ds(e,fs(".monaco-tl-row")),i=ds(t,fs(".monaco-tl-indent")),n=ds(t,fs(".monaco-tl-twistie")),s=ds(t,fs(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:E.None,templateData:o}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var s,o;i.indentGuidesDisposable.dispose(),null===(o=(s=this.renderer).disposeElement)||void 0===o||o.call(s,e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=UV.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...ea.asClassNameArray(Qr.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...ea.asClassNameArray(Qr.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(Dn(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new N,n=this.modelProvider();for(;;){const s=n.getNodeLocation(e),o=n.getParentNodeLocation(s);if(!o)break;const r=n.getNode(o),a=fs(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(r)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(r,a),i.add(x((()=>this.renderedIndentGuides.delete(r,a)))),e=r}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const s=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):s&&t.add(i.getNode(s))}catch(ge){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),k(this.disposables)}}UV.DefaultIndent=8;class KV{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new N,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"==typeof n?n?1:0:RV(n)?AV(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:Ir.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),s=Array.isArray(n)?n:[n];for(const o of s){const e=o&&o.toString();if(void 0===e)return{data:Ir.Default,visibility:i};let t;if(this.tree.findMatchType===qV.Contiguous){const i=e.toLowerCase().indexOf(this._lowercasePattern);if(i>-1){t=[Number.MAX_SAFE_INTEGER,0];for(let e=this._lowercasePattern.length;e>0;e--)t.push(i+e-1)}}else t=Tr(this._pattern,this._lowercasePattern,0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(t)return this._matchCount++,1===s.length?{data:t,visibility:i}:{data:{label:e,score:t},visibility:i}}return this.tree.findMode===jV.Filter?"number"==typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:Ir.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){k(this.disposables)}}var jV,qV;!function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(jV||(jV={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(qV||(qV={}));class $V{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,s,o={}){var r,a;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=s,this.options=o,this._pattern="",this.width=0,this._onDidChangeMode=new U,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new U,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new U,this._onDidChangeOpenState=new U,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new N,this.disposables=new N,this._mode=null!==(r=e.options.defaultFindMode)&&void 0!==r?r:jV.Highlight,this._matchType=null!==(a=e.options.defaultFindMatchType)&&void 0!==a?a:qV.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){var e,t,i,n;const s=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&s?null===(e=this.tree.options.showNotFoundMessage)||void 0===e||e?null===(t=this.widget)||void 0===t||t.showMessage({type:2,content:ue(0,"No elements found.")}):null===(i=this.widget)||void 0===i||i.showMessage({type:2}):null===(n=this.widget)||void 0===n||n.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===jV.Filter||(this.filter.totalCount>0&&this.filter.matchCount<=1||!Ir.isDefault(e.filterData))}layout(e){var t;this.width=e,null===(t=this.widget)||void 0===t||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function GV(e){let t=IV.Unknown;return $n(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=IV.Twistie:$n(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=IV.Element:$n(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=IV.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function ZV(e,t){t(e),e.children.forEach((e=>ZV(e,t)))}class YV{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new U,this.onDidChange=this._onDidChange.event}set(e,t){!(null==t?void 0:t.__forceEvent)&&Id(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>ZV(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>ZV(e,n)));const s=new Map,o=e=>s.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>ZV(e,o)));const r=[];for(const a of this.nodes){const e=this.identityProvider.getId(a.element).toString();if(i.has(e)){const t=s.get(e);t&&t.visible&&r.push(t)}else r.push(a)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class XV extends dx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(ix(e.browserEvent.target)||ex(e.browserEvent.target)||tx(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let s=!1;if(s="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,s&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.getNodeLocation(t),o=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,o),s&&n)return void(e.browserEvent.isHandledByList=!0)}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}}class QV extends bx{constructor(e,t,i,n,s,o,r,a){super(e,t,i,n,a),this.focusTrait=s,this.selectionTrait=o,this.anchorTrait=r}createMouseController(e){return new XV(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],s=[];let o;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&s.push(e+i),this.anchorTrait.has(t)&&(o=e+i)})),n.length>0&&super.setFocus(Vd([...super.getFocus(),...n])),s.length>0&&super.setSelection(Vd([...super.getSelection(),...s])),"number"==typeof o&&super.setAnchor(o)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class JV{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return B.filter(B.map(this.view.onMouseDblClick,GV),(e=>e.target!==IV.Filter))}get onPointer(){return B.map(this.view.onPointer,GV)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return B.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.mode)&&void 0!==t?t:jV.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.matchType)&&void 0!==t?t:qV.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,n,s={}){var o;this._user=e,this._options=s,this.eventBufferer=new Z,this.onDidChangeFindOpenState=B.None,this.disposables=new N,this._onWillRefilter=new U,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new U;const r=new HV(i),a=new Y,l=new Y,h=this.disposables.add(new zV(l.event)),d=new qs;this.renderers=n.map((e=>new UV(e,(()=>this.model),a.event,h,d,s)));for(const m of this.renderers)this.disposables.add(m);let c;s.keyboardNavigationLabelProvider&&(c=new KV(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:c}),this.disposables.add(c)),this.focus=new YV((()=>this.view.getFocusedElements()[0]),s.identityProvider),this.selection=new YV((()=>this.view.getSelectedElements()[0]),s.identityProvider),this.anchor=new YV((()=>this.view.getAnchorElement()),s.identityProvider),this.view=new QV(e,t,r,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},function(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:e=>t.identityProvider.getId(e.element)},dnd:t.dnd&&new VV(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize(t){const i=e(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>t.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>t.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)})})}((()=>this.model),s)),{tree:this})),this.model=this.createModel(e,this.view,s),a.input=this.model.onDidChangeCollapseState;const u=B.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);u((()=>null),null,this.disposables);const g=this.disposables.add(new U),p=this.disposables.add(new Xh(0));if(this.disposables.add(B.any(u,this.focus.onDidChange,this.selection.onDidChange)((()=>{p.trigger((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);g.fire([...e.values()])}))}))),l.input=g.event,!1!==s.keyboardSupport){const e=B.chain(this.view.onKeyDown,(e=>e.filter((e=>!ex(e.target))).map((e=>new St(e)))));B.chain(e,(e=>e.filter((e=>15===e.keyCode))))(this.onLeftArrow,this,this.disposables),B.chain(e,(e=>e.filter((e=>17===e.keyCode))))(this.onRightArrow,this,this.disposables),B.chain(e,(e=>e.filter((e=>10===e.keyCode))))(this.onSpace,this,this.disposables)}if((null===(o=s.findWidgetEnabled)||void 0===o||o)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new $V(this,this.model,this.view,c,s.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=B.None,this.onDidChangeFindMatchType=B.None;this.styleElement=Jn(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===FV.Always)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e);for(const i of this.renderers)i.updateOptions(e);this.view.updateOptions(this._options),null===(t=this.findController)||void 0===t||t.updateOptions(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===FV.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),Wr(t)&&(null===(i=this.findController)||void 0===i||i.layout(t))}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){k(this.disposables),this.view.dispose()}}class eH{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new PV(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=v.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=v.empty(),i){const n=new Set,s=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null===e.element)return;const o=e;if(n.add(o.element),this.nodes.set(o.element,o),this.identityProvider){const e=this.identityProvider.getId(o.element).toString();s.add(e),this.nodesByIdentity.set(e,o)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,o)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const o=e;if(n.has(o.element)||this.nodes.delete(o.element),this.identityProvider){const e=this.identityProvider.getId(o.element).toString();s.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,o)}}))}preserveCollapseState(e=v.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),v.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t){let t;return t=void 0===e.collapsed?void 0:e.collapsed===EV.Collapsed||e.collapsed===EV.PreserveOrCollapsed||e.collapsed!==EV.Expanded&&e.collapsed!==EV.PreserveOrExpanded&&Boolean(e.collapsed),Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children),collapsed:t})}const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible;let n;return n=void 0===e.collapsed||e.collapsed===EV.PreserveOrCollapsed||e.collapsed===EV.PreserveOrExpanded?t.collapsed:e.collapsed===EV.Collapsed||e.collapsed!==EV.Expanded&&Boolean(e.collapsed),Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new MV(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new MV(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new MV(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new MV(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function tH(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:v.map(v.from(e.children),tH),collapsible:e.collapsible,collapsed:e.collapsed}}function iH(e){const t=[e.element],i=e.incompressible||!1;let n,s;for(;[s,n]=v.consume(v.from(e.children),2),1===s.length&&!s[0].incompressible;)e=s[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:v.map(v.concat(s,n),iH),collapsible:e.collapsible,collapsed:e.collapsed}}function nH(e,t=0){let i;return i=tnH(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function sH(e){return nH(e,0)}function oH(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:v.map(v.from(e.children),(e=>oH(e,t,i)))})}class rH{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new eH(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=v.empty(),i){const n=i.diffIdentityProvider&&(s=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>s.getId(e).toString())).join("\0")});var s;if(null===e){const e=v.map(t,this.enabled?iH:tH);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const o=this.nodes.get(e);if(!o)throw new MV(this.user,"Unknown compressed tree node");const r=this.model.getNode(o),a=this.model.getParentNodeLocation(o),l=this.model.getNode(a),h=oH(sH(r),e,t),d=(this.enabled?iH:tH)(h),c=i.diffIdentityProvider?(e,t)=>i.diffIdentityProvider.getId(e)===i.diffIdentityProvider.getId(t):void 0;if(Id(d.element.elements,r.element.elements,c))return void this._setChildren(o,d.children||v.empty(),{diffIdentityProvider:n,diffDepth:1});const u=l.children.map((e=>e===r?d:e));this._setChildren(l.element,u,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=v.map(t,sH),n=v.map(i,e?iH:tH);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new MV(this.user,`Tree element not found: ${e}`);return t}}const aH=e=>e[e.length-1];class lH{get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new lH(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}class hH{get onDidSplice(){return B.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return B.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return B.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||aH;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new TV((e=>new lH(n,e))),this.model=new rH(e,function(e,t){return{splice(i,n,s){t.splice(i,n,s.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(n,i))}setChildren(e,t=v.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var dH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class cH extends JV{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}setChildren(e,t=v.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new eH(e,t,i)}}class uH{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===s.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){var s,o,r,a;i.compressedTreeNode?null===(o=(s=this.renderer).disposeCompressedElements)||void 0===o||o.call(s,i.compressedTreeNode,t,i.data,n):null===(a=(r=this.renderer).disposeElement)||void 0===a||a.call(r,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}dH([UL],uH.prototype,"compressedTreeNodeProvider",null);class gH extends cH{constructor(e,t,i,n,s={}){const o=()=>this;super(e,t,i,n.map((e=>new uH(o,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(ge){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(o,s))}setChildren(e,t=v.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new hH(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var pH=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function mH(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function fH(e,t){return!!t.parent&&(t.parent===e||fH(e,t.parent))}class _H{get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new _H(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class vH{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...ea.asClassNameArray(Qr.treeItemLoading)),!0):(t.classList.remove(...ea.asClassNameArray(Qr.treeItemLoading)),!1)}disposeElement(e,t,i,n){var s,o;null===(o=(s=this.renderer).disposeElement)||void 0===o||o.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function bH(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function CH(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class wH extends HD{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function yH(e){return e instanceof HD?new wH(e):e}class SH{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,yH(e),t)}onDragOver(e,t,i,n,s=!0){return this.dnd.onDragOver(yH(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(yH(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}dispose(){this.dnd.dispose()}}function LH(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new SH(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"==typeof e.defaultFindVisibility?e.defaultFindVisibility:void 0===e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)})}function kH(e,t){t(e),e.children.forEach((e=>kH(e,t)))}class DH{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return B.map(this.tree.onDidChangeFocus,bH)}get onDidChangeSelection(){return B.map(this.tree.onDidChangeSelection,bH)}get onMouseDblClick(){return B.map(this.tree.onMouseDblClick,CH)}get onPointer(){return B.map(this.tree.onPointer,CH)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,s,o={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new U,this._onDidChangeNodeSlowState=new U,this.nodeMapper=new TV((e=>new _H(e))),this.disposables=new N,this.identityProvider=o.identityProvider,this.autoExpandSingleChildren=void 0!==o.autoExpandSingleChildren&&o.autoExpandSingleChildren,this.sorter=o.sorter,this.collapseByDefault=o.collapseByDefault,this.tree=this.createTree(e,t,i,n,o),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=mH({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,s){const o=new HV(i),r=n.map((e=>new vH(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=LH(s)||{};return new cH(e,t,o,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return pH(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,s){return pH(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new MV(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield B.toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(yield this.refreshAndRenderNode(o,t,n,s),i)try{this.tree.rerender(o)}catch(ge){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return pH(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new MV(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield B.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield B.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield B.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new MV(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return pH(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return pH(this,void 0,void 0,(function*(){let n;if(this.subTreeRefreshPromises.forEach(((s,o)=>{!n&&function(e,t){return e===t||fH(e,t)||fH(t,e)}(o,e)&&(n=s.then((()=>this.refreshNode(e,t,i))))})),n)return n;if(e!==this.root){if(this.tree.getNode(e).collapsed)return e.hasChildren=!!this.dataSource.hasChildren(e.element),void(e.stale=!0)}return this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return pH(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=yield this.doRefreshNode(e,t,i);e.stale=!1,yield ld.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return pH(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if(Vr(t))n=Promise.resolve(t);else{const i=Jh(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(v.empty());try{const s=yield n;return this.setChildren(e,s,t,i)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),d(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return Vr(i)?this.processChildren(i):(t=Gh((()=>pH(this,void 0,void 0,(function*(){return this.processChildren(yield i)})))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(r))}setChildren(e,t,i,n){const s=[...t];if(0===e.children.length&&0===s.length)return[];const o=new Map,r=new Map;for(const h of e.children)if(o.set(h.element,h),this.identityProvider){const e=this.tree.isCollapsed(h);r.set(h.id,{node:h,collapsed:e})}const a=[],l=s.map((t=>{const s=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=mH({element:t,parent:e,hasChildren:s});return s&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),h=r.get(l);if(h){const e=h.node;return o.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=s,i?h.collapsed?(e.children.forEach((e=>kH(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):s&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const d=mH({element:t,parent:e,id:l,hasChildren:s});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(d):s&&this.collapseByDefault&&!this.collapseByDefault(t)&&(d.collapsedByDefault=!1,a.push(d)),d}));for(const h of o.values())kH(h,(e=>this.nodes.delete(e.element)));for(const h of l)this.nodes.set(h.element,h);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),s=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?v.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class xH{get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new xH(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class NH{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...ea.asClassNameArray(Qr.treeItemLoading)),!0):(t.classList.remove(...ea.asClassNameArray(Qr.treeItemLoading)),!1)}disposeElement(e,t,i,n){var s,o;null===(o=(s=this.renderer).disposeElement)||void 0===o||o.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var s,o;null===(o=(s=this.renderer).disposeCompressedElements)||void 0===o||o.call(s,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=k(this.disposables)}}class EH extends DH{constructor(e,t,i,n,s,o,r={}){super(e,t,i,s,o,r),this.compressionDelegate=n,this.compressibleNodeMapper=new TV((e=>new xH(e))),this.filter=r.filter}createTree(e,t,i,n,s){const o=new HV(i),r=n.map((e=>new NH(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&LH(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(s)||{};return new gH(e,t,o,r,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},s=n(this.tree.getSelection()),o=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let h=!1;const d=e=>{const t=e.element;if(t)for(let n=0;n{const t=this.filter.filter(e,1),i="boolean"==typeof(n=t)?n?1:0:RV(n)?AV(n.visibility):AV(n);var n;if(2===i)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===i}))),super.processChildren(e)}}class IH extends JV{constructor(e,t,i,n,s,o={}){super(e,t,i,n,o),this.user=e,this.dataSource=s,this.identityProvider=o.identityProvider}createModel(e,t,i){return new eH(e,t,i)}}new Tl("isMac",Pe,ue(0,"Whether the operating system is macOS")),new Tl("isLinux",Fe,ue(0,"Whether the operating system is Linux"));const MH=new Tl("isWindows",Oe,ue(0,"Whether the operating system is Windows")),TH=new Tl("isWeb",We,ue(0,"Whether the platform is a web browser")),RH=(new Tl("isMacNative",Pe&&!We,ue(0,"Whether the operating system is macOS on a non-browser platform")),new Tl("isIOS",He,ue(0,"Whether the operating system is iOS")),new Tl("isMobile",ze,ue(0,"Whether the platform is a mobile web browser")),new Tl("isDevelopment",!1,!0),new Tl("productQualityType","",ue(0,"Quality type of VS Code")),"inputFocus");new Tl(RH,!1,ue(0,"Whether keyboard focus is inside an input box"));var AH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},OH=function(e,t){return function(i,n){t(i,n,e)}};const PH=Pa("listService");const FH=new Tl("listScrollAtBoundary","none"),BH=(ul.or(FH.isEqualTo("top"),FH.isEqualTo("both")),ul.or(FH.isEqualTo("bottom"),FH.isEqualTo("both")),new Tl("listFocus",!0)),WH=new Tl("listSupportsMultiselect",!0),VH=ul.and(BH,ul.not(RH)),HH=new Tl("listHasSelectionOrFocus",!1),zH=new Tl("listDoubleSelection",!1),UH=new Tl("listMultiSelection",!1),KH=new Tl("listSelectionNavigation",!1),jH=new Tl("listSupportsFind",!0),qH=new Tl("treeElementCanCollapse",!1),$H=new Tl("treeElementHasParent",!1),GH=new Tl("treeElementCanExpand",!1),ZH=new Tl("treeElementHasChild",!1),YH=new Tl("treeFindOpen",!1),XH="listTypeNavigationMode",QH="listAutomaticKeyboardNavigation";function JH(e,t){const i=e.createScoped(t.getHTMLElement());return BH.bindTo(i),i}function ez(e,t){const i=FH.bindTo(e),n=()=>{const e=0===t.scrollTop,n=t.scrollHeight-t.renderHeight-t.scrollTop<1;e&&n?i.set("both"):e?i.set("top"):n?i.set("bottom"):i.set("none")};return n(),t.onDidScroll(n)}const tz="workbench.list.multiSelectModifier",iz="workbench.list.openMode",nz="workbench.list.horizontalScrolling",sz="workbench.list.defaultFindMode",oz="workbench.list.typeNavigationMode",rz="workbench.list.keyboardNavigation",az="workbench.list.scrollByPage",lz="workbench.list.defaultFindMatchType",hz="workbench.tree.indent",dz="workbench.tree.renderIndentGuides",cz="workbench.list.smoothScrolling",uz="workbench.list.mouseWheelScrollSensitivity",gz="workbench.list.fastScrollSensitivity",pz="workbench.tree.expandMode";function mz(e){return"alt"===e.getValue(tz)}class fz extends E{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=mz(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(tz)&&(this.useAltAsMultipleSelectionModifier=mz(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:ax(e)}isSelectionRangeChangeEvent(e){return lx(e)}}function _z(e,t){var i;const n=e.get(uu),s=e.get(PL),o=new N;return[Object.assign(Object.assign({},t),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>s.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(n.getValue(cz)),mouseWheelScrollSensitivity:n.getValue(uz),fastScrollSensitivity:n.getValue(gz),multipleSelectionController:null!==(i=t.multipleSelectionController)&&void 0!==i?i:o.add(new fz(n)),keyboardNavigationEventFilter:kz(s),scrollByPage:Boolean(n.getValue(az))}),o]}let vz=class extends bx{constructor(e,t,i,n,s,o,r,a,l){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(a.getValue(nz)),[d,c]=l.invokeFunction(_z,s);super(e,t,i,n,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:h})),this.disposables.add(c),this.contextKeyService=JH(o,this),this.disposables.add(ez(this.contextKeyService,this)),this.listSupportsMultiSelect=WH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport);KH.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=HH.bindTo(this.contextKeyService),this.listDoubleSelection=zH.bindTo(this.contextKeyService),this.listMultiSelection=UH.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=mz(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(tz)&&(this._useAltAsMultipleSelectionModifier=mz(a));let t={};if(e.affectsConfiguration(nz)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(nz));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(az)){const e=Boolean(a.getValue(az));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(cz)){const e=Boolean(a.getValue(cz));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(uz)){const e=a.getValue(uz);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(gz)){const e=a.getValue(gz);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new yz(this,Object.assign({configurationService:a},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Yx(e):Zx)}};vz=AH([OH(5,Rl),OH(6,PH),OH(7,uu),OH(8,Oa)],vz);let bz=class extends sV{constructor(e,t,i,n,s,o,r,a,l){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(a.getValue(nz)),[d,c]=l.invokeFunction(_z,s);super(e,t,i,n,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:h})),this.disposables=new N,this.disposables.add(c),this.contextKeyService=JH(o,this),this.disposables.add(ez(this.contextKeyService,this.widget)),this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=WH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport);KH.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this._useAltAsMultipleSelectionModifier=mz(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(tz)&&(this._useAltAsMultipleSelectionModifier=mz(a));let t={};if(e.affectsConfiguration(nz)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(nz));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(az)){const e=Boolean(a.getValue(az));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(cz)){const e=Boolean(a.getValue(cz));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(uz)){const e=a.getValue(uz);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(gz)){const e=a.getValue(gz);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new yz(this,Object.assign({configurationService:a},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Yx(e):Zx)}dispose(){this.disposables.dispose(),super.dispose()}};bz=AH([OH(5,Rl),OH(6,PH),OH(7,uu),OH(8,Oa)],bz);let Cz=class extends pV{constructor(e,t,i,n,s,o,r,a,l,h){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(nz)),[c,u]=h.invokeFunction(_z,o);super(e,t,i,n,s,Object.assign(Object.assign({keyboardSupport:!1},c),{horizontalScrolling:d})),this.disposables.add(u),this.contextKeyService=JH(r,this),this.disposables.add(ez(this.contextKeyService,this)),this.listSupportsMultiSelect=WH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);KH.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=HH.bindTo(this.contextKeyService),this.listDoubleSelection=zH.bindTo(this.contextKeyService),this.listMultiSelection=UH.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=mz(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(tz)&&(this._useAltAsMultipleSelectionModifier=mz(l));let t={};if(e.affectsConfiguration(nz)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(nz));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(az)){const e=Boolean(l.getValue(az));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(cz)){const e=Boolean(l.getValue(cz));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(uz)){const e=l.getValue(uz);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(gz)){const e=l.getValue(gz);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Sz(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Yx(e):Zx)}dispose(){this.disposables.dispose(),super.dispose()}};Cz=AH([OH(6,Rl),OH(7,PH),OH(8,uu),OH(9,Oa)],Cz);class wz extends E{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new U),this.onDidOpen=this._onDidOpen.event,this._register(B.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(iz)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(iz)&&(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(iz)))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class yz extends wz{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Sz extends wz{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Lz extends wz{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function kz(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return 1===n.kind?(t=!0,!1):(t=!1,0===n.kind)}}let Dz=class extends cH{constructor(e,t,i,n,s,o,r,a,l){const{options:h,getTypeNavigationMode:d,disposable:c}=o.invokeFunction(Rz,s);super(e,t,i,n,h),this.disposables.add(c),this.internals=new Az(this,s,d,s.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};Dz=AH([OH(5,Oa),OH(6,Rl),OH(7,PH),OH(8,uu)],Dz);let xz=class extends gH{constructor(e,t,i,n,s,o,r,a,l){const{options:h,getTypeNavigationMode:d,disposable:c}=o.invokeFunction(Rz,s);super(e,t,i,n,h),this.disposables.add(c),this.internals=new Az(this,s,d,s.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};xz=AH([OH(5,Oa),OH(6,Rl),OH(7,PH),OH(8,uu)],xz);let Nz=class extends IH{constructor(e,t,i,n,s,o,r,a,l,h){const{options:d,getTypeNavigationMode:c,disposable:u}=r.invokeFunction(Rz,o);super(e,t,i,n,s,d),this.disposables.add(u),this.internals=new Az(this,o,c,o.overrideStyles,a,l,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Nz=AH([OH(6,Oa),OH(7,Rl),OH(8,PH),OH(9,uu)],Nz);let Ez=class extends DH{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,o,r,a,l,h){const{options:d,getTypeNavigationMode:c,disposable:u}=r.invokeFunction(Rz,o);super(e,t,i,n,s,d),this.disposables.add(u),this.internals=new Az(this,o,c,o.overrideStyles,a,l,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Ez=AH([OH(6,Oa),OH(7,Rl),OH(8,PH),OH(9,uu)],Ez);let Iz=class extends EH{constructor(e,t,i,n,s,o,r,a,l,h,d){const{options:c,getTypeNavigationMode:u,disposable:g}=a.invokeFunction(Rz,r);super(e,t,i,n,s,o,c),this.disposables.add(g),this.internals=new Az(this,r,u,r.overrideStyles,l,h,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function Mz(e){const t=e.getValue(sz);if("highlight"===t)return jV.Highlight;if("filter"===t)return jV.Filter;const i=e.getValue(rz);return"simple"===i||"highlight"===i?jV.Highlight:"filter"===i?jV.Filter:void 0}function Tz(e){const t=e.getValue(lz);return"fuzzy"===t?qV.Fuzzy:"contiguous"===t?qV.Contiguous:void 0}function Rz(e,t){var i;const n=e.get(uu),s=e.get(Vx),o=e.get(Rl),r=e.get(Oa),a=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(nz)),[l,h]=r.invokeFunction(_z,t),d=t.paddingBottom,c=void 0!==t.renderIndentGuides?t.renderIndentGuides:n.getValue(dz);return{getTypeNavigationMode:()=>{const e=o.getContextKeyValue(XH);if("automatic"===e)return qD.Automatic;if("trigger"===e)return qD.Trigger;if(!1===o.getContextKeyValue(QH))return qD.Trigger;const t=n.getValue(oz);return"automatic"===t?qD.Automatic:"trigger"===t?qD.Trigger:void 0},disposable:h,options:Object.assign(Object.assign({keyboardSupport:!1},l),{indent:"number"==typeof n.getValue(hz)?n.getValue(hz):void 0,renderIndentGuides:c,smoothScrolling:Boolean(n.getValue(cz)),defaultFindMode:Mz(n),defaultFindMatchType:Tz(n),horizontalScrolling:a,scrollByPage:Boolean(n.getValue(az)),paddingBottom:d,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(i=t.expandOnlyOnTwistieClick)&&void 0!==i?i:"doubleClick"===n.getValue(pz),contextViewProvider:s,findWidgetStyles:$x})}}Iz=AH([OH(7,Oa),OH(8,Rl),OH(9,PH),OH(10,uu)],Iz);let Az=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,s,o,r){var a;this.tree=e,this.disposables=[],this.contextKeyService=JH(s,e),this.disposables.push(ez(this.contextKeyService,e)),this.listSupportsMultiSelect=WH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport);KH.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=jH.bindTo(this.contextKeyService),this.listSupportFindWidget.set(null===(a=t.findWidgetEnabled)||void 0===a||a),this.hasSelectionOrFocus=HH.bindTo(this.contextKeyService),this.hasDoubleSelection=zH.bindTo(this.contextKeyService),this.hasMultiSelection=UH.bindTo(this.contextKeyService),this.treeElementCanCollapse=qH.bindTo(this.contextKeyService),this.treeElementHasParent=$H.bindTo(this.contextKeyService),this.treeElementCanExpand=GH.bindTo(this.contextKeyService),this.treeElementHasChild=ZH.bindTo(this.contextKeyService),this.treeFindOpen=YH.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=mz(r),this.updateStyleOverrides(n);const l=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},h=new Set;h.add(XH),h.add(QH),this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),l()})),e.onDidChangeCollapseState(l),e.onDidChangeModel(l),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),r.onDidChangeConfiguration((n=>{let s={};if(n.affectsConfiguration(tz)&&(this._useAltAsMultipleSelectionModifier=mz(r)),n.affectsConfiguration(hz)){const e=r.getValue(hz);s=Object.assign(Object.assign({},s),{indent:e})}if(n.affectsConfiguration(dz)&&void 0===t.renderIndentGuides){const e=r.getValue(dz);s=Object.assign(Object.assign({},s),{renderIndentGuides:e})}if(n.affectsConfiguration(cz)){const e=Boolean(r.getValue(cz));s=Object.assign(Object.assign({},s),{smoothScrolling:e})}if(n.affectsConfiguration(sz)||n.affectsConfiguration(rz)){const e=Mz(r);s=Object.assign(Object.assign({},s),{defaultFindMode:e})}if(n.affectsConfiguration(oz)||n.affectsConfiguration(rz)){const e=i();s=Object.assign(Object.assign({},s),{typeNavigationMode:e})}if(n.affectsConfiguration(lz)){const e=Tz(r);s=Object.assign(Object.assign({},s),{defaultFindMatchType:e})}if(n.affectsConfiguration(nz)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(nz));s=Object.assign(Object.assign({},s),{horizontalScrolling:e})}if(n.affectsConfiguration(az)){const e=Boolean(r.getValue(az));s=Object.assign(Object.assign({},s),{scrollByPage:e})}if(n.affectsConfiguration(pz)&&void 0===t.expandOnlyOnTwistieClick&&(s=Object.assign(Object.assign({},s),{expandOnlyOnTwistieClick:"doubleClick"===r.getValue(pz)})),n.affectsConfiguration(uz)){const e=r.getValue(uz);s=Object.assign(Object.assign({},s),{mouseWheelScrollSensitivity:e})}if(n.affectsConfiguration(gz)){const e=r.getValue(gz);s=Object.assign(Object.assign({},s),{fastScrollSensitivity:e})}Object.keys(s).length>0&&e.updateOptions(s)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(h)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new Lz(e,Object.assign({configurationService:r},t)),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?Yx(e):Zx)}dispose(){this.disposables=k(this.disposables)}};Az=AH([OH(4,Rl),OH(5,PH),OH(6,uu)],Az);Ul.as(ku).registerConfiguration({id:"workbench",order:7,title:ue(0,"Workbench"),type:"object",properties:{[tz]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[ue(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),ue(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:ue(0,"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[iz]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:ue(0,"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[nz]:{type:"boolean",default:!1,description:ue(0,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[az]:{type:"boolean",default:!1,description:ue(0,"Controls whether clicks in the scrollbar scroll page by page.")},[hz]:{type:"number",default:8,minimum:4,maximum:40,description:ue(0,"Controls tree indentation in pixels.")},[dz]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:ue(0,"Controls whether the tree should render indent guides.")},[cz]:{type:"boolean",default:!1,description:ue(0,"Controls whether lists and trees have smooth scrolling.")},[uz]:{type:"number",default:1,markdownDescription:ue(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[gz]:{type:"number",default:5,markdownDescription:ue(0,"Scrolling speed multiplier when pressing `Alt`.")},[sz]:{type:"string",enum:["highlight","filter"],enumDescriptions:[ue(0,"Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),ue(0,"Filter elements when searching.")],default:"highlight",description:ue(0,"Controls the default find mode for lists and trees in the workbench.")},[rz]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[ue(0,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),ue(0,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),ue(0,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:ue(0,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:ue(0,"Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[lz]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[ue(0,"Use fuzzy matching when searching."),ue(0,"Use contiguous matching when searching.")],default:"fuzzy",description:ue(0,"Controls the type of matching used when searching lists and trees in the workbench.")},[pz]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:ue(0,"Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[oz]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:ue(0,"Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});var Oz=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Pz{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=lk.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?ue(0,"{0} in {1} on line {2} at column {3}",t.value,ba(this.uri),this.range.startLineNumber,this.range.startColumn):ue(0,"in {0} on line {1} at column {2}",ba(this.uri),this.range.startLineNumber,this.range.startColumn)}}class Fz{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:o,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:s-t}),l=new Mh(n,a.startColumn,n,s),h=new Mh(o,r,o,1073741824),d=i.getValueInRange(l).replace(/^\s+/,""),c=i.getValueInRange(e);return{value:d+c+i.getValueInRange(h).replace(/\s+$/,""),highlight:{start:d.length,end:d.length+c.length}}}}class Bz{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new zs}dispose(){k(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?ue(0,"1 symbol in {0}, full path {1}",ba(this.uri),this.uri.fsPath):ue(0,"{0} symbols in {1}, full path {2}",e,ba(this.uri),this.uri.fsPath)}resolve(e){return Oz(this,void 0,void 0,(function*(){if(0!==this._previews.size)return this;for(const i of this.children)if(!this._previews.has(i.uri))try{const t=yield e.createModelReference(i.uri);this._previews.set(i.uri,new Fz(t))}catch(t){r(t)}return this}))}}class Wz{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new U,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(Wz._compareReferences);for(const s of e)if(n&&fa.isEqual(n.uri,s.uri,!0)||(n=new Bz(this,s.uri),this.groups.push(n)),0===n.children.length||0!==Wz._compareReferences(s,n.children[n.children.length-1])){const e=new Pz(i===s,n,s,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){k(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new Wz(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?ue(0,"No results found"):1===this.references.length?ue(0,"Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?ue(0,"Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):ue(0,"Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,o=i.parent.groups.length;return 1===o||t&&n+10?(n=t?(n+1)%s:(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%o,i.parent.groups[n].children[0]):(n=(n+o-1)%o,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:vo(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&Mh.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return fa.compare(e.uri,t.uri)||Mh.compareRangesUsingStarts(e.range,t.range)}}class Vz{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=ds(e,fs(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=Xs(this.countFormat,this.count),this.element.title=Xs(this.titleFormat,this.count),this.element.style.backgroundColor=null!==(e=this.styles.badgeBackground)&&void 0!==e?e:"",this.element.style.color=null!==(t=this.styles.badgeForeground)&&void 0!==t?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}class Hz{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=null!==(i=null==t?void 0:t.supportIcons)&&void 0!==i&&i,this.domNode=ds(e,fs("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=Hz.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&fd(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,s+=i;for(const i of t)i.end<=s||(i.start>=s&&(i.start+=n),i.end>=s&&(i.end+=n));return i+=n,"\u23ce"}))}}class zz{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class Uz extends E{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new zz(ds(e,fs(".monaco-icon-label")))),this.labelContainer=ds(this.domNode.element,fs(".monaco-icon-label-container"));const i=ds(this.labelContainer,fs("span.monaco-icon-name-container"));(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new jz(i,!!t.supportIcons):this.nameNode=new Kz(i),this.hoverDelegate=null==t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"],s=["monaco-icon-label-container"];let o="";if(i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough"),i.disabledCommand&&s.push("disabled"),i.title&&(o+=i.title)),this.domNode.className=n.join(" "),this.domNode.element.setAttribute("aria-label",o),this.labelContainer.className=s.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof Hz?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,null==i?void 0:i.labelEscapeNewLines),this.setupHover(e.element,null==i?void 0:i.descriptionTitle)):(e.textContent=t&&(null==i?void 0:i.labelEscapeNewLines)?Hz.escapeNewLines(t,[]):t||"",this.setupHover(e.element,(null==i?void 0:i.descriptionTitle)||""),e.empty=!t)}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=aD(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){Pr(t)?e.title=oa(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new zz(ds(this.labelContainer,fs("span.monaco-icon-description-container"))));(null===(e=this.creationOptions)||void 0===e?void 0:e.supportDescriptionHighlights)?this.descriptionNode=new Hz(ds(t.element,fs("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new zz(ds(t.element,fs("span.label-description"))))}return this.descriptionNode}}class Kz{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!fd(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=ds(this.container,fs("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const s={start:n,end:n+e.length},o=i.map((e=>RD.intersect(s,e))).filter((e=>!RD.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=s.end+t.length,o}))}(e,i,null==t?void 0:t.matches);for(let s=0;s=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Zz=function(e,t){return function(i,n){t(i,n,e)}};let Yz=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Wz||e instanceof Bz}getChildren(e){if(e instanceof Wz)return e.groups;if(e instanceof Bz)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};Yz=Gz([Zz(0,Va)],Yz);class Xz{getHeight(){return 23}getTemplateId(e){return e instanceof Bz?tU.id:nU.id}}let Qz=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Pz){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return ba(e.uri)}};Qz=Gz([Zz(0,PL)],Qz);class Jz{getId(e){return e instanceof Pz?e.id:e.uri}}let eU=class extends E{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new Uz(i,{supportHighlights:!0})),this.badge=new Vz(ds(i,fs(".count")),{},Gx),e.appendChild(i)}set(e,t){const i=wa(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(ue(0,"{0} references",n)):this.badge.setTitleFormat(ue(0,"{0} reference",n))}};eU=Gz([Zz(1,qz)],eU);let tU=$z=class{constructor(e){this._instantiationService=e,this.templateId=$z.id}renderTemplate(e){return this._instantiationService.createInstance(eU,e)}renderElement(e,t,i){i.set(e.element,fr(e.filterData))}disposeTemplate(e){e.dispose()}};tU.id="FileReferencesRenderer",tU=$z=Gz([Zz(0,Oa)],tU);class iU{constructor(e){this.label=new Hz(e)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!Ir.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,fr(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${ba(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class nU{constructor(){this.templateId=nU.id}renderTemplate(e){return new iU(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}nU.id="OneReferenceRenderer";class sU{getWidgetAriaLabel(){return ue(0,"References")}getAriaLabel(e){return e.ariaMessage}}var oU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},rU=function(e,t){return function(i,n){t(i,n,e)}},aU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class lU{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new N,this._callOnModelChange=new N,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(const t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,s=e.children.length;n{const s=n.deltaDecorations([],t);for(let t=0;t{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(dU,"ReferencesWidget",this._treeContainer,new Xz,[this._instantiationService.createInstance(tU),this._instantiationService.createInstance(nU)],this._instantiationService.createInstance(Yz),t),this._splitView.addView({onDidChange:B.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},dV.Distribute),this._splitView.addView({onDidChange:B.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},dV.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const i=(e,t)=>{e instanceof Pz&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),vs(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Wn(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=ue(0,"No results"),_s(this._messageContainer),Promise.resolve(void 0)):(vs(this._messageContainer),this._decorationsManager=new lU(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),_s(this._treeContainer),_s(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof Pz?e:e instanceof Bz&&e.children.length>0?e.children[0]:void 0}revealReference(e){return aU(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return aU(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==vn.inMemory?this.setTitle(va(e.uri),this._uriLabel.getUriLabel(wa(e.uri))):this.setTitle(ue(0,"References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const n=yield i;if(!this._model)return void n.dispose();k(this._previewModelReference);const s=n.object;if(s){const t=this._preview.getModel()===s.textEditorModel?0:1,i=Mh.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}))}};cU=oU([rU(3,R_),rU(4,Va),rU(5,Oa),rU(6,zW),rU(7,qz),rU(8,rw),rU(9,PL),rU(10,yc),rU(11,Xu)],cU);var uU,gU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},pU=function(e,t){return function(i,n){t(i,n,e)}},mU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const fU=new Tl("referenceSearchVisible",!1,ue(0,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let _U=uU=class{static get(e){return e.getContribution(uU.ID)}constructor(e,t,i,n,s,o,r,a){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=o,this._storageService=r,this._configurationService=a,this._disposables=new N,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=fU.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const s="peekViewLayout",o=hU.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(cU,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(ue(0,"Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{var i;if(r===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(ue(0,"{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new Ba(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(86)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return mU(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),o=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n,!1),s?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return mU(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var i;null===(i=this._widget)||void 0===i||i.hide(),this._ignoreModelChangeEvent=!0;const n=Mh.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then((e=>{var t;if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(n),this._widget.focusOnReferenceTree();else{const i=uU.get(e),s=this._model.clone();this.closeWidget(),e.focus(),null==i||i.toggleWidget(n,Gh((e=>Promise.resolve(s))),null!==(t=this._peekMode)&&void 0!==t&&t)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,r(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function vU(e,t){const i=function(e){const t=e.get(Fa).getFocusedCodeEditor();return t instanceof cW?t.getParentEditor():t}(e);if(!i)return;const n=_U.get(i);n&&t(n)}_U.ID="editor.contrib.referencesController",_U=uU=gU([pU(2,Rl),pU(3,Fa),pU(4,uL),pU(5,Oa),pU(6,qN),pU(7,uu)],_U),jl.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:pt(2089,60),when:ul.or(fU,UW.inPeekEditor),handler(e){vU(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),jl.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:ul.or(fU,UW.inPeekEditor),handler(e){vU(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),jl.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:ul.or(fU,UW.inPeekEditor),handler(e){vU(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),Za.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),Za.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),Za.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),Za.registerCommand("closeReferenceSearch",(e=>vU(e,(e=>e.closeWidget())))),jl.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:ul.and(UW.inPeekEditor,ul.not("config.editor.stablePeek"))}),jl.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:ul.and(fU,ul.not("config.editor.stablePeek"))}),jl.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ul.and(fU,VH,qH.negate(),GH.negate()),handler(e){var t;const i=null===(t=e.get(PH).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof Pz&&vU(e,(e=>e.revealReference(i[0])))}}),jl.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ul.and(fU,VH,qH.negate(),GH.negate()),handler(e){var t;const i=null===(t=e.get(PH).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof Pz&&vU(e,(e=>e.openReference(i[0],!0,!0)))}}),Za.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(PH).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof Pz&&vU(e,(e=>e.openReference(i[0],!1,!0)))}));var bU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},CU=function(e,t){return function(i,n){t(i,n,e)}};const wU=new Tl("hasSymbols",!1,ue(0,"Whether there are symbol locations that can be navigated via keyboard-only.")),yU=Pa("ISymbolNavigationService");let SU=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=wU.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new LU(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),s=i.getPosition();if(!n||!s)return;let o=!1,r=!1;for(const a of t.references)if(_a(a.uri,n.uri))o=!0,r=r||Mh.containsPosition(a.range,s);else if(o)break;o&&r||this.reset()}));this._currentState=D(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:Mh.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?ue(0,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):ue(0,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};SU=bU([CU(0,Rl),CU(1,Fa),CU(2,uL),CU(3,PL)],SU),Cu(yU,SU,1),wh(new class extends fh{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:wU,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(yU).revealNext(t)}}),jl.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:wU,primary:9,handler(e){e.get(yU).reset()}});let LU=class{constructor(e){this._listener=new Map,this._disposables=new N,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),k(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,D(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};LU=bU([CU(0,Fa)],LU);var kU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function DU(e,t,i,n){return kU(this,void 0,void 0,(function*(){const s=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{a(e)}))));return Pd((yield Promise.all(s)).flat())}))}function xU(e,t,i,n){return DU(t,i,e,((e,t,i)=>e.provideDefinition(t,i,n)))}function NU(e,t,i,n){return DU(t,i,e,((e,t,i)=>e.provideDeclaration(t,i,n)))}function EU(e,t,i,n){return DU(t,i,e,((e,t,i)=>e.provideImplementation(t,i,n)))}function IU(e,t,i,n){return DU(t,i,e,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function MU(e,t,i,n,s){return DU(t,i,e,((e,t,i)=>kU(this,void 0,void 0,(function*(){const o=yield e.provideReferences(t,i,{includeDeclaration:!0},s);if(!n||!o||2!==o.length)return o;const r=yield e.provideReferences(t,i,{includeDeclaration:!1},s);return r&&1===r.length?r:o}))))}function TU(e){return kU(this,void 0,void 0,(function*(){const t=yield e(),i=new Wz(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}Ch("_executeDefinitionProvider",((e,t,i)=>{const n=xU(e.get(iL).definitionProvider,t,i,Hh.None);return TU((()=>n))})),Ch("_executeTypeDefinitionProvider",((e,t,i)=>{const n=IU(e.get(iL).typeDefinitionProvider,t,i,Hh.None);return TU((()=>n))})),Ch("_executeDeclarationProvider",((e,t,i)=>{const n=NU(e.get(iL).declarationProvider,t,i,Hh.None);return TU((()=>n))})),Ch("_executeReferenceProvider",((e,t,i)=>{const n=MU(e.get(iL).referenceProvider,t,i,!1,Hh.None);return TU((()=>n))})),Ch("_executeImplementationProvider",((e,t,i)=>{const n=EU(e.get(iL).implementationProvider,t,i,Hh.None);return TU((()=>n))}));var RU,AU,OU,PU,FU,BU,WU,VU,HU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};th.appendMenuItem(Ql.EditorContext,{submenu:Ql.EditorContextPeek,title:ue(0,"Peek"),group:"navigation",order:100});class zU{static is(e){return!(!e||"object"!=typeof e)&&(e instanceof zU||!(!Ba.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class UU extends bh{static all(){return UU._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const i of v.wrap(t.menu))i.id!==Ql.EditorContext&&i.id!==Ql.EditorContextPeek||(i.when=ul.and(e.precondition,i.when));return t}constructor(e,t){super(UU._patchConfig(t)),this.configuration=e,UU._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const s=e.get(uL),o=e.get(Fa),r=e.get(mL),a=e.get(yU),l=e.get(iL),h=e.get(Oa),d=t.getModel(),c=t.getPosition(),u=zU.is(i)?i:new zU(d,c),g=new aL(t,5),p=Zh(this._getLocationModel(l,u.model,u.position,g.token),g.token).then((e=>HU(this,void 0,void 0,(function*(){var s;if(!e||g.token.isCancellationRequested)return;let r;if(Os(e.ariaMessage),e.referenceAt(d.uri,c)){const e=this._getAlternativeCommand(t);!UU._activeAlternativeCommands.has(e)&&UU._allSymbolNavigationCommands.has(e)&&(r=UU._allSymbolNavigationCommands.get(e))}const l=e.references.length;if(0===l){if(!this.configuration.muteMessage){const e=d.getWordAtPosition(c);null===(s=iD.get(t))||void 0===s||s.showMessage(this._getNoResultFoundMessage(e),c)}}else{if(1!==l||!r)return this._onResult(o,a,t,e,n);UU._activeAlternativeCommands.add(this.desc.id),h.invokeFunction((e=>r.runEditorCommand(e,t,i,n).finally((()=>{UU._activeAlternativeCommands.delete(this.desc.id)}))))}}))),(e=>{s.error(e)})).finally((()=>{g.dispose()}));return r.showWhile(p,250),p}_onResult(e,t,i,n,s){return HU(this,void 0,void 0,(function*(){const o=this._getGoToPreference(i);if(i instanceof cW||!(this.configuration.openInPeek||"peek"===o&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===o,l=yield this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,s):n.dispose(),"goto"===o&&t.put(r)}else this._openInPeek(i,n,s)}))}_openReference(e,t,i,n,s){return HU(this,void 0,void 0,(function*(){let o;var r;if((r=i)&&an.isUri(r.uri)&&Mh.isIRange(r.range)&&(Mh.isIRange(r.originSelectionRange)||Mh.isIRange(r.targetSelectionRange))&&(o=i.targetSelectionRange),o||(o=i.range),!o)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:Mh.collapseToStart(o),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(a){if(s){const e=a.getModel(),t=a.createDecorationsCollection([{range:o,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{a.getModel()===e&&t.clear()}),350)}return a}}))}_openInPeek(e,t,i){const n=_U.get(e);n&&e.hasModel()?n.toggleWidget(null!=i?i:e.getSelection(),Gh((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}UU._allSymbolNavigationCommands=new Map,UU._activeAlternativeCommands=new Set;class KU extends UU{_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield xU(e.definitionProvider,t,i,n),ue(0,"Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No definition found for '{0}'",e.word):ue(0,"No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}oh(((RU=class extends KU{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:RU.id,title:{value:ue(0,"Go to Definition"),original:"Go to Definition",mnemonicTitle:ue(0,"Go to &&Definition")},precondition:ul.and(Rh.hasDefinitionProvider,Rh.isInWalkThroughSnippet.toNegated()),keybinding:[{when:Rh.editorTextFocus,primary:70,weight:100},{when:ul.and(Rh.editorTextFocus,TH),primary:2118,weight:100}],menu:[{id:Ql.EditorContext,group:"navigation",order:1.1},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Za.registerCommandAlias("editor.action.goToDeclaration",RU.id)}}).id="editor.action.revealDefinition",RU)),oh(((AU=class extends KU{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:AU.id,title:{value:ue(0,"Open Definition to the Side"),original:"Open Definition to the Side"},precondition:ul.and(Rh.hasDefinitionProvider,Rh.isInWalkThroughSnippet.toNegated()),keybinding:[{when:Rh.editorTextFocus,primary:pt(2089,70),weight:100},{when:ul.and(Rh.editorTextFocus,TH),primary:pt(2089,2118),weight:100}]}),Za.registerCommandAlias("editor.action.openDeclarationToTheSide",AU.id)}}).id="editor.action.revealDefinitionAside",AU)),oh(((OU=class extends KU{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:OU.id,title:{value:ue(0,"Peek Definition"),original:"Peek Definition"},precondition:ul.and(Rh.hasDefinitionProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:Ql.EditorContextPeek,group:"peek",order:2}}),Za.registerCommandAlias("editor.action.previewDeclaration",OU.id)}}).id="editor.action.peekDefinition",OU));class jU extends UU{_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield NU(e.declarationProvider,t,i,n),ue(0,"Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No declaration found for '{0}'",e.word):ue(0,"No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}oh(((PU=class extends jU{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:PU.id,title:{value:ue(0,"Go to Declaration"),original:"Go to Declaration",mnemonicTitle:ue(0,"Go to &&Declaration")},precondition:ul.and(Rh.hasDeclarationProvider,Rh.isInWalkThroughSnippet.toNegated()),menu:[{id:Ql.EditorContext,group:"navigation",order:1.3},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No declaration found for '{0}'",e.word):ue(0,"No declaration found")}}).id="editor.action.revealDeclaration",PU)),oh(class extends jU{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:ue(0,"Peek Declaration"),original:"Peek Declaration"},precondition:ul.and(Rh.hasDeclarationProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),menu:{id:Ql.EditorContextPeek,group:"peek",order:3}})}});class qU extends UU{_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield IU(e.typeDefinitionProvider,t,i,n),ue(0,"Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No type definition found for '{0}'",e.word):ue(0,"No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}oh(((FU=class extends qU{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:FU.ID,title:{value:ue(0,"Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:ue(0,"Go to &&Type Definition")},precondition:ul.and(Rh.hasTypeDefinitionProvider,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:0,weight:100},menu:[{id:Ql.EditorContext,group:"navigation",order:1.4},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}).ID="editor.action.goToTypeDefinition",FU)),oh(((BU=class extends qU{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:BU.ID,title:{value:ue(0,"Peek Type Definition"),original:"Peek Type Definition"},precondition:ul.and(Rh.hasTypeDefinitionProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),menu:{id:Ql.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",BU));class $U extends UU{_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield EU(e.implementationProvider,t,i,n),ue(0,"Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?ue(0,"No implementation found for '{0}'",e.word):ue(0,"No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}oh(((WU=class extends $U{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:WU.ID,title:{value:ue(0,"Go to Implementations"),original:"Go to Implementations",mnemonicTitle:ue(0,"Go to &&Implementations")},precondition:ul.and(Rh.hasImplementationProvider,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:2118,weight:100},menu:[{id:Ql.EditorContext,group:"navigation",order:1.45},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}).ID="editor.action.goToImplementation",WU)),oh(((VU=class extends $U{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:VU.ID,title:{value:ue(0,"Peek Implementations"),original:"Peek Implementations"},precondition:ul.and(Rh.hasImplementationProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:3142,weight:100},menu:{id:Ql.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",VU));class GU extends UU{_getNoResultFoundMessage(e){return e?ue(0,"No references found for '{0}'",e.word):ue(0,"No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}oh(class extends GU{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:ue(0,"Go to References"),original:"Go to References",mnemonicTitle:ue(0,"Go to &&References")},precondition:ul.and(Rh.hasReferenceProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rh.editorTextFocus,primary:1094,weight:100},menu:[{id:Ql.EditorContext,group:"navigation",order:1.45},{id:Ql.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield MU(e.referenceProvider,t,i,!0,n),ue(0,"References"))}))}}),oh(class extends GU{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:ue(0,"Peek References"),original:"Peek References"},precondition:ul.and(Rh.hasReferenceProvider,UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated()),menu:{id:Ql.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(yield MU(e.referenceProvider,t,i,!1,n),ue(0,"References"))}))}});class ZU extends UU{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:ue(0,"Go to Any Symbol"),original:"Go to Any Symbol"},precondition:ul.and(UW.notInPeekEditor,Rh.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return HU(this,void 0,void 0,(function*(){return new Wz(this._references,ue(0,"Locations"))}))}_getNoResultFoundMessage(e){return e&&ue(0,"No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}Za.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:an},{name:"position",description:"The position at which to start",constraint:Ba.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,i,n,s,o,r)=>HU(void 0,void 0,void 0,(function*(){jr(an.isUri(t)),jr(Ba.isIPosition(i)),jr(Array.isArray(n)),jr(void 0===s||"string"==typeof s),jr(void 0===r||"boolean"==typeof r);const a=e.get(Fa),l=yield a.openCodeEditor({resource:t},a.getFocusedCodeEditor());if(JW(l))return l.setPosition(i),l.revealPositionInCenterIfOutsideViewport(i,0),l.invokeWithinContext((e=>{const t=new class extends ZU{_getNoResultFoundMessage(e){return o||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(o),openInPeek:Boolean(r),openToSide:!1},n,s);e.get(Oa).invokeFunction(t.run.bind(t),l)}))}))}),Za.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:an},{name:"position",description:"The position at which to start",constraint:Ba.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,i,n,s)=>HU(void 0,void 0,void 0,(function*(){e.get(Ga).executeCommand("editor.action.goToLocations",t,i,n,s,void 0,!0)}))}),Za.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{jr(an.isUri(t)),jr(Ba.isIPosition(i));const n=e.get(iL),s=e.get(Fa);return s.openCodeEditor({resource:t},s.getFocusedCodeEditor()).then((e=>{if(!JW(e)||!e.hasModel())return;const t=_U.get(e);if(!t)return;const s=Gh((t=>MU(n.referenceProvider,e.getModel(),Ba.lift(i),!1,t).then((e=>new Wz(e,ue(0,"References")))))),o=new Mh(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(o,s,!1))}))}}),Za.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var YU,XU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},QU=function(e,t){return function(i,n){t(i,n,e)}},JU=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let eK=YU=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new N,this.toUnhookForKeyboard=new N,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new IR(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,null!=t?t:void 0)}))),this.toUnhook.add(s.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{r(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(s.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(YU.ID)}startFindDefinitionFromCursor(e){return JU(this,void 0,void 0,(function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;return JU(this,void 0,void 0,(function*(){this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const n=new rL(this.editor,15);let s;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Gh((t=>this.findDefinition(e,t)));try{s=yield this.previousPromise}catch(a){return void r(a)}if(!s||!s.length||!n.validate(this.editor))return void this.removeLinkDecorations();const o=s[0].originSelectionRange?Mh.lift(s[0].originSelectionRange):new Mh(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(s.length>1){let e=o;for(const{originSelectionRange:t}of s)t&&(e=Mh.plusRange(e,t));this.addDecoration(e,(new Ia).appendText(ue(0,"Click to show {0} definitions.",s.length)))}else{const e=s[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const s=this.getPreviewValue(i,n,e),r=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(o,s?(new Ia).appendCodeblock(r||"",s):void 0),t.dispose()}))}}))}getPreviewValue(e,t,i){let n=i.range;n.endLineNumber-n.startLineNumber>=YU.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t));return this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let s=t+1;s{const i=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(e);return new KU({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)}))}isInPeekEditor(e){const t=e.get(Rl);return UW.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};eK.ID="editor.contrib.gotodefinitionatposition",eK.MAX_SOURCE_PREVIEW_LINES=8,eK=YU=XU([QU(1,Va),QU(2,yc),QU(3,iL)],eK),Lh(eK.ID,eK,2);const tK=fs;class iK extends E{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new TD(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class nK extends E{static render(e,t,i){return new nK(e,t,i)}constructor(e,t,i){super(),this.actionContainer=ds(e,tK("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=ds(this.actionContainer,tK("a.action")),this.action.setAttribute("role","button"),t.iconClass&&ds(this.action,tK(`span.icon.${t.iconClass}`));ds(this.action,tK("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(En(this.actionContainer,os.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this._register(En(this.actionContainer,os.KEY_DOWN,(e=>{const i=new St(e);(i.equals(3)||i.equals(10))&&(e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer))}))),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var sK=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},oK=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,s){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,s,(t=e[i](t)).done,t.value)}))}}};class rK{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class aK extends E{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new U),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new sd((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new sd((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new sd((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=function(e){const t=new Uh,i=e(t.token);return new dd(t,(e=>jh(this,void 0,void 0,(function*(){var n,s,o,r;const a=t.token.onCancellationRequested((()=>{a.dispose(),t.dispose(),e.reject(new c)}));try{try{for(var l,h=!0,d=qh(i);!(n=(l=yield d.next()).done);h=!0){r=l.value,h=!1;const i=r;if(t.token.isCancellationRequested)return;e.emitOne(i)}}catch(u){s={error:u}}finally{try{h||n||!(o=d.return)||(yield o.call(d))}finally{if(s)throw s.error}}a.dispose(),t.dispose()}catch(g){a.dispose(),t.dispose(),e.reject(g)}}))))}((e=>this._computer.computeAsync(e))),(()=>{sK(this,void 0,void 0,(function*(){var e,t,i,n;try{try{for(var s,o=!0,a=oK(this._asyncIterable);!(e=(s=yield a.next()).done);o=!0){n=s.value,o=!1;const e=n;e&&(this._result.push(e),this._fireResult())}}catch(l){t={error:l}}finally{try{o||e||!(i=a.return)||(yield i.call(a))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(Dre){r(Dre)}}))})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new rK(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class lK{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class hK{constructor(e,t,i,n,s,o){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=o,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}const dK=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class cK{constructor(){let e;this._onDidWillResize=new U,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new U,this.onDidResize=this._onDidResize.event,this._sashListener=new N,this._size=new Wn(0,0),this._minSize=new Wn(0,0),this._maxSize=new Wn(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new CW(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new CW(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new CW(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:gW.North}),this._southSash=new CW(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:gW.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(B.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(B.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(B.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(B.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:s,width:o}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(o,t));const r=new Wn(t,e);Wn.equals(r,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=r,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}class uK extends E{constructor(e,t=new Wn(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new cK),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Wn.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize((e=>{this._resize(new Wn(e.dimension.width,e.dimension.height)),e.done&&(this._isResizing=!1)}))),this._register(this._resizableNode.onDidWillResize((()=>{this._isResizing=!0})))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return(null===(e=this._contentPosition)||void 0===e?void 0:e.position)?Ba.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;return Hn(t).top+i.top-30}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=Hn(t),s=Fn(t.ownerDocument.body),o=n.top+i.top+i.height;return s.height-o-24}_findPositionPreference(e,t){var i,n;const s=Math.min(null!==(i=this._availableVerticalSpaceBelow(t))&&void 0!==i?i:1/0,e),o=Math.min(null!==(n=this._availableVerticalSpaceAbove(t))&&void 0!==n?n:1/0,e),r=Math.min(Math.max(o,s),e),a=Math.min(e,r);let l;return l=this._editor.getOption(60).above?a<=o?1:2:a<=s?2:1,1===l?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var gK,pK,mK=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fK=function(e,t){return function(i,n){t(i,n,e)}};const _K=fs;let vK=gK=class extends E{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(yK,this._editor)),this._participants=[];for(const n of dK.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new LK(this._editor,this._participants),this._hoverOperation=this._register(new aK(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new bK(this._computer.anchor,t,e.isComplete))}))),this._register(Mn(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(DC.onDidChange((()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const n of this._participants)if(n.suggestHoverAnchor){const i=n.suggestHoverAnchor(e);i&&t.push(i)}const i=e.target;if(6===i.type&&t.push(new lK(0,i.range,e.event.posx,e.event.posy)),7===i.type){const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"==typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToTextt.priority-e.priority)),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new lK(0,e,void 0,void 0),t,i,n,null)}_startShowingOrUpdateHover(e,t,i,n,s){if(!this._widget.position||!this._currentResult)return!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0);return this._editor.getOption(60).sticky&&s&&this._widget.isMouseGettingCloser(s.event.posx,s.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?!(!e||!this._currentResult.anchor.equals(e))||(e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,n,s){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=s,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&0===e.messages.length&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return!!e&&this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor)for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){if(this._widget.position&&this._currentResult&&this._currentResult.isComplete){if(!e.isComplete)return;if(this._computer.insistOnKeepingHoverVisible&&0===e.messages.length)return}this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:s}=gK.computeHoverRanges(this._editor,e.range,t),o=new N,r=o.add(new SK(this._keybindingService)),a=document.createDocumentFragment();let l=null;const h={fragment:a,statusBar:r,setColorPicker:e=>l=e,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:e=>this._widget.setMinimumDimensions(e),hide:()=>this.hide()};for(const c of this._participants){const e=t.filter((e=>e.owner===c));e.length>0&&o.add(c.renderHoverParts(h,e))}const d=t.some((e=>e.isBeforeContent));if(r.hasContent&&a.appendChild(r.hoverElement),a.hasChildNodes()){if(s){const e=this._editor.createDecorationsCollection();e.set([{range:s,options:gK._DECORATION_OPTIONS}]),o.add(x((()=>{e.clear()})))}this._widget.showAt(a,new wK(l,i,n,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,o))}else o.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),s=i.coordinatesConverter,o=s.convertModelRangeToViewRange(t),r=new Ba(o.startLineNumber,i.getLineMinColumn(o.startLineNumber));n=s.convertViewPositionToModelPosition(r).column}const s=t.startLineNumber;let o=t.startColumn,r=i[0].range,a=null;for(const l of i)r=Mh.plusRange(r,l.range),l.range.startLineNumber===s&&l.range.endLineNumber===s&&(o=Math.max(Math.min(o,l.range.startColumn),n)),l.forceShowAtRange&&(a=l.range);return{showAtPosition:a?a.getStartPosition():new Ba(s,t.startColumn),showAtSecondaryPosition:a?a.getStartPosition():new Ba(s,o),highlightRange:r}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};vK._DECORATION_OPTIONS=xw.register({description:"content-hover-highlight",className:"hoverHighlight"}),vK=gK=mK([fK(1,Oa),fK(2,PL)],vK);class bK{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.messages.length?this:new CK(this,this.anchor,t,this.isComplete)}}class CK extends bK{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class wK{constructor(e,t,i,n,s,o,r,a,l,h){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=n,this.stoleFocus=s,this.source=o,this.isBeforeContent=r,this.initialMousePosX=a,this.initialMousePosY=l,this.disposables=h,this.closestMouseDistance=void 0}}let yK=pK=class extends uK{get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}get isVisibleFromKeyboard(){var e;return 1===(null===(e=this._visibleData)||void 0===e?void 0:e.source)}get isVisible(){var e;return null!==(e=this._hoverVisibleKey.get())&&void 0!==e&&e}get isFocused(){var e;return null!==(e=this._hoverFocusedKey.get())&&void 0!==e&&e}constructor(e,t,i,n,s){const o=e.getOption(66)+8,r=new Wn(150,o);super(e,r),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new iK),this._minimumSize=r,this._hoverVisibleKey=Rh.hoverVisible.bindTo(t),this._hoverFocusedKey=Rh.hoverFocused.bindTo(t),ds(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange((()=>this._layout()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()})));const a=this._register(hs(this._resizableNode.domNode));this._register(a.onDidFocus((()=>{this._hoverFocusedKey.set(!0)}))),this._register(a.onDidBlur((()=>{this._hoverFocusedKey.set(!1)}))),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),null===(e=this._visibleData)||void 0===e||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return pK.ID}static _applyDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,s="number"==typeof i?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return pK._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return pK._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,s="number"==typeof i?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){pK._applyMaxDimensions(this._hover.contentsDomNode,e,t),pK._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth","number"==typeof e?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,i-10))}_updateResizableNodeMaxDimensions(){var e,t;const i=null!==(e=this._findMaximumRenderingWidth())&&void 0!==e?e:1/0,n=null!==(t=this._findMaximumRenderingHeight())&&void 0!==t?t:1/0;this._resizableNode.maxSize=new Wn(i,n),this._setHoverWidgetMaxDimensions(i,n)}_resize(e){var t,i;pK._lastDimensions=new Wn(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),null===(i=null===(t=this._visibleData)||void 0===t?void 0:t.colorPicker)||void 0===i||i.layout()}_findAvailableSpaceVertically(){var e;const t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition;if(t)return 1===this._positionPreference?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=6;return Array.from(this._hover.contentsDomNode.children).forEach((e=>{t+=e.clientHeight})),this._hasHorizontalScrollbar()&&(t+=10),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some((e=>e.scrollWidth>e.clientWidth));return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=void 0===this._contentWidth?0:this._contentWidth-2;if(e||this._hover.containerDomNode.clientWidththis._visibleData.closestMouseDistance+4)&&(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),!0)}_setHoverData(e){var t;null===(t=this._visibleData)||void 0===t||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=""+t/e,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,pK._lastDimensions.height),t=Math.max(.66*this._editor.getLayoutInfo().width,500,pK._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[null!==(e=this._positionPreference)&&void 0!==e?e:1]}:null}showAt(e,t){var i,n,s,o;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const r=jn(this._hover.containerDomNode),a=t.showAtPosition;this._positionPreference=null!==(i=this._findPositionPreference(r,a))&&void 0!==i?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),null===(n=t.colorPicker)||void 0===n||n.layout();const l=(h=!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),d=null!==(o=null===(s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))||void 0===s?void 0:s.getAriaLabel())&&void 0!==o?o:"",h&&d?ue(0,"Inspect this in the accessible view with {0}.",d):h?ue(0,"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):"");var h,d;l&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+l)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Wn(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const i=this._hover.containerDomNode,n=this._hover.contentsDomNode,s=null!==(t=this._findMaximumRenderingHeight())&&void 0!==t?t:1/0;this._setContainerDomNodeDimensions(zn(i),Math.min(s,e)),this._setContentsDomNodeDimensions(zn(n),Math.min(s,e-10))}setMinimumDimensions(e){this._minimumSize=new Wn(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=void 0===this._contentWidth?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Wn(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=jn(t),n=zn(t);if(this._resizableNode.layout(i,n),this._setHoverWidgetDimensions(n,i),i=jn(t),n=zn(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(i,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(i)),null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition){const e=jn(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-30})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+30})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};yK.ID="editor.contrib.resizableContentHoverWidget",yK._lastDimensions=new Wn(0,0),yK=pK=mK([fK(1,Rl),fK(2,uu),fK(3,ZR),fK(4,PL)],yK);let SK=class extends E{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=_K("div.hover-row.status-bar"),this.actionsElement=ds(this.hoverElement,_K("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(nK.render(this.actionsElement,e,i))}append(e){const t=ds(this.actionsElement,e);return this._hasContent=!0,t}};SK=mK([fK(0,PL)],SK);class LK{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,o=e.range.endLineNumber===n?e.range.endColumn:s;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>o)return!1}else if(i>t.range.startColumn||t.range.endColumn>o)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return hd.EMPTY;const i=LK._getLineDecorations(this._editor,t);return hd.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):hd.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=LK._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Pd(t)}}function kK(e,t,i,n,s,o){const r=i+s/2,a=n+o/2,l=Math.max(Math.abs(e-r)-s/2,0),h=Math.max(Math.abs(t-a)-o/2,0);return Math.sqrt(l*l+h*h)}const DK=fs;class xK extends E{constructor(e,t,i){super(),this._renderDisposeables=this._register(new N),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new iK),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Yk({editor:this._editor},t,i)),this._computer=new NK(this._editor),this._hoverOperation=this._register(new aK(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return xK.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const e=DK("div.hover-row.markdown-hover"),t=ds(e,DK("div.hover-contents")),s=this._renderDisposeables.add(this._markdownRenderer.render(n.value));t.appendChild(s.element),i.appendChild(e)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),s=this._editor.getOption(66),o=i-n-(this._hover.containerDomNode.clientHeight-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}}xK.ID="editor.contrib.modesGlyphHoverWidget";class NK{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const t=n.options.glyphMarginHoverMessage;t&&!Ma(t)&&i.push(...$d(t).map(e))}return i}}var EK=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class IK{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function MK(e,t,i,n){const s=e.ordered(t).map(((e,s)=>function(e,t,i,n,s){return EK(this,void 0,void 0,(function*(){try{const o=yield Promise.resolve(e.provideHover(i,n,s));if(o&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(o))return new IK(e,o,t)}catch(o){a(o)}}))}(e,s,t,i,n)));return hd.fromPromises(s).coalesce()}Ch("_executeHoverProvider",((e,t,i)=>function(e,t,i,n){return MK(e,t,i,n).map((e=>e.hover)).toPromise()}(e.get(iL).hoverProvider,t,i,Hh.None)));var TK=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},RK=function(e,t){return function(i,n){t(i,n,e)}};const AK=fs;class OK{constructor(e,t,i,n,s){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let PK=class{constructor(e,t,i,n,s){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this.hoverOrdinal=3}createLoadingMessage(e){return new OK(this,e.range,[(new Ia).appendText(ue(0,"Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];let r=1e3;const a=i.getLineLength(n),l=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),h=this._editor.getOption(116),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:l});let c=!1;h>=0&&a>h&&e.range.startColumn>=h&&(c=!0,o.push(new OK(this,e.range,[{value:ue(0,"Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,r++))),!c&&"number"==typeof d&&a>=d&&o.push(new OK(this,e.range,[{value:ue(0,"Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,r++));let u=!1;for(const g of t){const t=g.range.startLineNumber===n?g.range.startColumn:1,i=g.range.endLineNumber===n?g.range.endColumn:s,a=g.options.hoverMessage;if(!a||Ma(a))continue;g.options.beforeContentClassName&&(u=!0);const l=new Mh(e.range.startLineNumber,t,e.range.startLineNumber,i);o.push(new OK(this,l,$d(a),u,r++))}return o}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return hd.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return hd.EMPTY;const s=new Ba(e.range.startLineNumber,e.range.startColumn);return MK(this._languageFeaturesService.hoverProvider,n,s,i).filter((e=>!Ma(e.hover.contents))).map((t=>{const i=t.hover.range?Mh.lift(t.hover.range):e.range;return new OK(this,i,t.hover.contents,!1,t.ordinal)}))}renderHoverParts(e,t){return FK(e,t,this._editor,this._languageService,this._openerService)}};function FK(e,t,i,n,s){t.sort(((e,t)=>e.ordinal-t.ordinal));const o=new N;for(const r of t)for(const t of r.contents){if(Ma(t))continue;const r=AK("div.hover-row.markdown-hover"),a=ds(r,AK("div.hover-contents")),l=o.add(new Yk({editor:i},n,s));o.add(l.onDidRenderAsync((()=>{a.className="hover-contents code-hover-contents",e.onContentsChanged()})));const h=o.add(l.render(t));a.appendChild(h.element),e.fragment.appendChild(r)}return o}PK=TK([RK(1,yc),RK(2,Uk),RK(3,uu),RK(4,iL)],PK);var BK=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},WK=function(e,t){return function(i,n){t(i,n,e)}};class VK{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let HK=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._dispoables=new N,this._markers=[],this._nextIdx=-1,an.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=lo(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?Mh.compareRangesUsingStarts(e,t)||bN.compare(e.severity,t.severity):bN.compare(e.severity,t.severity)||Mh.compareRangesUsingStarts(e,t)),i},o=()=>{this._markers=this._markerService.read({resource:an.isUri(e)?e:void 0,severities:bN.Error|bN.Warning|bN.Info}),"function"==typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(s)};o(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(o(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new VK(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));s<0&&(s=Md(this._markers,{resource:e.uri},((e,t)=>lo(e.resource.toString(),t.resource.toString()))),s<0&&(s=~s));for(let o=s;ot.resource.toString()===e.toString()));if(!(i<0))for(;i=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},$K=function(e,t){return function(i,n){t(i,n,e)}};class GK{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new N,this._editor=t;const o=document.createElement("div");o.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),o.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),o.appendChild(this._relatedBlock),this._disposables.add(Mn(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new ID(o,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{o.style.left=`-${e.scrollLeft}px`,o.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){k(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let o=((null==t?void 0:t.length)||0)+2;s&&(o+="string"==typeof s?s.length:s.value.length);const r=so(i);this._lines=r.length,this._longestLineLength=0;for(const c of r)this._longestLineLength=Math.max(c.length+o,this._longestLineLength);Dn(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const c of r)a=document.createElement("div"),a.innerText=c,""===c&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||s){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(s)if("string"==typeof s){const t=document.createElement("span");t.innerText=`(${s})`,t.classList.add("code"),e.appendChild(t)}else{this._codeLink=fs("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()};ds(this._codeLink,fs("span")).innerText=s.value,e.appendChild(this._codeLink)}}if(Dn(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Wd(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(66))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const s=document.createElement("span");s.innerText=t.message,i.appendChild(n),i.appendChild(s),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(50),h=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:h,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case bN.Error:t=ue(0,"Error");break;case bN.Warning:t=ue(0,"Warning");break;case bN.Info:t=ue(0,"Info");break;case bN.Hint:t=ue(0,"Hint")}let i=ue(0,"{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();if(n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1){i=`${n.getLineContent(e.startLineNumber)}, ${i}`}return i}}let ZK=jK=class extends qW{constructor(e,t,i,n,s,o,r){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=o,this._labelService=r,this._callOnDispose=new N,this._onDidSelectRelatedInformation=new U,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=bN.Warning,this._backgroundColor=rc.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(oj);let t=JK,i=ej;this._severity===bN.Warning?(t=tj,i=ij):this._severity===bN.Info&&(t=nj,i=sj);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(GW),secondaryHeadingColor:e.getColor(ZW)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e=>this.editor.focus())));const t=[],i=this._menuService.createMenu(jK.TitleMenu,this._contextKeyService);RW(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=ds(e,fs(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new GK(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=Mh.lift(e),s=this.editor.getPosition(),o=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(o,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=ue(0,i>1?"{0} of {1} problems":"{0} of {1} problem",t,i);this.setTitle(ba(r.uri),e)}this._icon.className=`codicon ${KK.className(bN.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(o,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};ZK.TitleMenu=new Ql("gotoErrorTitleMenu"),ZK=jK=qK([$K(1,R_),$K(2,Uk),$K(3,Jl),$K(4,Oa),$K(5,Rl),$K(6,qz)],ZK);const YK=L_(gm,pm),XK=L_(mm,fm),QK=L_(_m,vm),JK=Sp("editorMarkerNavigationError.background",{dark:YK,light:YK,hcDark:Np,hcLight:Np},ue(0,"Editor marker navigation widget error color.")),ej=Sp("editorMarkerNavigationError.headerBackground",{dark:S_(JK,.1),light:S_(JK,.1),hcDark:null,hcLight:null},ue(0,"Editor marker navigation widget error heading background.")),tj=Sp("editorMarkerNavigationWarning.background",{dark:XK,light:XK,hcDark:Np,hcLight:Np},ue(0,"Editor marker navigation widget warning color.")),ij=Sp("editorMarkerNavigationWarning.headerBackground",{dark:S_(tj,.1),light:S_(tj,.1),hcDark:"#0C141F",hcLight:S_(tj,.2)},ue(0,"Editor marker navigation widget warning heading background.")),nj=Sp("editorMarkerNavigationInfo.background",{dark:QK,light:QK,hcDark:Np,hcLight:Np},ue(0,"Editor marker navigation widget info color.")),sj=Sp("editorMarkerNavigationInfo.headerBackground",{dark:S_(nj,.1),light:S_(nj,.1),hcDark:null,hcLight:null},ue(0,"Editor marker navigation widget info heading background.")),oj=Sp("editorMarkerNavigation.background",{dark:Cm,light:Cm,hcDark:Cm,hcLight:Cm},ue(0,"Editor marker navigation widget background."));var rj,aj=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},lj=function(e,t){return function(i,n){t(i,n,e)}},hj=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let dj=rj=class{static get(e){return e.getContribution(rj.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new N,this._editor=e,this._widgetVisible=pj.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(ZK,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&Mh.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:Mh.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new Ba(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var i,n;return hj(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const s=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(s.move(e,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const o=yield this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);o&&(null===(i=rj.get(o))||void 0===i||i.close(),null===(n=rj.get(o))||void 0===n||n.nagivate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}}))}};dj.ID="editor.contrib.markerController",dj=rj=aj([lj(1,zK),lj(2,Rl),lj(3,Fa),lj(4,Oa)],dj);class cj extends _h{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return hj(this,void 0,void 0,(function*(){t.hasModel()&&(null===(i=dj.get(t))||void 0===i||i.nagivate(this._next,this._multiFile))}))}}class uj extends cj{constructor(){super(!0,!1,{id:uj.ID,label:uj.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:578,weight:100},menuOpts:{menuId:ZK.TitleMenu,title:uj.LABEL,icon:QT("marker-navigation-next",Qr.arrowDown,ue(0,"Icon for goto next marker.")),group:"navigation",order:1}})}}uj.ID="editor.action.marker.next",uj.LABEL=ue(0,"Go to Next Problem (Error, Warning, Info)");class gj extends cj{constructor(){super(!1,!1,{id:gj.ID,label:gj.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:1602,weight:100},menuOpts:{menuId:ZK.TitleMenu,title:gj.LABEL,icon:QT("marker-navigation-previous",Qr.arrowUp,ue(0,"Icon for goto previous marker.")),group:"navigation",order:2}})}}gj.ID="editor.action.marker.prev",gj.LABEL=ue(0,"Go to Previous Problem (Error, Warning, Info)");Lh(dj.ID,dj,4),yh(uj),yh(gj),yh(class extends cj{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:ue(0,"Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:66,weight:100},menuOpts:{menuId:Ql.MenubarGoMenu,title:ue(0,"Next &&Problem"),group:"6_problem_nav",order:1}})}}),yh(class extends cj{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:ue(0,"Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:1090,weight:100},menuOpts:{menuId:Ql.MenubarGoMenu,title:ue(0,"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const pj=new Tl("markersNavigationVisible",!1);wh(new(fh.bindToContribution(dj.get))({id:"closeMarkersNavigation",precondition:pj,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:Rh.focus,primary:9,secondary:[1033]}}));var mj=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fj=function(e,t){return function(i,n){t(i,n,e)}};const _j=fs;class vj{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const bj={type:1,filter:{include:vL.QuickFix},triggerAction:fL.QuickFixHover};let Cj,wj,yj=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];for(const r of t){const t=r.range.startLineNumber===n?r.range.startColumn:1,a=r.range.endLineNumber===n?r.range.endColumn:s,l=this._markerDecorationsService.getMarker(i.uri,r);if(!l)continue;const h=new Mh(e.range.startLineNumber,t,e.range.startLineNumber,a);o.push(new vj(this,h,l))}return o}renderHoverParts(e,t){if(!t.length)return E.None;const i=new N;t.forEach((t=>e.fragment.appendChild(this.renderMarkerHover(t,i))));const n=1===t.length?t[0]:t.sort(((e,t)=>bN.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=_j("div.hover-row"),n=ds(i,_j("div.marker.hover-contents")),{source:s,message:o,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const h=ds(n,_j("span"));if(h.style.whiteSpace="pre-wrap",h.innerText=o,s||a)if(a&&"string"!=typeof a){const e=_j("span");if(s){ds(e,_j("span")).innerText=s}const i=ds(e,_j("a.code-link"));i.setAttribute("href",a.target.toString()),t.add(En(i,"click",(e=>{this._openerService.open(a.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()})));ds(i,_j("span")).innerText=a.value;const o=ds(n,e);o.style.opacity="0.6",o.style.paddingLeft="6px"}else{const e=ds(n,_j("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(Wd(l))for(const{message:d,resource:c,startLineNumber:u,startColumn:g}of l){const e=ds(n,_j("div"));e.style.marginTop="8px";const i=ds(e,_j("a"));i.innerText=`${ba(c)}(${u}, ${g}): `,i.style.cursor="pointer",t.add(En(i,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(c,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:u,startColumn:g}}}).catch(r)})));const s=ds(e,_j("span"));s.innerText=d,this._editor.applyFontInfo(s)}return i}renderMarkerStatusbar(e,t,i){if(t.marker.severity!==bN.Error&&t.marker.severity!==bN.Warning&&t.marker.severity!==bN.Info||e.statusBar.addAction({label:ue(0,"View Problem"),commandId:uj.ID,run:()=>{var i;e.hide(),null===(i=dj.get(this._editor))||void 0===i||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const n=e.statusBar.append(_j("div"));this.recentMarkerCodeActionsInfo&&(CN.makeKey(this.recentMarkerCodeActionsInfo.marker)===CN.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=ue(0,"No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?E.None:i.add(ed((()=>n.textContent=ue(0,"Checking for quick fixes...")),200));n.textContent||(n.textContent=String.fromCharCode(160));const o=this.getCodeActions(t.marker);i.add(x((()=>o.cancel()))),o.then((o=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return o.dispose(),void(n.textContent=ue(0,"No quick fixes available"));n.style.display="none";let r=!1;i.add(x((()=>{r||o.dispose()}))),e.statusBar.addAction({label:ue(0,"Quick Fix..."),commandId:LL,run:t=>{r=!0;const i=TN.get(this._editor),n=Hn(t);e.hide(),null==i||i.showCodeActions(bj,o,{x:n.left,y:n.top,width:n.width,height:n.height})}})}),r)}}getCodeActions(e){return Gh((t=>TL(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new Mh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),bj,pL.None,t)))}};function Sj(){return Cj}yj=mj([fj(1,MR),fj(2,Uk),fj(3,iL)],yj);class Lj{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=void 0===t?void 0:e,n=void 0===t?e:t;return wj({owner:i,debugName:()=>{const e=Ij(n);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(n.toString());return t?`${this.debugName}.${t[2]}`:i?void 0:`${this.debugName} (mapped)`}},(e=>n(this.read(e),e)))}}class kj extends Lj{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function Dj(e,t){const i=new Nj(e,t);try{e(i)}finally{i.finish()}}function xj(e,t,i){e?t(e):Dj(t,i)}class Nj{constructor(e,t){var i;this._fn=e,this._getDebugName=t,this.updatingObservers=[],null===(i=Sj())||void 0===i||i.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():Ij(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;const t=this.updatingObservers;this.updatingObservers=null;for(const{observer:i,observable:n}of t)i.endUpdate(n);null===(e=Sj())||void 0===e||e.handleEndTransaction()}}function Ej(e,t,i,n){let s;if(void 0!==e){if("function"!=typeof e)return e;if(s=e(),void 0!==s)return s}if(void 0!==t&&(s=Ij(t),void 0!==s))return s;if(void 0!==i)for(const o in i)if(i[o]===n)return o}function Ij(e){const t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),n=i?i[1]:void 0;return null==n?void 0:n.trim()}function Mj(e,t){return"string"==typeof e?new Tj(void 0,e,t):new Tj(e,void 0,t)}class Tj extends kj{get debugName(){var e;return null!==(e=Ej(this._debugName,void 0,this._owner,this))&&void 0!==e?e:"ObservableValue"}constructor(e,t,i){super(),this._owner=e,this._debugName=t,this._value=i}get(){return this._value}set(e,t,i){var n;if(this._value===e)return;let s;t||(t=s=new Nj((()=>{}),(()=>`Setting ${this.debugName}`)));try{const s=this._value;this._setValue(e),null===(n=Sj())||void 0===n||n.handleObservableChanged(this,{oldValue:s,newValue:e,change:i,didChange:!0,hadValue:!0});for(const e of this.observers)t.updateObserver(e,this),e.handleChange(this,i)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function Rj(e,t){return"string"==typeof e?new Aj(void 0,e,t):new Aj(e,void 0,t)}class Aj extends Tj{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;null===(e=this._value)||void 0===e||e.dispose()}}const Oj=(e,t)=>e===t;function Pj(e,t){return void 0!==t?new Wj(e,void 0,t,void 0,void 0,void 0,Oj):new Wj(void 0,void 0,e,void 0,void 0,void 0,Oj)}function Fj(e,t){var i;return new Wj(e.owner,e.debugName,t,void 0,void 0,void 0,null!==(i=e.equalityComparer)&&void 0!==i?i:Oj)}function Bj(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const s=new N;return new Wj(n,(()=>{var e;return null!==(e=Ij(i))&&void 0!==e?e:"(anonymous)"}),(e=>(s.clear(),i(e,s))),void 0,void 0,(()=>s.dispose()),Oj)}!function(e){wj=e}(Pj);class Wj extends kj{get debugName(){var e;return null!==(e=Ej(this._debugName,this._computeFn,this._owner,this))&&void 0!==e?e:"(anonymous)"}constructor(e,t,i,n,s,o=void 0,r){var a,l;super(),this._owner=e,this._debugName=t,this._computeFn=i,this.createChangeSummary=n,this._handleChange=s,this._handleLastObserverRemoved=o,this._equalityComparator=r,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=null===(a=this.createChangeSummary)||void 0===a?void 0:a.call(this),null===(l=Sj())||void 0===l||l.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),null===(e=this._handleLastObserverRemoved)||void 0===e||e.call(this)}get(){var e;if(0===this.observers.size){const t=this._computeFn(this,null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this));return this.onLastObserverRemoved(),t}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){var e,t;if(3===this.state)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const n=0!==this.state,s=this.value;this.state=3;const o=this.changeSummary;this.changeSummary=null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this);try{this.value=this._computeFn(this,o)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const r=n&&!this._equalityComparator(s,this.value);if(null===(t=Sj())||void 0===t||t.handleDerivedRecomputed(this,{oldValue:s,newValue:this.value,change:void 0,didChange:r,hadValue:n}),r)for(const a of this.observers)a.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const i of this.observers)i.handlePossibleChange(this);if(t)for(const i of this.observers)i.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}if(this.updateCount<0)throw new f}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),n=3===this.state;if(i&&(1===this.state||n)&&(this.state=2,n))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function Vj(e,t){return new Kj(e.debugName,t,void 0,void 0)}function Hj(e){return new Kj(void 0,e,void 0,void 0)}function zj(e,t){return new Kj(e.debugName,t,e.createEmptyChangeSummary,e.handleChange)}function Uj(e){const t=new N,i=Vj({debugName:()=>Ij(e)||"(anonymous)"},(i=>{t.clear(),e(i,t)}));return x((()=>{i.dispose(),t.dispose()}))}class Kj{get debugName(){if("string"==typeof this._debugName)return this._debugName;if("function"==typeof this._debugName){const e=this._debugName();if(void 0!==e)return e}const e=Ij(this._runFn);return void 0!==e?e:"(anonymous)"}constructor(e,t,i,n){var s,o;this._debugName=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=null===(s=this.createChangeSummary)||void 0===s?void 0:s.call(this),null===(o=Sj())||void 0===o||o.handleAutorunCreated(this),this._runIfNeeded(),C(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),w(this)}_runIfNeeded(){var e,t,i;if(3===this.state)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3;try{if(!this.disposed){null===(e=Sj())||void 0===e||e.handleAutorunTriggered(this);const i=this.changeSummary;this.changeSummary=null===(t=this.createChangeSummary)||void 0===t?void 0:t.call(this),this._runFn(this,i)}}finally{null===(i=Sj())||void 0===i||i.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,Hl((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary))&&(this.state=2)}}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}function jj(e){return new qj(e)}!function(e){e.Observer=Kj}(Hj||(Hj={}));class qj extends Lj{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function $j(e,t){return new Gj(e,t)}class Gj extends kj{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=e=>{var t;const i=this._getValue(e),n=!this.hasValue||this.value!==i;null===(t=Sj())||void 0===t||t.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:i,change:void 0,didChange:n,hadValue:this.hasValue}),n&&(this.value=i,this.hasValue&&Dj((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")})),this.hasValue=!0)}}getDebugName(){return Ij(this._getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}function Zj(e,t){return new Yj(e,t)}!function(e){e.Observer=Gj}($j||($j={}));class Yj extends kj{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{Dj((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function Xj(e){return"string"==typeof e?new Qj(e):new Qj(void 0,e)}class Qj extends kj{get debugName(){var e;return null!==(e=Ej(this._debugName,void 0,this._owner,this))&&void 0!==e?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(e)for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t);else Dj((e=>{this.trigger(e,t)}),(()=>`Trigger signal ${this.debugName}`))}get(){}}function Jj(e){const t=new eq(!0);return e.addObserver(t),e.reportChanges(),x((()=>{e.removeObserver(t)}))}class eq{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,0===this.counter&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}}const tq="editor.action.inlineSuggest.commit",iq="editor.action.inlineSuggest.showPrevious",nq="editor.action.inlineSuggest.showNext";var sq=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class oq extends E{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new G),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new N),this.options=i,this.lookupKeybindings="function"==typeof this.options.getKeyBinding,this.toggleMenuAction=this._register(new rq((()=>{var e;return null===(e=this.toggleMenuActionViewItem)||void 0===e?void 0:e.show()}),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Ix(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,actionViewItemProvider:(e,n)=>{var s;if(e.id===rq.ID)return this.toggleMenuActionViewItem=new EW(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:ea.asClassNameArray(null!==(s=i.moreIcon)&&void 0!==s?s:Qr.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof ja){const i=new EW(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach((e=>{this.actionBar.push(e,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){var t,i,n;const s=this.lookupKeybindings?null===(i=(t=this.options).getKeyBinding)||void 0===i?void 0:i.call(t,e):void 0;return null!==(n=null==s?void 0:s.getLabel())&&void 0!==n?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class rq extends za{constructor(e,t){t=t||ue(0,"More Actions..."),super(rq.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return sq(this,void 0,void 0,(function*(){this.toggleDropdownMenu()}))}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}rq.ID="toolbar.toggle.more";var aq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},lq=function(e,t){return function(i,n){t(i,n,e)}};let hq=class extends oq{constructor(e,t,i,n,s,o,r){super(e,s,Object.assign(Object.assign({getKeyBinding:e=>{var t;return null!==(t=o.lookupKeybinding(e.id))&&void 0!==t?t:void 0}},t),{allowContextMenu:!0,skipTelemetry:"string"==typeof(null==t?void 0:t.telemetrySource)})),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._sessionDisposables=this._store.add(new N);const a=null==t?void 0:t.telemetrySource;a&&this._store.add(this.actionBar.onDidRun((e=>r.publicLog2("workbenchActionExecuted",{id:e.action.id,from:a}))))}setActions(e,t=[],i){var n,s,o;this._sessionDisposables.clear();const r=e.slice(),a=t.slice(),l=[];let h=0;const d=[];let c=!1;if(-1!==(null===(n=this._options)||void 0===n?void 0:n.hiddenItemStrategy))for(let u=0;unull==e?void 0:e.id))),t=this._options.overflowBehavior.maxItems-e.size;let i=0;for(let n=0;n=t&&(r[n]=void 0,d[n]=s))}}Fd(r),Fd(d),super.setActions(r,Ka.join(d,a)),l.length>0&&this._sessionDisposables.add(En(this.getElement(),"contextmenu",(e=>{var t,n,s,o,r;const a=new Nt(e),d=this.getItemAction(a.target);if(!d)return;a.preventDefault(),a.stopPropagation();let u,g=!1;if(1===h&&0===(null===(t=this._options)||void 0===t?void 0:t.hiddenItemStrategy)){g=!0;for(let e=0;ethis._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>a,getActions:()=>p,menuId:null===(s=this._options)||void 0===s?void 0:s.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},null===(o=this._options)||void 0===o?void 0:o.menuOptions),skipTelemetry:"string"==typeof(null===(r=this._options)||void 0===r?void 0:r.telemetrySource),contextKeyService:this._contextKeyService})})))}};hq=aq([lq(2,Jl),lq(3,Rl),lq(4,Hx),lq(5,PL),lq(6,rh)],hq);var dq,cq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},uq=function(e,t){return function(i,n){t(i,n,e)}};let gq=class extends E{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=$j(this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(62).showToolbar)),this.sessionPosition=void 0,this.position=Pj(this,(e=>{var t,i,n;const s=null===(t=this.model.read(e))||void 0===t?void 0:t.ghostText.read(e);if(!this.alwaysShowToolbar.read(e)||!s||0===s.parts.length)return this.sessionPosition=void 0,null;const o=s.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==s.lineNumber&&(this.sessionPosition=void 0);const r=new Ba(s.lineNumber,Math.min(o,null!==(n=null===(i=this.sessionPosition)||void 0===i?void 0:i.column)&&void 0!==n?n:Number.MAX_SAFE_INTEGER));return this.sessionPosition=r,r})),this._register(Uj(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const s=i.add(this.instantiationService.createInstance(fq,this.editor,!0,this.position,n.selectedInlineCompletionIndex,n.inlineCompletionsCount,n.selectedInlineCompletion.map((e=>{var t;return null!==(t=null==e?void 0:e.inlineCompletion.source.inlineCompletions.commands)&&void 0!==t?t:[]}))));e.addContentWidget(s),i.add(x((()=>e.removeContentWidget(s)))),i.add(Hj((e=>{this.position.read(e)&&n.lastTriggerKind.read(e)!==cC.Explicit&&n.triggerExplicitly()})))})))}};gq=cq([uq(2,Oa)],gq);const pq=QT("inline-suggestion-hints-next",Qr.chevronRight,ue(0,"Icon for show next parameter hint.")),mq=QT("inline-suggestion-hints-previous",Qr.chevronLeft,ue(0,"Icon for show previous parameter hint."));let fq=dq=class extends E{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new za(e,t,i,!0,(()=>this._commandService.executeCommand(e))),s=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let o=t;return s&&(o=ue(0,"{0} ({1})",t,s.getLabel())),n.tooltip=o,n}constructor(e,t,i,n,s,o,r,a,l,h,d){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=n,this._suggestionCount=s,this._extraCommands=o,this._commandService=r,this.keybindingService=l,this._contextKeyService=h,this._menuService=d,this.id="InlineSuggestionHintsContentWidget"+dq.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Ns("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Ns("div@toolBar")]),this.previousAction=this.createCommandAction(iq,ue(0,"Previous"),ea.asClassName(mq)),this.availableSuggestionCountAction=new za("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(nq,ue(0,"Next"),ea.asClassName(pq)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Ql.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new sd((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new sd((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100)),this.lastCommands=[],this.toolBar=this._register(a.createInstance(bq,this.nodes.toolBar,Ql.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof nh)return a.createInstance(vq,e,void 0);if(e===this.availableSuggestionCountAction){const t=new _q(void 0,e,{label:!0,icon:!1});return t.setClass("availableSuggestionCount"),t}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{dq._dropDownVisible=e}))),this._register(Hj((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register(Hj((e=>{const t=this._suggestionCount.read(e),i=this._currentSuggestionIdx.read(e);void 0!==t?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${t}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),void 0!==t&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()}))),this._register(Hj((e=>{const t=this._extraCommands.read(e);if(Id(this.lastCommands,t))return;this.lastCommands=t;const i=t.map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[n,s]of this.inlineCompletionsActionsMenus.getActions())for(const e of s)e instanceof nh&&i.push(e);i.length>0&&i.unshift(new Ka),this.toolBar.setAdditionalSecondaryActions(i)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};fq._dropDownVisible=!1,fq.id=0,fq=dq=cq([uq(6,Ga),uq(7,Oa),uq(8,PL),uq(9,Rl),uq(10,Jl)],fq);class _q extends xx{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}class vq extends OW{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=Ns("div.keybinding").root;new Wx(t,$e,Object.assign({disableTitle:!0},Bx)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let bq=class extends hq{constructor(e,t,i,n,s,o,r,a){super(e,Object.assign({resetMenu:t},i),n,s,o,r,a),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){var e,t,i,n,s,o,r;const a=[],l=[];RW(this.menu,null===(e=this.options2)||void 0===e?void 0:e.menuOptions,{primary:a,secondary:l},null===(i=null===(t=this.options2)||void 0===t?void 0:t.toolbarOptions)||void 0===i?void 0:i.primaryGroup,null===(s=null===(n=this.options2)||void 0===n?void 0:n.toolbarOptions)||void 0===s?void 0:s.shouldInlineSubmenu,null===(r=null===(o=this.options2)||void 0===o?void 0:o.toolbarOptions)||void 0===r?void 0:r.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),a.unshift(...this.prependedPrimaryActions),this.setActions(a,l)}setPrependedPrimaryActions(e){Id(this.prependedPrimaryActions,e,((e,t)=>e===t))||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Id(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};bq=cq([uq(3,Jl),uq(4,Rl),uq(5,Hx),uq(6,PL),uq(7,rh)],bq);var Cq,wq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},yq=function(e,t){return function(i,n){t(i,n,e)}};const Sq=!1;let Lq=Cq=class extends E{static get(e){return e.getContribution(Cq.ID)}constructor(e,t,i,n,s){super(),this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._keybindingService=s,this._toUnhook=new N,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new sd((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())}))),this._register(this._editor.onMouseLeave((()=>{this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()})))}_hookEvents(){const e=this._editor.getOption(60);this._isHoverEnabled=e.enabled,this._isHoverSticky=e.sticky,this._hidingDelay=e.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._toUnhook.add(this._editor.onDidChangeModel((()=>this._hideWidgets()))),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const i=e.target;9!==i.type||i.detail!==yK.ID?12===i.type&&i.detail===xK.ID||(12!==i.type&&(this._hoverClicked=!1),(null===(t=this._contentWidget)||void 0===t?void 0:t.widget.isResizing)||this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,i;const n=e.event.browserEvent.relatedTarget;(null===(t=this._contentWidget)||void 0===t?void 0:t.widget.isResizing)||(null===(i=this._contentWidget)||void 0===i?void 0:i.containsNode(n))||this._hideWidgets()}_isMouseOverWidget(e){var t,i,n,s,o;const r=e.target;return!(!this._isHoverSticky||9!==r.type||r.detail!==yK.ID)||(!(!this._isHoverSticky||!(null===(t=this._contentWidget)||void 0===t?void 0:t.containsNode(null===(i=e.event.browserEvent.view)||void 0===i?void 0:i.document.activeElement))||(null===(s=null===(n=e.event.browserEvent.view)||void 0===n?void 0:n.getSelection())||void 0===s?void 0:s.isCollapsed))||(!(this._isHoverSticky||9!==r.type||r.detail!==yK.ID||!(null===(o=this._contentWidget)||void 0===o?void 0:o.isColorPickerVisible))||!(!this._isHoverSticky||12!==r.type||r.detail!==xK.ID)))}_onEditorMouseMove(e){var t,i,n,s;if(this._mouseMoveEvent=e,(null===(t=this._contentWidget)||void 0===t?void 0:t.isFocused)||(null===(i=this._contentWidget)||void 0===i?void 0:i.isResizing))return;if(this._isMouseDown&&this._hoverClicked)return;if(this._isHoverSticky&&(null===(n=this._contentWidget)||void 0===n?void 0:n.isVisibleFromKeyboard))return;this._isMouseOverWidget(e)?this._reactToEditorMouseMoveRunner.cancel():(null===(s=this._contentWidget)||void 0===s?void 0:s.isVisible)&&this._isHoverSticky&&this._hidingDelay>0?this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay):this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,i,n;if(!e)return;const s=e.target,o=null===(t=s.element)||void 0===t?void 0:t.classList.contains("colorpicker-color-decoration"),r=this._editor.getOption(146);if(o&&("click"===r&&!this._hoverActivatedByColorDecoratorClick||"hover"===r&&!this._isHoverEnabled||"clickAndHover"===r&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!o&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)return void this._hideWidgets();if(this._getOrCreateContentWidget().maybeShowAt(e))null===(i=this._glyphWidget)||void 0===i||i.hide();else{if(2===s.type&&s.position)return null===(n=this._contentWidget)||void 0===n||n.hide(),this._glyphWidget||(this._glyphWidget=new xK(this._editor,this._languageService,this._openerService)),void this._glyphWidget.startShowingAt(s.position.lineNumber);Sq,this._hideWidgets()}}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=1===i.kind||2===i.kind&&"editor.action.showHover"===i.commandId&&(null===(t=this._contentWidget)||void 0===t?void 0:t.isVisible);5===e.keyCode||6===e.keyCode||57===e.keyCode||4===e.keyCode||n||this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible)||fq.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(vK,this._editor)),this._contentWidget}showContentHover(e,t,i,n,s=!1){this._hoverActivatedByColorDecoratorClick=s,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}focus(){var e;null===(e=this._contentWidget)||void 0===e||e.focus()}scrollUp(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollUp()}scrollDown(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollDown()}scrollLeft(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollLeft()}scrollRight(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollRight()}pageUp(){var e;null===(e=this._contentWidget)||void 0===e||e.pageUp()}pageDown(){var e;null===(e=this._contentWidget)||void 0===e||e.pageDown()}goToTop(){var e;null===(e=this._contentWidget)||void 0===e||e.goToTop()}goToBottom(){var e;null===(e=this._contentWidget)||void 0===e||e.goToBottom()}get isColorPickerVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};Lq.ID="editor.contrib.hover",Lq=Cq=wq([yq(1,Oa),yq(2,Uk),yq(3,yc),yq(4,PL)],Lq);Lh(Lq.ID,Lq,2),yh(class extends _h{constructor(){super({id:"editor.action.showHover",label:ue(0,"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=Lq.get(t);if(!n)return;const s=t.getPosition(),o=new Mh(s.lineNumber,s.column,s.lineNumber,s.column),r=2===t.getOption(2)||!!(null==i?void 0:i.focus);n.isHoverVisible?n.focus():n.showContentHover(o,1,1,r)}}),yh(class extends _h{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:ue(0,"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=Lq.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new Mh(n.lineNumber,n.column,n.lineNumber,n.column),o=eK.get(t);if(!o)return;o.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(s,1,1,!0)}))}}),yh(class extends _h{constructor(){super({id:"editor.action.scrollUpHover",label:ue(0,"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:16,weight:100}})}run(e,t){const i=Lq.get(t);i&&i.scrollUp()}}),yh(class extends _h{constructor(){super({id:"editor.action.scrollDownHover",label:ue(0,"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:18,weight:100}})}run(e,t){const i=Lq.get(t);i&&i.scrollDown()}}),yh(class extends _h{constructor(){super({id:"editor.action.scrollLeftHover",label:ue(0,"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:15,weight:100}})}run(e,t){const i=Lq.get(t);i&&i.scrollLeft()}}),yh(class extends _h{constructor(){super({id:"editor.action.scrollRightHover",label:ue(0,"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:17,weight:100}})}run(e,t){const i=Lq.get(t);i&&i.scrollRight()}}),yh(class extends _h{constructor(){super({id:"editor.action.pageUpHover",label:ue(0,"Page Up Hover"),alias:"Page Up Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=Lq.get(t);i&&i.pageUp()}}),yh(class extends _h{constructor(){super({id:"editor.action.pageDownHover",label:ue(0,"Page Down Hover"),alias:"Page Down Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=Lq.get(t);i&&i.pageDown()}}),yh(class extends _h{constructor(){super({id:"editor.action.goToTopHover",label:ue(0,"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=Lq.get(t);i&&i.goToTop()}}),yh(class extends _h{constructor(){super({id:"editor.action.goToBottomHover",label:ue(0,"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:Rh.hoverFocused,kbOpts:{kbExpr:Rh.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=Lq.get(t);i&&i.goToBottom()}}),dK.register(PK),dK.register(yj),B_(((e,t)=>{const i=e.getColor(qm);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))}));class kq extends E{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if("click"!==t&&"clickAndHover"!==t)return;const i=e.target;if(6!==i.type)return;if(!i.detail.injectedText)return;if(i.detail.injectedText.options.attachedData!==jT)return;if(!i.range)return;const n=this._editor.getContribution(Lq.ID);if(n&&!n.isColorPickerVisible){const e=new Mh(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(e,1,0,!1,!0)}}}kq.ID="editor.contrib.colorContribution",Lh(kq.ID,kq,2),dK.register(vR);var Dq,xq,Nq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Eq=function(e,t){return function(i,n){t(i,n,e)}},Iq=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Mq=Dq=class extends E{constructor(e,t,i,n,s,o,r){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=s,this._languageFeatureService=o,this._languageConfigurationService=r,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=Rh.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=Rh.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||null===(e=this._standaloneColorPickerWidget)||void 0===e||e.focus():this._standaloneColorPickerWidget=new Tq(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),null===(e=this._standaloneColorPickerWidget)||void 0===e||e.hide(),this._editor.focus()}insertColor(){var e;null===(e=this._standaloneColorPickerWidget)||void 0===e||e.updateEditor(),this.hide()}static get(e){return e.getContribution(Dq.ID)}};Mq.ID="editor.contrib.standaloneColorPickerController",Mq=Dq=Nq([Eq(1,Rl),Eq(2,Wa),Eq(3,PL),Eq(4,Oa),Eq(5,iL),Eq(6,Xu)],Mq),Lh(Mq.ID,Mq,1);let Tq=xq=class extends E{constructor(e,t,i,n,s,o,r,a){var l;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=s,this._keybindingService=o,this._languageFeaturesService=r,this._languageConfigurationService=a,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new U),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(CR,this._editor),this._position=null===(l=this._editor._getViewModel())||void 0===l?void 0:l.getPrimaryCursorState().modelState.position;const h=this._editor.getSelection(),d=h?{startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},c=this._register(hs(this._body));this._register(c.onDidBlur((e=>{this.hide()}))),this._register(c.onDidFocus((e=>{this.focus()}))),this._register(this._editor.onDidChangeCursorPosition((()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()}))),this._register(this._editor.onMouseMove((e=>{var t;const i=null===(t=e.target.element)||void 0===t?void 0:t.classList;i&&i.contains("colorpicker-color-decoration")&&this.hide()}))),this._register(this.onResult((e=>{this._render(e.value,e.foundInEditor)}))),this._start(d),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return xq.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}_start(e){return Iq(this,void 0,void 0,(function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new Rq(t.result,t.foundInEditor))}))}_computeAsync(e){return Iq(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=yield this._standaloneColorPickerParticipant.createColorHover(t,new MT(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}))}_render(e,t){const i=document.createDocumentFragment();let n;const s={fragment:i,statusBar:this._register(new SK(this._keybindingService)),setColorPicker:e=>n=e,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(s,[e])),void 0===n)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(.66*this._editor.getLayoutInfo().width,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),n.layout();const o=n.body,r=o.saturationBox.domNode.clientWidth,a=o.domNode.clientWidth-r-22-8,l=n.body.enterButton;null==l||l.onClicked((()=>{this.updateEditor(),this.hide()}));const h=n.header;h.pickedColorNode.style.width=r+8+"px";h.originalColorNode.style.width=a+"px";const d=n.header.closeButton;null==d||d.onClicked((()=>{this.hide()})),t&&(l&&(l.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Tq.ID="editor.contrib.standaloneColorPickerWidget",Tq=xq=Nq([Eq(3,Oa),Eq(4,Wa),Eq(5,PL),Eq(6,iL),Eq(7,Xu)],Tq);class Rq{constructor(e,t){this.value=e,this.foundInEditor=t}}yh(class extends _h{constructor(){super({id:"editor.action.hideColorPicker",label:ue(0,"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:Rh.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;null===(i=Mq.get(t))||void 0===i||i.hide()}}),yh(class extends _h{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:ue(0,"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:Rh.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;null===(i=Mq.get(t))||void 0===i||i.insertColor()}}),oh(class extends bh{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:ue(0,"Show or Focus Standalone Color Picker"),mnemonicTitle:ue(0,"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:Ql.CommandPalette}]})}runEditorCommand(e,t){var i;null===(i=Mq.get(t))||void 0===i||i.showOrFocus()}});class Aq{static insert(e,t){return{range:new Mh(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}class Oq{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let s=0;s=65&&n<=90&&n+32===o||o>=65&&o<=90&&o+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,o){const r=e.startLineNumber,a=e.startColumn,l=e.endLineNumber,h=e.endColumn,d=s.getLineContent(r),c=s.getLineContent(l);let u,g=d.lastIndexOf(t,a-1+t.length),p=c.indexOf(i,h-1-i.length);if(-1!==g&&-1!==p)if(r===l){d.substring(g+t.length,p).indexOf(i)>=0&&(g=-1,p=-1)}else{const e=d.substring(g+t.length),n=c.substring(0,p);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(g=-1,p=-1)}-1!==g&&-1!==p?(n&&g+t.length0&&32===c.charCodeAt(p-1)&&(i=" "+i,p-=1),u=Oq._createRemoveBlockCommentOperations(new Mh(r,g+t.length+1,l,p+1),t,i)):(u=Oq._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===u.length?i:null);for(const m of u)o.addTrackedEditOperation(m.range,m.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return Mh.isEmpty(e)?n.push(Aq.delete(new Mh(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(Aq.delete(new Mh(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(Aq.delete(new Mh(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return Mh.isEmpty(e)?s.push(Aq.replace(new Mh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(Aq.insert(new Ba(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(Aq.insert(new Ba(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),o=this.languageConfigurationService.getLanguageConfiguration(s).comments;o&&o.blockCommentStartToken&&o.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,o.blockCommentStartToken,o.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new Th(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new Th(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}class Pq{constructor(e,t,i,n,s,o,r){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),o=n.getLanguageConfiguration(s).comments,r=o?o.lineCommentToken:null;if(!r)return null;const a=[];for(let l=0,h=i-t+1;lr?s-1:s}}}class Fq extends _h{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(Xu);if(!t.hasModel())return;const n=[],s=t.getModel().getOptions(),o=t.getOption(23),r=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));r.sort(((e,t)=>Mh.compareRangesUsingStarts(e.selection,t.selection)));let a=r[0];for(let l=1;l=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new Uq(new Hq(e,t))}static forStrings(){return new Uq(new Bq)}static forConfigKeys(){return new Uq(new Wq)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new zq,this._root.segment=i.value());const s=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new zq,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new zq,n.right.segment=i.value()),s.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new zq,n.mid.segment=i.value()),s.push([0,n]),n=n.mid}}const o=n.value;n.value=t,n.key=e;for(let r=s.length-1;r>=0;r--){const e=s[r][1];e.updateHeight();const t=e.balanceFactor();if(t<-1||t>1){const t=s[r][0],i=s[r+1][0];if(1===t&&1===i)s[r][1]=e.rotateLeft();else if(-1===t&&-1===i)s[r][1]=e.rotateRight();else if(1===t&&-1===i)e.right=s[r+1][1]=s[r+1][1].rotateRight(),s[r][1]=e.rotateLeft();else{if(-1!==t||1!==i)throw new Error;e.left=s[r+1][1]=s[r+1][1].rotateLeft(),s[r][1]=e.rotateRight()}if(r>0)switch(s[r-1][0]){case-1:s[r-1][1].left=s[r][1];break;case 1:s[r-1][1].right=s[r][1];break;case 0:s[r-1][1].mid=s[r][1]}else this._root=s[0][1]}}return o}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),s=[];let o=this._root;for(;o;){const e=n.cmp(o.segment);if(e>0)s.push([-1,o]),o=o.left;else if(e<0)s.push([1,o]),o=o.right;else{if(!n.hasNext())break;n.next(),s.push([0,o]),o=o.mid}}if(o){if(t?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){const e=this._min(o.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),o.key=t,o.value=i,o.segment=n}}else{const e=null!==(i=o.left)&&void 0!==i?i:o.right;if(s.length>0){const[t,i]=s[s.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=s.length-1;e>=0;e--){const t=s[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),s[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),s[e][1]=t.rotateRight()),e>0)switch(s[e-1][0]){case-1:s[e-1][1].left=s[e][1];break;case 1:s[e-1][1].right=s[e][1];break;case 0:s[e-1][1].mid=s[e][1]}else this._root=s[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}const Kq=Pa("contextService");function jq(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&an.isUri(t.uri)}function qq(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&!jq(e)&&!function(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&an.isUri(t.configPath)}(e)}const $q={id:"ext-dev"},Gq={id:"empty-window"};class Zq{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const Yq="code-workspace",Xq=(ue(0,"Code Workspace"),"4064f6ec-cb38-4ad0-af64-ee6467e63c82");var Qq,Jq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},e$=function(e,t){return function(i,n){t(i,n,e)}};let t$,i$=Qq=class{static get(e){return e.getContribution(Qq.ID)}constructor(e,t,i,n,s,o,r,a){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=o,this._configurationService=r,this._workspaceContextService=a,this._toDispose=new N,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&Yn(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(24)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu(e.event);if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?Ql.SimpleEditorContext:Ql.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),s=n.getActions({arg:e.uri});n.dispose();for(const o of s){const[,t]=o;let n=0;for(const s of t)if(s instanceof ih){const t=this._getMenuActions(e,s.item.submenu);t.length>0&&(i.push(new ja(s.id,s.label,t)),n++)}else i.push(s),n++;n&&i.push(new Ka)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),t=Hn(this._editor.getDomNode()),i=t.left+e.left,s=t.top+e.top+e.height;n={x:i,y:s}}const s=this._editor.getOption(126)&&!He;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new xx(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new xx(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;if(this._workspaceContextService.getWorkspace().id===Xq)return;const t=this._editor.getOption(72);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:void 0===e.enabled||e.enabled,checked:e.checked,run:e.run}),s=(e,t,s,o,r)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const a=e=>()=>{this._configurationService.updateValue(s,e)},l=[];for(const i of r)l.push(n({label:i.label,checked:o===i.value,run:a(i.value)}));return((e,t)=>new ja("menu-action-"+ ++i,e,t,void 0))(e,l)},o=[];o.push(n({label:ue(0,"Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),o.push(new Ka),o.push(n({label:ue(0,"Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),o.push(s(ue(0,"Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:ue(0,"Proportional"),value:"proportional"},{label:ue(0,"Fill"),value:"fill"},{label:ue(0,"Fit"),value:"fit"}])),o.push(s(ue(0,"Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:ue(0,"Mouse Over"),value:"mouseover"},{label:ue(0,"Always"),value:"always"}]));const r=this._editor.getOption(126)&&!He;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>o,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};i$.ID="editor.contrib.contextmenu",i$=Qq=Jq([e$(1,Hx),e$(2,Vx),e$(3,Rl),e$(4,PL),e$(5,Jl),e$(6,uu),e$(7,Kq)],i$);Lh(i$.ID,i$,2),yh(class extends _h{constructor(){super({id:"editor.action.showContextMenu",label:ue(0,"Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;null===(i=i$.get(t))||void 0===i||i.showContextMenu()}});class n${constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new n$(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new s$(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new s$(new n$(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new s$(new n$(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}o$.ID="editor.contrib.cursorUndoRedoController";function r$(){return!!Ii.VSCODE_DEV}function a$(e){if(r$()){const t=function(){t$||(t$=new Set);const e=globalThis;e.$hotReload_applyNewExports||(e.$hotReload_applyNewExports=e=>{for(const t of t$){const i=t(e);if(i)return i}});return t$}();return t.add(e),{dispose(){t.delete(e)}}}return{dispose(){}}}function l$(e,t){const i=new N,n=e.createDecorationsCollection();return i.add(Vj({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function h$(e,t){return e.appendChild(t),x((()=>{e.removeChild(t)}))}Lh(o$.ID,o$,0),yh(class extends _h{constructor(){super({id:"cursorUndo",label:ue(0,"Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;null===(n=o$.get(t))||void 0===n||n.cursorUndo()}}),yh(class extends _h{constructor(){super({id:"cursorRedo",label:ue(0,"Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;null===(n=o$.get(t))||void 0===n||n.cursorRedo()}});class d$ extends E{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new OR(e,t)),this._width=Mj(this,this.elementSizeObserver.getWidth()),this._height=Mj(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange((e=>Dj((e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function c$(e,t){let i=e.get(),n=i,s=i;const o=Mj("animatedValue",i);let r=-1;let a;function l(){const e=Date.now()-r;var t,h,d,c;s=Math.floor((h=n,d=i-n,(t=e)===(c=300)?h+d:d*(1-Math.pow(2,-10*t/c))+h)),e<300?a=requestAnimationFrame(l):s=i,o.set(s,void 0)}return t.add(zj({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(t,i)=>(t.didChange(e)&&(i.animate=i.animate||t.change),!0)},((t,o)=>{void 0!==a&&(cancelAnimationFrame(a),a=void 0),n=s,i=e.read(t),r=Date.now()-(o.animate?0:300),l()}))),o}class u$ extends E{constructor(e,t,i){super(),this._register(new p$(e,i)),this._register(m$(i,{height:t.actualHeight,top:t.actualTop}))}}class g${get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=Mj(this,void 0),this._actualHeight=Mj(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class p${constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId="managedOverlayWidget-"+p$._counter++,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function m$(e,t){return Hj((i=>{for(let[n,s]of Object.entries(t))s&&"object"==typeof s&&"read"in s&&(s=s.read(i)),"number"==typeof s&&(s=`${s}px`),n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e.style[n]=s}))}function f$(e,t){return function(e,t){if(r$()){Zj("reload",(t=>a$((i=>{if([...Object.values(i)].some((t=>e.includes(t))))return e=>(t(void 0),!0)})))).read(t)}}([e],t),e}function _$(e,t,i){const n=new N,s=[];return n.add(Hj((o=>{const r=t.read(o),a=new Map,l=new Map;i&&i(!0),e.changeViewZones((e=>{for(const t of s)e.removeZone(t);s.length=0;for(const t of r){const i=e.addZone(t);s.push(i),a.set(t,i)}})),i&&i(!1),n.add(zj({createEmptyChangeSummary:()=>[],handleChange(e,t){const i=l.get(e.changedObservable);return void 0!==i&&t.push(i),!0}},((t,n)=>{for(const e of r)e.onChange&&(l.set(e.onChange,a.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones((e=>{for(const t of n)e.layoutZone(t)})),i&&i(!1)})))}))),n.add({dispose(){i&&i(!0),e.changeViewZones((e=>{for(const t of s)e.removeZone(t)})),i&&i(!1)}}),n}p$._counter=0;class v$ extends Uh{dispose(){super.dispose(!0)}}const b$=Pa("audioCue");class C${static register(e){return new C$(e.fileName)}constructor(e){this.fileName=e}}C$.error=C$.register({fileName:"error.mp3"}),C$.warning=C$.register({fileName:"warning.mp3"}),C$.foldedArea=C$.register({fileName:"foldedAreas.mp3"}),C$.break=C$.register({fileName:"break.mp3"}),C$.quickFixes=C$.register({fileName:"quickFixes.mp3"}),C$.taskCompleted=C$.register({fileName:"taskCompleted.mp3"}),C$.taskFailed=C$.register({fileName:"taskFailed.mp3"}),C$.terminalBell=C$.register({fileName:"terminalBell.mp3"}),C$.diffLineInserted=C$.register({fileName:"diffLineInserted.mp3"}),C$.diffLineDeleted=C$.register({fileName:"diffLineDeleted.mp3"}),C$.diffLineModified=C$.register({fileName:"diffLineModified.mp3"}),C$.chatRequestSent=C$.register({fileName:"chatRequestSent.mp3"}),C$.chatResponsePending=C$.register({fileName:"chatResponsePending.mp3"}),C$.chatResponseReceived1=C$.register({fileName:"chatResponseReceived1.mp3"}),C$.chatResponseReceived2=C$.register({fileName:"chatResponseReceived2.mp3"}),C$.chatResponseReceived3=C$.register({fileName:"chatResponseReceived3.mp3"}),C$.chatResponseReceived4=C$.register({fileName:"chatResponseReceived4.mp3"});class w${constructor(e){this.randomOneOf=e}}class y${static register(e){const t=new w$("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new y$(t,e.name,e.settingsKey);return y$._audioCues.add(i),i}constructor(e,t,i){this.sound=e,this.name=t,this.settingsKey=i}}y$._audioCues=new Set,y$.error=y$.register({name:ue(0,"Error on Line"),sound:C$.error,settingsKey:"audioCues.lineHasError"}),y$.warning=y$.register({name:ue(0,"Warning on Line"),sound:C$.warning,settingsKey:"audioCues.lineHasWarning"}),y$.foldedArea=y$.register({name:ue(0,"Folded Area on Line"),sound:C$.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),y$.break=y$.register({name:ue(0,"Breakpoint on Line"),sound:C$.break,settingsKey:"audioCues.lineHasBreakpoint"}),y$.inlineSuggestion=y$.register({name:ue(0,"Inline Suggestion on Line"),sound:C$.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),y$.terminalQuickFix=y$.register({name:ue(0,"Terminal Quick Fix"),sound:C$.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),y$.onDebugBreak=y$.register({name:ue(0,"Debugger Stopped on Breakpoint"),sound:C$.break,settingsKey:"audioCues.onDebugBreak"}),y$.noInlayHints=y$.register({name:ue(0,"No Inlay Hints on Line"),sound:C$.error,settingsKey:"audioCues.noInlayHints"}),y$.taskCompleted=y$.register({name:ue(0,"Task Completed"),sound:C$.taskCompleted,settingsKey:"audioCues.taskCompleted"}),y$.taskFailed=y$.register({name:ue(0,"Task Failed"),sound:C$.taskFailed,settingsKey:"audioCues.taskFailed"}),y$.terminalCommandFailed=y$.register({name:ue(0,"Terminal Command Failed"),sound:C$.error,settingsKey:"audioCues.terminalCommandFailed"}),y$.terminalBell=y$.register({name:ue(0,"Terminal Bell"),sound:C$.terminalBell,settingsKey:"audioCues.terminalBell"}),y$.notebookCellCompleted=y$.register({name:ue(0,"Notebook Cell Completed"),sound:C$.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"}),y$.notebookCellFailed=y$.register({name:ue(0,"Notebook Cell Failed"),sound:C$.taskFailed,settingsKey:"audioCues.notebookCellFailed"}),y$.diffLineInserted=y$.register({name:ue(0,"Diff Line Inserted"),sound:C$.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),y$.diffLineDeleted=y$.register({name:ue(0,"Diff Line Deleted"),sound:C$.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),y$.diffLineModified=y$.register({name:ue(0,"Diff Line Modified"),sound:C$.diffLineModified,settingsKey:"audioCues.diffLineModified"}),y$.chatRequestSent=y$.register({name:ue(0,"Chat Request Sent"),sound:C$.chatRequestSent,settingsKey:"audioCues.chatRequestSent"}),y$.chatResponseReceived=y$.register({name:ue(0,"Chat Response Received"),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[C$.chatResponseReceived1,C$.chatResponseReceived2,C$.chatResponseReceived3,C$.chatResponseReceived4]}}),y$.chatResponsePending=y$.register({name:ue(0,"Chat Response Pending"),sound:C$.chatResponsePending,settingsKey:"audioCues.chatResponsePending"});var S$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},L$=function(e,t){return function(i,n){t(i,n,e)}},k$=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const D$=QT("diff-review-insert",Qr.add,ue(0,"Icon for 'Insert' in accessible diff viewer.")),x$=QT("diff-review-remove",Qr.remove,ue(0,"Icon for 'Remove' in accessible diff viewer.")),N$=QT("diff-review-close",Qr.close,ue(0,"Icon for 'Close' in accessible diff viewer."));let E$=class extends E{constructor(e,t,i,n,s,o,r,a,l){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=o,this._diffs=r,this._editors=a,this._instantiationService=l,this.model=Bj(this,((e,t)=>{const i=this._visible.read(e);if(this._parentNode.style.visibility=i?"visible":"hidden",!i)return null;const n=t.add(this._instantiationService.createInstance(I$,this._diffs,this._editors,this._setVisible,this._canClose));return{model:n,view:t.add(this._instantiationService.createInstance(B$,this._parentNode,n,this._width,this._height,this._editors))}})),this._register(Jj(this.model))}next(){Dj((e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this.model.get().model.nextGroup(e)}))}prev(){Dj((e=>{this._setVisible(!0,e),this.model.get().model.previousGroup(e)}))}close(){Dj((e=>{this._setVisible(!1,e)}))}};E$._ttPolicy=Ak("diffReview",{createHTML:e=>e}),E$=S$([L$(8,Oa)],E$);let I$=class extends E{constructor(e,t,i,n,s){super(),this._diffs=e,this._editors=t,this._setVisible=i,this.canClose=n,this._audioCueService=s,this._groups=Mj(this,[]),this._currentGroupIdx=Mj(this,0),this._currentElementIdx=Mj(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map(((e,t)=>this._groups.read(t)[e])),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map(((e,t)=>{var i;return null===(i=this.currentGroup.read(t))||void 0===i?void 0:i.lines[e]})),this._register(Hj((e=>{const t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);const i=function(e,t,i){const n=[];for(const s of Ad(e,((e,t)=>t.modified.startLineNumber-e.modified.endLineNumberExclusive<2*M$))){const e=[];e.push(new A$);const o=new bc(Math.max(1,s[0].original.startLineNumber-M$),Math.min(s[s.length-1].original.endLineNumberExclusive+M$,t+1)),r=new bc(Math.max(1,s[0].modified.startLineNumber-M$),Math.min(s[s.length-1].modified.endLineNumberExclusive+M$,i+1));Od(s,((t,i)=>{const n=new bc(t?t.original.endLineNumberExclusive:o.startLineNumber,i?i.original.startLineNumber:o.endLineNumberExclusive),s=new bc(t?t.modified.endLineNumberExclusive:r.startLineNumber,i?i.modified.startLineNumber:r.endLineNumberExclusive);n.forEach((t=>{e.push(new F$(t,s.startLineNumber+(t-n.startLineNumber)))})),i&&(i.original.forEach((t=>{e.push(new O$(i,t))})),i.modified.forEach((t=>{e.push(new P$(i,t))})))}));const a=s[0].modified.join(s[s.length-1].modified),l=s[0].original.join(s[s.length-1].original);n.push(new R$(new gM(a,l),e))}return n}(t,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());Dj((e=>{const t=this._editors.modified.getPosition();if(t){const n=i.findIndex((e=>(null==t?void 0:t.lineNumber){const t=this.currentElement.read(e);(null==t?void 0:t.type)===T$.Deleted?this._audioCueService.playAudioCue(y$.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(null==t?void 0:t.type)===T$.Added&&this._audioCueService.playAudioCue(y$.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}))),this._register(Hj((e=>{var t;const i=this.currentElement.read(e);if(i&&i.type!==T$.Header){const e=null!==(t=i.modifiedLineNumber)&&void 0!==t?t:i.diff.modified.startLineNumber;this._editors.modified.setSelection(Mh.fromPositions(new Ba(e,1)))}})))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||xj(t,(t=>{this._currentGroupIdx.set(dc.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)}))}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||Dj((i=>{this._currentElementIdx.set(dc.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)}))}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);-1!==i&&Dj((e=>{this._currentElementIdx.set(i,e)}))}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===T$.Deleted?(this._editors.original.setSelection(Mh.fromPositions(new Ba(e.originalLineNumber,1))),this._editors.original.revealLine(e.originalLineNumber),this._editors.original.focus()):(e.type!==T$.Header&&(this._editors.modified.setSelection(Mh.fromPositions(new Ba(e.modifiedLineNumber,1))),this._editors.modified.revealLine(e.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};I$=S$([L$(4,b$)],I$);const M$=3;var T$;!function(e){e[e.Header=0]="Header",e[e.Unchanged=1]="Unchanged",e[e.Deleted=2]="Deleted",e[e.Added=3]="Added"}(T$||(T$={}));class R${constructor(e,t){this.range=e,this.lines=t}}class A${constructor(){this.type=T$.Header}}class O${constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=T$.Deleted,this.modifiedLineNumber=void 0}}class P${constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=T$.Added,this.originalLineNumber=void 0}}class F${constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=T$.Unchanged}}let B$=class extends E{constructor(e,t,i,n,s,o){super(),this._element=e,this._model=t,this._width=i,this._height=n,this._editors=s,this._languageService=o,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const r=document.createElement("div");r.className="diff-review-actions",this._actionBar=this._register(new Ix(r)),this._register(Hj((e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push(new za("diffreview.close",ue(0,"Close"),"close-diff-review "+ea.asClassName(N$),!0,(()=>k$(this,void 0,void 0,(function*(){return t.close()})))),{label:!1,icon:!0})}))),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new TD(this._content,{})),us(this.domNode,this._scrollbar.getDomNode(),r),this._register(x((()=>{us(this.domNode)}))),this._register(m$(this.domNode,{width:this._width,height:this._height})),this._register(m$(this._content,{width:this._width,height:this._height})),this._register(Uj(((e,t)=>{this._model.currentGroup.read(e),this._render(t)}))),this._register(Mn(this.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())})))}_render(e){const t=this._editors.original.getOptions(),i=this._editors.modified.getOptions(),n=document.createElement("div");n.className="diff-review-table",n.setAttribute("role","list"),n.setAttribute("aria-label",ue(0,"Accessible Diff Viewer. Use arrow up and down to navigate.")),Bk(n,i.get(50)),us(this._content,n);const s=this._editors.original.getModel(),o=this._editors.modified.getModel();if(!s||!o)return;const r=s.getOptions(),a=o.getOptions(),l=i.get(66),h=this._model.currentGroup.get();for(const d of(null==h?void 0:h.lines)||[]){if(!h)break;let c;if(d.type===T$.Header){const e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");const t=h.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,s=e=>0===e?ue(0,"no lines changed"):1===e?ue(0,"1 line changed"):ue(0,"{0} lines changed",e),o=s(t.original.length),r=s(t.modified.length);e.setAttribute("aria-label",ue(0,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,o,t.modified.startLineNumber,r));const a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),c=e}else c=this._createRow(d,l,this._width.get(),t,s,r,i,o,a);n.appendChild(c);const u=Pj((e=>this._model.currentElement.read(e)===d));e.add(Hj((e=>{const t=u.read(e);c.tabIndex=t?0:-1,t&&c.focus()}))),e.add(En(c,"focus",(()=>{this._model.goToLine(d)})))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,s,o,r,a,l){const h=n.get(143),d=h.glyphMarginWidth+h.lineNumbersWidth,c=r.get(143),u=10+c.glyphMarginWidth+c.lineNumbersWidth;let g="diff-review-row",p="";let m=null;switch(e.type){case T$.Added:g="diff-review-row line-insert",p=" char-insert",m=D$;break;case T$.Deleted:g="diff-review-row line-delete",p=" char-delete",m=x$}const f=document.createElement("div");f.style.minWidth=i+"px",f.className=g,f.setAttribute("role","listitem"),f.ariaLevel="";const _=document.createElement("div");_.className="diff-review-cell",_.style.height=`${t}px`,f.appendChild(_);const v=document.createElement("span");v.style.width=d+"px",v.style.minWidth=d+"px",v.className="diff-review-line-number"+p,void 0!==e.originalLineNumber?v.appendChild(document.createTextNode(String(e.originalLineNumber))):v.innerText="\xa0",_.appendChild(v);const b=document.createElement("span");b.style.width=u+"px",b.style.minWidth=u+"px",b.style.paddingRight="10px",b.className="diff-review-line-number"+p,void 0!==e.modifiedLineNumber?b.appendChild(document.createTextNode(String(e.modifiedLineNumber))):b.innerText="\xa0",_.appendChild(b);const C=document.createElement("span");if(C.className="diff-review-spacer",m){const e=document.createElement("span");e.className=ea.asClassName(m),e.innerText="\xa0\xa0",C.appendChild(e)}else C.innerText="\xa0\xa0";let w;if(_.appendChild(C),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(a,r,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);E$._ttPolicy&&(t=E$._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),w=a.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(s,n,o.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);E$._ttPolicy&&(t=E$._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),w=s.getLineContent(e.originalLineNumber)}0===w.length&&(w=ue(0,"blank"));let y="";switch(e.type){case T$.Unchanged:y=e.originalLineNumber===e.modifiedLineNumber?ue(0,"{0} unchanged line {1}",w,e.originalLineNumber):ue(0,"{0} original line {1} modified line {2}",w,e.originalLineNumber,e.modifiedLineNumber);break;case T$.Added:y=ue(0,"+ {0} modified line {1}",w,e.modifiedLineNumber);break;case T$.Deleted:y=ue(0,"- {0} original line {1}",w,e.originalLineNumber)}return f.setAttribute("aria-label",y),f}_getLineHtml(e,t,i,n,s){const o=e.getLineContent(n),r=t.get(50),a=RC.createEmpty(o,s),l=lP.isBasicASCII(o,e.mightContainNonBasicASCII()),h=lP.containsRTL(o,l,e.mightContainRTL());return NA(new yA(r.isMonospace&&!t.get(33),r.canUseHalfwidthRightwardsArrow,o,!1,l,h,0,a,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(116),t.get(98),t.get(93),t.get(51)!==NS.OFF,null)).html}};B$=S$([L$(5,yc)],B$);const W$=QT("diff-insert",Qr.add,ue(0,"Line decoration for inserts in the diff editor.")),V$=QT("diff-remove",Qr.remove,ue(0,"Line decoration for removals in the diff editor.")),H$=xw.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+ea.asClassName(W$),marginClassName:"gutter-insert"}),z$=xw.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+ea.asClassName(V$),marginClassName:"gutter-delete"}),U$=xw.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),K$=xw.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),j$=xw.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),q$=xw.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),$$=xw.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),G$=xw.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),Z$=xw.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),Y$=xw.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"}),X$=xw.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new Ia(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(ue(0,"Click to revert change")),glyphMarginClassName:"arrow-revert-change "+ea.asClassName(Qr.arrowRight),zIndex:10001});class Q$ extends E{constructor(e,t,i,n,s){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=s,this._originalScrollTop=$j(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=$j(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._viewZonesChanged=Zj("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=Mj(this,0),this._modifiedViewZonesChangedSignal=Zj("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Zj("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=Bj(((e,t)=>{var i;this._element.replaceChildren();const n=this._diffModel.read(e),s=null===(i=null==n?void 0:n.diff.read(e))||void 0===i?void 0:i.movedTexts;if(!s||0===s.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);const o=this._originalEditorLayoutInfo.read(e),r=this._modifiedEditorLayoutInfo.read(e);if(!o||!r)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);const a=s.map((t=>{function i(e,t){return(t.getTopForLineNumber(e.startLineNumber,!0)+t.getTopForLineNumber(e.endLineNumberExclusive,!0))/2}const n=i(t.lineRangeMapping.original,this._editors.original),s=this._originalScrollTop.read(e),o=i(t.lineRangeMapping.modified,this._editors.modified),r=n-s,a=o-this._modifiedScrollTop.read(e),l=Math.min(n,o),h=Math.max(n,o);return{range:new dc(l,h),from:r,to:a,fromWithoutScroll:n,toWithoutScroll:o,move:t}}));a.sort(function(...e){return(t,i)=>{for(const n of e){const e=n(t,i);if(!yd.isNeitherLessOrGreaterThan(e))return e}return yd.neitherLessOrGreaterThan}}(Yd((e=>e.fromWithoutScroll>e.toWithoutScroll),Qd),Yd((e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll),Xd)));const l=J$.compute(a.map((e=>e.range))),h=o.verticalScrollbarWidth,d=10*(l.getTrackCount()-1)+20,c=h+d+(r.contentLeft-Q$.movedCodeBlockPadding);let u=0;for(const g of a){const e=h+10+10*l.getTrack(u),i=15,s=15,o=c,a=r.glyphMarginWidth+r.lineNumbersWidth,d=18,p=document.createElementNS("http://www.w3.org/2000/svg","rect");p.classList.add("arrow-rectangle"),p.setAttribute("x",""+(o-a)),p.setAttribute("y",""+(g.to-d/2)),p.setAttribute("width",`${a}`),p.setAttribute("height",`${d}`),this._element.appendChild(p);const m=document.createElementNS("http://www.w3.org/2000/svg","g"),f=document.createElementNS("http://www.w3.org/2000/svg","path");f.setAttribute("d",`M 0 ${g.from} L ${e} ${g.from} L ${e} ${g.to} L ${o-s} ${g.to}`),f.setAttribute("fill","none"),m.appendChild(f);const _=document.createElementNS("http://www.w3.org/2000/svg","polygon");_.classList.add("arrow"),t.add(Hj((e=>{f.classList.toggle("currentMove",g.move===n.activeMovedText.read(e)),_.classList.toggle("currentMove",g.move===n.activeMovedText.read(e))}))),_.setAttribute("points",`${o-s},${g.to-i/2} ${o},${g.to} ${o-s},${g.to+i/2}`),m.appendChild(_),this._element.appendChild(m),u++}this.width.set(d,void 0)})),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(x((()=>this._element.remove()))),this._register(Hj((e=>{const t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=t.width-t.verticalScrollbarWidth+"px",this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-Q$.movedCodeBlockPadding+this.width.read(e)}px`)}))),this._register(Jj(this._state));const o=Pj((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);return i?i.movedTexts.map((e=>({move:e,original:new g$(jj(e.lineRangeMapping.original.startLineNumber-1),18),modified:new g$(jj(e.lineRangeMapping.modified.startLineNumber-1),18)}))):[]}));this._register(_$(this._editors.original,o.map((e=>e.map((e=>e.original)))))),this._register(_$(this._editors.modified,o.map((e=>e.map((e=>e.modified)))))),this._register(Uj(((e,t)=>{const i=o.read(e);for(const n of i)t.add(new eG(this._editors.original,n.original,n.move,"original",this._diffModel.get())),t.add(new eG(this._editors.modified,n.modified,n.move,"modified",this._diffModel.get()))})));const r=$j(this._editors.original.onDidChangeCursorPosition,(()=>this._editors.original.getPosition())),a=$j(this._editors.modified.onDidChangeCursorPosition,(()=>this._editors.modified.getPosition())),l=Zj("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0))))),h=Zj("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let d="modified";this._register(zj({createEmptyChangeSummary:()=>{},handleChange:(e,t)=>(e.didChange(l)&&(d="original"),e.didChange(h)&&(d="modified"),!0)},(e=>{l.read(e),h.read(e);const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e);let n;if(i&&"original"===d){const t=r.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.original.contains(t.lineNumber))))}if(i&&"modified"===d){const t=a.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.modified.contains(t.lineNumber))))}n!==t.movedTextToCompare.get()&&t.movedTextToCompare.set(void 0,void 0),t.setActiveMovedText(n)})))}}Q$.movedCodeBlockPadding=4;class J${static compute(e){const t=[],i=[];for(const n of e){let e=t.findIndex((e=>!e.intersectsStrict(n)));if(-1===e){const i=6;t.length>=i?e=vc(t,Yd((e=>e.intersectWithRangeLength(n)),Xd)):(e=t.length,t.push(new cc))}t[e].addRange(n),i.push(e)}return new J$(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class eG extends u${constructor(e,t,i,n,s){const o=Ns("div.diff-hidden-lines-widget");super(e,t,o.root),this._editor=e,this._move=i,this._kind=n,this._diffModel=s,this._nodes=Ns("div.diff-moved-code-block",{style:{marginRight:"4px"}},[Ns("div.text-content@textContent"),Ns("div.action-bar@actionBar")]),o.root.appendChild(this._nodes.root);const r=$j(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));let a;this._register(m$(this._nodes.root,{paddingRight:r.map((e=>e.verticalScrollbarWidth))})),a=i.changes.length>0?"original"===this._kind?ue(0,"Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):ue(0,"Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):"original"===this._kind?ue(0,"Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):ue(0,"Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const l=this._register(new Ix(this._nodes.actionBar,{highlightToggledItems:!0})),h=new za("",a,"",!1);l.push(h,{icon:!1,label:!0});const d=new za("","Compare",ea.asClassName(Qr.compareChanges),!0,(()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)}));this._register(Hj((e=>{const t=this._diffModel.movedTextToCompare.read(e)===i;d.checked=t}))),l.push(d,{icon:!1,label:!0})}}class tG extends E{constructor(e,t,i){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=Pj(this,(e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e);if(!i)return null;const n=this._diffModel.read(e).movedTextToCompare.read(e),s=this._options.renderIndicators.read(e),o=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(const h of i.mappings){if(h.lineRangeMapping.original.isEmpty||r.push({range:h.lineRangeMapping.original.toInclusiveRange(),options:s?z$:K$}),h.lineRangeMapping.modified.isEmpty||a.push({range:h.lineRangeMapping.modified.toInclusiveRange(),options:s?H$:U$}),h.lineRangeMapping.modified.isEmpty||h.lineRangeMapping.original.isEmpty)h.lineRangeMapping.original.isEmpty||r.push({range:h.lineRangeMapping.original.toInclusiveRange(),options:Z$}),h.lineRangeMapping.modified.isEmpty||a.push({range:h.lineRangeMapping.modified.toInclusiveRange(),options:q$});else for(const e of h.lineRangeMapping.innerChanges||[])h.lineRangeMapping.original.contains(e.originalRange.startLineNumber)&&r.push({range:e.originalRange,options:e.originalRange.isEmpty()&&o?Y$:G$}),h.lineRangeMapping.modified.contains(e.modifiedRange.startLineNumber)&&a.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()&&o?$$:j$});h.lineRangeMapping.modified.isEmpty||!this._options.shouldRenderRevertArrows.read(e)||n||a.push({range:Mh.fromPositions(new Ba(h.lineRangeMapping.modified.startLineNumber,1)),options:X$})}if(n)for(const h of n.changes){const e=h.original.toInclusiveRange();e&&r.push({range:e,options:s?z$:K$});const t=h.modified.toInclusiveRange();t&&a.push({range:t,options:s?H$:U$});for(const i of h.innerChanges||[])r.push({range:i.originalRange,options:G$}),a.push({range:i.modifiedRange,options:j$})}const l=this._diffModel.read(e).activeMovedText.read(e);for(const h of i.movedTexts)r.push({range:h.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(h===l?" currentMove":""),blockPadding:[Q$.movedCodeBlockPadding,0,Q$.movedCodeBlockPadding,Q$.movedCodeBlockPadding]}}),a.push({range:h.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(h===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}})),this._register(l$(this._editors.original,this._decorations.map((e=>(null==e?void 0:e.originalDecorations)||[])))),this._register(l$(this._editors.modified,this._decorations.map((e=>(null==e?void 0:e.modifiedDecorations)||[]))))}}class iG extends E{constructor(e,t,i){super(),this._options=e,this._domNode=t,this._dimensions=i,this._sashRatio=Mj(this,void 0),this.sashLeft=Pj(this,(e=>{var t;const i=null!==(t=this._sashRatio.read(e))&&void 0!==t?t:this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(i,e)})),this._sash=this._register(new CW(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart((()=>{this._startSashPosition=this.sashLeft.get()}))),this._register(this._sash.onDidChange((e=>{const t=this._dimensions.width.get(),i=this._computeSashLeft((this._startSashPosition+(e.currentX-e.startX))/t,void 0);this._sashRatio.set(i/t,void 0)}))),this._register(this._sash.onDidEnd((()=>this._sash.layout()))),this._register(this._sash.onDidReset((()=>this._sashRatio.set(void 0,void 0)))),this._register(Hj((e=>{const t=this._options.enableSplitViewResizing.read(e);this._sash.state=t?3:0,this.sashLeft.read(e),this._dimensions.height.read(e),this._sash.layout()})))}setBoundarySashes(e){this._sash.orthogonalEndSash=e.bottom}_computeSashLeft(e,t){const i=this._dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),s=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,o=100;return i<=200?n:si-o?i-o:s}}class nG{remove(){var e;null===(e=this.parent)||void 0===e||e.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;void 0!==t.children.get(n);s++)n=`${i}_${s}`;return n}static empty(e){return 0===e.children.size}}class sG extends nG{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class oG extends nG{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class rG extends nG{static create(e,t,i){const n=new Uh(i),s=new rG(t.uri),o=e.ordered(t),r=o.map(((e,i)=>{var o;const r=nG.findId(`provider_${i}`,s),l=new oG(r,s,null!==(o=e.displayName)&&void 0!==o?o:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,n.token)).then((e=>{for(const t of e||[])rG._makeOutlineElement(t,l);return l}),(e=>(a(e),l))).then((e=>{nG.empty(e)?e.remove():s._groups.set(r,e)}))})),l=e.onDidChange((()=>{Id(e.ordered(t),o)||n.cancel()}));return Promise.all(r).then((()=>n.token.isCancellationRequested&&!i.isCancellationRequested?rG.create(e,t,i):s._compact())).finally((()=>{n.dispose(),l.dispose()}))}static _makeOutlineElement(e,t){const i=nG.findId(e,t),n=new sG(i,t,e);if(e.children)for(const s of e.children)rG._makeOutlineElement(s,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=v.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof sG?e.push(t.symbol):e.push(...v.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>Mh.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return rG._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>Ba.compare(Mh.getStartPosition(e.range),Mh.getStartPosition(t.range))||Ba.compare(Mh.getEndPosition(t.range),Mh.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&rG._flattenDocumentSymbols(e,n.children,n.name)}}var aG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},lG=function(e,t){return function(i,n){t(i,n,e)}},hG=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let dG=class extends E{get isUpdatingViewZones(){return this._isUpdatingViewZones}constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._languageFeaturesService=n,this._isUpdatingViewZones=!1,this._modifiedOutlineSource=Bj(this,((e,t)=>{const i=this._editors.modifiedModel.read(e);if(i)return t.add(new cG(this._languageFeaturesService,i))})),this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(3===e.reason){const e=this._diffModel.get();Dj((t=>{for(const i of this._editors.original.getSelections()||[])null==e||e.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,t),null==e||e.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,t)}))}}))),this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(3===e.reason){const e=this._diffModel.get();Dj((t=>{for(const i of this._editors.modified.getSelections()||[])null==e||e.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,t),null==e||e.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,t)}))}})));const s=this._diffModel.map(((e,t)=>{var i,n;return 0===(null===(i=null==e?void 0:e.diff.read(t))||void 0===i?void 0:i.mappings.length)?[]:null!==(n=null==e?void 0:e.unchangedRegions.read(t))&&void 0!==n?n:[]})),o=Bj(this,((e,t)=>{const i=this._modifiedOutlineSource.read(e);if(!i)return{origViewZones:[],modViewZones:[]};const n=[],o=[],r=this._options.renderSideBySide.read(e),a=s.read(e);for(const s of a)if(!s.shouldHideControls(e)){{const e=Pj((e=>s.getHiddenOriginalRange(e).startLineNumber-1)),o=new g$(e,24);n.push(o),t.add(new uG(this._editors.original,o,s,s.originalUnchangedRange,!r,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,void 0)),this._options))}{const e=Pj((e=>s.getHiddenModifiedRange(e).startLineNumber-1)),n=new g$(e,24);o.push(n),t.add(new uG(this._editors.modified,n,s,s.modifiedUnchangedRange,!1,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,void 0)),this._options))}}return{origViewZones:n,modViewZones:o}})),r={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new Ia(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(ue(0,"Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+ea.asClassName(Qr.fold),zIndex:10001};this._register(l$(this._editors.original,Pj((e=>{const t=s.read(e),i=t.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:r})));for(const n of t)n.shouldHideControls(e)&&i.push({range:Mh.fromPositions(new Ba(n.originalLineNumber,1)),options:a});return i})))),this._register(l$(this._editors.modified,Pj((e=>{const t=s.read(e),i=t.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:r})));for(const n of t)n.shouldHideControls(e)&&i.push({range:bc.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:a});return i})))),this._register(_$(this._editors.original,o.map((e=>e.origViewZones)),(e=>this._isUpdatingViewZones=e))),this._register(_$(this._editors.modified,o.map((e=>e.modViewZones)),(e=>this._isUpdatingViewZones=e))),this._register(Hj((e=>{const t=s.read(e);this._editors.original.setHiddenAreas(t.map((t=>t.getHiddenOriginalRange(e).toInclusiveRange())).filter(Ur)),this._editors.modified.setHiddenAreas(t.map((t=>t.getHiddenModifiedRange(e).toInclusiveRange())).filter(Ur))}))),this._register(this._editors.modified.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.modifiedUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}}))),this._register(this._editors.original.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.originalUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}})))}};dG=aG([lG(3,iL)],dG);let cG=class extends E{constructor(e,t){super(),this._languageFeaturesService=e,this._textModel=t,this._currentModel=Mj(this,void 0);const i=Zj("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),n=Zj("_textModel.onDidChangeContent",B.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>{}),100));this._register(Uj(((e,t)=>hG(this,void 0,void 0,(function*(){i.read(e),n.read(e);const s=t.add(new v$),o=yield rG.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,s.token);t.isDisposed||this._currentModel.set(o,void 0)})))))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter((t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber)));return n.sort(Jd(Yd((e=>e.range.endLineNumber-e.range.startLineNumber),Xd))),n.map((e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber})))}};cG=aG([lG(0,iL)],cG);class uG extends u${constructor(e,t,i,n,s,o,r,a){const l=Ns("div.diff-hidden-lines-widget");super(e,t,l.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this.hide=s,this._modifiedOutlineSource=o,this._revealModifiedHiddenLine=r,this._options=a,this._nodes=Ns("div.diff-hidden-lines",[Ns("div.top@top",{title:ue(0,"Click or drag to show more above")}),Ns("div.center@content",{style:{display:"flex"}},[Ns("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[fs("a",{title:ue(0,"Show all"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...ok("$(unfold)"))]),Ns("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),Ns("div.bottom@bottom",{title:ue(0,"Click or drag to show more below"),role:"button"})]),l.root.appendChild(this._nodes.root);const h=$j(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));this.hide?us(this._nodes.first):this._register(m$(this._nodes.first,{width:h.map((e=>e.contentLeft))}));const d=this._editor;this._register(En(this._nodes.top,"mousedown",(e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set(!0,void 0);const s=En(window,"mousemove",(e=>{const s=e.clientY-t;i=i||Math.abs(s)>2;const o=Math.round(s/d.getOption(66)),r=Math.max(0,Math.min(n+o,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(r,void 0)})),o=En(window,"mouseup",(e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(!1,void 0),s.dispose(),o.dispose()}))}))),this._register(En(this._nodes.bottom,"mousedown",(e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set(!0,void 0);const s=En(window,"mousemove",(e=>{const s=e.clientY-t;i=i||Math.abs(s)>2;const o=Math.round(s/d.getOption(66)),r=Math.max(0,Math.min(n-o,this._unchangedRegion.getMaxVisibleLineCountBottom())),a=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(r,void 0);const l=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(l-a))})),o=En(window,"mouseup",(e=>{if(this._unchangedRegion.isDragged.set(!1,void 0),!i){const e=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const t=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),s.dispose(),o.dispose()}))}))),this._register(Hj((e=>{const t=[];if(!this.hide){const n=ue(0,"{0} hidden lines",i.getHiddenModifiedRange(e).length),s=fs("span",{title:ue(0,"Double click to unfold")},n);s.addEventListener("dblclick",(e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))})),t.push(s);const o=this._unchangedRegion.getHiddenModifiedRange(e),r=this._modifiedOutlineSource.getBreadcrumbItems(o,e);if(r.length>0){t.push(fs("span",void 0,"\xa0\xa0|\xa0\xa0"));for(let e=0;e{this._revealModifiedHiddenLine(i.startLineNumber)}}}}us(this._nodes.others,...t)})))}}const gG=Pa("editorWorkerService");var pG,mG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fG=function(e,t){return function(i,n){t(i,n,e)}},_G=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let vG=pG=class{constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new U,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;null===(e=this.diffAlgorithmOnDidChangeSubscription)||void 0===e||e.dispose()}computeDiff(e,t,i,n){var s,o;return _G(this,void 0,void 0,(function*(){if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,n);if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new pM(new bc(1,2),new bc(1,t.getLineCount()+1),[new mM(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const r=JSON.stringify([e.uri.toString(),t.uri.toString()]),a=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),l=pG.diffCache.get(r);if(l&&l.context===a)return l.result;const h=F.create(),d=yield this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),c=h.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:c,timedOut:null===(s=null==d?void 0:d.quitEarly)||void 0===s||s,detectedMoves:i.computeMoves?null!==(o=null==d?void 0:d.moves.length)&&void 0!==o?o:0:-1}),n.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!d)throw new Error("no diff result available");return pG.diffCache.size>10&&pG.diffCache.delete(pG.diffCache.keys().next().value),pG.diffCache.set(r,{result:d,context:a}),d}))}setOptions(e){var t;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(null===(t=this.diffAlgorithmOnDidChangeSubscription)||void 0===t||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),i=!0),i&&this.onDidChangeEventEmitter.fire()}};vG.diffCache=new Map,vG=pG=mG([fG(1,gG),fG(2,rh)],vG);var bG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},CG=function(e,t){return function(i,n){t(i,n,e)}};const wG=Pa("diffProviderFactoryService");let yG=class{constructor(e){this.instantiationService=e}createDiffProvider(e,t){return this.instantiationService.createInstance(vG,t)}};yG=bG([CG(0,Oa)],yG),Cu(wG,yG,1);var SG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},LG=function(e,t){return function(i,n){t(i,n,e)}},kG=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let DG=class extends E{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i,n){super(),this.model=e,this._options=t,this._editor=i,this._diffProviderFactoryService=n,this._isDiffUpToDate=Mj(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=Mj(this,void 0),this.diff=this._diff,this._unchangedRegions=Mj(this,{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=Pj(this,(e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e).regions:(Dj((e=>{for(const t of this._unchangedRegions.get().regions)t.collapseAll(e)})),[]))),this.movedTextToCompare=Mj(this,void 0),this._activeMovedText=Mj(this,void 0),this._hoveredMovedText=Mj(this,void 0),this.activeMovedText=Pj(this,(e=>{var t,i;return null!==(i=null!==(t=this.movedTextToCompare.read(e))&&void 0!==t?t:this._hoveredMovedText.read(e))&&void 0!==i?i:this._activeMovedText.read(e)})),this._cancellationTokenSource=new Uh,this._diffProvider=Pj(this,(e=>{const t=this._diffProviderFactoryService.createDiffProvider(this._editor,{diffAlgorithm:this._options.diffAlgorithm.read(e)});return{diffProvider:t,onChangeSignal:Zj("onDidChange",t.onDidChange)}})),this._register(x((()=>this._cancellationTokenSource.cancel())));const s=Xj("contentChangedSignal"),o=this._register(new sd((()=>s.trigger(void 0)),200)),r=(t,i,n)=>{const s=EG.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n)),o=this._unchangedRegions.get(),r=o.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).filter((e=>!!e)).map((e=>bc.fromRange(e))),a=o.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).filter((e=>!!e)).map((e=>bc.fromRange(e))),l=e.original.deltaDecorations(o.originalDecorationIds,s.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),h=e.modified.deltaDecorations(o.modifiedDecorationIds,s.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));for(const e of s)for(let t=0;t{if(this._diff.get()){const i=Dg.fromModelContentChanges(t.changes),n=MG(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,Dj((e=>{this._diff.set(xG.fromDiffResult(this._lastDiff),e),r(n,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}o.schedule()}))),this._register(e.original.onDidChangeContent((t=>{if(this._diff.get()){const i=Dg.fromModelContentChanges(t.changes),n=IG(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,Dj((e=>{this._diff.set(xG.fromDiffResult(this._lastDiff),e),r(n,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}o.schedule()}))),this._register(Uj(((t,i)=>kG(this,void 0,void 0,(function*(){var n,a;this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),o.cancel(),s.read(t);const l=this._diffProvider.read(t);l.onChangeSignal.read(t),f$(YM,t),f$(qM,t),this._isDiffUpToDate.set(!1,void 0);let h=[];i.add(e.original.onDidChangeContent((e=>{const t=Dg.fromModelContentChanges(e.changes);h=rp(h,t)})));let d=[];i.add(e.modified.onDidChangeContent((e=>{const t=Dg.fromModelContentChanges(e.changes);d=rp(d,t)})));let c=yield l.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);var u,g,p;this._cancellationTokenSource.token.isCancellationRequested||(u=c,g=e.original,p=e.modified,c={changes:u.changes.map((e=>new pM(e.original,e.modified,e.innerChanges?e.innerChanges.map((e=>function(e,t,i){let n=e.originalRange,s=e.modifiedRange;return(1!==n.endColumn||1!==s.endColumn)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&s.endColumn===i.getLineMaxColumn(s.endLineNumber)&&n.endLineNumber{r(c,e),this._lastDiff=c;const t=xG.fromDiffResult(c);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);const i=this.movedTextToCompare.get();this.movedTextToCompare.set(i?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified))):void 0,e)})))})))))}ensureModifiedLineIsVisible(e,t){var i;if(0===(null===(i=this.diff.get())||void 0===i?void 0:i.mappings.length))return;const n=this._unchangedRegions.get().regions;for(const s of n)if(s.getHiddenModifiedRange(void 0).contains(e))return void s.showModifiedLine(e,t)}ensureOriginalLineIsVisible(e,t){var i;if(0===(null===(i=this.diff.get())||void 0===i?void 0:i.mappings.length))return;const n=this._unchangedRegions.get().regions;for(const s of n)if(s.getHiddenOriginalRange(void 0).contains(e))return void s.showOriginalLine(e,t)}waitForDiff(){return kG(this,void 0,void 0,(function*(){var e,t;yield(e=this.isDiffUpToDate,t=e=>e,new Promise((i=>{let n=!1,s=!1;const o=Hj((r=>{const a=e.read(r);t(a)&&(n?o.dispose():s=!0,i(a))}));n=!0,s&&o.dispose()})))}))}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map((e=>({range:e.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(e){const t=e.collapsedRegions.map((e=>bc.deserialize(e.range))),i=this._unchangedRegions.get();Dj((e=>{for(const n of i.regions)for(const i of t)if(n.modifiedUnchangedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}}))}};DG=SG([LG(3,wG)],DG);class xG{static fromDiffResult(e){return new xG(e.changes.map((e=>new NG(e))),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class NG{constructor(e){this.lineRangeMapping=e}}class EG{static fromDiffs(e,t,i,n,s){const o=pM.inverse(e,t,i),r=[];for(const a of o){let e=a.original.startLineNumber,o=a.modified.startLineNumber,l=a.original.length;const h=1===e&&1===o,d=e+l===t+1&&o+l===i+1;(h||d)&&l>=s+n?(h&&!d&&(l-=s),d&&!h&&(e+=s,o+=s,l-=s),r.push(new EG(e,o,l,0,0))):l>=2*s+n&&(e+=s,o+=s,l-=2*s,r.push(new EG(e,o,l,0,0)))}return r}get originalUnchangedRange(){return bc.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return bc.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=Mj(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=Mj(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=Pj(this,(e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e))),this.isDragged=Mj(this,!1),this._visibleLineCountTop.set(n,void 0),this._visibleLineCountBottom.set(s,void 0)}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return bc.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return bc.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t){const i=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),n=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;i{var s;this._contextMenuService.showContextMenu({domForShadowRoot:c&&null!==(s=i.getDomNode())&&void 0!==s?s:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>{const e=[],t=n.modified.isEmpty;e.push(new za("diff.clipboard.copyDeletedContent",t?n.original.length>1?ue(0,"Copy deleted lines"):ue(0,"Copy deleted line"):n.original.length>1?ue(0,"Copy changed lines"):ue(0,"Copy changed line"),void 0,!0,(()=>TG(this,void 0,void 0,(function*(){const e=this._originalTextModel.getValueInRange(n.original.toExclusiveRange());yield this._clipboardService.writeText(e)}))))),n.original.length>1&&e.push(new za("diff.clipboard.copyDeletedLineContent",ue(0,t?"Copy deleted line ({0})":"Copy changed line ({0})",n.original.startLineNumber+d),void 0,!0,(()=>TG(this,void 0,void 0,(function*(){let e=this._originalTextModel.getLineContent(n.original.startLineNumber+d);if(""===e){e=0===this._originalTextModel.getEndOfLineSequence()?"\n":"\r\n"}yield this._clipboardService.writeText(e)})))));return i.getOption(90)||e.push(new za("diff.inline.revertChange",ue(0,"Revert this change"),void 0,!0,(()=>TG(this,void 0,void 0,(function*(){this._editor.revert(this._diff)}))))),e},autoSelectFirstItem:!0})};this._register(Mn(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=Hn(this._diffActions),n=Math.floor(h/3);e.preventDefault(),u(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId!==this._getViewZoneId()?this.visibility=!1:(d=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,h),this.visibility=!0)}))),this._register(i.onMouseDown((e=>{if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){e.target.detail.viewZoneId===this._getViewZoneId()&&(e.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,h),u(e.event.posx,e.event.posy+h))}})))}_updateLightBulbPosition(e,t,i){const{top:n}=Hn(e),s=t-n,o=Math.floor(s/i),r=o*i;if(this._diffActions.style.top=`${r}px`,this._viewLineCounts){let e=0;for(let t=0;te});function OG(e,t,i,n){Bk(n,t.fontInfo);const s=i.length>0,o=new Qc(1e4);let r=0,a=0;const l=[];for(let c=0;c');const l=t.getLineContent(),h=lP.isBasicASCII(l,s),d=lP.containsRTL(l,h,o),c=DA(new yA(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,h,d,0,t,i,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==NS.OFF,null),a);return a.appendString(""),c.characterMapping.getHorizontalOffset(c.characterMapping.length)}var WG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},VG=function(e,t){return function(i,n){t(i,n,e)}};let HG=class extends E{constructor(e,t,i,n,s,o,r){super(),this._editors=e,this._diffModel=t,this._options=i,this._diffEditorWidget=n,this._canIgnoreViewZoneUpdateEvent=s,this._clipboardService=o,this._contextMenuService=r,this._originalTopPadding=Mj(this,0),this._originalScrollOffset=Mj(this,0),this._originalScrollOffsetAnimated=c$(this._originalScrollOffset,this._store),this._modifiedTopPadding=Mj(this,0),this._modifiedScrollOffset=Mj(this,0),this._modifiedScrollOffsetAnimated=c$(this._modifiedScrollOffset,this._store);let a=!1;const l=Mj("state",0),h=this._register(new sd((()=>{l.set(l.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((e=>{a||this._canIgnoreViewZoneUpdateEvent()||h.schedule()}))),this._register(this._editors.modified.onDidChangeViewZones((e=>{a||this._canIgnoreViewZoneUpdateEvent()||h.schedule()}))),this._register(this._editors.original.onDidChangeConfiguration((e=>{(e.hasChanged(144)||e.hasChanged(66))&&h.schedule()}))),this._register(this._editors.modified.onDidChangeConfiguration((e=>{(e.hasChanged(144)||e.hasChanged(66))&&h.schedule()})));const d=this._diffModel.map((e=>e?$j(e.model.original.onDidChangeTokens,(()=>2===e.model.original.tokenization.backgroundTokenizationState)):void 0)).map(((e,t)=>null==e?void 0:e.read(t))),c=new Set,u=new Set,g=Pj((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);if(!t||!i)return null;l.read(e);const n=this._options.renderSideBySide.read(e);return zG(this._editors.original,this._editors.modified,i.mappings,c,u,n)})),p=Pj((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);if(!i)return null;l.read(e);const n=i.changes.map((e=>new NG(e)));return zG(this._editors.original,this._editors.modified,n,c,u,!0)}));function m(){const e=document.createElement("div");return e.className="diagonal-fill",e}const f=this._register(new N),_=Pj((e=>{var t,i,n,s,o,r,a,l;f.clear();const h=g.read(e)||[],c=[],u=[],_=this._modifiedTopPadding.read(e);_>0&&u.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:_,showInHiddenAreas:!0,suppressMouseDown:!0});const v=this._originalTopPadding.read(e);v>0&&c.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:v,showInHiddenAreas:!0,suppressMouseDown:!0});const b=this._options.renderSideBySide.read(e),C=b||null===(t=this._editors.modified._getViewModel())||void 0===t?void 0:t.createLineBreaksComputer();if(C)for(const N of h)if(N.diff)for(let E=N.originalRange.startLineNumber;Ethis._editors.original.getModel().tokenization.getLineTokens(e))),I.originalRange.mapToLineArray((e=>w[y++])),k,D),A=[];for(const B of I.diff.innerChanges||[])A.push(new hP(B.originalRange.delta(-(I.diff.original.startLineNumber-1)),G$.className,0));const O=OG(R,x,A,T),P=document.createElement("div");if(P.className="inline-deleted-margin-view-zone",Bk(P,x.fontInfo),this._options.renderIndicators.read(e))for(let W=0;Wqr(F)),P,this._editors.modified,I.diff,this._diffEditorWidget,O.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let H=0;H1&&c.push({afterLineNumber:I.originalRange.startLineNumber+H,domNode:m(),heightInPx:(z-1)*S,showInHiddenAreas:!0,suppressMouseDown:!0})}u.push({afterLineNumber:I.modifiedRange.startLineNumber-1,domNode:T,heightInPx:O.heightInLines*S,minWidthInPx:O.minWidthInPx,marginDomNode:P,setZoneId(e){F=e},showInHiddenAreas:!0,suppressMouseDown:!0})}const M=document.createElement("div");M.className="gutter-delete",c.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:I.modifiedHeightInPx,marginDomNode:M,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const U=I.modifiedHeightInPx-I.originalHeightInPx;if(U>0){if(null==L?void 0:L.lineRangeMapping.original.delta(-1).deltaLength(2).contains(I.originalRange.endLineNumberExclusive-1))continue;c.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:U,showInHiddenAreas:!0,suppressMouseDown:!0})}else{if(null==L?void 0:L.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(I.modifiedRange.endLineNumberExclusive-1))continue;function K(){const e=document.createElement("div");return e.className="arrow-revert-change "+ea.asClassName(Qr.arrowRight),fs("div",{},e)}let j;I.diff&&I.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(e)&&(j=K()),u.push({afterLineNumber:I.modifiedRange.endLineNumberExclusive-1,domNode:m(),heightInPx:-U,marginDomNode:j,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const q of null!==(l=p.read(e))&&void 0!==l?l:[]){if(!(null==L?void 0:L.lineRangeMapping.original.intersect(q.originalRange))||!(null==L?void 0:L.lineRangeMapping.modified.intersect(q.modifiedRange)))continue;const $=q.modifiedHeightInPx-q.originalHeightInPx;$>0?c.push({afterLineNumber:q.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:$,showInHiddenAreas:!0,suppressMouseDown:!0}):u.push({afterLineNumber:q.modifiedRange.endLineNumberExclusive-1,domNode:m(),heightInPx:-$,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:c,mod:u}}));this._register(Uj((e=>{const t=PN.capture(this._editors.modified),i=_.read(e);a=!0,this._editors.original.changeViewZones((e=>{for(const t of c)e.removeZone(t);c.clear();for(const t of i.orig){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),c.add(i)}})),this._editors.modified.changeViewZones((e=>{for(const t of u)e.removeZone(t);u.clear();for(const t of i.mod){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),u.add(i)}})),a=!1,t.restore(this._editors.modified)}))),this._register(x((()=>{this._editors.original.changeViewZones((e=>{for(const t of c)e.removeZone(t);c.clear()})),this._editors.modified.changeViewZones((e=>{for(const t of u)e.removeZone(t);u.clear()}))})));let v=!1;this._register(this._editors.original.onDidScrollChange((e=>{e.scrollLeftChanged&&!v&&(v=!0,this._editors.modified.setScrollLeft(e.scrollLeft),v=!1)}))),this._register(this._editors.modified.onDidScrollChange((e=>{e.scrollLeftChanged&&!v&&(v=!0,this._editors.original.setScrollLeft(e.scrollLeft),v=!1)}))),this._originalScrollTop=$j(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=$j(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._register(Hj((e=>{const t=this._originalScrollTop.read(e)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(e))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(e));t!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(t,1)}))),this._register(Hj((e=>{const t=this._modifiedScrollTop.read(e)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(e))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(e));t!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(t,1)}))),this._register(Hj((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);let n=0;if(i){const e=this._editors.original.getTopForLineNumber(i.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();n=this._editors.modified.getTopForLineNumber(i.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-e}n>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(n,void 0)):n<0?(this._modifiedTopPadding.set(-n,void 0),this._originalTopPadding.set(0,void 0)):setTimeout((()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)}),400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-n,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+n,void 0,!0)})))}};function zG(e,t,i,n,s,o){const r=new ec(UG(e,n)),a=new ec(UG(t,s)),l=e.getOption(66),h=t.getOption(66),d=[];let c=0,u=0;function g(e,t){for(;;){let i=r.peek(),n=a.peek();if(i&&i.lineNumber>=e&&(i=void 0),n&&n.lineNumber>=t&&(n=void 0),!i&&!n)break;const s=i?i.lineNumber-c:Number.MAX_VALUE,o=n?n.lineNumber-u:Number.MAX_VALUE;so?(a.dequeue(),i={lineNumber:n.lineNumber-u+c,heightInPx:0}):(r.dequeue(),a.dequeue()),d.push({originalRange:bc.ofLength(i.lineNumber,1),modifiedRange:bc.ofLength(n.lineNumber,1),originalHeightInPx:l+i.heightInPx,modifiedHeightInPx:h+n.heightInPx,diff:void 0})}}for(const p of i){const m=p.lineRangeMapping;g(m.original.startLineNumber,m.modified.startLineNumber);let f=!0,_=m.modified.startLineNumber,v=m.original.startLineNumber;function b(e,t){var i,n,s,o;if(et.lineNumbere+t.heightInPx),0))&&void 0!==n?n:0,m=null!==(o=null===(s=a.takeWhile((e=>e.lineNumbere+t.heightInPx),0))&&void 0!==o?o:0;d.push({originalRange:c,modifiedRange:u,originalHeightInPx:c.length*l+g,modifiedHeightInPx:u.length*h+m,diff:p.lineRangeMapping}),v=e,_=t}if(o)for(const C of m.innerChanges||[])C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&b(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber),C.originalRange.endColumn1&&n.push({lineNumber:a,heightInPx:r*(e-1)})}for(const a of e.getWhitespaces()){if(t.has(a.id))continue;const e=0===a.afterLineNumber?0:o.convertViewPositionToModelPosition(new Ba(a.afterLineNumber,1)).lineNumber;i.push({lineNumber:e,heightInPx:a.height})}return function(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;const s=[];let o=0,r=0;for(;od?(s.push(l),r++):(s.push(n(a,l)),o++,r++)}for(;oe.lineNumber),((e,t)=>({lineNumber:e.lineNumber,heightInPx:e.heightInPx+t.heightInPx})))}HG=WG([VG(5,Xy),VG(6,Hx)],HG);var KG,jG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},qG=function(e,t){return function(i,n){t(i,n,e)}};let $G=KG=class extends E{constructor(e,t,i,n,s,o,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=s,this._modifiedEditorLayoutInfo=o,this._options=r,this._themeService=a;const l=$j(this._themeService.onDidColorThemeChange,(()=>this._themeService.getColorTheme())),h=Pj((e=>{const t=l.read(e);return{insertColor:t.getColor(of)||(t.getColor(nf)||ef).transparent(2),removeColor:t.getColor(rf)||(t.getColor(sf)||tf).transparent(2)}})),d=$j(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),c=$j(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollHeight()));this._register(Uj(((e,t)=>{if(!this._options.renderOverviewRuler.read(e))return;const i=Fk(document.createElement("div"));i.setClassName("diffViewport"),i.setPosition("absolute");const n=Ns("div.diffOverview",{style:{position:"absolute",top:"0px",width:KG.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;t.add(h$(n,i.domNode)),t.add(Mn(n,os.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)}))),t.add(En(n,os.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),t.add(h$(this._rootElement,n)),t.add(Uj(((e,t)=>{const s=this._diffModel.read(e),o=this._editors.original.createOverviewRuler("original diffOverviewRuler");o&&(t.add(o),t.add(h$(n,o.getDomNode())));const r=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(r&&(t.add(r),t.add(h$(n,r.getDomNode()))),!o||!r)return;const a=Zj("viewZoneChanged",this._editors.original.onDidChangeViewZones),l=Zj("viewZoneChanged",this._editors.modified.onDidChangeViewZones),u=Zj("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),g=Zj("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add(Hj((e=>{var t;a.read(e),l.read(e),u.read(e),g.read(e);const i=h.read(e),n=null===(t=null==s?void 0:s.diff.read(e))||void 0===t?void 0:t.mappings;function d(e,t,i){const n=i._getViewModel();return n?e.filter((e=>e.length>0)).map((e=>{const i=n.coordinatesConverter.convertModelPositionToViewPosition(new Ba(e.startLineNumber,1)),s=n.coordinatesConverter.convertModelPositionToViewPosition(new Ba(e.endLineNumberExclusive,1)),o=s.lineNumber-i.lineNumber;return new TP(i.lineNumber,s.lineNumber,o,t.toString())})):[]}const c=d((n||[]).map((e=>e.lineRangeMapping.original)),i.removeColor,this._editors.original),p=d((n||[]).map((e=>e.lineRangeMapping.modified)),i.insertColor,this._editors.modified);null==o||o.setZones(c),null==r||r.setZones(p)}))),t.add(Hj((e=>{const t=this._rootHeight.read(e),s=this._rootWidth.read(e),a=this._modifiedEditorLayoutInfo.read(e);if(a){const n=KG.ENTIRE_DIFF_OVERVIEW_WIDTH-2*KG.ONE_OVERVIEW_WIDTH;o.setLayout({top:0,height:t,right:n+KG.ONE_OVERVIEW_WIDTH,width:KG.ONE_OVERVIEW_WIDTH}),r.setLayout({top:0,height:t,right:0,width:KG.ONE_OVERVIEW_WIDTH});const s=d.read(e),l=c.read(e),h=this._editors.modified.getOption(102),u=new bD(h.verticalHasArrows?h.arrowSize:0,h.verticalScrollbarSize,0,a.height,l,s);i.setTop(u.getSliderPosition()),i.setHeight(u.getSliderSize())}else i.setTop(0),i.setHeight(0);n.style.height=t+"px",n.style.left=s-KG.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",i.setWidth(KG.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))})))}};$G.ONE_OVERVIEW_WIDTH=15,$G.ENTIRE_DIFF_OVERVIEW_WIDTH=2*KG.ONE_OVERVIEW_WIDTH,$G=KG=jG([qG(7,R_)],$G);Sp("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},ue(0,"The border color for text that got moved in the diff editor.")),Sp("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},ue(0,"The active border color for text that got moved in the diff editor."));class GG extends E{constructor(){super(...arguments),this._id=++GG.idCounter,this._onDidDispose=this._register(new U),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}GG.idCounter=0;var ZG=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},YG=function(e,t){return function(i,n){t(i,n,e)}};let XG=class extends E{constructor(e,t,i,n,s,o,r){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._createInnerEditor=s,this._instantiationService=o,this._keybindingService=r,this._onDidContentSizeChange=this._register(new U),this.original=this._register(this._createLeftHandSideEditor(i.editorOptions.get(),n.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(i.editorOptions.get(),n.modifiedEditor||{})),this.modifiedModel=$j(this.modified.onDidChangeModel,(()=>this.modified.getModel())),this._register(zj({createEmptyChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)},((e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))})))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange((e=>{const t=this.original.getContentWidth()+this.modified.getContentWidth()+$G.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),s}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=qS.revealHorizontalRightPadding.defaultValue+$G.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t=Object.assign(Object.assign({},e),{dimension:{height:0,width:0}});return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");const i=ue(0," use {0} to open the accessibility help.",null===(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))||void 0===t?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+i:e?e.replaceAll(i,""):""}};XG=ZG([YG(5,Oa),YG(6,PL)],XG);class QG{get editorOptions(){return this._options}constructor(e,t){this.diffEditorWidth=t,this.couldShowInlineViewBecauseOfSize=Pj(this,(e=>this._options.read(e).renderSideBySide&&this.diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint)),this.renderOverviewRuler=Pj(this,(e=>this._options.read(e).renderOverviewRuler)),this.renderSideBySide=Pj(this,(e=>this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)))),this.readOnly=Pj(this,(e=>this._options.read(e).readOnly)),this.shouldRenderRevertArrows=Pj(this,(e=>!!this._options.read(e).renderMarginRevertIcon&&(!!this.renderSideBySide.read(e)&&!this.readOnly.read(e)))),this.renderIndicators=Pj(this,(e=>this._options.read(e).renderIndicators)),this.enableSplitViewResizing=Pj(this,(e=>this._options.read(e).enableSplitViewResizing)),this.splitViewDefaultRatio=Pj(this,(e=>this._options.read(e).splitViewDefaultRatio)),this.ignoreTrimWhitespace=Pj(this,(e=>this._options.read(e).ignoreTrimWhitespace)),this.maxComputationTimeMs=Pj(this,(e=>this._options.read(e).maxComputationTime)),this.showMoves=Pj(this,(e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e))),this.isInEmbeddedEditor=Pj(this,(e=>this._options.read(e).isInEmbeddedEditor)),this.diffWordWrap=Pj(this,(e=>this._options.read(e).diffWordWrap)),this.originalEditable=Pj(this,(e=>this._options.read(e).originalEditable)),this.diffCodeLens=Pj(this,(e=>this._options.read(e).diffCodeLens)),this.accessibilityVerbose=Pj(this,(e=>this._options.read(e).accessibilityVerbose)),this.diffAlgorithm=Pj(this,(e=>this._options.read(e).diffAlgorithm)),this.showEmptyDecorations=Pj(this,(e=>this._options.read(e).experimental.showEmptyDecorations)),this.onlyShowAccessibleDiffViewer=Pj(this,(e=>this._options.read(e).onlyShowAccessibleDiffViewer)),this.hideUnchangedRegions=Pj(this,(e=>this._options.read(e).hideUnchangedRegions.enabled)),this.hideUnchangedRegionsRevealLineCount=Pj(this,(e=>this._options.read(e).hideUnchangedRegions.revealLineCount)),this.hideUnchangedRegionsContextLineCount=Pj(this,(e=>this._options.read(e).hideUnchangedRegions.contextLineCount)),this.hideUnchangedRegionsMinimumLineCount=Pj(this,(e=>this._options.read(e).hideUnchangedRegions.minimumLineCount));const i=Object.assign(Object.assign({},e),JG(e,hS));this._options=Mj(this,i)}updateOptions(e){const t=JG(e,this._options.get()),i=Object.assign(Object.assign(Object.assign({},this._options.get()),e),t);this._options.set(i,void 0,{changedOptions:e})}}function JG(e,t){var i,n,s,o,r,a,l,h;return{enableSplitViewResizing:_S(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:wS(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:_S(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:_S(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:bS(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:bS(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:_S(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:_S(e.renderIndicators,t.renderIndicators),originalEditable:_S(e.originalEditable,t.originalEditable),diffCodeLens:_S(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:_S(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:LS(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:LS(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:_S(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:_S(null===(i=e.experimental)||void 0===i?void 0:i.showMoves,t.experimental.showMoves),showEmptyDecorations:_S(null===(n=e.experimental)||void 0===n?void 0:n.showEmptyDecorations,t.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:_S(null!==(o=null===(s=e.hideUnchangedRegions)||void 0===s?void 0:s.enabled)&&void 0!==o?o:null===(r=e.experimental)||void 0===r?void 0:r.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:bS(null===(a=e.hideUnchangedRegions)||void 0===a?void 0:a.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:bS(null===(l=e.hideUnchangedRegions)||void 0===l?void 0:l.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:bS(null===(h=e.hideUnchangedRegions)||void 0===h?void 0:h.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:_S(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:_S(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:bS(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:_S(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited)}}var eZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},tZ=function(e,t){return function(i,n){t(i,n,e)}};let iZ=class extends GG{constructor(e,t,i,n,s,o,r,a){var l;super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=s,this._audioCueService=r,this._editorProgressService=a,this.elements=Ns("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[Ns("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[fs("span",{},"No Changes")]),Ns("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),Ns("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),Ns("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=this._register(Rj("diffModel",void 0)),this.onDidChangeModel=B.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new SB([Rl,this._contextKeyService])),this._boundarySashes=Mj(this,void 0),this._accessibleDiffViewerShouldBeVisible=Mj(this,!1),this._accessibleDiffViewerVisible=Pj(this,(e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e))),this.movedBlocksLinesPart=Mj(this,void 0),this._layoutInfo=Pj(this,(e=>{var t,i,n;const s=this._rootSizeObserver.width.read(e),o=this._rootSizeObserver.height.read(e),r=null===(t=this._sash.read(e))||void 0===t?void 0:t.sashLeft.read(e),a=null!=r?r:Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),l=s-a-(this._options.renderOverviewRuler.read(e)?$G.ENTIRE_DIFF_OVERVIEW_WIDTH:0),h=a-(null!==(n=null===(i=this.movedBlocksLinesPart.read(e))||void 0===i?void 0:i.width.read(e))&&void 0!==n?n:0);return this.elements.original.style.width=h+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=l+"px",this.elements.modified.style.left=a+"px",this._editors.original.layout({width:h,height:o}),this._editors.modified.layout({width:l,height:o}),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}})),this._diffValue=this._diffModel.map(((e,t)=>null==e?void 0:e.diff.read(t))),this.onDidUpdateDiff=B.fromObservableLight(this._diffValue),o.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(x((()=>this._domElement.removeChild(this.elements.root)))),this._rootSizeObserver=this._register(new d$(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(null!==(l=t.automaticLayout)&&void 0!==l&&l),this._options=new QG(t,this._rootSizeObserver.width),this._contextKeyService.createKey(Rh.isEmbeddedDiffEditor.key,!1);const h=Rh.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this._register(Hj((e=>{h.set(this._options.isInEmbeddedEditor.read(e))})));const d=Rh.comparingMovedCode.bindTo(this._contextKeyService);this._register(Hj((e=>{var t;d.set(!!(null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e)))})));const c=Rh.diffEditorRenderSideBySideInlineBreakpointReached.bindTo(this._contextKeyService);this._register(Hj((e=>{c.set(this._options.couldShowInlineViewBecauseOfSize.read(e))}))),this._editors=this._register(this._instantiationService.createInstance(XG,this.elements.original,this.elements.modified,this._options,i,((e,t,i,n)=>this._createInnerEditor(e,t,i,n)))),this._sash=Bj(this,((e,t)=>{const i=this._options.renderSideBySide.read(e);if(this.elements.root.classList.toggle("side-by-side",i),!i)return;const n=t.add(new iG(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((e,t)=>e-(this._options.renderOverviewRuler.read(t)?$G.ENTIRE_DIFF_OVERVIEW_WIDTH:0)))}));return t.add(Hj((e=>{const t=this._boundarySashes.read(e);t&&n.setBoundarySashes(t)}))),n})),this._register(Jj(this._sash)),this._register(Uj(((e,t)=>{this.unchangedRangesFeature=t.add(this._instantiationService.createInstance(f$(dG,e),this._editors,this._diffModel,this._options))}))),this._register(Uj(((e,t)=>{t.add(new(f$(tG,e))(this._editors,this._diffModel,this._options))}))),this._register(Uj(((e,t)=>{t.add(this._instantiationService.createInstance(f$(HG,e),this._editors,this._diffModel,this._options,this,(()=>this.unchangedRangesFeature.isUpdatingViewZones)))}))),this._register(Uj(((e,t)=>{t.add(this._instantiationService.createInstance(f$($G,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((e=>e.modifiedEditor)),this._options))}))),this._register(Uj(((e,t)=>{this._accessibleDiffViewer=t.add(this._register(this._instantiationService.createInstance(f$(E$,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t)),this._options.onlyShowAccessibleDiffViewer.map((e=>!e)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((e,t)=>{var i;return null===(i=null==e?void 0:e.diff.read(t))||void 0===i?void 0:i.mappings.map((e=>e.lineRangeMapping))})),this._editors)))})));const u=this._accessibleDiffViewerVisible.map((e=>e?"hidden":"visible"));this._register(m$(this.elements.modified,{visibility:u})),this._register(m$(this.elements.original,{visibility:u})),this._createDiffEditorContributions(),o.addDiffEditor(this),this._register(Jj(this._layoutInfo)),this._register(Uj(((e,t)=>{this.movedBlocksLinesPart.set(t.add(new(f$(Q$,e))(this.elements.root,this._diffModel,this._layoutInfo.map((e=>e.originalEditor)),this._layoutInfo.map((e=>e.modifiedEditor)),this._editors)),void 0)}))),this._register(m$(this.elements.overlay,{width:this._layoutInfo.map(((e,t)=>e.originalEditor.width+(this._options.renderSideBySide.read(t)?0:e.modifiedEditor.width))),visibility:Pj((e=>{var t,i;return this._options.hideUnchangedRegions.read(e)&&0===(null===(i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e))||void 0===i?void 0:i.mappings.length)?"visible":"hidden"}))})),this._register(this._editors.modified.onMouseDown((e=>{var t,i;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("arrow-revert-change"))){const t=e.target.position.lineNumber,n=e.target,s=this._diffModel.get();if(!s)return;const o=null===(i=s.diff.get())||void 0===i?void 0:i.mappings;if(!o)return;const r=o.find((e=>(null==n?void 0:n.detail.afterLineNumber)===e.lineRangeMapping.modified.startLineNumber-1||e.lineRangeMapping.modified.startLineNumber===t));if(!r)return;this.revert(r.lineRangeMapping),e.event.stopPropagation()}}))),this._register(B.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>{var t,i;if(3===(null==e?void 0:e.reason)){const n=null===(i=null===(t=this._diffModel.get())||void 0===t?void 0:t.diff.get())||void 0===i?void 0:i.mappings.find((t=>t.lineRangeMapping.modified.contains(e.position.lineNumber)));(null==n?void 0:n.lineRangeMapping.modified.isEmpty)?this._audioCueService.playAudioCue(y$.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):(null==n?void 0:n.lineRangeMapping.original.isEmpty)?this._audioCueService.playAudioCue(y$.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):n&&this._audioCueService.playAudioCue(y$.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}})));const g=this._diffModel.map(((e,t)=>null==e?void 0:e.isDiffUpToDate.read(t)));this._register(Uj(((e,t)=>{if(!1===g.read(e)){const e=this._editorProgressService.show(!0,1e3);t.add(x((()=>e.done())))}})))}_createInnerEditor(e,t,i,n){return e.createInstance(XB,t,i,n)}_createDiffEditorContributions(){const e=kh.getDiffEditorContributions();for(const i of e)try{this._register(this._instantiationService.createInstance(i.ctor,this))}catch(t){r(t)}}get _targetEditor(){return this._editors.modified}getEditorType(){return sF.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;return{original:this._editors.original.saveViewState(),modified:this._editors.modified.saveViewState(),modelState:null===(e=this._diffModel.get())||void 0===e?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const i=e;this._editors.original.restoreViewState(i.original),this._editors.modified.restoreViewState(i.modified),i.modelState&&(null===(t=this._diffModel.get())||void 0===t||t.restoreSerializedState(i.modelState))}}createViewModel(e){return this._instantiationService.createInstance(DG,e,this._options,this)}getModel(){var e,t;return null!==(t=null===(e=this._diffModel.get())||void 0===e?void 0:e.model)&&void 0!==t?t:null}setModel(e){!e&&this._diffModel.get()&&this._accessibleDiffViewer.close();const t=e?"model"in e?e:this.createViewModel(e):void 0;this._editors.original.setModel(t?t.model.original:null),this._editors.modified.setModel(t?t.model.modified:null),Dj((e=>{this._diffModel.set(t,e)}))}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.diff.get();return t?t.mappings.map((e=>{const t=e.lineRangeMapping;let i,n,s,o,r=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,r=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(s=t.modified.startLineNumber-1,o=0,r=void 0):(s=t.modified.startLineNumber,o=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:s,modifiedEndLineNumber:o,charChanges:null==r?void 0:r.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}})):null}revert(e){var t;const i=null===(t=this._diffModel.get())||void 0===t?void 0:t.model;if(!i)return;const n=e.innerChanges?e.innerChanges.map((e=>({range:e.modifiedRange,text:i.original.getValueInRange(e.originalRange)}))):[{range:e.modified.toExclusiveRange(),text:i.original.getValueInRange(e.original.toExclusiveRange())}];this._editors.modified.executeEdits("diffEditor",n)}accessibleDiffViewerNext(){this._accessibleDiffViewer.next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.prev()}mapToOtherSide(){var e,t;const i=this._editors.modified.hasWidgetFocus(),n=i?this._editors.modified:this._editors.original,s=i?this._editors.original:this._editors.modified;let o;const r=n.getSelection();if(r){const n=null===(t=null===(e=this._diffModel.get())||void 0===e?void 0:e.diff.get())||void 0===t?void 0:t.mappings.map((e=>i?e.lineRangeMapping.flip():e.lineRangeMapping));if(n){const e=nZ(r.getStartPosition(),n),t=nZ(r.getEndPosition(),n);o=Mh.plusRange(e,t)}}return{destination:s,destinationSelection:o}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.unchangedRegions.get();t&&Dj((e=>{for(const i of t)i.collapseAll(e)}))}showAllUnchangedRegions(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.unchangedRegions.get();t&&Dj((e=>{for(const i of t)i.showAll(e)}))}};function nZ(e,t){const i=uc(t,(t=>t.original.startLineNumber<=e.lineNumber));if(!i)return Mh.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){const t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return Mh.fromPositions(new Ba(t,e.column))}if(!i.innerChanges)return Mh.fromPositions(new Ba(i.modified.startLineNumber,1));const n=uc(i.innerChanges,(t=>t.originalRange.getStartPosition().isBeforeOrEqual(e)));if(!n){const t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return Mh.fromPositions(new Ba(t,e.column))}if(n.originalRange.containsPosition(e))return n.modifiedRange;{const t=(r=n.originalRange.getEndPosition(),a=e,r.lineNumber===a.lineNumber?new ug(0,a.column-r.column):new ug(a.lineNumber-r.lineNumber,a.column-1));return Mh.fromPositions((s=n.modifiedRange.getEndPosition(),0===(o=t).lineCount?new Ba(s.lineNumber,s.column+o.columnCount):new Ba(s.lineNumber+o.lineCount,o.columnCount+1)))}var s,o,r,a}iZ=eZ([tZ(3,Rl),tZ(4,Oa),tZ(5,Fa),tZ(6,b$),tZ(7,mL)],iZ);oh(class extends sh{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:ue(0,"Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:Qr.map,toggled:ul.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:ul.has("isInDiffEditor"),menu:{when:ul.has("isInDiffEditor"),id:Ql.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(uu),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}});class sZ extends sh{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:ue(0,"Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:ul.has("isInDiffEditor")})}run(e,...t){const i=e.get(uu),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}oh(sZ);class oZ extends sh{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:ue(0,"Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:ul.has("isInDiffEditor")})}run(e,...t){const i=e.get(uu),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}oh(oZ),th.appendMenuItem(Ql.EditorTitle,{command:{id:(new oZ).desc.id,title:ue(0,"Use Inline View When Space Is Limited"),toggled:ul.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:ul.has("isInDiffEditor")},order:11,group:"1_diff",when:ul.and(Rh.diffEditorRenderSideBySideInlineBreakpointReached,ul.has("isInDiffEditor"))}),th.appendMenuItem(Ql.EditorTitle,{command:{id:(new sZ).desc.id,title:ue(0,"Show Moved Code Blocks"),icon:Qr.move,toggled:_l.create("config.diffEditor.experimental.showMoves",!0),precondition:ul.has("isInDiffEditor")},order:10,group:"1_diff",when:ul.has("isInDiffEditor")});const rZ={value:ue(0,"Diff Editor"),original:"Diff Editor"};oh(class extends bh{constructor(){super({id:"diffEditor.switchSide",title:{value:ue(0,"Switch Side"),original:"Switch Side"},icon:Qr.arrowSwap,precondition:ul.has("isInDiffEditor"),f1:!0,category:rZ})}runEditorCommand(e,t,i){const n=dZ(e);if(n instanceof iZ){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}});oh(class extends bh{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:ue(0,"Exit Compare Move"),original:"Exit Compare Move"},icon:Qr.close,precondition:Rh.comparingMovedCode,f1:!1,category:rZ,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=dZ(e);n instanceof iZ&&n.exitCompareMove()}});oh(class extends bh{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:ue(0,"Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:Qr.fold,precondition:ul.has("isInDiffEditor"),f1:!0,category:rZ})}runEditorCommand(e,t,...i){const n=dZ(e);n instanceof iZ&&n.collapseAllUnchangedRegions()}});oh(class extends bh{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:ue(0,"Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:Qr.unfold,precondition:ul.has("isInDiffEditor"),f1:!0,category:rZ})}runEditorCommand(e,t,...i){const n=dZ(e);n instanceof iZ&&n.showAllUnchangedRegions()}});const aZ={value:ue(0,"Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class lZ extends sh{constructor(){super({id:lZ.id,title:{value:ue(0,"Go to Next Difference"),original:"Go to Next Difference"},category:aZ,precondition:ul.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=dZ(e);null==t||t.accessibleDiffViewerNext()}}lZ.id="editor.action.accessibleDiffViewer.next",th.appendMenuItem(Ql.EditorTitle,{command:{id:lZ.id,title:ue(0,"Open Accessible Diff Viewer"),precondition:ul.has("isInDiffEditor")},order:10,group:"2_diff",when:ul.and(Rh.accessibleDiffViewerVisible.negate(),ul.has("isInDiffEditor"))});class hZ extends sh{constructor(){super({id:hZ.id,title:{value:ue(0,"Go to Previous Difference"),original:"Go to Previous Difference"},category:aZ,precondition:ul.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=dZ(e);null==t||t.accessibleDiffViewerPrev()}}function dZ(e){var t;const i=e.get(Fa),n=i.listDiffEditors(),s=null!==(t=i.getFocusedCodeEditor())&&void 0!==t?t:i.getActiveCodeEditor();if(!s)return null;for(let r=0,a=n.length;rthis.selection.endLineNumber?this.targetSelection=new Th(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(gZ(e)&&(this._modifierPressed=!0),this._mouseDown&&gZ(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(gZ(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===pZ.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(null===this._dragSelection){const e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}gZ(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new Ba(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:s}=e;i=[new Th(n,s,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new Th(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(gZ(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(pZ.ID,new uZ(this._dragSelection,t,gZ(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new Mh(e.lineNumber,e.column,e.lineNumber,e.column),options:pZ._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}pZ.ID="editor.contrib.dragAndDrop",pZ.TRIGGER_KEY_VALUE=Pe?6:5,pZ._DECORATION_OPTIONS=xw.register({description:"dnd-target",className:"dnd-target"}),Lh(pZ.ID,pZ,2);var mZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fZ=function(e,t){return function(i,n){t(i,n,e)}},_Z=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class vZ{remove(){var e;null===(e=this.parent)||void 0===e||e.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;void 0!==t.children.get(n);s++)n=`${i}_${s}`;return n}static empty(e){return 0===e.children.size}}class bZ extends vZ{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class CZ extends vZ{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class wZ extends vZ{static create(e,t,i){const n=new Uh(i),s=new wZ(t.uri),o=e.ordered(t),r=o.map(((e,i)=>{var o;const r=vZ.findId(`provider_${i}`,s),l=new CZ(r,s,null!==(o=e.displayName)&&void 0!==o?o:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,n.token)).then((e=>{for(const t of e||[])wZ._makeOutlineElement(t,l);return l}),(e=>(a(e),l))).then((e=>{vZ.empty(e)?e.remove():s._groups.set(r,e)}))})),l=e.onDidChange((()=>{Id(e.ordered(t),o)||n.cancel()}));return Promise.all(r).then((()=>n.token.isCancellationRequested&&!i.isCancellationRequested?wZ.create(e,t,i):s._compact())).finally((()=>{n.dispose(),l.dispose(),n.dispose()}))}static _makeOutlineElement(e,t){const i=vZ.findId(e,t),n=new bZ(i,t,e);if(e.children)for(const s of e.children)wZ._makeOutlineElement(s,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=v.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof bZ?e.push(t.symbol):e.push(...v.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>Mh.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return wZ._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>Ba.compare(Mh.getStartPosition(e.range),Mh.getStartPosition(t.range))||Ba.compare(Mh.getEndPosition(t.range),Mh.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&wZ._flattenDocumentSymbols(e,n.children,n.name)}}const yZ=Pa("IOutlineModelService");let SZ=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new N,this._cache=new Ks(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return _Z(this,void 0,void 0,(function*(){const i=this._languageFeaturesService.documentSymbolProvider,n=i.ordered(e);let s=this._cache.get(e.id);if(!s||s.versionId!==e.getVersionId()||!Id(s.provider,n)){const t=new Uh;s={versionId:e.getVersionId(),provider:n,promiseCnt:0,source:t,promise:wZ.create(i,e,t.token),model:void 0},this._cache.set(e.id,s);const o=Date.now();s.promise.then((t=>{s.model=t,this._debounceInformation.update(e,Date.now()-o)})).catch((t=>{this._cache.delete(e.id)}))}if(s.model)return s.model;s.promiseCnt+=1;const o=t.onCancellationRequested((()=>{0==--s.promiseCnt&&(s.source.cancel(),this._cache.delete(e.id))}));try{return yield s.promise}finally{o.dispose()}}))}};SZ=mZ([fZ(0,iL),fZ(1,CE),fZ(2,Wa)],SZ),Cu(yZ,SZ,1);var LZ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};Za.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return LZ(this,void 0,void 0,(function*(){const[i]=t;jr(an.isUri(i));const n=e.get(yZ),s=e.get(Va),o=yield s.createModelReference(i);try{return(yield n.getOrCreate(o.object.textEditorModel,Hh.None)).getTopLevelSymbols()}finally{o.dispose()}}))}));const kZ=function(){if("object"==typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;tDZ(this,void 0,void 0,(function*(){return e})),asFile:()=>{},value:"string"==typeof e?e:void 0}}class NZ{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return v.some(this,(([e,t])=>t.asFile()))&&t.push("files"),MZ(EZ(e),t)}get(e){var t;return null===(t=this._entries.get(this.toKey(e)))||void 0===t?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return EZ(e)}}function EZ(e){return e.toLowerCase()}function IZ(e,t){return MZ(EZ(e),t.map(EZ))}function MZ(e,t){if("*/*"===e)return t.length>0;if(t.includes(e))return!0;const i=e.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,s,o]=i;return"*"===o&&t.some((e=>e.startsWith(s+"/")))}const TZ=Object.freeze({create:e=>Vd(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>TZ.split(e).filter((e=>!e.startsWith("#")))}),RZ="CodeEditors",AZ="CodeFiles";Ul.add("workbench.contributions.dragAndDrop",new class{});class OZ{constructor(){}static getInstance(){return OZ.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}OZ.INSTANCE=new OZ;var PZ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function FZ(e){const t=new NZ;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,xZ(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,BZ(n))}}return t}function BZ(e){const t=e.path?an.parse(e.path):void 0;return function(e,t,i){const n={id:kZ(),name:e,uri:t,data:i};return{asString:()=>DZ(this,void 0,void 0,(function*(){return""})),asFile:()=>n,value:void 0}}(e.name,t,(()=>PZ(this,void 0,void 0,(function*(){return new Uint8Array(yield e.arrayBuffer())}))))}const WZ=Object.freeze([RZ,AZ,sD.RESOURCES,sD.INTERNAL_URI_LIST]);function VZ(e,t=!1){const i=FZ(e),n=i.get(sD.INTERNAL_URI_LIST);if(n)i.replace(yu.uriList,n);else if(t||!i.has(yu.uriList)){const t=[];for(const i of e.items){const e=i.getAsFile();if(e){const i=e.path;try{i?t.push(an.file(i).toString()):t.push(an.parse(e.name,!0).toString())}catch(ge){}}}t.length&&i.replace(yu.uriList,xZ(TZ.create(t)))}for(const s of WZ)i.delete(s);return i}function HZ(e){var t;function i(e,t){return"providerId"in e&&e.providerId===t.providerId||"mimeType"in e&&e.mimeType===t.handledMimeType}const n=new Map;for(const r of e)for(const s of null!==(t=r.yieldTo)&&void 0!==t?t:[])for(const t of e)if(t!==r&&i(s,t)){let e=n.get(r);e||(e=[],n.set(r,e)),e.push(t)}if(!n.size)return Array.from(e);const s=new Set,o=[];return function e(t){if(!t.length)return[];const i=t[0];if(o.includes(i))return console.warn(`Yield to cycle detected for ${i.providerId}`),t;if(s.has(i))return e(t.slice(1));let r=[];const a=n.get(i);return a&&(o.push(i),r=e(a),o.pop()),s.add(i),[...r,i,...e(t.slice(1))]}(Array.from(e))}var zZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},UZ=function(e,t){return function(i,n){t(i,n,e)}},KZ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const jZ=xw.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:"\xa0",inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class qZ extends E{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=fs(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=fs("span.icon");this.domNode.append(t),t.classList.add(...ea.asClassNameArray(Qr.loading),"codicon-modifier-spin");const i=()=>{const e=this.editor.getOption(66);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};i(),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(52)||e.hasChanged(66))&&i()}))),this._register(En(this.domNode,os.CLICK,(e=>{this.delegate.cancel()})))}getId(){return qZ.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}qZ.baseId="editor.widget.inlineProgressWidget";let $Z=class extends E{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new I),this._currentWidget=new I,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,i){return KZ(this,void 0,void 0,(function*(){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=ed((()=>{const n=Mh.fromPositions(e);this._currentDecorations.set([{range:n,options:jZ}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(qZ,this.id,this._editor,n,t,i))}),this._showDelay);try{return yield i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}}))}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};$Z=zZ([UZ(2,Oa)],$Z);rc.white.toString(),rc.white.toString();class GZ extends E{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new U),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,n=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=n||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),e.appendChild(this._element),this._register(qL.addTarget(this._element)),[os.CLICK,KL.Tap].forEach((e=>{this._register(En(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):as(e)})))})),this._register(En(this._element,os.KEY_DOWN,(e=>{const t=new St(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&as(t,!0)}))),this._register(En(this._element,os.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register(En(this._element,os.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register(hs(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of ok(e))if("string"==typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t,i,n;if(this._label===e)return;if(Ta(this._label)&&Ta(e)&&((i=this._label)===(n=e)||i&&n&&i.value===n.value&&i.isTrusted===n.isTrusted&&i.supportThemeIcons===n.supportThemeIcons&&i.supportHtml===n.supportHtml&&(i.baseUri===n.baseUri||i.baseUri&&n.baseUri&&_a(an.from(i.baseUri),an.from(n.baseUri)))))return;this._element.classList.add("monaco-text-button");const s=this.options.supportShortLabel?this._labelElement:this._element;if(Ta(e)){const i=mk(e,{inline:!0});i.dispose();const n=null===(t=i.element.querySelector("p"))||void 0===t?void 0:t.innerHTML;if(n){const e=ki(n,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});s.innerHTML=e}else us(s)}else this.options.supportIcons?us(s,...this.getContentElements(e)):s.textContent=e;"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=Ck(e)),this._label=e}get label(){return this._label}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var ZZ,YZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},XZ=function(e,t){return function(i,n){t(i,n,e)}},QZ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let JZ=ZZ=class extends E{constructor(e,t,i,n,s,o,r,a,l,h){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=o,this.onSelectNewEdit=r,this._contextMenuService=a,this._keybindingService=h,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(l),this.visibleContext.set(!0),this._register(x((()=>this.visibleContext.reset()))),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(x((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition((e=>{s.containsPosition(e.position)||this.dispose()}))),this._register(B.runAndSubscribe(h.onDidUpdateKeybindings,(()=>{this._updateButtonTitle()})))}_updateButtonTitle(){var e;const t=null===(e=this._keybindingService.lookupKeybinding(this.showCommand.id))||void 0===e?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=fs(".post-edit-widget"),this.button=this._register(new GZ(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(En(this.domNode,os.CLICK,(()=>this.showSelector())))}getId(){return ZZ.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Hn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map(((e,t)=>$a({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}})))})}};JZ.baseId="editor.widget.postEditWidget",JZ=ZZ=YZ([XZ(7,Hx),XZ(8,Rl),XZ(9,PL)],JZ);let eY=class extends E{constructor(e,t,i,n,s,o){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=o,this._currentWidget=this._register(new I),this._register(B.any(t.onDidChangeModel,t.onDidChangeModelContent)((()=>this.clear())))}applyEditAndShowIfNeeded(e,t,i,n){var s,o;return QZ(this,void 0,void 0,(function*(){const r=this._editor.getModel();if(!r||!e.length)return;const a=t.allEdits[t.activeEditIndex];if(!a)return;let l=[];l=("string"==typeof a.insertText?""===a.insertText:""===a.insertText.snippet)?[]:e.map((e=>new eL(r.uri,"string"==typeof a.insertText?{range:e,text:a.insertText,insertAsSnippet:!1}:{range:e,text:a.insertText.snippet,insertAsSnippet:!0})));const h={edits:[...l,...null!==(o=null===(s=a.additionalEdit)||void 0===s?void 0:s.edits)&&void 0!==o?o:[]]},d=e[0],c=r.deltaDecorations([],[{range:d,options:{description:"paste-line-suffix",stickiness:0}}]);let u,g;try{u=yield this._bulkEditService.apply(h,{editor:this._editor,token:n}),g=r.getDecorationRange(c[0])}finally{r.deltaDecorations(c,[])}i&&u.isApplied&&t.allEdits.length>1&&this.show(null!=g?g:d,t,(s=>QZ(this,void 0,void 0,(function*(){const o=this._editor.getModel();o&&(yield o.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:s,allEdits:t.allEdits},i,n))}))))}))}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(JZ,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;null===(e=this._currentWidget.value)||void 0===e||e.showSelector()}};eY=YZ([XZ(4,Oa),XZ(5,QS)],eY);var tY,iY=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},nY=function(e,t){return function(i,n){t(i,n,e)}},sY=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const oY="editor.changePasteType",rY=new Tl("pasteWidgetVisible",!1,ue(0,"Whether the paste widget is showing")),aY="application/vnd.code.copyMetadata";let lY=tY=class extends E{static get(e){return e.getContribution(tY.ID)}constructor(e,t,i,n,s,o,r){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=s,this._quickInputService=o,this._progressService=r,this._editor=e;const a=e.getContainerDomNode();this._register(En(a,"copy",(e=>this.handleCopy(e)))),this._register(En(a,"cut",(e=>this.handleCopy(e)))),this._register(En(a,"paste",(e=>this.handlePaste(e)),!0)),this._pasteProgressManager=this._register(new $Z("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(eY,"pasteIntoEditor",e,rY,{id:oY,label:ue(0,"Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},Qn().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(e){var t,i;if(!this._editor.hasTextFocus())return;if(We&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled())return;const n=this._editor.getModel(),s=this._editor.getSelections();if(!n||!(null==s?void 0:s.length))return;const o=this._editor.getOption(37);let r=s;const a=1===s.length&&s[0].isEmpty();if(a){if(!o)return;r=[new Mh(r[0].startLineNumber,1,r[0].startLineNumber,1+n.getLineLength(r[0].startLineNumber))]}const l=null===(t=this._editor._getViewModel())||void 0===t?void 0:t.getPlainTextToCopy(s,o,Oe),h={multicursorText:Array.isArray(l)?l:null,pasteOnNewLine:a,mode:null},d=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter((e=>!!e.prepareDocumentPaste));if(!d.length)return void this.setCopyMetadata(e.clipboardData,{defaultPastePayload:h});const c=FZ(e.clipboardData),u=d.flatMap((e=>{var t;return null!==(t=e.copyMimeTypes)&&void 0!==t?t:[]})),g=kZ();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:u,defaultPastePayload:h});const p=Gh((e=>sY(this,void 0,void 0,(function*(){const t=Pd(yield Promise.all(d.map((t=>sY(this,void 0,void 0,(function*(){try{return yield t.prepareDocumentPaste(n,r,c,e)}catch(i){return void console.error(i)}}))))));t.reverse();for(const e of t)for(const[t,i]of e)c.replace(t,i);return c}))));null===(i=this._currentCopyOperation)||void 0===i||i.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:p}}handlePaste(e){var t,i;return sY(this,void 0,void 0,(function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;null===(t=this._currentPasteOperation)||void 0===t||t.cancel(),this._currentPasteOperation=void 0;const n=this._editor.getModel(),s=this._editor.getSelections();if(!(null==s?void 0:s.length)||!n)return;if(!this.isPasteAsEnabled())return;const o=this.fetchCopyMetadata(e),r=VZ(e.clipboardData);r.delete(aY);const a=[...e.clipboardData.types,...null!==(i=null==o?void 0:o.providerCopyMimeTypes)&&void 0!==i?i:[],yu.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter((e=>{var t;return null===(t=e.pasteMimeTypes)||void 0===t?void 0:t.some((e=>IZ(e,a)))}));l.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,l,s,r,o):this.doPasteInline(l,s,r,o))}))}doPasteInline(e,t,i,n){const s=Gh((o=>sY(this,void 0,void 0,(function*(){const r=this._editor;if(!r.hasModel())return;const a=r.getModel(),l=new aL(r,3,void 0,o);try{if(yield this.mergeInDataFromCopy(i,n,l.token),l.token.isCancellationRequested)return;const s=e.filter((e=>hY(e,i)));if(!s.length||1===s.length&&"text"===s[0].id)return void(yield this.applyDefaultPasteHandler(i,n,l.token));const o=yield this.getPasteEdits(s,i,a,t,l.token);if(l.token.isCancellationRequested)return;if(1===o.length&&"text"===o[0].providerId)return void(yield this.applyDefaultPasteHandler(i,n,l.token));if(o.length){const e="afterPaste"===r.getOption(84).showPasteSelector;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:o},e,l.token)}yield this.applyDefaultPasteHandler(i,n,l.token)}finally{l.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}))));this._pasteProgressManager.showWhile(t[0].getEndPosition(),ue(0,"Running paste handlers. Click to cancel"),s),this._currentPasteOperation=s}showPasteAsPick(e,t,i,n,s){const o=Gh((r=>sY(this,void 0,void 0,(function*(){const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),h=new aL(a,3,void 0,r);try{if(yield this.mergeInDataFromCopy(n,s,h.token),h.token.isCancellationRequested)return;let o=t.filter((e=>hY(e,n)));e&&(o=o.filter((t=>t.id===e)));const r=yield this.getPasteEdits(o,n,l,i,h.token);if(h.token.isCancellationRequested)return;if(!r.length)return;let a;if(e)a=r.at(0);else{const e=yield this._quickInputService.pick(r.map((e=>({label:e.label,description:e.providerId,detail:e.detail,edit:e}))),{placeHolder:ue(0,"Select Paste Action")});a=null==e?void 0:e.edit}if(!a)return;const d=function(e,t,i){var n,s;return{edits:[...t.map((t=>new eL(e,"string"==typeof i.insertText?{range:t,text:i.insertText,insertAsSnippet:!1}:{range:t,text:i.insertText.snippet,insertAsSnippet:!0}))),...null!==(s=null===(n=i.additionalEdit)||void 0===n?void 0:n.edits)&&void 0!==s?s:[]]}}(l.uri,i,a);yield this._bulkEditService.apply(d,{editor:this._editor})}finally{h.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}))));this._progressService.withProgress({location:10,title:ue(0,"Running paste handlers")},(()=>o))}setCopyMetadata(e,t){e.setData(aY,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const i=e.clipboardData.getData(aY);if(i)try{return JSON.parse(i)}catch(Ws){return}const[n,s]=Zy.getTextData(e.clipboardData);return s?{defaultPastePayload:{mode:s.mode,multicursorText:null!==(t=s.multicursorText)&&void 0!==t?t:null,pasteOnNewLine:!!s.isFromEmptySelection}}:void 0}mergeInDataFromCopy(e,t,i){var n;return sY(this,void 0,void 0,(function*(){if((null==t?void 0:t.id)&&(null===(n=this._currentCopyOperation)||void 0===n?void 0:n.handle)===t.id){const t=yield this._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[i,n]of t)e.replace(i,n)}if(!e.has(yu.uriList)){const t=yield this._clipboardService.readResources();if(i.isCancellationRequested)return;t.length&&e.append(yu.uriList,xZ(TZ.create(t)))}}))}getPasteEdits(e,t,i,n,s){return sY(this,void 0,void 0,(function*(){const o=yield Zh(Promise.all(e.map((e=>sY(this,void 0,void 0,(function*(){var o;try{const r=yield null===(o=e.provideDocumentPasteEdits)||void 0===o?void 0:o.call(e,i,n,t,s);if(r)return Object.assign(Object.assign({},r),{providerId:e.id})}catch(r){console.error(r)}}))))),s);return HZ(Pd(null!=o?o:[]))}))}applyDefaultPasteHandler(e,t,i){var n,s,o;return sY(this,void 0,void 0,(function*(){const r=null!==(n=e.get(yu.text))&&void 0!==n?n:e.get("text");if(!r)return;const a=yield r.asString();if(i.isCancellationRequested)return;const l={text:a,pasteOnNewLine:null!==(s=null==t?void 0:t.defaultPastePayload.pasteOnNewLine)&&void 0!==s&&s,multicursorText:null!==(o=null==t?void 0:t.defaultPastePayload.multicursorText)&&void 0!==o?o:null,mode:null};this._editor.trigger("keyboard","paste",l)}))}};function hY(e,t){var i;return Boolean(null===(i=e.pasteMimeTypes)||void 0===i?void 0:i.some((e=>t.matches(e))))}lY.ID="editor.contrib.copyPasteActionController",lY=tY=iY([nY(1,Oa),nY(2,QS),nY(3,Xy),nY(4,iL),nY(5,lE),nY(6,gL)],lY);var dY=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cY=function(e,t){return function(i,n){t(i,n,e)}},uY=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const gY=ue(0,"Built-in");class pY{provideDocumentPasteEdits(e,t,i,n){return uY(this,void 0,void 0,(function*(){const e=yield this.getEdit(i,n);return e?{insertText:e.insertText,label:e.label,detail:e.detail,handledMimeType:e.handledMimeType,yieldTo:e.yieldTo}:void 0}))}provideDocumentOnDropEdits(e,t,i,n){return uY(this,void 0,void 0,(function*(){const e=yield this.getEdit(i,n);return e?{insertText:e.insertText,label:e.label,handledMimeType:e.handledMimeType,yieldTo:e.yieldTo}:void 0}))}}class mY extends pY{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[yu.text],this.pasteMimeTypes=[yu.text]}getEdit(e,t){return uY(this,void 0,void 0,(function*(){const t=e.get(yu.text);if(!t)return;if(e.has(yu.uriList))return;const i=yield t.asString();return{handledMimeType:yu.text,label:ue(0,"Insert Plain Text"),detail:gY,insertText:i}}))}}class fY extends pY{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[yu.uriList],this.pasteMimeTypes=[yu.uriList]}getEdit(e,t){return uY(this,void 0,void 0,(function*(){const i=yield vY(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map((({uri:e,originalText:t})=>e.scheme===vn.file?e.fsPath:(n++,t))).join(" ");let o;return o=n>0?i.length>1?ue(0,"Insert Uris"):ue(0,"Insert Uri"):i.length>1?ue(0,"Insert Paths"):ue(0,"Insert Path"),{handledMimeType:yu.uriList,insertText:s,label:o,detail:gY}}))}}let _Y=class extends pY{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[yu.uriList],this.pasteMimeTypes=[yu.uriList]}getEdit(e,t){return uY(this,void 0,void 0,(function*(){const i=yield vY(e);if(!i.length||t.isCancellationRequested)return;const n=Pd(i.map((({uri:e})=>{const t=this._workspaceContextService.getWorkspaceFolder(e);return t?La(t.uri,e):void 0})));return n.length?{handledMimeType:yu.uriList,insertText:n.join(" "),label:i.length>1?ue(0,"Insert Relative Paths"):ue(0,"Insert Relative Path"),detail:gY}:void 0}))}};function vY(e){return uY(this,void 0,void 0,(function*(){const t=e.get(yu.uriList);if(!t)return[];const i=yield t.asString(),n=[];for(const e of TZ.parse(i))try{n.push({uri:an.parse(e),originalText:e})}catch(ge){}return n}))}_Y=dY([cY(0,Kq)],_Y);let bY=class extends E{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new mY)),this._register(e.documentOnDropEditProvider.register("*",new fY)),this._register(e.documentOnDropEditProvider.register("*",new _Y(t)))}};bY=dY([cY(0,iL),cY(1,Kq)],bY);let CY=class extends E{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new mY)),this._register(e.documentPasteEditProvider.register("*",new fY)),this._register(e.documentPasteEditProvider.register("*",new _Y(t)))}};CY=dY([cY(0,iL),cY(1,Kq)],CY),Lh(lY.ID,lY,0),DT(CY),wh(new class extends fh{constructor(){super({id:oY,precondition:rY,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){var n;return null===(n=lY.get(t))||void 0===n?void 0:n.changePasteType()}}),yh(class extends _h{constructor(){super({id:"editor.action.pasteAs",label:ue(0,"Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:ue(0,"The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(e,t,i){var n;const s="string"==typeof(null==i?void 0:i.id)?i.id:void 0;return null===(n=lY.get(t))||void 0===n?void 0:n.pasteAs(s)}});class wY{constructor(e){this.identifier=e}}const yY=Pa("treeViewsDndService");Cu(yY,class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}},1);var SY,LY=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},kY=function(e,t){return function(i,n){t(i,n,e)}},DY=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const xY="editor.experimental.dropIntoEditor.defaultProvider",NY="editor.changeDropType",EY=new Tl("dropWidgetVisible",!1,ue(0,"Whether the drop widget is showing"));let IY=SY=class extends E{static get(e){return e.getContribution(SY.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=OZ.getInstance(),this._dropProgressManager=this._register(t.createInstance($Z,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(eY,"dropIntoEditor",e,EY,{id:NY,label:ue(0,"Show drop options...")})),this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event))))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,i){var n;return DY(this,void 0,void 0,(function*(){if(!i.dataTransfer||!e.hasModel())return;null===(n=this._currentOperation)||void 0===n||n.cancel(),e.focus(),e.setPosition(t);const s=Gh((n=>DY(this,void 0,void 0,(function*(){const o=new aL(e,1,void 0,n);try{const s=yield this.extractDataTransferData(i);if(0===s.size||o.token.isCancellationRequested)return;const r=e.getModel();if(!r)return;const a=this._languageFeaturesService.documentOnDropEditProvider.ordered(r).filter((e=>!e.dropMimeTypes||e.dropMimeTypes.some((e=>s.matches(e))))),l=yield this.getDropEdits(a,r,t,s,o);if(o.token.isCancellationRequested)return;if(l.length){const i=this.getInitialActiveEditIndex(r,l),s="afterDrop"===e.getOption(36).showDropSelector;yield this._postDropWidgetManager.applyEditAndShowIfNeeded([Mh.fromPositions(t)],{activeEditIndex:i,allEdits:l},s,n)}}finally{o.dispose(),this._currentOperation===s&&(this._currentOperation=void 0)}}))));this._dropProgressManager.showWhile(t,ue(0,"Running drop handlers. Click to cancel"),s),this._currentOperation=s}))}getDropEdits(e,t,i,n,s){return DY(this,void 0,void 0,(function*(){const o=yield Zh(Promise.all(e.map((e=>DY(this,void 0,void 0,(function*(){try{const o=yield e.provideDocumentOnDropEdits(t,i,n,s.token);if(o)return Object.assign(Object.assign({},o),{providerId:e.id})}catch(o){console.error(o)}}))))),s.token);return HZ(Pd(null!=o?o:[]))}))}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(xY,{resource:e.uri});for(const[n,s]of Object.entries(i)){const e=t.findIndex((e=>s===e.providerId&&e.handledMimeType&&IZ(n,[e.handledMimeType])));if(e>=0)return e}return 0}extractDataTransferData(e){return DY(this,void 0,void 0,(function*(){if(!e.dataTransfer)return new NZ;const t=VZ(e.dataTransfer);if(this.treeItemsTransfer.hasData(wY.prototype)){const e=this.treeItemsTransfer.getData(wY.prototype);if(Array.isArray(e))for(const i of e){const e=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(e)for(const[i,n]of e)t.replace(i,n)}}return t}))}};IY.ID="editor.contrib.dropIntoEditorController",IY=SY=LY([kY(1,Oa),kY(2,uu),kY(3,iL),kY(4,yY)],IY),Lh(IY.ID,IY,2),wh(new class extends fh{constructor(){super({id:NY,precondition:EY,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){var n;null===(n=IY.get(t))||void 0===n||n.changeDropType()}}),DT(bY),Ul.as(ku).registerConfiguration(Object.assign(Object.assign({},$S),{properties:{[xY]:{type:"object",scope:5,description:ue(0,"Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}));class MY{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,MY._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,MY._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new Mh(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,MY._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=MY._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=MY._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,o=Math.max(2,Math.ceil(3/i));let r=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let n=1,l=e.length;n=t.startLineNumber?t.endLineNumber>a&&(a=t.endLineNumber):(s.push({range:new Mh(r,1,a,1),options:MY._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),r=t.startLineNumber,a=t.endLineNumber)}s.push({range:new Mh(r,1,a,1),options:MY._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const o=new Array(e.length);for(let t=0,r=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,MY._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){const e=[];for(let t=0;tMh.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function AY(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function OY(e,t,i){const n=t.split(i),s=e[0].split(i);let o="";return n.forEach(((e,t)=>{o+=RY([s[t]],e)+i})),o.slice(0,-1)}class PY{constructor(e){this.staticValue=e,this.kind=0}}class FY{constructor(e){this.pieces=e,this.kind=1}}class BY{static fromStaticValue(e){return new BY([WY.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new PY(e[0].staticValue):this._state=new FY(e):this._state=new PY("")}buildReplaceString(e,t){if(0===this._state.kind)return t?RY(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n0){const e=[],i=t.caseOps.length;let n=0;for(let o=0,r=s.length;o=i){e.push(s.slice(o));break}switch(t.caseOps[n]){case"U":e.push(s[o].toUpperCase());break;case"u":e.push(s[o].toUpperCase()),n++;break;case"L":e.push(s[o].toLowerCase());break;case"l":e.push(s[o].toLowerCase()),n++;break;default:e.push(s[o])}}s=e.join("")}i+=s}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(ethis.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,k(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){if(!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)){this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new Mh(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,gX);this._decorations.set(n,i);const s=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(s);if(0===o&&n.length>0){const e=mc(n.map((e=>e.range)),(e=>Mh.compareRangesUsingStarts(e,s)>=0));o=e>0?e-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||1===n?(1===i?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new Ba(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new Ba(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=s)break;const o=e.charCodeAt(n);if(36===o){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===o||38===o){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=o&&o<=57){let r=o-48;if(n+1=s)break;const o=e.charCodeAt(n);switch(o){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(o))}}}return i.finalize()}(this._state.replaceString):BY.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){const n=e.buildReplaceString(i.matches,this._state.preserveCase),s=new Gw(t,n);this._executeEditorCommand("replace",s),this._decorations.setStartPosition(new Ba(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>pX._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=gX?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new qb(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),s=i.getFullModelRange(),o=this._getReplacePattern();let r;const a=this._state.preserveCase;r=o.hasReplacementPatterns||a?n.replace(t,(function(){return o.buildReplaceString(arguments,a)})):n.replace(t,o.buildReplaceString(null,a));const l=new Qw(s,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let o=0,r=i.length;oe.range)),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let t=this._findMatches(e,!1,1073741824).map((e=>new Th(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const i=this._editor.getSelection();for(let n=0,s=t.length;nthis._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const n={inputActiveOptionBorder:Cp(Pp),inputActiveOptionForeground:Cp(Bp),inputActiveOptionBackground:Cp(Fp)};this.caseSensitive=this._register(new bV(Object.assign({appendTitle:this._keybindingLabelFor(oX),isChecked:this._state.matchCase},n))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new CV(Object.assign({appendTitle:this._keybindingLabelFor(rX),isChecked:this._state.wholeWord},n))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new wV(Object.assign({appendTitle:this._keybindingLabelFor(aX),isChecked:this._state.isRegex},n))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(En(this._domNode,os.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(En(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return mX.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}function fX(e,t){return 1===e||2!==e&&t}mX.ID="editor.contrib.findOptionsWidget";class _X extends E{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return fX(this._isRegexOverride,this._isRegex)}get wholeWord(){return fX(this._wholeWordOverride,this._wholeWord)}get matchCase(){return fX(this._matchCaseOverride,this._matchCase)}get preserveCase(){return fX(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new U),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),void 0!==i&&(Mh.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const s={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;const r=this.isRegex,a=this.wholeWord,l=this.matchCase,h=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,o=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,o=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,o=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,o=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!Mh.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,s.searchScope=!0,o=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,o=!0),void 0!==e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,s.isSearching=!0,o=!0),void 0!==e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,s.filters=!0,o=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(o=!0,s.isRegex=!0),a!==this.wholeWord&&(o=!0,s.wholeWord=!0),l!==this.matchCase&&(o=!0,s.matchCase=!0),h!==this.preserveCase&&(o=!0,s.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=gX}}const vX=ue(0,"input"),bX=ue(0,"Preserve Case");class CX extends mV{constructor(e){super({icon:Qr.preserveCase,title:bX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class wX extends pD{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new U),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new U),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new U),this._onInput=this._register(new U),this._onKeyUp=this._register(new U),this._onPreserveCaseKeyDown=this._register(new U),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||vX;const s=n.appendPreserveCaseLabel||"",o=n.history||[],r=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new DV(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:o,showHistoryHint:n.showHistoryHint,flexibleHeight:r,flexibleWidth:a,flexibleMaxHeight:l,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new CX(Object.assign({appendTitle:s,isChecked:!1},n.toggleStyles))),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const h=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=h.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%h.length:e.equals(15)&&(i=0===t?h.length-1:t-1),e.equals(9)?(h[t].blur(),this.inputBox.focus()):i>=0&&h[i].focus(),as(e,!0)}}}));const d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),null==e||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;null===(e=this.inputBox)||void 0===e||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var yX=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},SX=function(e,t){return function(i,n){t(i,n,e)}};const LX=new Tl("suggestWidgetVisible",!1,ue(0,"Whether suggestion are visible")),kX="historyNavigationWidgetFocus",DX="historyNavigationForwardsEnabled",xX="historyNavigationBackwardsEnabled";let NX;const EX=[];function IX(e,t){if(EX.includes(t))throw new Error("Cannot register the same widget multiple times");EX.push(t);const i=new N,n=new Tl(kX,!1).bindTo(e),s=new Tl(DX,!0).bindTo(e),o=new Tl(xX,!0).bindTo(e),r=()=>{n.set(!0),NX=t},a=()=>{n.set(!1),NX===t&&(NX=void 0)};return t.element===document.activeElement&&r(),i.add(t.onDidFocus((()=>r()))),i.add(t.onDidBlur((()=>a()))),i.add(x((()=>{EX.splice(EX.indexOf(t),1),a()}))),{historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:o,dispose(){i.dispose()}}}let MX=class extends NV{constructor(e,t,i,n){super(e,t,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(IX(s,this.inputBox))}};MX=yX([SX(3,Rl)],MX);let TX=class extends wX{constructor(e,t,i,n,s=!1){super(e,t,s,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(IX(o,this.inputBox))}};function RX(e){var t,i;return"Up"===(null===(t=e.lookupKeybinding("history.showPrevious"))||void 0===t?void 0:t.getElectronAccelerator())&&"Down"===(null===(i=e.lookupKeybinding("history.showNext"))||void 0===i?void 0:i.getElectronAccelerator())}TX=yX([SX(3,Rl)],TX),jl.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ul.and(ul.has(kX),ul.equals(xX,!0),ul.not("isComposing"),LX.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{null==NX||NX.showPreviousValue()}}),jl.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ul.and(ul.has(kX),ul.equals(DX,!0),ul.not("isComposing"),LX.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{null==NX||NX.showNextValue()}});var AX=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const OX=QT("find-selection",Qr.selection,ue(0,"Icon for 'Find in Selection' in the editor find widget.")),PX=QT("find-collapsed",Qr.chevronRight,ue(0,"Icon to indicate that the editor find widget is collapsed.")),FX=QT("find-expanded",Qr.chevronDown,ue(0,"Icon to indicate that the editor find widget is expanded.")),BX=QT("find-replace",Qr.replace,ue(0,"Icon for 'Replace' in the editor find widget.")),WX=QT("find-replace-all",Qr.replaceAll,ue(0,"Icon for 'Replace All' in the editor find widget.")),VX=QT("find-previous-match",Qr.arrowUp,ue(0,"Icon for 'Find Previous' in the editor find widget.")),HX=QT("find-next-match",Qr.arrowDown,ue(0,"Icon for 'Find Next' in the editor find widget.")),zX=ue(0,"Find / Replace"),UX=ue(0,"Find"),KX=ue(0,"Find"),jX=ue(0,"Previous Match"),qX=ue(0,"Next Match"),$X=ue(0,"Find in Selection"),GX=ue(0,"Close"),ZX=ue(0,"Replace"),YX=ue(0,"Replace"),XX=ue(0,"Replace"),QX=ue(0,"Replace All"),JX=ue(0,"Toggle Replace"),eQ=ue(0,"Only the first {0} results are highlighted, but all find operations work on the entire text.",gX),tQ=ue(0,"{0} of {1}"),iQ=ue(0,"No results"),nQ=419;let sQ=69;const oQ="ctrlEnterReplaceAll.windows.donotask",rQ=Pe?256:2048;class aQ{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function lQ(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function hQ(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(90)&&(this._codeEditor.getOption(90)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(143)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(41)){const e=this._codeEditor.getOption(41).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new aQ(0),this._showViewZone()),!t&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((()=>AX(this,void 0,void 0,(function*(){if(this._isVisible){const e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}}))))),this._findInputFocused=zY.bindTo(o),this._findFocusTracker=this._register(hs(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=UY.bindTo(o),this._replaceFocusTracker=this._register(hs(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new aQ(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return dQ.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(90)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=zn(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,r)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=sQ+"px",this._state.matchesCount>=gX?this._matchesCount.title=eQ:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=gX&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=Xs(tQ,i,t)}else e=iQ;this._matchesCount.appendChild(document.createTextNode(e)),Os(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),sQ=Math.max(sQ,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===iQ)return""===i?ue(0,"{0} found",e):ue(0,"{0} found for '{1}'",e,i);if(t){const n=ue(0,"{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();if(s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1){return`${s.getLineContent(t.startLineNumber)}, ${n}`}return n}return ue(0,"{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(90);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Hn(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=n.left+(s?s.left:0),r=s?s.top:0;if(this._viewZone&&re.startLineNumber&&(t=!1);const i=Vn(this._domNode).left;o>i&&(t=!1);const s=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(s?s.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new aQ(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;const s=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(83).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!xn(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,s=!1,o=!1;if(this._resized){if(zn(this._domNode)>nQ)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=zn(this._findInput.domNode))}if(447+i>=t&&(s=!0),447+i-sQ>=t&&(o=!0),447+i-sQ>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",o),this._domNode.classList.toggle("reduced-find-widget",s),o||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._findInput.layout({collapsedFindWidget:n,narrowFindWidget:o,reducedFindWidget:s}),this._resized){const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=zn(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||Mh.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|rQ)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?lQ(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?hQ(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|rQ)?(this._keybindingService.dispatchEvent(e,e.target)||(Oe&&Be&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(ue(0,"Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(oQ,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?lQ(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?hQ(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const e=!0,t=!0;this._findInput=this._register(new MX(null,this._contextViewProvider,{width:221,label:UX,placeholder:KX,appendCaseSensitiveLabel:this._keybindingLabelFor(oX),appendWholeWordsLabel:this._keybindingLabelFor(rX),appendRegexLabel:this._keybindingLabelFor(aX),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(Dre){return{content:Dre.message}}},flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>RX(this._keybindingService),inputBoxStyles:qx,toggleStyles:jx},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),Fe&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new cQ({label:jX+this._keybindingLabelFor(JY),icon:VX,onTrigger:()=>{qr(this._codeEditor.getAction(JY)).run().then(void 0,r)}})),this._nextBtn=this._register(new cQ({label:qX+this._keybindingLabelFor(QY),icon:HX,onTrigger:()=>{qr(this._codeEditor.getAction(QY)).run().then(void 0,r)}}));const i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const n=document.createElement("div");n.className="find-actions",i.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new mV({icon:OX,title:$X+this._keybindingLabelFor(lX),isChecked:!1,inputActiveOptionBackground:Cp(Fp),inputActiveOptionBorder:Cp(Pp),inputActiveOptionForeground:Cp(Bp)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const e=this._codeEditor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new cQ({label:GX+this._keybindingLabelFor(sX),icon:nR,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),this._replaceInput=this._register(new TX(null,void 0,{label:ZX,placeholder:YX,appendPreserveCaseLabel:this._keybindingLabelFor(hX),history:[],flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showHistoryHint:()=>RX(this._keybindingService),inputBoxStyles:qx,toggleStyles:jx},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())}))),this._replaceBtn=this._register(new cQ({label:XX+this._keybindingLabelFor(dX),icon:BX,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new cQ({label:QX+this._keybindingLabelFor(cX),icon:WX,onTrigger:()=>{this._controller.replaceAll()}}));const s=document.createElement("div");s.className="replace-part",s.appendChild(this._replaceInput.domNode);const o=document.createElement("div");o.className="replace-actions",s.appendChild(o),o.appendChild(this._replaceBtn.domNode),o.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new cQ({label:JX,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=zn(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=zX,this._domNode.role="dialog",this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(s),this._resizeSash=new CW(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=nQ;this._register(this._resizeSash.onDidStart((()=>{a=zn(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=a+e.startX-e.currentX;if(t(parseFloat(Pn(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=zn(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=zn(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{var t,i;if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();null===(i=(t=this._opts).onKeyDown)||void 0===i||i.call(t,e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...ea.asClassNameArray(PX)),this._domNode.classList.add(...ea.asClassNameArray(FX))):(this._domNode.classList.remove(...ea.asClassNameArray(FX)),this._domNode.classList.add(...ea.asClassNameArray(PX)))}}B_(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(Vm)),i(".currentFindMatch",e.getColor(Wm)),i(".findScope",e.getColor(Hm));i(".find-widget",e.getColor(ym));const n=e.getColor(Mp);n&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const s=e.getColor(Tp);s&&t.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${s}; border-right: 1px solid ${s}; border-bottom: 1px solid ${s}; }`);const o=e.getColor(Um);o&&t.addRule(`.monaco-editor .findMatch { border: 1px ${M_(e.type)?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const r=e.getColor(zm);r&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const a=e.getColor(Km);a&&t.addRule(`.monaco-editor .findScope { border: 1px ${M_(e.type)?"dashed":"solid"} ${a}; }`);const l=e.getColor(Np);l&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const h=e.getColor(Sm);h&&t.addRule(`.monaco-editor .find-widget { color: ${h}; }`);const d=e.getColor(kp);d&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${d}; }`);const c=e.getColor(km);if(c)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${c}; }`);else{const i=e.getColor(Lm);i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const u=e.getColor(Zf);u&&t.addRule(`\n\t\t.monaco-editor .find-widget .button:not(.disabled):hover,\n\t\t.monaco-editor .find-widget .codicon-find-selection:hover {\n\t\t\tbackground-color: ${u} !important;\n\t\t}\n\t`);const g=e.getColor(xp);g&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${g}; }`)}));var uQ,gQ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},pQ=function(e,t){return function(i,n){t(i,n,e)}},mQ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function fQ(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let _Q=uQ=class extends E{get editor(){return this._editor}static get(e){return e.getContribution(uQ.ID)}constructor(e,t,i,n,s){super(),this._editor=e,this._findWidgetVisible=HY.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._notificationService=s,this._updateHistoryDelayer=new Xh(500),this._state=this._register(new _X),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})})))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!zY.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const e=this._editor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Js(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return mQ(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;const i=Object.assign(Object.assign({},t),{isRevealed:!0});if("single"===e.seedSearchStringFromSelection){const t=fQ(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=Js(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=fQ(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new pX(this._editor,this._state))}))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){var e;return!!this._model&&((null===(e=this._editor.getModel())||void 0===e?void 0:e.isTooLargeForHeapOperation())?(this._notificationService.warn(ue(0,"The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0))}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return mQ(this,void 0,void 0,(function*(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};_Q.ID="editor.contrib.findController",_Q=uQ=gQ([pQ(1,Rl),pQ(2,qN),pQ(3,Xy),pQ(4,uL)],_Q);let vQ=class extends _Q{constructor(e,t,i,n,s,o,r,a){super(e,i,r,a,o),this._contextViewService=t,this._keybindingService=n,this._themeService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){const i=Object.create(null,{_start:{get:()=>super._start}});return mQ(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const n=this._editor.getSelection();let s=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":s=!0;break;case"never":s=!1;break;case"multiline":s=!!n&&n.startLineNumber!==n.endLineNumber;break}e.updateSearchScope=e.updateSearchScope||s,yield i._start.call(this,e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new dQ(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new mX(this._editor,this._state,this._keybindingService))}};vQ=gQ([pQ(1,Vx),pQ(2,Rl),pQ(3,PL),pQ(4,R_),pQ(5,uL),pQ(6,qN),pQ(7,Xy)],vQ);Sh(new vh({id:ZY,label:ue(0,"Find"),alias:"Find",precondition:ul.or(Rh.focus,ul.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Ql.MenubarEditMenu,group:"3_find",title:ue(0,"&&Find"),order:1}})).addImplementation(0,((e,t,i)=>{const n=_Q.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})}));const bQ={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:ue(0,'Overrides "Use Regular Expression" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:ue(0,'Overrides "Match Whole Word" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:ue(0,'Overrides "Math Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:ue(0,'Overrides "Preserve Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},findInSelection:{type:"boolean"}}}}]};class CQ extends _h{run(e,t){return mQ(this,void 0,void 0,(function*(){const e=_Q.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(e))}))}}class wQ extends _h{run(e,t){return mQ(this,void 0,void 0,(function*(){const e=_Q.get(t);if(!e)return;const i=fQ(t,"single",!1);i&&e.setSearchString(i),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(e))}))}}Sh(new vh({id:nX,label:ue(0,"Replace"),alias:"Replace",precondition:ul.or(Rh.focus,ul.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Ql.MenubarEditMenu,group:"3_find",title:ue(0,"&&Replace"),order:2}})).addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(90))return!1;const n=_Q.get(t);if(!n)return!1;const s=t.getSelection(),o=n.isFindInputFocused(),r=!s.isEmpty()&&s.startLineNumber===s.endLineNumber&&"never"!==t.getOption(41).seedSearchStringFromSelection&&!o,a=o||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(41).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})})),Lh(_Q.ID,vQ,0),yh(class extends _h{constructor(){super({id:XY,label:ue(0,"Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:bQ})}run(e,t,i){return mQ(this,void 0,void 0,(function*(){const e=_Q.get(t);if(e){const n=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(null==i?void 0:i.findInSelection)||!1,loop:t.getOption(41).loop},n),e.setGlobalBufferTerm(e.getState().searchString)}}))}}),yh(class extends _h{constructor(){super({id:YY,label:ue(0,"Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return mQ(this,void 0,void 0,(function*(){const e=_Q.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}),yh(class extends CQ{constructor(){super({id:QY,label:ue(0,"Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:Rh.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ul.and(Rh.focus,zY),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}),yh(class extends CQ{constructor(){super({id:JY,label:ue(0,"Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:Rh.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ul.and(Rh.focus,zY),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}),yh(class extends _h{constructor(){super({id:eX,label:ue(0,"Go to Match..."),alias:"Go to Match...",precondition:HY}),this._highlightDecorations=[]}run(e,t,i){const n=_Q.get(t);if(!n)return;const s=n.getState().matchesCount;if(s<1){return void e.get(uL).notify({severity:cL.Warning,message:ue(0,"No matches. Try searching for something else.")})}const o=e.get(lE).createInputBox();o.placeholder=ue(0,"Type a number to go to a specific match (between 1 and {0})",s);const r=e=>{const t=parseInt(e);if(isNaN(t))return;const i=n.getState().matchesCount;return t>0&&t<=i?t-1:t<0&&t>=-i?i+t:void 0},a=e=>{const i=r(e);if("number"==typeof i){o.validationMessage=void 0,n.goToMatch(i);const e=n.getState().currentMatch;e&&this.addDecorations(t,e)}else o.validationMessage=ue(0,"Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};o.onDidChangeValue((e=>{a(e)})),o.onDidAccept((()=>{const e=r(o.value);"number"==typeof e?(n.goToMatch(e),o.hide()):o.validationMessage=ue(0,"Please type a number between 1 and {0}",n.getState().matchesCount)})),o.onDidHide((()=>{this.clearDecorations(t),o.dispose()})),o.show()}clearDecorations(e){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[])}))}addDecorations(e,t){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:A_(uv),position:vd.Full}}}])}))}}),yh(class extends wQ{constructor(){super({id:tX,label:ue(0,"Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}),yh(class extends wQ{constructor(){super({id:iX,label:ue(0,"Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}});const yQ=fh.bindToContribution(_Q.get);wh(new yQ({id:sX,precondition:HY,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:ul.and(Rh.focus,ul.not("isComposing")),primary:9,secondary:[1033]}})),wh(new yQ({id:oX,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:KY.primary,mac:KY.mac,win:KY.win,linux:KY.linux}})),wh(new yQ({id:rX,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:jY.primary,mac:jY.mac,win:jY.win,linux:jY.linux}})),wh(new yQ({id:aX,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:qY.primary,mac:qY.mac,win:qY.win,linux:qY.linux}})),wh(new yQ({id:lX,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:$Y.primary,mac:$Y.mac,win:$Y.win,linux:$Y.linux}})),wh(new yQ({id:hX,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:GY.primary,mac:GY.mac,win:GY.win,linux:GY.linux}})),wh(new yQ({id:dX,precondition:HY,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:3094}})),wh(new yQ({id:dX,precondition:HY,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:ul.and(Rh.focus,UY),primary:3}})),wh(new yQ({id:cX,precondition:HY,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:2563}})),wh(new yQ({id:cX,precondition:HY,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:ul.and(Rh.focus,UY),primary:void 0,mac:{primary:2051}}})),wh(new yQ({id:uX,precondition:HY,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:Rh.focus,primary:515}}));const SQ={0:" ",1:"u",2:"r"},LQ=16777215,kQ=4278190080;class DQ{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return!!(this._states[t]&1<65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new DQ(e.length),this._userDefinedStates=new DQ(e.length),this._recoveredStates=new DQ(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;iLQ||s>LQ)throw new Error("startLineNumber or endLineNumber must not exceed "+LQ);for(;e.length>0&&!t(n,s);)e.pop();const o=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&o)<<24),this._endIndexes[i]=s+((65280&o)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&LQ}getEndLineNumber(e){return this._endIndexes[e]&LQ}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&kQ)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(e)?i=>ii=h.startLineNumber))l&&l.startLineNumber===h.startLineNumber?(1===h.source?e=h:(e=l,e.isCollapsed=h.isCollapsed&&l.endLineNumber===h.endLineNumber,e.source=0),l=s(++r)):(e=h,h.isCollapsed&&0===h.source&&(e.source=2)),h=o(++a);else{let t=a,i=h;for(;;){if(!i||i.startLineNumber>l.endLineNumber){e=l;break}if(1===i.source&&i.endLineNumber>l.endLineNumber)break;i=o(++t)}l=s(++r)}if(e){for(;c&&c.endLineNumbere.startLineNumber&&e.startLineNumber>u&&e.endLineNumber<=i&&(!c||c.endLineNumber>=e.endLineNumber)&&(g.push(e),u=e.startLineNumber,c&&d.push(c),c=e)}}return g}}class NQ{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class EQ{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new U,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new xQ(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,s=-1,o=-1;const r=e=>{for(;no&&(o=e),n++}};for(const a of e){const e=a.regionIndex,i=this._editorDecorationIds[e];if(i&&!t[i]){t[i]=!0,r(e);const n=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,n),s=Math.max(s,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let n=0;ni&&(i=o)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(t,i)=>{for(const n of e)if(t=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>i)continue;const o=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:o})}return t.length>0?t:void 0}applyMemento(e){var t,i;if(!Array.isArray(e))return;const n=[],s=this._textModel.getLineCount();for(const r of e){if(r.startLineNumber>=r.endLineNumber||r.startLineNumber<1||r.endLineNumber>s)continue;const e=this._getLinesChecksum(r.startLineNumber+1,r.endLineNumber);r.checksum&&e!==r.checksum||n.push({startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,type:void 0,isCollapsed:null===(t=r.isCollapsed)||void 0===t||t,source:null!==(i=r.source)&&void 0!==i?i:0})}const o=xQ.sanitizeAndMerge(this._regions,n,s);this.updatePost(xQ.fromFoldRanges(o))}_getLinesChecksum(e,t){return hE(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),s=1;for(;n>=0;){const e=this._regions.toRegion(n);t&&!t(e,s)||i.push(e),s++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let o=n,r=this._regions.length;o0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let o=n,r=this._regions.length;o1){const o=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==s&&i0)for(const o of n){const n=e.getRegionAtLine(o);if(n&&(n.isCollapsed!==t&&s.push(n),i>1)){const o=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));s.push(...n)}e.toggleCollapseState(s)}function RQ(e,t,i){const n=[];for(const o of i){const t=e.getAllRegionsAtLine(o,void 0);t.length>0&&n.push(t[0])}const s=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(s)}function AQ(e,t,i){const n=e.textModel,s=e.regions,o=[];for(let r=s.length-1;r>=0;r--)if(i!==s.isCollapsed(r)){const e=s.getStartLineNumber(r);t.test(n.getLineContent(e))&&o.push(s.toRegion(r))}e.toggleCollapseState(o)}function OQ(e,t,i){const n=e.regions,s=[];for(let o=n.length-1;o>=0;o--)i!==n.isCollapsed(o)&&t===n.getType(o)&&s.push(n.toRegion(o));e.toggleCollapseState(s)}class PQ{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new U,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==ac(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,s=Number.MAX_VALUE,o=-1;const r=this._foldingModel.regions;for(;i0}isHidden(e){return null!==FQ(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const s=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=FQ(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let o=0,r=e.length;o0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function FQ(e,t){const i=mc(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}class BQ{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id="indent"}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(function(e,t,i,n=VQ){const s=e.getOptions().tabSize,o=new WQ(n);let r;i&&(r=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const a=[],l=e.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let h=e.getLineCount();h>0;h--){const i=e.getLineContent(h),n=Gv(i,s);let l,d=a[a.length-1];if(-1!==n){if(r&&(l=i.match(r))){if(!l[1]){a.push({indent:-2,endAbove:h,line:h});continue}{let e=a.length-1;for(;e>0&&-2!==a[e].indent;)e--;if(e>0){a.length=e+1,d=a[e],o.insertFirst(h,d.line,n),d.line=h,d.indent=n,d.endAbove=h;continue}}}if(d.indent>n){do{a.pop(),d=a[a.length-1]}while(d.indent>n);const e=d.endAbove-1;e-h>=1&&o.insertFirst(h,e,n)}d.indent===n?d.endAbove=h:a.push({indent:n,endAbove:h,line:h})}else t&&(d.endAbove=h)}return o.toIndentRanges(e)}(this.editorModel,i,n,this.foldingRangesLimit))}}class WQ{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>LQ||t>LQ)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new xQ(e,t)}{this._foldingRangesLimit.update(this._length,t);let i=0,n=this._indentOccurrences.length;for(let e=0;et){n=e;break}i+=s}}const s=e.getOptions().tabSize,o=new Uint32Array(t),r=new Uint32Array(t);for(let a=this._length-1,l=0;a>=0;a--){const h=this._startIndexes[a],d=Gv(e.getLineContent(h),s);(d{}};const HQ=Sp("editor.foldBackground",{light:S_(Om,.3),dark:S_(Om,.3),hcDark:null,hcLight:null},ue(0,"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);Sp("editorGutter.foldingControlForeground",{dark:Dp,light:Dp,hcDark:Dp,hcLight:Dp},ue(0,"Color of the folding control in the editor gutter."));const zQ=QT("folding-expanded",Qr.chevronDown,ue(0,"Icon for expanded ranges in the editor glyph margin.")),UQ=QT("folding-collapsed",Qr.chevronRight,ue(0,"Icon for collapsed ranges in the editor glyph margin.")),KQ=QT("folding-manual-collapsed",UQ,ue(0,"Icon for manually collapsed ranges in the editor glyph margin.")),jQ=QT("folding-manual-expanded",zQ,ue(0,"Icon for manually expanded ranges in the editor glyph margin.")),qQ={color:A_(HQ),position:Cd.Inline};class $Q{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?$Q.HIDDEN_RANGE_DECORATION:"never"===this.showFoldingControls?e?this.showFoldingHighlights?$Q.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:$Q.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:$Q.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?$Q.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:$Q.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?$Q.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:$Q.COLLAPSED_VISUAL_DECORATION:"mouseover"===this.showFoldingControls?i?$Q.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:$Q.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?$Q.MANUALLY_EXPANDED_VISUAL_DECORATION:$Q.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}$Q.COLLAPSED_VISUAL_DECORATION=xw.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(UQ)}),$Q.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=xw.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:qQ,isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(UQ)}),$Q.MANUALLY_COLLAPSED_VISUAL_DECORATION=xw.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(KQ)}),$Q.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=xw.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:qQ,isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(KQ)}),$Q.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=xw.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),$Q.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=xw.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:qQ,isWholeLine:!0}),$Q.EXPANDED_VISUAL_DECORATION=xw.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ea.asClassName(zQ)}),$Q.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=xw.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(zQ)}),$Q.MANUALLY_EXPANDED_VISUAL_DECORATION=xw.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ea.asClassName(jQ)}),$Q.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=xw.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:ea.asClassName(jQ)}),$Q.NO_CONTROLS_EXPANDED_RANGE_DECORATION=xw.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),$Q.HIDDEN_RANGE_DECORATION=xw.register({description:"folding-hidden-range-decoration",stickiness:1});const GQ={};class ZQ{constructor(e,t,i,n,s){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=s,this.id="syntax",this.disposables=new N,s&&this.disposables.add(s);for(const o of t)"function"==typeof o.onDidChange&&this.disposables.add(o.onDidChange(i))}compute(e){return function(e,t,i){let n=null;const s=e.map(((e,s)=>Promise.resolve(e.provideFoldingRanges(t,GQ,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(n)||(n=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&n.push({start:t.start,end:t.end,rank:s,kind:t.kind})}}),a)));return Promise.all(s).then((e=>n))}(this.providers,this.editorModel,e).then((t=>{var i,n;if(t){return function(e,t){const i=e.sort(((e,t)=>{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new YQ(t);let s;const o=[];for(const r of i)if(s){if(r.start>s.start)if(r.end<=s.end)o.push(s),s=r,n.add(r.start,r.end,r.kind&&r.kind.value,o.length);else{if(r.start>s.end){do{s=o.pop()}while(s&&r.start>s.end);s&&o.push(s),s=r}n.add(r.start,r.end,r.kind&&r.kind.value,o.length)}}else s=r,n.add(r.start,r.end,r.kind&&r.kind.value,o.length);return n.toIndentRanges()}(t,this.foldingRangesLimit)}return null!==(n=null===(i=this.fallbackRangeProvider)||void 0===i?void 0:i.compute(e))&&void 0!==n?n:null}))}dispose(){this.disposables.dispose()}}class YQ{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>LQ||t>LQ)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._nestingLevels[s]=n,this._types[s]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ie){i=r;break}t+=n}}const n=new Uint32Array(e),s=new Uint32Array(e),o=[];for(let r=0,a=0;r=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},JQ=function(e,t){return function(i,n){t(i,n,e)}},eJ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const tJ=new Tl("foldingEnabled",!1);let iJ=XQ=class extends E{static get(e){return e.getContribution(XQ.ID)}static getFoldingRangeProviders(e,t){var i,n;const s=e.foldingRangeProvider.ordered(t);return null!==(n=null===(i=XQ._foldingRangeSelector)||void 0===i?void 0:i.call(XQ,s,t))&&void 0!==n?n:s}constructor(e,t,i,n,s,o){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=o,this.localToDispose=this._register(new N),this.editor=e,this._foldingLimitReporter=new nJ(e);const r=this.editor.getOptions();this._isEnabled=r.get(43),this._useFoldingProviders="indentation"!==r.get(44),this._unfoldOnClickAfterEndOfLine=r.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=r.get(46),this.updateDebounceInfo=s.for(o.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new $Q(e),this.foldingDecorationProvider.showFoldingControls=r.get(109),this.foldingDecorationProvider.showFoldingHighlights=r.get(45),this.foldingEnabled=tJ.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(47)&&this.onModelChanged(),e.hasChanged(109)||e.hasChanged(45)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(109),this.foldingDecorationProvider.showFoldingHighlights=e.get(45),this.triggerFoldingModelChanged()}e.hasChanged(44)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(44),this.onFoldingStrategyChanged()),e.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),e.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))}))),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new EQ(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new PQ(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new Xh(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new sd((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{var e,t;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),null===(e=this.updateScheduler)||void 0===e||e.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,null===(t=this.rangeProvider)||void 0===t||t.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;null===(e=this.rangeProvider)||void 0===e||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new BQ(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=XQ.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new ZQ(e,i,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;null===(t=this.hiddenRangeModel)||void 0===t||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new F,i=this.getRangeProvider(e.textModel),n=this.foldingRegionPromise=Gh((e=>i.compute(e)));return n.then((i=>{if(i&&n===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(LC.Imports.value,!0);e&&(n=PN.capture(this.editor),this._currentModelHasFoldedImports=e)}const s=this.editor.getSelections(),o=s?s.map((e=>e.startLineNumber)):[];e.update(i,o),null==n||n.restore(this.editor);const r=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=r)}return e}))})).then(void 0,(e=>(r(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,r)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft;if(t.offsetX-n<4)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()){if(!e.target.detail.isAfterLines)break}return;case 6:if(this.hiddenRangeModel.hasRanges()){const e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,s=e.target.range;if(!s||s.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||s.startColumn!==e.getLineMaxColumn(i))return}const o=t.getRegionAtLine(i);if(o&&o.startLineNumber===i){const s=o.isCollapsed;if(n||s){let n=[];if(e.event.altKey){const e=e=>!e.containedBy(o)&&!o.containedBy(e),i=t.getRegionsInside(null,e);for(const t of i)t.isCollapsed&&n.push(t);0===n.length&&(n=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(o))e.isCollapsed===s&&n.push(e);!s&&i&&0!==n.length||n.push(o)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};iJ.ID="editor.contrib.folding",iJ=XQ=QQ([JQ(1,Rl),JQ(2,Xu),JQ(3,uL),JQ(4,CE),JQ(5,iL)],iJ);class nJ{constructor(e){this.editor=e,this._onDidChange=new U,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}class sJ extends _h{runEditorCommand(e,t,i){const n=e.get(Xu),s=iJ.get(t);if(!s)return;const o=s.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((e=>{if(e){this.invoke(s,e,t,i,n);const o=t.getSelection();o&&s.reveal(o.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function oJ(e){if(!zr(e)){if(!Fr(e))return!1;const t=e;if(!zr(t.levels)&&!Wr(t.levels))return!1;if(!zr(t.direction)&&!Pr(t.direction))return!1;if(!(zr(t.selectionLines)||Array.isArray(t.selectionLines)&&t.selectionLines.every(Wr)))return!1}return!0}class rJ extends sJ{getFoldingLevel(){return parseInt(this.id.substr(rJ.ID_PREFIX.length))}invoke(e,t,i){!function(e,t,i,n){const s=e.getRegionsInside(null,((e,s)=>s===t&&e.isCollapsed!==i&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(s)}(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}rJ.ID_PREFIX="editor.foldLevel",rJ.ID=e=>rJ.ID_PREFIX+e;Lh(iJ.ID,iJ,0),yh(class extends sJ{constructor(){super({id:"editor.unfold",label:ue(0,"Unfold"),alias:"Unfold",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:oJ,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=n&&n.levels||1,o=this.getLineNumbers(n,i);n&&"up"===n.direction?TQ(t,!1,s,o):MQ(t,!1,s,o)}}),yh(class extends sJ{constructor(){super({id:"editor.unfoldRecursively",label:ue(0,"Unfold Recursively"),alias:"Unfold Recursively",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2142),weight:100}})}invoke(e,t,i,n){MQ(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),yh(class extends sJ{constructor(){super({id:"editor.fold",label:ue(0,"Fold"),alias:"Fold",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:oJ,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=this.getLineNumbers(n,i),o=n&&n.levels,r=n&&n.direction;"number"!=typeof o&&"string"!=typeof r?function(e,t,i){const n=[];for(const s of i){const i=e.getAllRegionsAtLine(s,(e=>e.isCollapsed!==t));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}(t,!0,s):"up"===r?TQ(t,!0,o||1,s):MQ(t,!0,o||1,s)}}),yh(class extends sJ{constructor(){super({id:"editor.foldRecursively",label:ue(0,"Fold Recursively"),alias:"Fold Recursively",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);MQ(t,!0,Number.MAX_VALUE,n)}}),yh(class extends sJ{constructor(){super({id:"editor.foldAll",label:ue(0,"Fold All"),alias:"Fold All",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2069),weight:100}})}invoke(e,t,i){MQ(t,!0)}}),yh(class extends sJ{constructor(){super({id:"editor.unfoldAll",label:ue(0,"Unfold All"),alias:"Unfold All",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2088),weight:100}})}invoke(e,t,i){MQ(t,!1)}}),yh(class extends sJ{constructor(){super({id:"editor.foldAllBlockComments",label:ue(0,"Fold All Block Comments"),alias:"Fold All Block Comments",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2138),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())OQ(t,LC.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).comments;if(n&&n.blockCommentStartToken){AQ(t,new RegExp("^\\s*"+Js(n.blockCommentStartToken)),!0)}}}}),yh(class extends sJ{constructor(){super({id:"editor.foldAllMarkerRegions",label:ue(0,"Fold All Regions"),alias:"Fold All Regions",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())OQ(t,LC.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){AQ(t,new RegExp(n.markers.start),!0)}}}}),yh(class extends sJ{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:ue(0,"Unfold All Regions"),alias:"Unfold All Regions",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())OQ(t,LC.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){AQ(t,new RegExp(n.markers.start),!1)}}}}),yh(class extends sJ{constructor(){super({id:"editor.foldAllExcept",label:ue(0,"Fold All Except Selected"),alias:"Fold All Except Selected",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2136),weight:100}})}invoke(e,t,i){RQ(t,!0,this.getSelectedLines(i))}}),yh(class extends sJ{constructor(){super({id:"editor.unfoldAllExcept",label:ue(0,"Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2134),weight:100}})}invoke(e,t,i){RQ(t,!1,this.getSelectedLines(i))}}),yh(class extends sJ{constructor(){super({id:"editor.toggleFold",label:ue(0,"Toggle Fold"),alias:"Toggle Fold",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2090),weight:100}})}invoke(e,t,i){IQ(t,1,this.getSelectedLines(i))}}),yh(class extends sJ{constructor(){super({id:"editor.gotoParentFold",label:ue(0,"Go to Parent Fold"),alias:"Go to Parent Fold",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),yh(class extends sJ{constructor(){super({id:"editor.gotoPreviousFold",label:ue(0,"Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber0?t.regions.toRegion(i.regionIndex-1):null}return null}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),yh(class extends sJ{constructor(){super({id:"editor.gotoNextFold",label:ue(0,"Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndexe.startLineNumber&&(s.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(s.length>0){s.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=xQ.sanitizeAndMerge(t.regions,s,null===(n=i.getModel())||void 0===n?void 0:n.getLineCount());t.updatePost(xQ.fromFoldRanges(e))}}}}),yh(class extends sJ{constructor(){super({id:"editor.removeManualFoldingRanges",label:ue(0,"Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}});for(let xre=1;xre<=7;xre++)aJ=new rJ({id:rJ.ID(xre),label:ue(0,"Fold Level {0}",xre),alias:`Fold Level ${xre}`,precondition:tJ,kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2048|21+xre),weight:100}}),Dh.INSTANCE.registerEditorAction(aJ);var aJ;Za.registerCommand("_executeFoldingRangeProvider",(function(e,...t){return eJ(this,void 0,void 0,(function*(){const[i]=t;if(!(i instanceof an))throw u();const n=e.get(iL),s=e.get(Wa).getModel(i);if(!s)throw u();const o=e.get(uu);if(!o.getValue("editor.folding",{resource:i}))return[];const r=e.get(Xu),a=o.getValue("editor.foldingStrategy",{resource:i}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:i})},update:(e,t)=>{}},h=new BQ(s,r,l);let d=h;if("indentation"!==a){const e=iJ.getFoldingRangeProviders(n,s);e.length&&(d=new ZQ(s,e,(()=>{}),l,h))}const c=yield d.compute(Hh.None),g=[];try{if(c)for(let e=0;eAq.replace(Mh.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",s.map((e=>Aq.replaceMove(Mh.lift(e.range),e.text)))),i&&e.pushUndoStop(),n.restoreRelativeVerticalPositionOfCursor(e)}}class hJ{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}class dJ{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(hJ.toKey(e))}has(e){return this._set.has(hJ.toKey(e))}}var cJ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function uJ(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let s=1;sa.provideDocumentRangeFormattingEdits(e,e.getFullModelRange(),t,i)})}return n}class pJ{static setFormatterSelector(e){return{dispose:pJ._selectors.unshift(e)}}static select(e,t,i){return cJ(this,void 0,void 0,(function*(){if(0===e.length)return;const n=v.first(pJ._selectors);return n?yield n(e,t,i):void 0}))}}function mJ(e,t,i,n,s,o){return cJ(this,void 0,void 0,(function*(){const r=e.get(Oa),{documentRangeFormattingEditProvider:a}=e.get(iL),l=JW(t)?t.getModel():t,h=a.ordered(l),d=yield pJ.select(h,l,n);d&&(s.report(d),yield r.invokeFunction(fJ,d,t,i,o))}))}function fJ(e,t,i,n,s){var o,r;return cJ(this,void 0,void 0,(function*(){const a=e.get(gG),l=e.get(ah);let h,d;JW(i)?(h=i.getModel(),d=new aL(i,5,void 0,s)):(h=i,d=new lL(i,s));const c=[];let u=0;for(const e of $d(n).sort(Mh.compareRangesUsingStarts))u>0&&Mh.areIntersectingOrTouching(c[u-1],e)?c[u-1]=Mh.fromPositions(c[u-1].getStartPosition(),e.getEndPosition()):u=c.push(e);const g=e=>cJ(this,void 0,void 0,(function*(){var i,n;l.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(i=t.extensionId)||void 0===i?void 0:i.value,e);const s=(yield t.provideDocumentRangeFormattingEdits(h,e,h.getFormattingOptions(),d.token))||[];return l.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(n=t.extensionId)||void 0===n?void 0:n.value,s),s})),p=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>Mh.plusRange(e,t.range)),e[0].range);if(!t.some((e=>Mh.intersectRanges(i,e.range))))return!1;for(const n of e)for(const e of t)if(Mh.intersectRanges(n.range,e.range))return!0;return!1},m=[],f=[];try{if("function"==typeof t.provideDocumentRangesFormattingEdits){l.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(o=t.extensionId)||void 0===o?void 0:o.value,c);const e=(yield t.provideDocumentRangesFormattingEdits(h,c,h.getFormattingOptions(),d.token))||[];l.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(r=t.extensionId)||void 0===r?void 0:r.value,e),f.push(e)}else{for(const e of c){if(d.token.isCancellationRequested)return!0;f.push(yield g(e))}for(let e=0;e({text:e.text,range:Mh.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(Mh.areIntersectingOrTouching(i,t))return[new Th(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function _J(e,t,i,n,s){return cJ(this,void 0,void 0,(function*(){const o=e.get(Oa),r=e.get(iL),a=JW(t)?t.getModel():t,l=gJ(r.documentFormattingEditProvider,r.documentRangeFormattingEditProvider,a),h=yield pJ.select(l,a,i);h&&(n.report(h),yield o.invokeFunction(vJ,h,t,i,s))}))}function vJ(e,t,i,n,s){return cJ(this,void 0,void 0,(function*(){const o=e.get(gG);let r,a,l;JW(i)?(r=i.getModel(),a=new aL(i,5,void 0,s)):(r=i,a=new lL(i,s));try{const e=yield t.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield o.computeMoreMinimalEdits(r.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||0===l.length)return!1;if(JW(i))lJ.execute(i,l,2!==n),2!==n&&(uJ(l),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=l,t=new Th(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);r.pushEditOperations([t],l.map((e=>({text:e.text,range:Mh.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(Mh.areIntersectingOrTouching(i,t))return[new Th(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function bJ(e,t,i,n,s,o,r){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(s)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,s,o,r)).catch(a).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}pJ._selectors=new O,Za.registerCommand("_executeFormatRangeProvider",(function(e,...t){return cJ(this,void 0,void 0,(function*(){const[i,n,s]=t;jr(an.isUri(i)),jr(Mh.isIRange(n));const o=e.get(Va),r=e.get(gG),l=e.get(iL),h=yield o.createModelReference(i);try{return function(e,t,i,n,s,o){return cJ(this,void 0,void 0,(function*(){const r=t.documentRangeFormattingEditProvider.ordered(i);for(const t of r){const r=yield Promise.resolve(t.provideDocumentRangeFormattingEdits(i,n,s,o)).catch(a);if(Wd(r))return yield e.computeMoreMinimalEdits(i.uri,r)}}))}(r,l,h.object.textEditorModel,Mh.lift(n),s,Hh.None)}finally{h.dispose()}}))})),Za.registerCommand("_executeFormatDocumentProvider",(function(e,...t){return cJ(this,void 0,void 0,(function*(){const[i,n]=t;jr(an.isUri(i));const s=e.get(Va),o=e.get(gG),r=e.get(iL),l=yield s.createModelReference(i);try{return function(e,t,i,n,s){return cJ(this,void 0,void 0,(function*(){const o=gJ(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of o){const o=yield Promise.resolve(t.provideDocumentFormattingEdits(i,n,s)).catch(a);if(Wd(o))return yield e.computeMoreMinimalEdits(i.uri,o)}}))}(o,r,l.object.textEditorModel,n,Hh.None)}finally{l.dispose()}}))})),Za.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){return cJ(this,void 0,void 0,(function*(){const[i,n,s,o]=t;jr(an.isUri(i)),jr(Ba.isIPosition(n)),jr("string"==typeof s);const r=e.get(Va),a=e.get(gG),l=e.get(iL),h=yield r.createModelReference(i);try{return bJ(a,l,h.object.textEditorModel,Ba.lift(n),s,o,Hh.None)}finally{h.dispose()}}))}));var CJ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},wJ=function(e,t){return function(i,n){t(i,n,e)}},yJ=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let SJ=class{constructor(e,t,i){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._disposables=new N,this._sessionDisposables=new N,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(56)&&this._update()}))),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new Ub;for(const n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=new Uh,s=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return n.cancel(),void s.dispose();for(let t=0,o=e.changes.length;t{n.token.isCancellationRequested||Wd(e)&&(lJ.execute(this._editor,e,!0),uJ(e))})).finally((()=>{s.dispose()}))}};SJ.ID="editor.contrib.autoFormat",SJ=CJ([wJ(1,iL),wJ(2,gG)],SJ);let LJ=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new N,this._callOnModel=new N,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(mJ,this.editor,e,2,pL.None,Hh.None).catch(r))}};LJ.ID="editor.contrib.formatOnPaste",LJ=CJ([wJ(1,iL),wJ(2,Oa)],LJ);Lh(SJ.ID,SJ,2),Lh(LJ.ID,LJ,2),yh(class extends _h{constructor(){super({id:"editor.action.formatDocument",label:ue(0,"Format Document"),alias:"Format Document",precondition:ul.and(Rh.notInCompositeEditor,Rh.writable,Rh.hasDocumentFormattingProvider),kbOpts:{kbExpr:Rh.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return yJ(this,void 0,void 0,(function*(){if(t.hasModel()){const i=e.get(Oa),n=e.get(mL);yield n.showWhile(i.invokeFunction(_J,t,1,pL.None,Hh.None),250)}}))}}),yh(class extends _h{constructor(){super({id:"editor.action.formatSelection",label:ue(0,"Format Selection"),alias:"Format Selection",precondition:ul.and(Rh.writable,Rh.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:Rh.editorTextFocus,primary:pt(2089,2084),weight:100},contextMenuOpts:{when:Rh.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return yJ(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(Oa),n=t.getModel(),s=t.getSelections().map((e=>e.isEmpty()?new Mh(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),o=e.get(mL);yield o.showWhile(i.invokeFunction(mJ,t,s,1,pL.None,Hh.None),250)}))}}),Za.registerCommand("editor.action.format",(e=>yJ(void 0,void 0,void 0,(function*(){const t=e.get(Fa).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(Ga);t.getSelection().isEmpty()?yield i.executeCommand("editor.action.formatDocument"):yield i.executeCommand("editor.action.formatSelection")}))));class kJ{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new N;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new I);return s.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange((()=>{s.value=void 0,s.value=this.doProvide(e,t)}))),n}doProvide(e,t){var i;const n=new N,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const o={editor:s},r=tV(s);if(r){let e=null!==(i=s.saveViewState())&&void 0!==i?i:void 0;n.add(r.onDidChangeCursorPosition((()=>{var t;e=null!==(t=s.saveViewState())&&void 0!==t?t:void 0}))),o.restoreViewState=()=>{e&&s===this.activeTextEditorControl&&s.restoreViewState(e)},n.add(_(t.onCancellationRequested)((()=>{var e;return null===(e=o.restoreViewState)||void 0===e?void 0:e.call(o)})))}n.add(x((()=>this.clearDecorations(s)))),n.add(this.provideWithTextEditor(o,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&Ps(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return eV(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:A_(uv),position:vd.Full}}}],[s,o]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:o}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}class DJ extends kJ{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=ue(0,"Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,E.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new N;s.add(t.onDidAccept((i=>{const[s]=t.selectedItems;if(s){if(!this.isValidLineNumber(n,s.lineNumber))return;this.gotoLocation(e,{range:this.toRange(s.lineNumber,s.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const o=()=>{const e=this.parsePosition(n,t.value.trim().substr(DJ.PREFIX.length)),i=this.getPickLabel(n,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(n,e.lineNumber))return void this.clearDecorations(n);const s=this.toRange(e.lineNumber,e.column);n.revealRangeInCenter(s,0),this.addDecorations(n,s)};o(),s.add(t.onDidChangeValue((()=>o())));const r=tV(n);if(r){2===r.getOptions().get(67).renderType&&(r.updateOptions({lineNumbers:"on"}),s.add(x((()=>r.updateOptions({lineNumbers:"relative"})))))}return s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?ue(0,"Go to line {0} and character {1}.",t,i):ue(0,"Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?ue(0,"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):ue(0,"Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&(t>0&&t<=this.lineCount(e))}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){var t,i;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}var xJ;DJ.PREFIX=":",function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(xJ||(xJ={}));const NJ="workbench.contributions.quickaccess";var EJ,IJ,MJ,TJ,RJ,AJ,OJ,PJ;Ul.add(NJ,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),x((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return Pd([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||void 0||this.defaultProvider}}),function(e){e.inspectTokensAction=ue(0,"Developer: Inspect Tokens")}(EJ||(EJ={})),function(e){e.gotoLineActionLabel=ue(0,"Go to Line/Column...")}(IJ||(IJ={})),function(e){e.helpQuickAccessActionLabel=ue(0,"Show all Quick Access Providers")}(MJ||(MJ={})),function(e){e.quickCommandActionLabel=ue(0,"Command Palette"),e.quickCommandHelp=ue(0,"Show And Run Commands")}(TJ||(TJ={})),function(e){e.quickOutlineActionLabel=ue(0,"Go to Symbol..."),e.quickOutlineByCategoryActionLabel=ue(0,"Go to Symbol by Category...")}(RJ||(RJ={})),function(e){e.editorViewAccessibleLabel=ue(0,"Editor content"),e.accessibilityHelpMessage=ue(0,"Press Alt+F1 for Accessibility Options.")}(AJ||(AJ={})),function(e){e.toggleHighContrast=ue(0,"Toggle High Contrast Theme")}(OJ||(OJ={})),function(e){e.bulkEditServiceSummary=ue(0,"Made {0} edits in {1} files")}(PJ||(PJ={}));var FJ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},BJ=function(e,t){return function(i,n){t(i,n,e)}};let WJ=class extends DJ{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=B.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};WJ=FJ([BJ(0,Fa)],WJ);class VJ extends _h{constructor(){super({id:VJ.ID,label:IJ.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(lE).quickAccess.show(WJ.PREFIX)}}VJ.ID="editor.action.gotoLine",yh(VJ),Ul.as(NJ).registerQuickAccessProvider({ctor:WJ,prefix:WJ.PREFIX,helpEntries:[{description:IJ.gotoLineActionLabel,commandId:VJ.ID}]});class HJ extends E{constructor(e){super(),this.editor=e,this.widget=null,He&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(90);!this.widget&&e?this.widget=new zJ(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}HJ.ID="editor.contrib.iPadShowKeyboard";class zJ extends E{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(En(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(En(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return zJ.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}zJ.ID="editor.contrib.ShowKeyboardWidget",Lh(HJ.ID,HJ,3);class UJ{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Th(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new Th(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var KJ,jJ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},qJ=function(e,t){return function(i,n){t(i,n,e)}};let $J=KJ=class{static get(e){return e.getContribution(KJ.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var i;null===(i=this.currentRequest)||void 0===i||i.cancel();const n=this.editor.getSelection(),s=this.editor.getModel();if(!s||!n)return;let o=n;if(o.startLineNumber!==o.endLineNumber)return;const a=new rL(this.editor,5),l=s.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Gh((e=>this.editorWorkerService.navigateValueSet(l,o,t))),this.currentRequest.then((t=>{var i;if(!t||!t.range||!t.value)return;if(!a.validate(this.editor))return;const n=Mh.lift(t.range);let s=t.range;const l=t.value.length-(o.endColumn-o.startColumn);s={startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.startColumn+t.value.length},l>1&&(o=new Th(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+l-1));const h=new UJ(n,o,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,h),this.editor.pushUndoStop(),this.decorations.set([{range:s,options:KJ.DECORATION}]),null===(i=this.decorationRemover)||void 0===i||i.cancel(),this.decorationRemover=Jh(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(r)})).catch(r)):Promise.resolve(void 0)}};$J.ID="editor.contrib.inPlaceReplaceController",$J.DECORATION=xw.register({description:"in-place-replace",className:"valueSetReplacement"}),$J=KJ=jJ([qJ(1,gG)],$J);function GJ(e,t){let i=0;for(let n=0;n=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},XJ=function(e,t){return function(i,n){t(i,n,e)}};function QJ(e,t,i,n,s){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const o=t.getLanguageConfiguration(e.getLanguageId()).indentationRules;if(!o)return[];for(n=Math.min(n,e.getLineCount());i<=n&&o.unIndentedLinePattern;){const t=e.getLineContent(i);if(!o.unIndentedLinePattern.test(t))break;i++}if(i>n-1)return[];const{tabSize:r,indentSize:a,insertSpaces:l}=e.getOptions(),h=(e,t)=>(t=t||1,py.shiftIndent(e,e.length+t,r,a,l)),d=(e,t)=>(t=t||1,py.unshiftIndent(e,e.length+t,r,a,l)),c=[];let u;const g=e.getLineContent(i);let p=g;if(null!=s){u=s;const e=ro(g);p=u+g.substring(e.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(p)&&(u=d(u),p=u+g.substring(e.length)),g!==p&&c.push(Aq.replaceMove(new Th(i,1,i,e.length+1),hc(u,a,l)))}else u=ro(g);let m=u;o.increaseIndentPattern&&o.increaseIndentPattern.test(p)?(m=h(m),u=h(u)):o.indentNextLinePattern&&o.indentNextLinePattern.test(p)&&(m=h(m));for(let f=++i;f<=n;f++){const t=e.getLineContent(f),i=ro(t),n=m+t.substring(i.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(n)&&(m=d(m),u=d(u)),i!==m&&c.push(Aq.replaceMove(new Th(f,1,f,i.length+1),hc(m,a,l))),o.unIndentedLinePattern&&o.unIndentedLinePattern.test(t)||(o.increaseIndentPattern&&o.increaseIndentPattern.test(n)?(u=h(u),m=u):m=o.indentNextLinePattern&&o.indentNextLinePattern.test(n)?h(m):u)}return c}class JJ extends _h{constructor(){super({id:JJ.ID,label:ue(0,"Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:Rh.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new h0(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}JJ.ID="editor.action.indentationToSpaces";class e0 extends _h{constructor(){super({id:e0.ID,label:ue(0,"Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:Rh.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new d0(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}e0.ID="editor.action.indentationToTabs";class t0 extends _h{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(lE),n=e.get(Wa),s=t.getModel();if(!s)return;const o=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),r=s.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===o.tabSize&&e===r.tabSize?ue(0,"Configured Tab Size"):e===o.tabSize?ue(0,"Default Tab Size"):e===r.tabSize?ue(0,"Current Tab Size"):void 0}))),l=Math.min(s.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:ue(0,"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&s&&!s.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?s.updateOptions({tabSize:t}):s.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class i0 extends t0{constructor(){super(!1,!1,{id:i0.ID,label:ue(0,"Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}i0.ID="editor.action.indentUsingTabs";class n0 extends t0{constructor(){super(!0,!1,{id:n0.ID,label:ue(0,"Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}n0.ID="editor.action.indentUsingSpaces";class s0 extends t0{constructor(){super(!0,!0,{id:s0.ID,label:ue(0,"Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}}s0.ID="editor.action.changeTabDisplaySize";class o0 extends _h{constructor(){super({id:o0.ID,label:ue(0,"Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(Wa),n=t.getModel();if(!n)return;const s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}o0.ID="editor.action.detectIndentation";class r0{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&"string"==typeof i.text&&this._edits.push(i)}getEditOperations(e,t){for(const n of this._edits)t.addEditOperation(Mh.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let a0=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new N,this.callOnModel=new N,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(12)<4||this.editor.getOption(55)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(12),{tabSize:s,indentSize:o,insertSpaces:r}=i.getOptions(),a=[],l={shiftIndent:e=>py.shiftIndent(e,e.length+1,s,o,r),unshiftIndent:e=>py.unshiftIndent(e,e.length+1,s,o,r)};let h=e.startLineNumber;for(;h<=e.endLineNumber&&this.shouldIgnoreLine(i,h);)h++;if(h>e.endLineNumber)return;let d=i.getLineContent(h);if(!/\S/.test(d.substring(0,e.startColumn-1))){const e=vy(n,i,i.getLanguageId(),h,l,this._languageConfigurationService);if(null!==e){const t=ro(d),n=GJ(e,s);if(n!==GJ(t,s)){const e=ZJ(n,s,r);a.push({range:new Mh(h,1,h,t.length+1),text:e}),d=e+d.substr(t.length)}else{const e=by(i,h,this._languageConfigurationService);if(0===e||8===e)return}}}const c=h;for(;hi.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===c?d:i.getLineContent(e)},i.getLanguageId(),h+1,l,this._languageConfigurationService);if(null!==t){const n=GJ(t,s),o=GJ(ro(i.getLineContent(h+1)),s);if(n!==o){const t=n-o;for(let n=h+1;n<=e.endLineNumber;n++){const e=ro(i.getLineContent(n)),o=ZJ(GJ(e,s)+t,s,r);o!==e&&a.push({range:new Mh(n,1,n,e.length+1),text:o})}}}}if(a.length>0){this.editor.pushUndoStop();const e=new r0(a,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function l0(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let s="";for(let r=0;r0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}),yh(class extends _h{constructor(){super({id:"editor.action.reindentselectedlines",label:ue(0,"Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:Rh.writable})}run(e,t){const i=e.get(Xu),n=t.getModel();if(!n)return;const s=t.getSelections();if(null===s)return;const o=[];for(const r of s){let e=r.startLineNumber,t=r.endLineNumber;if(e!==t&&1===r.endColumn&&t--,1===e){if(e===t)continue}else e--;const s=QJ(n,i,e,t);o.push(...s)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}});var c0=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class u0{constructor(e,t){this.range=e,this.direction=t}}class g0{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new g0(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return c0(this,void 0,void 0,(function*(){if("function"==typeof this.provider.resolveInlayHint){if(this._currentResolve){if(yield this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),yield this._currentResolve}}))}_doResolve(e){var t,i;return c0(this,void 0,void 0,(function*(){try{const n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=null!==(t=null==n?void 0:n.tooltip)&&void 0!==t?t:this.hint.tooltip,this.hint.label=null!==(i=null==n?void 0:n.label)&&void 0!==i?i:this.hint.label,this._isResolved=!0}catch(n){a(n),this._isResolved=!1}}))}}class p0{static create(e,t,i,n){return c0(this,void 0,void 0,(function*(){const s=[],o=e.ordered(t).reverse().map((e=>i.map((i=>c0(this,void 0,void 0,(function*(){try{const o=yield e.provideInlayHints(t,i,n);(null==o?void 0:o.hints.length)&&s.push([o,e])}catch(o){a(o)}}))))));if(yield Promise.all(o.flat()),n.isCancellationRequested||t.isDisposed())throw new c;return new p0(i,s,t)}))}constructor(e,t,i){this._disposables=new N,this.ranges=e,this.provider=new Set;const n=[];for(const[s,o]of t){this._disposables.add(s),this.provider.add(o);for(const e of s.hints){const t=i.validatePosition(e.position);let s="before";const r=p0._getRangeAtPosition(i,t);let a;r.getStartPosition().isBefore(t)?(a=Mh.fromPositions(r.getStartPosition(),t),s="after"):(a=Mh.fromPositions(t,r.getEndPosition()),s="before"),n.push(new g0(e,new u0(a,s),o))}}this.items=n.sort(((e,t)=>Ba.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new Mh(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const s=e.tokenization.getLineTokens(i),o=t.column-1,r=s.findTokenIndexAtOffset(o);let a=s.getStartOffset(r),l=s.getEndOffset(r);return l-a==1&&(a===o&&r>1?(a=s.getStartOffset(r-1),l=s.getEndOffset(r-1)):l===o&&rXl(e)?e.command.id:kZ())));for(const e of UU.all())u.has(e.desc.id)&&c.push(new za(e.desc.id,nh.label(e.desc,{renderShortTitle:!0}),void 0,!0,(()=>m0(this,void 0,void 0,(function*(){const i=yield o.createModelReference(d.uri);try{const s=new zU(i.object.textEditorModel,Mh.getStartPosition(d.range)),o=n.item.anchor.range;yield l.invokeFunction(e.runEditorCommand.bind(e),t,s,o)}finally{i.dispose()}})))));if(n.part.command){const{command:e}=n.part;c.push(new Ka),c.push(new za(e.id,e.title,void 0,!0,(()=>m0(this,void 0,void 0,(function*(){var t;try{yield a.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}catch(i){h.notify({severity:cL.Error,source:n.item.provider.displayName,message:i})}})))))}const g=t.getOption(126);r.showContextMenu({domForShadowRoot:g&&null!==(s=t.getDomNode())&&void 0!==s?s:void 0,getAnchor:()=>{const e=Hn(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>c,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}))}function _0(e,t,i,n){return m0(this,void 0,void 0,(function*(){const s=e.get(Va),o=yield s.createModelReference(n.uri);yield i.invokeWithinContext((e=>m0(this,void 0,void 0,(function*(){const s=t.hasSideBySideModifier,r=e.get(Rl),a=UW.inPeekEditor.getValue(r),l=!s&&i.getOption(87)&&!a;return new KU({openToSide:s,openInPeek:l,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e,new zU(o.object.textEditorModel,Mh.getStartPosition(n.range)),Mh.lift(n.range))})))),o.dispose()}))}var v0,b0=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},C0=function(e,t){return function(i,n){t(i,n,e)}},w0=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class y0{constructor(){this._entries=new Ks(50)}get(e){const t=y0._key(e);return this._entries.get(t)}set(e,t){const i=y0._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const S0=Pa("IInlayHintsCache");Cu(S0,y0,1);class L0{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return"string"==typeof e?{label:e}:e[this.index]}}class k0{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let D0=v0=class{static get(e){var t;return null!==(t=e.getContribution(v0.ID))&&void 0!==t?t:void 0}constructor(e,t,i,n,s,o,r){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=s,this._notificationService=o,this._instaService=r,this._disposables=new N,this._sessionDisposables=new N,this._decorationsMetadata=new Map,this._ruleFactory=new WE(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(139)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(139);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add(x((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const s=new Set,o=new sd((()=>w0(this,void 0,void 0,(function*(){const e=Date.now();null==n||n.dispose(!0),n=new Uh;const i=t.onWillDispose((()=>null==n?void 0:n.cancel()));try{const i=n.token,r=yield p0.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(o.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void r.dispose();for(const e of r.provider)"function"!=typeof e.onDidChangeInlayHints||s.has(e)||(s.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{o.isScheduled()||o.schedule()}))));this._sessionDisposables.add(r),this._updateHintsDecorators(r.ranges,r.items),this._cacheHintsForFastRestore(t)}catch(a){r(a)}finally{n.dispose(),i.dispose()}}))),this._debounceInfo.get(t));if(this._sessionDisposables.add(o),this._sessionDisposables.add(x((()=>null==n?void 0:n.dispose(!0)))),o.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&o.isScheduled()||o.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{const t=Math.max(o.delay,1250);o.schedule(t)}))),"on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(ks.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),o.schedule(0)}})))}this._sessionDisposables.add(this._installDblClickGesture((()=>o.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new N,t=e.add(new IR(this._editor)),i=new N;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),s=this._editor.getModel();if(!n||!s)return void i.clear();const o=new Uh;i.add(x((()=>o.dispose(!0)))),n.item.resolve(o.token),this._activeInlayHintPart=n.part.command||n.part.location?new k0(n,t.hasTriggerModifier):void 0;const r=s.validatePosition(n.item.hint.position).lineNumber,a=new Mh(r,1,r,s.getLineMaxColumn(r)),l=this._getInlineHintsForRange(a);this._updateHintsDecorators([a],l),i.add(x((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([a],l)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((e=>w0(this,void 0,void 0,(function*(){const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(_0,e,this._editor,i.location):yC.is(i.command)&&(yield this._invokeCommand(i.command,t.item))}}))))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((t=>w0(this,void 0,void 0,(function*(){if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),yield i.item.resolve(Hh.None),Wd(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>Aq.replace(Mh.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))))}_installContextMenu(){return this._editor.onContextMenu((e=>w0(this,void 0,void 0,(function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(f0,this._editor,e.event.target,t))}))))}_getInlayHintLabelPart(e){var t;if(6!==e.target.type)return;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof Dw&&(null==i?void 0:i.attachedData)instanceof L0?i.attachedData:void 0}_invokeCommand(e,t){var i;return w0(this,void 0,void 0,(function*(){try{yield this._commandService.executeCommand(e.id,...null!==(i=e.arguments)&&void 0!==i?i:[])}catch(n){this._notificationService.notify({severity:cL.Error,source:t.provider.displayName,message:n})}}))}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const s=e.getDecorationRange(i);if(s){const e=new u0(s,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(Mh.compareRangesUsingStarts)){const t=e.validateRange(new Mh(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&Mh.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=Mh.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(e,t){var i,n;const s=[],o=(e,t,i,n,o)=>{const r={content:i,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:n,attachedData:o};s.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},r=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(a/3|0)+"px",display:"inline-block"});o(e,i,"\u200a",t?wd.Right:wd.None)},{fontSize:a,fontFamily:l,padding:h,isUniform:d}=this._getLayoutInfo(),c="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(c,l);for(const p of t){p.hint.paddingLeft&&r(p,!1);const e="string"==typeof p.hint.label?[{label:p.hint.label}]:p.hint.label;for(let t=0;tv0._MAX_DECORATORS)break}const u=[];for(const p of e)for(const{id:e}of null!==(n=this._editor.getDecorationsInRange(p))&&void 0!==n?n:[]){const t=this._decorationsMetadata.get(e);t&&(u.push(e),t.classNameRef.dispose(),this._decorationsMetadata.delete(e))}const g=PN.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(u,s.map((e=>e.decoration)));for(let i=0;ii)&&(s=i);const o=e.fontFamily||n;return{fontSize:s,fontFamily:o,padding:t,isUniform:!t&&o===n&&s===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};function x0(e){return e.replace(/[ \t]/g,"\xa0")}D0.ID="editor.contrib.InlayHints",D0._MAX_DECORATORS=1500,D0=v0=b0([C0(1,iL),C0(2,CE),C0(3,S0),C0(4,Ga),C0(5,uL),C0(6,Oa)],D0),Za.registerCommand("_executeInlayHintProvider",((e,...t)=>w0(void 0,void 0,void 0,(function*(){const[i,n]=t;jr(an.isUri(i)),jr(Mh.isIRange(n));const{inlayHintsProvider:s}=e.get(iL),o=yield e.get(Va).createModelReference(i);try{const e=yield p0.create(s,o.object.textEditorModel,[Mh.lift(n)],Hh.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{o.dispose()}}))));var N0=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},E0=function(e,t){return function(i,n){t(i,n,e)}},I0=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},M0=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,s){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,s,(t=e[i](t)).done,t.value)}))}}};class T0 extends hK{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let R0=class extends PK{constructor(e,t,i,n,s,o){super(e,t,i,n,o),this._resolverService=s,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!D0.get(this._editor))return null;if(6!==e.target.type)return null;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof Dw&&i.attachedData instanceof L0?new T0(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof T0?new hd((t=>I0(this,void 0,void 0,(function*(){var n,s,o,r;const{part:a}=e;if(yield a.item.resolve(i),i.isCancellationRequested)return;let l,h;if("string"==typeof a.item.hint.tooltip?l=(new Ia).appendText(a.item.hint.tooltip):a.item.hint.tooltip&&(l=a.item.hint.tooltip),l&&t.emitOne(new OK(this,e.range,[l],!1,0)),Wd(a.item.hint.textEdits)&&t.emitOne(new OK(this,e.range,[(new Ia).appendText(ue(0,"Double-click to insert"))],!1,10001)),"string"==typeof a.part.tooltip?h=(new Ia).appendText(a.part.tooltip):a.part.tooltip&&(h=a.part.tooltip),h&&t.emitOne(new OK(this,e.range,[h],!1,1)),a.part.location||a.part.command){let i;const n=ue(0,"altKey"===this._editor.getOption(77)?Pe?"cmd + click":"ctrl + click":Pe?"option + click":"alt + click");a.part.location&&a.part.command?i=(new Ia).appendText(ue(0,"Go to Definition ({0}), right click for more",n)):a.part.location?i=(new Ia).appendText(ue(0,"Go to Definition ({0})",n)):a.part.command&&(i=new Ia(`[${ue(0,"Execute Command")}](${d=a.part.command,an.from({scheme:vn.command,path:d.id,query:d.arguments&&encodeURIComponent(JSON.stringify(d.arguments))}).toString()} "${a.part.command.title}") (${n})`,{isTrusted:!0})),i&&t.emitOne(new OK(this,e.range,[i],!1,1e4))}var d;const c=yield this._resolveInlayHintLabelPartHover(a,i);try{for(var u,g=!0,p=M0(c);!(n=(u=yield p.next()).done);g=!0){r=u.value,g=!1;const e=r;t.emitOne(e)}}catch(m){s={error:m}}finally{try{g||n||!(o=p.return)||(yield o.call(p))}finally{if(s)throw s.error}}})))):hd.EMPTY}_resolveInlayHintLabelPartHover(e,t){return I0(this,void 0,void 0,(function*(){if(!e.part.location)return hd.EMPTY;const{uri:i,range:n}=e.part.location,s=yield this._resolverService.createModelReference(i);try{const i=s.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?MK(this._languageFeaturesService.hoverProvider,i,new Ba(n.startLineNumber,n.startColumn),t).filter((e=>!Ma(e.hover.contents))).map((t=>new OK(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):hd.EMPTY}finally{s.dispose()}}))}};R0=N0([E0(1,yc),E0(2,Uk),E0(3,uu),E0(4,Va),E0(5,iL)],R0),Lh(D0.ID,D0,1),dK.register(R0);class A0 extends E{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=A0.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=A0.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=A0.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=A0.suppressSuggestions.bindTo(this.contextKeyService),this._register(Hj((e=>{const t=this.model.read(e),i=null==t?void 0:t.state.read(e),n=!!(null==i?void 0:i.inlineCompletion)&&void 0!==(null==i?void 0:i.ghostText)&&!(null==i?void 0:i.ghostText.isEmpty());this.inlineCompletionVisible.set(n),(null==i?void 0:i.ghostText)&&(null==i?void 0:i.inlineCompletion)&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)}))),this._register(Hj((e=>{const t=this.model.read(e);let i=!1,n=!0;const s=null==t?void 0:t.ghostText.read(e);if((null==t?void 0:t.selectedSuggestItem)&&s&&s.parts.length>0){const{column:e,lines:o}=s.parts[0],r=o[0];if(e<=t.textModel.getLineIndentColumn(s.lineNumber)){let e=oo(r);-1===e&&(e=r.length-1),i=e>0;const s=t.textModel.getOptions().tabSize;n=lc.visibleColumnFromColumn(r,e+1,s)t)throw new f(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new Mh(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function B0(e,t){return new Ba(e.lineNumber+t.lineNumber-1,1===t.lineNumber?e.column+t.column-1:t.column)}function W0(e){let t=1,i=1;for(const n of e)"\n"===n?(t++,i=1):i++;return new Ba(t,i)}class V0{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every(((t,i)=>t.equals(e.parts[i])))}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1],i=function(e,t){const i=new O0(e),n=t.map((e=>{const t=Mh.lift(e.range);return{startOffset:i.getOffset(t.getStartPosition()),endOffset:i.getOffset(t.getEndPosition()),text:e.text}}));n.sort(((e,t)=>t.startOffset-e.startOffset));for(const s of n)e=e.substring(0,s.startOffset)+s.text+e.substring(s.endOffset);return e}(e.substr(0,t.column-1),this.parts.map((e=>({range:{startLineNumber:1,endLineNumber:1,startColumn:e.column,endColumn:e.column},text:e.lines.join("\n")}))));return i.substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}get lineCount(){return 1+this.parts.reduce(((e,t)=>e+t.lines.length-1),0)}}class H0{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,i)=>t===e.lines[i]))}}class z0{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.newLines=i,this.additionalReservedLineCount=n,this.parts=[new H0(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join("\n")}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every((e=>0===e.lines.length))}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every(((t,i)=>t===e.newLines[i]))&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function U0(e,t){return e===t||!(!e||!t)&&((e instanceof V0&&t instanceof V0||e instanceof z0&&t instanceof z0)&&e.equals(t))}var K0=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},j0=function(e,t){return function(i,n){t(i,n,e)}};const q0="ghost-text";let $0=class extends E{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=Mj(this,!1),this.currentTextModel=$j(this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=Pj(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;const n=i instanceof z0?i.columnRange:void 0,s=[],o=[];function r(e,t){if(o.length>0){const i=o[o.length-1];t&&i.decorations.push(new fA(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)o.push({content:i,decorations:t?[new fA(1,i.length+1,t,0)]:[]})}const a=t.getLineContent(i.lineNumber);let l,h=0;for(const c of i.parts){let e=c.lines;void 0===l?(s.push({column:c.column,text:e[0],preview:c.preview}),e=e.slice(1)):r([a.substring(h,c.column-1)],void 0),e.length>0&&(r(e,q0),void 0===l&&c.column<=a.length&&(l=c.column)),h=c.column-1}void 0!==l&&r([a.substring(h)],void 0);const d=void 0!==l?new F0(l,a.length+1):void 0;return{replacedRange:n,inlineTexts:s,additionalLines:o,hiddenRange:d,lineNumber:i.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t}})),this.decorations=Pj(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];t.replacedRange&&i.push({range:t.replacedRange.toRange(t.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const n of t.inlineTexts)i.push({range:Mh.fromPositions(new Ba(t.lineNumber,n.column)),options:{description:q0,after:{content:n.text,inlineClassName:n.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:wd.Left},showIfCollapsed:!0}});return i})),this.additionalLinesWidget=this._register(new G0(this.editor,this.languageService.languageIdCodec,Pj((e=>{const t=this.uiState.read(e);return t?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register(x((()=>{this.isDisposed.set(!0,void 0)}))),this._register(function(e,t){const i=new N,n=e.createDecorationsCollection();return i.add(Vj({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};$0=K0([j0(2,yc)],$0);class G0 extends E{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=Zj("editorOptionChanged",B.filter(this.editor.onDidChangeConfiguration,(e=>e.hasChanged(33)||e.hasChanged(116)||e.hasChanged(98)||e.hasChanged(93)||e.hasChanged(51)||e.hasChanged(50)||e.hasChanged(66)))),this._register(Hj((e=>{const t=this.lines.read(e);this.editorOptionsChanged.read(e),t?this.updateLines(t.lineNumber,t.additionalLines,t.minReservedLineCount):this.clear()})))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:s}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const o=Math.max(t.length,i);if(o>0){const i=document.createElement("div");!function(e,t,i,n,s){const o=n.get(33),r=n.get(116),a="none",l=n.get(93),h=n.get(51),d=n.get(50),c=n.get(66),u=new Qc(1e4);u.appendString('
    ');for(let m=0,f=i.length;m');const g=Mo(n),p=Eo(n),f=RC.createEmpty(n,s);DA(new yA(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,n,!1,g,p,0,f,e.decorations,t,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,r,a,l,h!==NS.OFF,null),u),u.appendString("
    ")}u.appendString(""),Bk(e,d);const g=u.build(),p=Z0?Z0.createHTML(g):g;e.innerHTML=p}(i,s,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:o,domNode:i,afterColumnAffinity:1})}}))}}const Z0=Ak("editorGhostText",{createHTML:e=>e});class Y0{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}class X0{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t,i=0,n=this.value.charCodeAt(e);if(t=X0._table[n],"number"==typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(X0.isDigitCharacter(n)){t=8;do{i+=1,n=this.value.charCodeAt(e+i)}while(X0.isDigitCharacter(n));return this.pos+=i,{type:t,pos:e,len:i}}if(X0.isVariableCharacter(n)){t=9;do{n=this.value.charCodeAt(e+ ++i)}while(X0.isVariableCharacter(n)||X0.isDigitCharacter(n));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,n=this.value.charCodeAt(e+i)}while(!isNaN(n)&&void 0===X0._table[n]&&!X0.isDigitCharacter(n)&&!X0.isVariableCharacter(n));return this.pos+=i,{type:t,pos:e,len:i}}}X0._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class Q0{constructor(){this._children=[]}appendChild(e){return e instanceof J0&&this._children[this._children.length-1]instanceof J0?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof a1)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class J0 extends Q0{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new J0(this.value)}}class e1 extends Q0{}class t1 extends e1{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof i1?this._children[0]:void 0}clone(){const e=new t1(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class i1 extends Q0{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof J0&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new i1;return this.options.forEach(e.appendChild,e),e}}class n1 extends Q0{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof s1&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof s1){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new n1;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class s1 extends Q0{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){return new s1(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class o1 extends e1{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new J0(t)],!0)}clone(){const e=new o1(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function r1(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class a1 extends Q0{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof t1&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return r1([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof t1&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof o1&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new a1;return this._children=this.children.map((e=>e.clone())),e}walk(e){r1(this.children,e)}}class l1{constructor(){this._scanner=new X0,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new a1;return this.parseFragment(e,n),this.ensureFinalTabstop(n,null!=i&&i,null!=t&&t),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk((e=>(e instanceof t1&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):s.push(e)),!0)));const o=(e,i)=>{const s=n.get(e.index);if(!s)return;const r=new t1(e.index);r.transform=e.transform;for(const t of s){const e=t.clone();r.appendChild(e),e instanceof t1&&n.has(e.index)&&!i.has(e.index)&&(i.add(e.index),o(e,i),i.delete(e.index))}t.replace(e,[r])},r=new Set;for(const a of s)o(a,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){if(t||i&&e.placeholders.length>0){e.placeholders.find((e=>0===e.index))||e.appendChild(new t1(0))}}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new J0(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new t1(Number(t)):new o1(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new t1(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new J0("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new i1;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new J0(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new o1(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new J0("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new n1;let i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new J0(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(Dre){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new s1(Number(n))),!0;if(this._accept(4))return e.appendChild(new s1(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new s1(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new s1(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new s1(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new s1(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new s1(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new J0(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}var h1=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function d1(e,t,i,n,s=Hh.None,o){return h1(this,void 0,void 0,(function*(){const r=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new Mh(e.lineNumber,i.startColumn,e.lineNumber,n):Mh.fromPositions(e,e.with(void 0,n))}(t,i),l=e.all(i),h=new qs;for(const e of l)e.groupId&&h.add(e.groupId,e);function d(e){if(!e.yieldsToGroupIds)return[];const t=[];for(const i of e.yieldsToGroupIds||[]){const e=h.get(i);for(const i of e)t.push(i)}return t}const c=new Map,u=new Set;function g(e,t){if(t=[...t,e],u.has(e))return t;u.add(e);try{const i=d(e);for(const e of i){const i=g(e,t);if(i)return i}}finally{u.delete(e)}}function p(e){const o=c.get(e);if(o)return o;const r=g(e,[]);r&&a(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${r.map((e=>e.toString?e.toString():""+e)).join(" -> ")}`));const l=new ad;return c.set(e,l.p),(()=>h1(this,void 0,void 0,(function*(){if(!r){const t=d(e);for(const e of t){const t=yield p(e);if(t&&t.items.length>0)return}}try{return yield e.provideInlineCompletions(i,t,n,s)}catch(Dre){return void a(Dre)}})))().then((e=>l.complete(e)),(e=>l.error(e))),l.p}const m=yield Promise.all(l.map((e=>h1(this,void 0,void 0,(function*(){return{provider:e,completions:yield p(e)}}))))),f=new Map,_=[];for(const e of m){const t=e.completions;if(!t)continue;const n=new u1(t,e.provider);_.push(n);for(const e of t.items){const t=g1.from(e,n,r,i,o);f.set(t.hash(),t)}}return new c1(Array.from(f.values()),new Set(f.keys()),_)}))}class c1{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class u1{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,0===this.refCount&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class g1{static from(e,t,i,n,s){let o,r,a=e.range?Mh.lift(e.range):i;if("string"==typeof e.insertText){if(o=e.insertText,s&&e.completeBracketPairs){o=p1(o,a.getStartPosition(),n,s);const t=o.length-e.insertText.length;0!==t&&(a=new Mh(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+t))}r=void 0}else if("snippet"in e.insertText){const t=e.insertText.snippet.length;if(s&&e.completeBracketPairs){e.insertText.snippet=p1(e.insertText.snippet,a.getStartPosition(),n,s);const i=e.insertText.snippet.length-t;0!==i&&(a=new Mh(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+i))}const i=(new l1).parse(e.insertText.snippet);1===i.children.length&&i.children[0]instanceof J0?(o=i.children[0].value,r=void 0):(o=i.toString(),r={snippet:e.insertText.snippet,range:a})}else Vl(e.insertText);return new g1(o,e.command,a,o,r,e.additionalTextEdits||P0,e,t)}constructor(e,t,i,n,s,o,r,a){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=s,this.additionalTextEdits=o,this.sourceInlineCompletion=r,this.source=a,n=(e=e.replace(/\r\n|\r/g,"\n")).replace(/\r\n|\r/g,"\n")}withRange(e){return new g1(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function p1(e,t,i,n){const s=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,o=i.tokenization.tokenizeLineWithEdit(t,s.length-(t.column-1),e),r=null==o?void 0:o.sliceAndInflate(t.column-1,s.length,0);if(!r)return e;const a=function(e,t){const i=new Tg,n=new Xg(i,(e=>t.getLanguageConfiguration(e))),s=sp(new $g(new Y0([e]),n),[],void 0,!0);let o="";const r=e.getLineContent();return function e(t,i){if(2===t.kind)if(e(t.openingBracket,i),i=_g(i,t.openingBracket.length),t.child&&(e(t.child,i),i=_g(i,t.child.length)),t.closingBracket)e(t.closingBracket,i),i=_g(i,t.closingBracket.length);else{const e=n.getSingleLanguageBracketTokens(t.openingBracket.languageId).findClosingTokenText(t.openingBracket.bracketIds);o+=e}else if(3===t.kind);else if(0===t.kind||1===t.kind)o+=r.substring(i,_g(i,t.length));else if(4===t.kind)for(const n of t.children)e(n,i),i=_g(i,n.length)}(s,0),o}(r,n);return a}class m1{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){const i=t?this.range.intersectRanges(t):this.range;if(!i)return this;const n=e.getValueInRange(i,1),s=vo(n,this.text),o=B0(this.range.getStartPosition(),W0(n.substring(0,s))),r=this.text.substring(s),a=Mh.fromPositions(o,this.range.getEndPosition());return new m1(a,r)}augments(e){return this.text.startsWith(e.text)&&(t=this.range,(i=e.range).getStartPosition().equals(t.getStartPosition())&&i.getEndPosition().isBeforeOrEqual(t.getEndPosition()));var t,i}computeGhostText(e,t,i,n=0){let s=this.removeCommonPrefix(e);if(s.range.endLineNumber!==s.range.startLineNumber)return;const o=e.getLineContent(s.range.startLineNumber),r=ro(o).length;if(s.range.startColumn-1<=r){const e=ro(s.text).length,t=o.substring(s.range.startColumn-1,r),[i,n]=[s.range.getStartPosition(),s.range.getEndPosition()],a=i.column+t.length<=n.column?i.delta(0,t.length):n,l=Mh.fromPositions(a,n),h=s.text.startsWith(t)?s.text.substring(t.length):s.text.substring(e);s=new m1(l,h)}const a=e.getValueInRange(s.range),l=function(e,t){if((null==f1?void 0:f1.originalValue)===e&&(null==f1?void 0:f1.newValue)===t)return null==f1?void 0:f1.changes;{let i=v1(e,t,!0);if(i){const n=_1(i);if(n>0){const s=v1(e,t,!1);s&&_1(s)0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==a.length)return}const c=s.text.length-n;for(const u of l){const e=s.range.startColumn+u.originalStart+u.originalLength;if("subwordSmart"===t&&i&&i.lineNumber===s.range.startLineNumber&&e0)return;if(0===u.modifiedLength)continue;const n=u.modifiedStart+u.modifiedLength,o=Math.max(u.modifiedStart,Math.min(n,c)),r=s.text.substring(u.modifiedStart,o),a=s.text.substring(o,Math.max(u.modifiedStart,n));if(r.length>0){const t=so(r);d.push(new H0(e,t,!1))}if(a.length>0){const t=so(a);d.push(new H0(e,t,!0))}}return new V0(h,d)}}let f1;function _1(e){let t=0;for(const i of e)t+=i.originalLength;return t}function v1(e,t,i){if(e.length>5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;it&&(t=n)}return t}const s=Math.max(n(e),n(t));function o(e){if(e<0)throw new Error("unexpected");return s+e+1}function r(e){let t=0,n=0;const s=new Int32Array(e.length);for(let r=0,a=e.length;ra},{getElements:()=>l}).ComputeDiff(!1).changes}var b1=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},C1=function(e,t){return function(i,n){t(i,n,e)}},w1=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let y1=class extends E{constructor(e,t,i,n,s){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=s,this._updateOperation=this._register(new I),this.inlineCompletions=Rj("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=Rj("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent((()=>{this._updateOperation.clear()})))}fetch(e,t,i){var n,s;const o=new S1(e,t,this.textModel.getVersionId()),r=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(null===(n=this._updateOperation.value)||void 0===n?void 0:n.request.satisfies(o))return this._updateOperation.value.promise;if(null===(s=r.get())||void 0===s?void 0:s.request.satisfies(o))return Promise.resolve(!0);const a=!!this._updateOperation.value;this._updateOperation.clear();const l=new Uh,h=(()=>w1(this,void 0,void 0,(function*(){var n,s;if((a||t.triggerKind===cC.Automatic)&&(yield(n=this._debounceValue.get(this.textModel),new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),n);s&&(t=s.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))})))),l.token.isCancellationRequested||this.textModel.getVersionId()!==o.versionId)return!1;const h=new Date,d=yield d1(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,l.token,this.languageConfigurationService);if(l.token.isCancellationRequested||this.textModel.getVersionId()!==o.versionId)return!1;const c=new Date;this._debounceValue.update(this.textModel,c.getTime()-h.getTime());const u=new k1(d,o,this.textModel,this.versionId);if(i){const t=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!d.has(t)&&u.prepend(i.inlineCompletion,t.range,!0)}return this._updateOperation.clear(),Dj((e=>{r.set(u,e)})),!0})))(),d=new L1(o,l,h);return this._updateOperation.value=d,h}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;(null===(t=this._updateOperation.value)||void 0===t?void 0:t.request.context.selectedSuggestionInfo)&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};y1=b1([C1(3,iL),C1(4,Xu)],y1);class S1{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&function(e,t,i){if(!e||!t)return e===t;return i(e,t)}(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,((e,t)=>e.equals(t)))&&(e.context.triggerKind===cC.Automatic||this.context.triggerKind===cC.Explicit)&&this.versionId===e.versionId}}class L1{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class k1{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=i,this.versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=Pj(this,(e=>{this.versionId.read(e);let t=!1;for(const i of this._inlineCompletions)t=t||i._updateRange(this.textModel);return t&&this._rangeVersionIdValue++,this._rangeVersionIdValue}));const s=i.deltaDecorations([],e.completions.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._inlineCompletions=e.completions.map(((e,t)=>new D1(e,s[t],this._rangeVersionId)))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,0===this._refCount){setTimeout((()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map((e=>e.decorationId)),[])}),0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new D1(e,n,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}}class D1{get forwardStable(){var e;return null!==(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)&&void 0!==e&&e}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=i,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=null!=n?n:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new m1(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,i){const n=this._toFilterTextReplacement(i).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(i).getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const s=e.getValueInRange(n.range,1).toLowerCase(),o=n.text.toLowerCase(),r=Math.max(0,t.column-n.range.startColumn);let a=o.substring(0,r),l=o.substring(r),h=s.substring(0,r),d=s.substring(r);const c=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=c&&(h=h.trimStart(),0===h.length&&(d=d.trimStart()),a=a.trimStart(),0===a.length&&(l=l.trimStart())),a.startsWith(h)&&!!Zo(d,l)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new m1(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return x1(this._getUpdatedRange(e)).isBefore(x1(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){const t=e.getDecorationRange(this.decorationId);return t?!this._updatedRange.equalsRange(t)&&(this._updatedRange=t,!0):(this._isValid=!1,!0)}}function x1(e){return e.startLineNumber===e.endLineNumber?new Ba(1,1+e.endColumn-e.startColumn):new Ba(1+e.endLineNumber-e.startLineNumber,e.endColumn)}var N1=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const E1={Visible:LX,HasFocusedSuggestion:new Tl("suggestWidgetHasFocusedSuggestion",!1,ue(0,"Whether any suggestion is focused")),DetailsVisible:new Tl("suggestWidgetDetailsVisible",!1,ue(0,"Whether suggestion details are visible")),MultipleSuggestions:new Tl("suggestWidgetMultipleSuggestions",!1,ue(0,"Whether there are multiple suggestions to pick from")),MakesTextEdit:new Tl("suggestionMakesTextEdit",!0,ue(0,"Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Tl("acceptSuggestionOnEnter",!0,ue(0,"Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Tl("suggestionHasInsertAndReplaceRange",!1,ue(0,"Whether the current suggestion has insert and replace behaviour")),InsertMode:new Tl("suggestionInsertMode",void 0,{type:"string",description:ue(0,"Whether the default behaviour is to insert or replace")}),CanResolve:new Tl("suggestionCanResolve",!1,ue(0,"Whether the current suggestion supports to resolve further details"))},I1=new Ql("suggestWidgetStatusBar");class M1{constructor(e,t,i,n){var s;this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=Ir.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:null===(s=t.label)||void 0===s?void 0:s.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,Mh.isIRange(t.range)?(this.editStart=new Ba(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new Ba(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new Ba(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||Mh.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new Ba(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new Ba(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new Ba(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||Mh.spansMultipleLines(t.range.insert)||Mh.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return void 0!==this._resolveDuration}get resolveDuration(){return void 0!==this._resolveDuration?this._resolveDuration:-1}resolve(e){return N1(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._resolveDuration=void 0})),i=new F(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._resolveDuration=i.elapsed()}),(e=>{d(e)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})).finally((()=>{t.dispose()}))}return this._resolveCache}))}}class T1{constructor(e=2,t=new Set,i=new Set,n=new Map,s=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=s}}let R1;T1.default=new T1;class A1{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function O1(e,t,i,n=T1.default,s={triggerKind:0},o=Hh.None){return N1(this,void 0,void 0,(function*(){const r=new F;i=i.clone();const l=t.getWordAtPosition(i),h=l?new Mh(i.lineNumber,l.startColumn,i.lineNumber,l.endColumn):Mh.fromPositions(i),d={replace:h,insert:h.setEndPosition(i.lineNumber,i.column)},u=[],g=new N,p=[];let m=!1;const f=(e,t,s)=>{var o,r,a;let l=!1;if(!t)return l;for(const h of t.suggestions)if(!n.kindFilter.has(h.kind)){if(!n.showDeprecated&&(null===(o=null==h?void 0:h.tags)||void 0===o?void 0:o.includes(1)))continue;h.range||(h.range=d),h.sortText||(h.sortText="string"==typeof h.label?h.label:h.label.label),!m&&h.insertTextRules&&4&h.insertTextRules&&(m=l1.guessNeedsClipboard(h.insertText)),u.push(new M1(i,h,t,e)),l=!0}return L(t)&&g.add(t),p.push({providerName:null!==(r=e._debugDisplayName)&&void 0!==r?r:"unknown_provider",elapsedProvider:null!==(a=t.duration)&&void 0!==a?a:-1,elapsedOverall:s.elapsed()}),l},_=(()=>N1(this,void 0,void 0,(function*(){})))();for(const c of e.orderedGroups(t)){let e=!1;if(yield Promise.all(c.map((r=>N1(this,void 0,void 0,(function*(){if(n.providerItemsToReuse.has(r)){const t=n.providerItemsToReuse.get(r);return t.forEach((e=>u.push(e))),void(e=e||t.length>0)}if(!(n.providerFilter.size>0)||n.providerFilter.has(r))try{const n=new F,a=yield r.provideCompletionItems(t,i,s,o);e=f(r,a,n)||e}catch(l){a(l)}}))))),e||o.isCancellationRequested)break}return yield _,o.isCancellationRequested?(g.dispose(),Promise.reject(new c)):new A1(u.sort((v=n.snippetSortOrder,F1.get(v))),m,{entries:p,elapsed:r.elapsed()},g);var v}))}function P1(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.textLabelt.textLabel?1:e.completion.kind-t.completion.kind}const F1=new Map;F1.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return P1(e,t)})),F1.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return P1(e,t)})),F1.set(1,P1),Za.registerCommand("_executeCompletionItemProvider",((e,...t)=>N1(void 0,void 0,void 0,(function*(){const[i,n,s,o]=t;jr(an.isUri(i)),jr(Ba.isIPosition(n)),jr("string"==typeof s||!s),jr("number"==typeof o||!o);const{completionProvider:r}=e.get(iL),a=yield e.get(Va).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=a.object.textEditorModel.validatePosition(n),l=yield O1(r,a.object.textEditorModel,i,void 0,{triggerCharacter:null!=s?s:void 0,triggerKind:s?1:0});for(const n of l.items)t.length<(null!=o?o:0)&&t.push(n.resolve(Hh.None)),e.incomplete=e.incomplete||n.container.incomplete,e.suggestions.push(n.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>l.disposable.dispose()),100)}}finally{a.dispose()}}))));class B1{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}function W1(e,t=Oe){return function(e,t=Oe){return!!t&&ga(e.charCodeAt(0))&&58===e.charCodeAt(1)}(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);var V1=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},H1=function(e,t){return function(i,n){t(i,n,e)}};Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class z1{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class U1{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=ro(this._model.getLineContent(this._selection.startLineNumber),0,this._selection.startColumn-1);let n=i;e.snippet.walk((t=>t!==e&&(t instanceof J0&&(n=ro(so(t.value).pop())),!0)));const s=vo(n,i);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${n.substr(s)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class K1{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return Xi(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=Xi(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===Yi(this._model.uri.fsPath)?"":this._labelService.getUriLabel(wa(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class j1{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!Zs(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let q1=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};q1=V1([H1(2,Xu)],q1);class $1{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if("CURRENT_YEAR"===t)return String(this._date.getFullYear());if("CURRENT_YEAR_SHORT"===t)return String(this._date.getFullYear()).slice(-2);if("CURRENT_MONTH"===t)return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if("CURRENT_DATE"===t)return String(this._date.getDate().valueOf()).padStart(2,"0");if("CURRENT_HOUR"===t)return String(this._date.getHours().valueOf()).padStart(2,"0");if("CURRENT_MINUTE"===t)return String(this._date.getMinutes().valueOf()).padStart(2,"0");if("CURRENT_SECOND"===t)return String(this._date.getSeconds().valueOf()).padStart(2,"0");if("CURRENT_DAY_NAME"===t)return $1.dayNames[this._date.getDay()];if("CURRENT_DAY_NAME_SHORT"===t)return $1.dayNamesShort[this._date.getDay()];if("CURRENT_MONTH_NAME"===t)return $1.monthNames[this._date.getMonth()];if("CURRENT_MONTH_NAME_SHORT"===t)return $1.monthNamesShort[this._date.getMonth()];if("CURRENT_SECONDS_UNIX"===t)return String(Math.floor(this._date.getTime()/1e3));if("CURRENT_TIMEZONE_OFFSET"===t){const e=this._date.getTimezoneOffset(),t=e>0?"-":"+",i=Math.trunc(Math.abs(e/60)),n=i<10?"0"+i:i,s=Math.abs(e)-60*i;return t+n+":"+(s<10?"0"+s:s)}}}$1.dayNames=[ue(0,"Sunday"),ue(0,"Monday"),ue(0,"Tuesday"),ue(0,"Wednesday"),ue(0,"Thursday"),ue(0,"Friday"),ue(0,"Saturday")],$1.dayNamesShort=[ue(0,"Sun"),ue(0,"Mon"),ue(0,"Tue"),ue(0,"Wed"),ue(0,"Thu"),ue(0,"Fri"),ue(0,"Sat")],$1.monthNames=[ue(0,"January"),ue(0,"February"),ue(0,"March"),ue(0,"April"),ue(0,"May"),ue(0,"June"),ue(0,"July"),ue(0,"August"),ue(0,"September"),ue(0,"October"),ue(0,"November"),ue(0,"December")],$1.monthNamesShort=[ue(0,"Jan"),ue(0,"Feb"),ue(0,"Mar"),ue(0,"Apr"),ue(0,"May"),ue(0,"Jun"),ue(0,"Jul"),ue(0,"Aug"),ue(0,"Sep"),ue(0,"Oct"),ue(0,"Nov"),ue(0,"Dec")];class G1{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=function(e,t){if("string"==typeof e||void 0===e)return"string"==typeof e?{id:Xi(e)}:t?$q:Gq;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}(this._workspaceService.getWorkspace());return qq(t)?void 0:"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0}_resolveWorkspaceName(e){if(jq(e))return Xi(e.uri.path);let t=Xi(e.configPath.path);return t.endsWith(Yq)&&(t=t.substr(0,t.length-14-1)),t}_resoveWorkspacePath(e){if(jq(e))return W1(e.uri.fsPath);const t=Xi(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?W1(i):"/"}}class Z1{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?kZ():void 0}}var Y1,X1=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Q1=function(e,t){return function(i,n){t(i,n,e)}};class J1{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=Rd(t.placeholders,t1.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(-1===this._offset)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),s=this._snippet.fullLen(i),o=Mh.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),r=i.isFinalTabstop?J1._decor.inactiveFinal:J1._decor.inactive,a=t.addDecoration(o,r);this._placeholderDecorations.set(i,a)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),s=this._editor.getModel().getValueInRange(n),o=t.transform.resolve(s).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx]){const o=this._placeholderDecorations.get(s),r=this._editor.getModel().getDecorationRange(o);n.push(new Th(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(s),e.changeDecorationOptions(o,s.isFinalTabstop?J1._decor.activeFinal:J1._decor.active),i.add(s);for(const t of this._snippet.enclosingPlaceholders(s)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?J1._decor.activeFinal:J1._decor.active),i.add(t)}}for(const[t,s]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(s,t.isFinalTabstop?J1._decor.inactiveFinal:J1._decor.inactive);return n}));return t?this.move(e):null!=i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof t1){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),s=this._editor.getModel().getDecorationRange(t);if(!s){e.delete(n.index);break}i.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(null==e?void 0:e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof i1,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const s=e.shift();console.assert(-1!==s._offset),console.assert(!s._placeholderDecorations);const o=s._snippet.placeholderInfo.last.index;for(const e of s._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(o+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of s._snippet.placeholders){const n=s._snippet.offset(e),o=s._snippet.fullLen(e),r=Mh.fromPositions(t.getPositionAt(s._offset+n),t.getPositionAt(s._offset+n+o)),a=i.addDecoration(r,J1._decor.inactive);this._placeholderDecorations.set(e,a)}}this._placeholderGroups=Rd(this._snippet.placeholders,t1.compareByIndex)}))}}J1._decor={active:xw.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:xw.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:xw.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:xw.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const e2={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let t2=Y1=class{static adjustWhitespace(e,t,i,n,s){const o=ro(e.getLineContent(t.lineNumber),0,t.column-1);let r;return n.walk((t=>{if(!(t instanceof J0)||t.parent instanceof i1)return!0;if(s&&!s.has(t))return!0;const a=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)a[0]=e.normalizeIndentation(a[0]);else{r=null!=r?r:n.toString();const t=r.charCodeAt(i-1);10!==t&&13!==t||(a[0]=e.normalizeIndentation(o+a[0]))}for(let t=1;te.get(Kq))),g=e.invokeWithinContext((e=>new K1(e.get(qz),c))),p=()=>r,m=c.getValueInRange(Y1.adjustSelection(c,e.getSelection(),i,0)),f=c.getValueInRange(Y1.adjustSelection(c,e.getSelection(),0,n)),_=c.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),v=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>Mh.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:b,idx:C}of v){let r=Y1.adjustSelection(c,b,i,0),w=Y1.adjustSelection(c,b,0,n);m!==c.getValueInRange(r)&&(r=b),f!==c.getValueInRange(w)&&(w=b);const y=b.setStartPosition(r.startLineNumber,r.startColumn).setEndPosition(w.endLineNumber,w.endColumn),S=(new l1).parse(t,!0,s),L=y.getStartPosition(),k=Y1.adjustWhitespace(c,L,o||C>0&&_!==c.getLineFirstNonWhitespaceColumn(b.positionLineNumber),S);S.resolveVariables(new z1([g,new j1(p,C,v.length,"spread"===e.getOption(78)),new U1(c,b,C,a),new q1(c,b,l),new $1,new G1(u),new Z1])),h[C]=Aq.replace(y,S.toString()),h[C].identifier={major:C,minor:0},h[C]._isTracked=!0,d[C]=new J1(e,S,k)}return{edits:h,snippets:d}}static createEditsAndSnippetsFromEdits(e,t,i,n,s,o,r){if(!e.hasModel()||0===t.length)return{edits:[],snippets:[]};const a=[],l=e.getModel(),h=new l1,d=new a1,c=new z1([e.invokeWithinContext((e=>new K1(e.get(qz),l))),new j1((()=>s),0,e.getSelections().length,"spread"===e.getOption(78)),new U1(l,e.getSelection(),0,o),new q1(l,e.getSelection(),r),new $1,new G1(e.invokeWithinContext((e=>e.get(Kq)))),new Z1]);t=t.sort(((e,t)=>Mh.compareRangesUsingStarts(e.range,t.range)));let u=0;for(let g=0;g0){const i=t[g-1].range,n=Mh.fromPositions(i.getEndPosition(),e.getStartPosition()),s=new J0(l.getValueInRange(n));d.appendChild(s),u+=s.value.length}const n=h.parseFragment(i,d);Y1.adjustWhitespace(l,e.getStartPosition(),!0,d,new Set(n)),d.resolveVariables(c);const s=d.toString(),o=s.slice(u);u=s.length;const r=Aq.replace(e,o);r.identifier={major:g,minor:0},r._isTracked=!0,a.push(r)}return h.ensureFinalTabstop(d,i,!0),{edits:a,snippets:[new J1(e,d,"")]}}constructor(e,t,i=e2,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){k(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}="string"==typeof this._template?Y1.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):Y1.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>{const i=e.filter((e=>!!e.identifier));for(let n=0;nTh.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=e2){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=Y1.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,(e=>{const t=e.filter((e=>!!e.identifier));for(let s=0;sTh.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))}))}e.sort(Mh.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(Mh.compareRangesUsingStarts);for(let s=0;s0}};t2=Y1=X1([Q1(3,Xu)],t2);var i2,n2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},s2=function(e,t){return function(i,n){t(i,n,e)}};const o2={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let r2=i2=class{static get(e){return e.getContribution(i2.ID)}constructor(e,t,i,n,s){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=s,this._snippetListener=new N,this._modelVersionId=-1,this._inSnippet=i2.InSnippetMode.bindTo(n),this._hasNextTabstop=i2.HasNextTabstop.bindTo(n),this._hasPrevTabstop=i2.HasPrevTabstop.bindTo(n)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?o2:Object.assign(Object.assign({},o2),t))}catch(Dre){this.cancel(),this._logService.error(Dre),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!=typeof e&&this.cancel(),this._session?(jr("string"==typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new t2(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),null===(i=this._session)||void 0===i?void 0:i.hasChoice){const e={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!Ba.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),s=Boolean(i.choice.options.find((e=>e.value===n))),o=[];for(let r=0;r{null==i||i.dispose(),n=!1},o=()=>{n||(i=this._languageFeaturesService.completionProvider.register({language:t.getLanguageId(),pattern:t.uri.fsPath,scheme:t.uri.scheme,exclusive:!0},e),this._snippetListener.add(i),n=!0)};this._choiceCompletions={provider:e,enable:o,disable:s}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState())))}}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:t}=this._session;if(!t||!this._choiceCompletions)return null===(e=this._choiceCompletions)||void 0===e||e.disable(),void(this._currentChoice=void 0);this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask((()=>{!function(e,t){var i;null===(i=e.getContribution("editor.contrib.suggestController"))||void 0===i||i.triggerSuggest((new Set).add(t),void 0,!0)}(this._editor,this._choiceCompletions.provider)})))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;null===(e=this._session)||void 0===e||e.prev(),this._updateState()}next(){var e;null===(e=this._session)||void 0===e||e.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};r2.ID="snippetController2",r2.InSnippetMode=new Tl("inSnippetMode",!1,ue(0,"Whether the editor in current in snippet mode")),r2.HasNextTabstop=new Tl("hasNextTabstop",!1,ue(0,"Whether there is a next tab stop when in snippet mode")),r2.HasPrevTabstop=new Tl("hasPrevTabstop",!1,ue(0,"Whether there is a previous tab stop when in snippet mode")),r2=i2=n2([s2(1,ah),s2(2,iL),s2(3,Rl),s2(4,Xu)],r2),Lh(r2.ID,r2,4);const a2=fh.bindToContribution(r2.get);wh(new a2({id:"jumpToNextSnippetPlaceholder",precondition:ul.and(r2.InSnippetMode,r2.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:Rh.editorTextFocus,primary:2}})),wh(new a2({id:"jumpToPrevSnippetPlaceholder",precondition:ul.and(r2.InSnippetMode,r2.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:Rh.editorTextFocus,primary:1026}})),wh(new a2({id:"leaveSnippet",precondition:r2.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:Rh.editorTextFocus,primary:9,secondary:[1033]}})),wh(new a2({id:"acceptSnippet",precondition:r2.InSnippetMode,handler:e=>e.finish()}));var l2,h2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},d2=function(e,t){return function(i,n){t(i,n,e)}},c2=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.Undo=0]="Undo",e[e.Redo=1]="Redo",e[e.AcceptWord=2]="AcceptWord",e[e.Other=3]="Other"}(l2||(l2={}));let u2=class extends E{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,s,o,r,a,l,h,d,c){let u;super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=i,this.textModelVersionId=n,this._debounceValue=s,this._suggestPreviewEnabled=o,this._suggestPreviewMode=r,this._inlineSuggestMode=a,this._enabled=l,this._instantiationService=h,this._commandService=d,this._languageConfigurationService=c,this._source=this._register(this._instantiationService.createInstance(y1,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Mj(this,!1),this._forceUpdate=Xj("forceUpdate"),this._selectedInlineCompletionId=Mj(this,void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([l2.Redo,l2.Undo,l2.AcceptWord]),this._fetchInlineCompletions=function(e,t){var i;return new Wj(e.owner,e.debugName,t,e.createEmptyChangeSummary,e.handleChange,void 0,null!==(i=e.equalityComparer)&&void 0!==i?i:Oj)}({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:cC.Automatic}),handleChange:(e,t)=>(e.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(e.change)?t.preserveCurrentCompletion=!0:e.didChange(this._forceUpdate)&&(t.inlineCompletionTriggerKind=e.change),!0)},((e,t)=>{this._forceUpdate.read(e);if(!(this._enabled.read(e)&&this.selectedSuggestItem.read(e)||this._isActive.read(e)))return void this._source.cancelUpdate();this.textModelVersionId.read(e);const i=this.selectedInlineCompletion.get(),n=t.preserveCurrentCompletion||(null==i?void 0:i.forwardStable)?i:void 0,s=this._source.suggestWidgetInlineCompletions.get(),o=this.selectedSuggestItem.read(e);if(s&&!o){const e=this._source.inlineCompletions.get();Dj((t=>{e&&s.request.versionId>e.request.versionId&&this._source.inlineCompletions.set(s.clone(),t),this._source.clearSuggestWidgetInlineCompletions(t)}))}const r=this.cursorPosition.read(e),a={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:null==o?void 0:o.toSelectedSuggestionInfo()};return this._source.fetch(r,a,n)})),this._filteredInlineCompletionItems=Pj(this,(e=>{const t=this._source.inlineCompletions.read(e);if(!t)return[];const i=this.cursorPosition.read(e),n=t.inlineCompletions.filter((t=>t.isVisible(this.textModel,i,e)));return n})),this.selectedInlineCompletionIndex=Pj(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineCompletionItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineCompletion=Pj(this,(e=>this._filteredInlineCompletionItems.read(e)[this.selectedInlineCompletionIndex.read(e)])),this.lastTriggerKind=this._source.inlineCompletions.map((e=>null==e?void 0:e.request.context.triggerKind)),this.inlineCompletionsCount=Pj(this,(e=>this.lastTriggerKind.read(e)===cC.Explicit?this._filteredInlineCompletionItems.read(e).length:void 0)),this.state=Fj({owner:this,equalityComparer:(e,t)=>e&&t?U0(e.ghostText,t.ghostText)&&e.inlineCompletion===t.inlineCompletion&&e.suggestItem===t.suggestItem:e===t},(e=>{var t;const i=this.textModel,n=this.selectedSuggestItem.read(e);if(n){const s=n.toSingleTextEdit().removeCommonPrefix(i),o=this._computeAugmentedCompletion(s,e);if(!this._suggestPreviewEnabled.read(e)&&!o)return;const r=null!==(t=null==o?void 0:o.edit)&&void 0!==t?t:s,a=o?o.edit.text.length-s.text.length:0,l=this._suggestPreviewMode.read(e),h=this.cursorPosition.read(e),d=r.computeGhostText(i,l,h,a);return{ghostText:null!=d?d:new V0(r.range.endLineNumber,[]),inlineCompletion:null==o?void 0:o.completion,suggestItem:n}}{if(!this._isActive.read(e))return;const t=this.selectedInlineCompletion.read(e);if(!t)return;const n=t.toSingleTextEdit(e),s=this._inlineSuggestMode.read(e),o=this.cursorPosition.read(e),r=n.computeGhostText(i,s,o);return r?{ghostText:r,inlineCompletion:t,suggestItem:void 0}:void 0}})),this.ghostText=Fj({owner:this,equalityComparer:U0},(e=>{const t=this.state.read(e);if(t)return t.ghostText})),this._register(Jj(this._fetchInlineCompletions)),this._register(Hj((e=>{var t,i;const n=this.state.read(e),s=null==n?void 0:n.inlineCompletion;if((null==s?void 0:s.semanticId)!==(null==u?void 0:u.semanticId)&&(u=s,s)){const e=s.inlineCompletion,n=e.source;null===(i=(t=n.provider).handleItemDidShow)||void 0===i||i.call(t,n.inlineCompletions,e.sourceInlineCompletion,e.insertText)}})))}trigger(e){return c2(this,void 0,void 0,(function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()}))}triggerExplicitly(e){return c2(this,void 0,void 0,(function*(){xj(e,(e=>{this._isActive.set(!0,e),this._forceUpdate.trigger(e,cC.Explicit)})),yield this._fetchInlineCompletions.get()}))}stop(e){xj(e,(e=>{this._isActive.set(!1,e),this._source.clear(e)}))}_computeAugmentedCompletion(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t);return function(e,t){for(const i of e){const e=t(i);if(void 0!==e)return e}}(n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(Ur),(n=>{let s=n.toSingleTextEdit(t);return s=s.removeCommonPrefix(i,Mh.fromPositions(s.range.getStartPosition(),e.range.getEndPosition())),s.augments(e)?{edit:s,completion:n}:void 0}))}_deltaSelectedInlineCompletionIndex(e){return c2(this,void 0,void 0,(function*(){yield this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}))}next(){return c2(this,void 0,void 0,(function*(){yield this._deltaSelectedInlineCompletionIndex(1)}))}previous(){return c2(this,void 0,void 0,(function*(){yield this._deltaSelectedInlineCompletionIndex(-1)}))}accept(e){var t;return c2(this,void 0,void 0,(function*(){if(e.getModel()!==this.textModel)throw new f;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),n.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[Aq.replaceMove(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition()),null===(t=r2.get(e))||void 0===t||t.insert(n.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[Aq.replaceMove(n.range,n.insertText),...n.additionalTextEdits]),n.command&&n.source.addRef(),Dj((e=>{this._source.clear(e),this._isActive.set(!1,e)})),n.command&&(yield this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,a),n.source.removeRef())}))}acceptNextWord(e){return c2(this,void 0,void 0,(function*(){yield this._acceptNext(e,((e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),s=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),o=t.match(s);let r=0;r=o&&void 0!==o.index?0===o.index?o[0].length:o.index:t.length;const a=/\s+/g.exec(t);return a&&void 0!==a.index&&a.index+a[0].length{const i=t.match(/\n/);return i&&void 0!==i.index?i.index+1:t.length}))}))}_acceptNext(e,t){return c2(this,void 0,void 0,(function*(){if(e.getModel()!==this.textModel)throw new f;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.ghostText,s=i.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText)return void(yield this.accept(e));const o=n.parts[0],r=new Ba(n.lineNumber,o.column),a=o.lines.join("\n"),l=t(r,a);if(l===a.length&&1===n.parts.length)return void this.accept(e);const h=a.substring(0,l);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[Aq.replace(Mh.fromPositions(r),h)]);const t=W0(h);e.setPosition(B0(r,t))}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){const t=Mh.fromPositions(s.range.getStartPosition(),B0(r,W0(h))),i=e.getModel().getValueInRange(t,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,i.length)}}))}handleSuggestAccepted(e){var t,i;const n=e.toSingleTextEdit().removeCommonPrefix(this.textModel),s=this._computeAugmentedCompletion(n,void 0);if(!s)return;const o=s.completion.inlineCompletion;null===(i=(t=o.source.provider).handlePartialAccept)||void 0===i||i.call(t,o.source.inlineCompletions,o.sourceInlineCompletion,n.text.length)}};u2=h2([d2(9,Oa),d2(10,Ga),d2(11,Xu)],u2);var g2,p2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m2=function(e,t){return function(i,n){t(i,n,e)}};class f2{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let s=0;sthis._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===$N.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){var i;const n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if((null===(i=this._strategy)||void 0===i?void 0:i.name)!==n){this._saveState();const e=g2._strategyCtors.get(n)||_2;this._strategy=new e;try{const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=this._storageService.get(`${g2._storagePrefix}/${n}`,e);t&&this._strategy.fromJSON(JSON.parse(t))}catch(Dre){}}return this._strategy}_saveState(){if(this._strategy){const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=JSON.stringify(this._strategy);this._storageService.store(`${g2._storagePrefix}/${this._strategy.name}`,t,e,1)}}};v2._strategyCtors=new Map([["recentlyUsedByPrefix",class extends f2{constructor(){super("recentlyUsedByPrefix"),this._trie=Uq.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageId()}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const s=`${e.getLanguageId()}/${n}`;let o=this._trie.get(s);if(o||(o=this._trie.findSubstr(s)),o)for(let r=0;re.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:dC.fromString(i.type),this._trie.set(t,i)}}}],["recentlyUsed",class extends f2{constructor(){super("recentlyUsed"),this._cache=new Ks(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);const s=i[0].score[0];let o=-1,r=-1,a=-1;for(let l=0;la&&n.type===i[l].completion.kind&&n.insertText===i[l].completion.insertText&&(a=n.touch,r=l),i[l].completion.preselect&&-1===o)return l}return-1!==r?r:-1!==o?o:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:dC.fromString(i.type),this._cache.set(t,i);this._seq=this._cache.size}}],["first",_2]]),v2._storagePrefix="suggest/memories",v2=g2=p2([m2(0,qN),m2(1,uu)],v2);const b2=Pa("ISuggestMemories");Cu(b2,v2,1);var C2,w2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},y2=function(e,t){return function(i,n){t(i,n,e)}};let S2=C2=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=C2.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(122)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(122);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};S2.AtEnd=new Tl("atEndOfWord",!1),S2=C2=w2([y2(1,Rl)],S2);var L2,k2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},D2=function(e,t){return function(i,n){t(i,n,e)}};let x2=L2=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=L2.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(0===e.items.length)return void this.reset();L2._moveIndex(!0,e,t)!==t?(this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(let s=t.items.length;s>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i)&&t.items[n].completion.additionalTextEdits;s--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=L2._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};x2.OtherSuggestions=new Tl("hasOtherSuggestions",!1),x2=L2=k2([D2(1,Rl)],x2);class N2{constructor(e,t,i,n){this._disposables=new N,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{this.reset()}))),this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((s=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!Wd(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new Ub;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var E2=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class I2{provideSelectionRanges(e,t){return E2(this,void 0,void 0,(function*(){const i=[];for(const n of t){const t=[];i.push(t);const s=new Map;yield new Promise((t=>I2._bracketsRightYield(t,0,e,n,s))),yield new Promise((i=>I2._bracketsLeftYield(i,0,e,n,s,t)))}return i}))}static _bracketsRightYield(e,t,i,n,s){const o=new Map,r=Date.now();for(;;){if(t>=I2._maxRounds){e();break}if(!n){e();break}const a=i.bracketPairs.findNextBracket(n);if(!a){e();break}if(Date.now()-r>I2._maxDuration){setTimeout((()=>I2._bracketsRightYield(e,t+1,i,n,s)));break}if(a.bracketInfo.isOpeningBracket){const e=a.bracketInfo.bracketText,t=o.has(e)?o.get(e):0;o.set(e,t+1)}else{const e=a.bracketInfo.getOpeningBrackets()[0].bracketText;let t=o.has(e)?o.get(e):0;if(t-=1,o.set(e,Math.max(0,t)),t<0){let t=s.get(e);t||(t=new O,s.set(e,t)),t.push(a.range)}}n=a.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,o){const r=new Map,a=Date.now();for(;;){if(t>=I2._maxRounds&&0===s.size){e();break}if(!n){e();break}const l=i.bracketPairs.findPrevBracket(n);if(!l){e();break}if(Date.now()-a>I2._maxDuration){setTimeout((()=>I2._bracketsLeftYield(e,t+1,i,n,s,o)));break}if(l.bracketInfo.isOpeningBracket){const e=l.bracketInfo.bracketText;let t=r.has(e)?r.get(e):0;if(t-=1,r.set(e,Math.max(0,t)),t<0){const t=s.get(e);if(t){const n=t.shift();0===t.size&&s.delete(e);const r=Mh.fromPositions(l.range.getEndPosition(),n.getStartPosition()),a=Mh.fromPositions(l.range.getStartPosition(),n.getEndPosition());o.push({range:r}),o.push({range:a}),I2._addBracketLeading(i,a,o)}}}else{const e=l.bracketInfo.getOpeningBrackets()[0].bracketText,t=r.has(e)?r.get(e):0;r.set(e,t+1)}n=l.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(n);0!==s&&s!==t.startColumn&&(i.push({range:Mh.fromPositions(new Ba(n,s),t.getEndPosition())}),i.push({range:Mh.fromPositions(new Ba(n,1),t.getEndPosition())}));const o=n-1;if(o>0){const n=e.getLineFirstNonWhitespaceColumn(o);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(o)&&(i.push({range:Mh.fromPositions(new Ba(o,n),t.getEndPosition())}),i.push({range:Mh.fromPositions(new Ba(o,1),t.getEndPosition())}))}}}I2._maxDuration=30,I2._maxRounds=2;var M2=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class T2{static create(e,t){return M2(this,void 0,void 0,(function*(){if(!t.getOption(117).localityBonus)return T2.None;if(!t.hasModel())return T2.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return T2.None;const[s]=yield(new I2).provideSelectionRanges(i,[n]);if(0===s.length)return T2.None;const o=yield e.computeWordRanges(i.uri,s[0].range);if(!o)return T2.None;const r=i.getWordUntilPosition(n);return delete o[r.word],new class extends T2{distance(e,i){if(!n.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const r="string"==typeof i.label?i.label:i.label.label,a=o[r];if(Bd(a))return 2<<20;const l=Md(a,Mh.fromPositions(e),Mh.compareRangesUsingStarts),h=l>=0?a[l]:a[Math.max(0,~l-1)];let d=s.length;for(const t of s){if(!Mh.containsRange(t.range,h))break;d-=1}return d}}}))}}T2.None=new class extends T2{distance(){return 0}};class R2{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class A2{constructor(e,t,i,n,s,o,r=Mr.default,a=void 0){this.clipboardText=a,this._snippetCompareFn=A2._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=r,"top"===o?this._snippetCompareFn=A2._compareCompletionItemsSnippetsUp:"bottom"===o&&(this._snippetCompareFn=A2._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",s="";const o=1===this._refilterKind?this._items:this._filteredItems,r=[],a=!this._options.filterGraceful||o.length>2e3?Tr:Ar;for(let l=0;l=u)h.score=Ir.Default;else if("string"==typeof h.completion.filterText){const t=a(n,s,e,h.completion.filterText,h.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===co(h.completion.filterText,h.textLabel)?h.score=t:(h.score=mr(n,s,e,h.textLabel,h.labelLow,0),h.score[0]=t[0])}else{const t=a(n,s,e,h.textLabel,h.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;h.score=t}}h.idx=l,h.distance=this._wordDistance.distance(h.position,h.completion),r.push(h),e.push(h.textLabel.length)}this._filteredItems=r.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Td(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return A2._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return A2._compareCompletionItems(e,t)}}var O2,P2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},F2=function(e,t){return function(i,n){t(i,n,e)}},B2=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class W2{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&((n.endColumn===i.column||n.startColumn+1===i.column)&&!!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}let V2=O2=class{constructor(e,t,i,n,s,o,r,a,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=o,this._configurationService=r,this._languageFeaturesService=a,this._envService=l,this._toDispose=new N,this._triggerCharacterListener=new N,this._triggerQuickSuggest=new id,this._triggerState=void 0,this._completionDisposables=new N,this._onDidCancel=new U,this._onDidTrigger=new U,this._onDidSuggest=new U,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Th(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters()}))),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})));let h=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{h=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{h=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{h||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{h||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){k(this._triggerCharacterListener),k([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(90)||!this._editor.hasModel()||!this._editor.getOption(120))return;const e=new Map;for(const i of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const t of i.triggerCharacters||[]){let n=e.get(t);n||(n=new Set,n.add(R1),e.set(t,n)),n.add(i)}const t=t=>{var i;if(!function(e,t){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getContextKeyValue(A0.suppressSuggestions.key);return void 0!==i?!i:!e.getOption(62).suppressSuggestions}(this._editor,this._contextKeyService,this._configurationService))return;if(W2.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let n="";wo(t.charCodeAt(t.length-1))?Co(t.charCodeAt(t.length-2))&&(n=t.substr(t.length-2)):n=t.charAt(t.length-1);const s=e.get(n);if(s){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())s.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:n,retrigger:Boolean(this._completionModel),clipboardText:null===(i=this._completionModel)||void 0===i?void 0:i.clipboardText,completionOptions:{providerFilter:s,providerItemsToReuse:e}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd((()=>t())))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;B1.isAllOff(this._editor.getOption(88))||this._editor.getOption(117).snippetsPreventQuickSuggestions&&(null===(e=r2.get(this._editor))||void 0===e?void 0:e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!W2.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(88);if(!B1.isAllOff(i)){if(!B1.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),s=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==B1.valueFor(i,s))return}(function(e,t){if(!Boolean(t.getContextKeyValue(A0.inlineSuggestionVisible.key)))return!0;const i=t.getContextKeyValue(A0.suppressSuggestions.key);return void 0!==i?!i:!e.getOption(62).suppressSuggestions})(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(89)))}_refilterCompletionItems(){jr(this._editor.hasModel()),jr(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new W2(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(i)}trigger(e){var t,i,n,s,o,a;if(!this._editor.hasModel())return;const l=this._editor.getModel(),h=new W2(l,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:null!==(t=e.shy)&&void 0!==t&&t,position:this._editor.getPosition()}),this._context=h;let d={triggerKind:null!==(i=e.triggerKind)&&void 0!==i?i:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Uh;let c=1;switch(this._editor.getOption(111)){case"top":c=0;break;case"bottom":c=2}const{itemKind:u,showDeprecated:g}=O2._createSuggestFilter(this._editor),p=new T1(c,null!==(s=null===(n=e.completionOptions)||void 0===n?void 0:n.kindFilter)&&void 0!==s?s:u,null===(o=e.completionOptions)||void 0===o?void 0:o.providerFilter,null===(a=e.completionOptions)||void 0===a?void 0:a.providerItemsToReuse,g),m=T2.create(this._editorWorkerService,this._editor),f=O1(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),p,d,this._requestToken.token);Promise.all([f,m]).then((([t,i])=>B2(this,void 0,void 0,(function*(){var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let s=null==e?void 0:e.clipboardText;if(!s&&t.needsClipboard&&(s=yield this._clipboardService.readText()),void 0===this._triggerState)return;const o=this._editor.getModel(),r=new W2(o,this._editor.getPosition(),e),a=Object.assign(Object.assign({},Mr.default),{firstMatchCanBeWeak:!this._editor.getOption(117).matchOnWordStartOnly});if(this._completionModel=new A2(t.items,this._context.column,{leadingLineContent:r.leadingLineContent,characterCountDelta:r.column-this._context.column},i,this._editor.getOption(117),this._editor.getOption(111),a,s),this._completionDisposables.add(t.disposable),this._onNewContext(r),this._reportDurationsTelemetry(t.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const e of t.items)e.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`,e.completion)})))).catch(r)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static _createSuggestFilter(e){const t=new Set;"none"===e.getOption(111)&&t.add(27);const i=e.getOption(117);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if(ro(e.leadingLineContent)===ro(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){if(W2.shouldAutoTrigger(this._editor)&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=W2.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};V2=O2=P2([F2(1,gG),F2(2,Xy),F2(3,rh),F2(4,ah),F2(5,Rl),F2(6,uu),F2(7,iL),F2(8,_E)],V2);class H2{constructor(e,t){this._disposables=new N,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eH2._maxSelectionLength)return;this._lastOvertyped[e]={value:s.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},U2=function(e,t){return function(i,n){t(i,n,e)}};class K2 extends OW{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=ue(0,"{0} ({1})",this._action.label,K2.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"\u23ce")}}let j2=class{constructor(e,t,i,n,s){this._menuId=t,this._menuService=n,this._contextKeyService=s,this._menuDisposables=new N,this.element=ds(e,fs(".suggest-status-bar"));const o=e=>e instanceof nh?i.createInstance(K2,e,void 0):void 0;this._leftActions=new Ix(this.element,{actionViewItemProvider:o}),this._rightActions=new Ix(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const t=[],i=[];for(const[n,s]of e.getActions())"left"===n?t.push(...s):i.push(...s);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};j2=z2([U2(2,Oa),U2(3,Jl),U2(4,Rl)],j2);var q2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},$2=function(e,t){return function(i,n){t(i,n,e)}};function G2(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let Z2=class{constructor(e,t){this._editor=e,this._onDidClose=new U,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new U,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new N,this._renderDisposeable=new N,this._borderWidth=1,this._size=new Wn(330,0),this.domNode=fs(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Yk,{editor:e}),this._body=fs(".body"),this._scrollbar=new TD(this._body,{alwaysConsumeMouseWheel:!0}),ds(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=ds(this._body,fs(".header")),this._close=ds(this._header,fs("span"+ea.asCSSSelector(Qr.close))),this._close.title=ue(0,"Close"),this._type=ds(this._header,fs("p.type")),this._docs=ds(this._body,fs("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(118)||t.fontSize,s=e.get(119)||t.lineHeight,o=t.fontWeight,r=`${n}px`,a=`${s}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+s/n,this.domNode.style.fontWeight=o,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(119)||this._editor.getOption(50).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=ue(0,"Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:s,documentation:o}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`,o=(new Ia).appendCodeblock("empty",t),s=`Provider: ${e.provider._debugDisplayName}`}if(t||G2(e)){if(this.domNode.classList.remove("no-docs","no-type"),s){const e=s.length>1e5?`${s.substr(0,1e5)}\u2026`:s;this._type.textContent=e,this._type.title=e,_s(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else Dn(this._type),this._type.title="",vs(this._type),this.domNode.classList.add("no-type");if(Dn(this._docs),"string"==typeof o)this._docs.classList.remove("markdown-docs"),this._docs.textContent=o;else if(o){this._docs.classList.add("markdown-docs"),Dn(this._docs);const e=this._markdownRenderer.render(o);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new Wn(e,t);Wn.equals(i,this._size)||(this._size=i,function(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Z2=q2([$2(1,Oa)],Z2);class Y2{constructor(e,t){let i,n;this.widget=e,this._editor=t,this._disposables=new N,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new cK,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let s=0,o=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(o=n.width-e.dimension.width,t=!0),e.north&&(s=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+s,left:i.left+o})}e.done&&(i=void 0,n=void 0,s=0,o=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size,this._preferAlignAtTop)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,null!==(i=this._userSize)&&void 0!==i?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const s=Fn(this.getDomNode().ownerDocument.body),o=this.widget.getLayoutInfo(),r=new Wn(220,2*o.lineHeight),a=e.top,l=function(){const i=s.width-(e.left+e.width+o.borderWidth+o.horizontalPadding),n=-o.borderWidth+e.left+e.width,l=new Wn(i,s.height-e.top-o.borderHeight-o.verticalPadding),h=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:h,minSize:r.with(Math.min(i,r.width))}}(),h=[l,function(){const i=e.left-o.borderWidth-o.horizontalPadding,n=Math.max(o.horizontalPadding,e.left-t.width-o.borderWidth),l=new Wn(i,s.height-e.top-o.borderHeight-o.verticalPadding),h=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:h,minSize:r.with(Math.min(i,r.width))}}(),function(){const i=e.left,n=-o.borderWidth+e.top+e.height,a=new Wn(e.width-o.borderHeight,s.height-e.top-e.height-o.verticalPadding);return{top:n,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:r.with(a.width)}}()],d=null!==(n=h.find((e=>e.fit>=0)))&&void 0!==n?n:h.sort(((e,t)=>t.fit-e.fit))[0],c=e.top+e.height-o.borderHeight;let u,g=t.height;const p=Math.max(d.maxSizeTop.height,d.maxSizeBottom.height);let m;g>p&&(g=p),i?g<=d.maxSizeTop.height?(u=!0,m=d.maxSizeTop):(u=!1,m=d.maxSizeBottom):g<=d.maxSizeBottom.height?(u=!1,m=d.maxSizeBottom):(u=!0,m=d.maxSizeTop),this._applyTopLeft({left:d.left,top:u?d.top:c-g}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!u,d===l,u,d!==l),this._resizable.minSize=d.minSize,this._resizable.maxSize=m,this._resizable.layout(g,Math.min(m.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var X2;!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(X2||(X2={}));const Q2=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function J2(e,t,i,n){const s=n===X2.ROOT_FOLDER?["rootfolder-icon"]:n===X2.FOLDER?["folder-icon"]:["file-icon"];if(i){let o;if(i.scheme===vn.data){o=Na.parseMetaData(i).get(Na.META_DATA_LABEL)}else{const e=i.path.match(Q2);e?(o=e4(e[2].toLowerCase()),e[1]&&s.push(`${e4(e[1].toLowerCase())}-name-dir-icon`)):o=e4(i.authority.toLowerCase())}if(n===X2.FOLDER)s.push(`${o}-name-folder-icon`);else{if(o){if(s.push(`${o}-name-file-icon`),s.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},n4=function(e,t){return function(i,n){t(i,n,e)}};function s4(e){return`suggest-aria-id:${e}`}const o4=QT("suggest-more-info",Qr.chevronRight,ue(0,"Icon for more information in the suggest widget.")),r4=new(t4=class{extract(e,t){if(e.textLabel.match(t4._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(t4._regexStrict))return t[0]=e.completion.detail,!0;if("string"==typeof e.completion.documentation){const i=t4._regexRelaxed.exec(e.completion.documentation);if(i&&(0===i.index||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}},t4._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,t4._regexStrict=new RegExp(`^${t4._regexRelaxed.source}$`,"i"),t4);let a4=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new U,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new N,i=e;i.classList.add("show-file-icons");const n=ds(e,fs(".icon")),s=ds(n,fs("span.colorspan")),o=ds(e,fs(".contents")),r=ds(o,fs(".main")),a=ds(r,fs(".icon-label.codicon")),l=ds(r,fs("span.left")),h=ds(r,fs("span.right")),d=new Uz(l,{supportHighlights:!0,supportIcons:!0});t.add(d);const c=ds(l,fs("span.signature-label")),u=ds(l,fs("span.qualifier-label")),g=ds(h,fs("span.details-label")),p=ds(h,fs("span.readMore"+ea.asCSSSelector(o4)));p.title=ue(0,"Read More");const m=()=>{const e=this._editor.getOptions(),t=e.get(50),s=t.getMassagedFontFamily(),o=t.fontFeatureSettings,a=e.get(118)||t.fontSize,l=e.get(119)||t.lineHeight,h=t.fontWeight,d=`${a}px`,c=`${l}px`,u=`${t.letterSpacing}px`;i.style.fontSize=d,i.style.fontWeight=h,i.style.letterSpacing=u,r.style.fontFamily=s,r.style.fontFeatureSettings=o,r.style.lineHeight=c,n.style.height=c,n.style.width=c,p.style.height=c,p.style.width=c};return m(),t.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(50)||e.hasChanged(118)||e.hasChanged(119))&&m()}))),{root:i,left:l,right:h,icon:n,colorspan:s,iconLabel:d,iconContainer:a,parametersLabel:c,qualifierLabel:u,detailsLabel:g,readMore:p,disposables:t}}renderElement(e,t,i){const{completion:n}=e;i.root.id=s4(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:fr(e.score)},o=[];if(19===n.kind&&r4.extract(e,o))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=o[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=J2(this._modelService,this._languageService,an.from({scheme:"fake",path:e.textLabel}),X2.FILE),o=J2(this._modelService,this._languageService,an.from({scheme:"fake",path:n.detail}),X2.FILE);s.extraClasses=t.length>o.length?t:o}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=[J2(this._modelService,this._languageService,an.from({scheme:"fake",path:e.textLabel}),X2.FOLDER),J2(this._modelService,this._languageService,an.from({scheme:"fake",path:n.detail}),X2.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...ea.asClassNameArray(dC.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),"string"==typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=l4(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=l4(n.label.detail||""),i.detailsLabel.textContent=l4(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(117).showInlineDetails?_s(i.detailsLabel):vs(i.detailsLabel),G2(e)?(i.right.classList.add("can-expand-details"),_s(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),vs(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function l4(e){return e.replace(/\r\n|\r|\n/g,"")}a4=i4([n4(1,Wa),n4(2,yc),n4(3,R_)],a4);var h4,d4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},c4=function(e,t){return function(i,n){t(i,n,e)}},u4=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};Sp("editorSuggestWidget.background",{dark:ym,light:ym,hcDark:ym,hcLight:ym},ue(0,"Background color of the suggest widget.")),Sp("editorSuggestWidget.border",{dark:Lm,light:Lm,hcDark:Lm,hcLight:Lm},ue(0,"Border color of the suggest widget."));const g4=Sp("editorSuggestWidget.foreground",{dark:wm,light:wm,hcDark:wm,hcLight:wm},ue(0,"Foreground color of the suggest widget."));Sp("editorSuggestWidget.selectedForeground",{dark:Wf,light:Wf,hcDark:Wf,hcLight:Wf},ue(0,"Foreground color of the selected entry in the suggest widget.")),Sp("editorSuggestWidget.selectedIconForeground",{dark:Vf,light:Vf,hcDark:Vf,hcLight:Vf},ue(0,"Icon foreground color of the selected entry in the suggest widget."));const p4=Sp("editorSuggestWidget.selectedBackground",{dark:Hf,light:Hf,hcDark:Hf,hcLight:Hf},ue(0,"Background color of the selected entry in the suggest widget."));Sp("editorSuggestWidget.highlightForeground",{dark:yf,light:yf,hcDark:yf,hcLight:yf},ue(0,"Color of the match highlights in the suggest widget.")),Sp("editorSuggestWidget.focusHighlightForeground",{dark:Sf,light:Sf,hcDark:Sf,hcLight:Sf},ue(0,"Color of the match highlights in the suggest widget when an item is focused.")),Sp("editorSuggestWidgetStatus.foreground",{dark:S_(g4,.5),light:S_(g4,.5),hcDark:S_(g4,.5),hcLight:S_(g4,.5)},ue(0,"Foreground color of the suggest widget status."));class m4{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof cW}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(Wn.is(e))return Wn.lift(e)}catch(Ws){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let f4=h4=class{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new I,this._pendingShowDetails=new I,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new id,this._disposables=new N,this._onDidSelect=new j,this._onDidFocus=new j,this._onDidHide=new U,this._onDidShow=new U,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new U,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new cK,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new _4(this,e),this._persistedSize=new m4(t,e);class o{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),r=new o(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,i,n,s;if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:o}=this.getLayoutInfo(),a=Math.round(e/2);let{width:l,height:h}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-h)<=a)&&(h=null!==(i=null===(t=r.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:o.height),(!r.persistWidth||Math.abs(r.currentSize.width-l)<=a)&&(l=null!==(s=null===(n=r.persistedSize)||void 0===n?void 0:n.width)&&void 0!==s?s:o.width),this._persistedSize.store(new Wn(l,h))}this._contentWidget.unlockPreference(),r=void 0}}))),this._messageElement=ds(this.element.domNode,fs(".message")),this._listElement=ds(this.element.domNode,fs(".tree"));const a=this._disposables.add(s.createInstance(Z2,this.editor));a.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Y2(a,this.editor);const l=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(117).showIcons);l();const h=s.createInstance(a4,this.editor);this._disposables.add(h),this._disposables.add(h.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new bx("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[h],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>ue(0,"Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!=typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=ue(0,"{0} {1}, {2}",t,i,n):i?t=ue(0,"{0} {1}",t,i):n&&(t=ue(0,"{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion;return ue(0,"{0}, docs: {1}",t,Xs("{0}{1}",n||"",i?"string"==typeof i?i:i.value:""))}}}),this._list.style(Yx({listInactiveFocusBackground:p4,listInactiveFocusOutline:Ep})),this._status=s.createInstance(j2,this.element.domNode,I1);const d=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(117).showStatusBar);d(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(117)&&(d(),l())}))),this._ctxSuggestWidgetVisible=E1.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=E1.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=E1.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=E1.HasFocusedSuggestion.bindTo(i),this._disposables.add(Mn(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=M_(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=Gh((e=>u4(this,void 0,void 0,(function*(){const t=ed((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>t.dispose()));try{return yield i.resolve(e)}finally{t.dispose(),n.dispose()}})))),this._currentSuggestionDetails.then((()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:s4(n)}))})).catch(r)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",4===e),this.element.domNode.classList.remove("message"),e){case 0:vs(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=h4.LOADING_MESSAGE,vs(this._listElement,this._status.element),_s(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,Ps(h4.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=h4.NO_SUGGESTIONS_MESSAGE,vs(this._listElement,this._status.element),_s(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,Ps(h4.NO_SUGGESTIONS_MESSAGE);break;case 3:case 4:vs(this._messageElement),_s(this._listElement,this._status.element),this._show();break;case 5:vs(this._messageElement),_s(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=ed((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,s){var o,r;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(o=this._loadingTimeout)||void 0===o||o.dispose(),null===(r=this._currentSuggestionDetails)||void 0===r||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const a=this._completionModel.items.length,l=0===a;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(s?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=Rn((()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}))}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!G2(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=Rn((()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.heightl&&(a=l);const h=this._completionModel?this._completionModel.stats.pLabelLen*o.typicalHalfwidthCharacterWidth:a,d=o.statusBarHeight+this._list.contentHeight+o.borderHeight,c=o.itemHeight+o.statusBarHeight,u=Hn(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,m=Math.min(s.height-p-o.verticalPadding,d),f=u.top+g.top-o.verticalPadding,_=Math.min(f,d);let v=Math.min(Math.max(_,m)+o.borderHeight,d);r===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(r=this._cappedHeight.wanted),rv&&(r=v);const b=150;r>m||this._forceRenderingAbove&&f>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),v=_):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),v=m),this.element.preferredSize=new Wn(h,o.defaultSize.height),this.element.maxSize=new Wn(l,v),this.element.minSize=new Wn(220,c),this._cappedHeight=r===d?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:r}:void 0}this._resize(a,r)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=t-s+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===(null===(e=this._contentWidget.getPosition())||void 0===e?void 0:e.preference[0]))}getLayoutInfo(){const e=this.editor.getOption(50),t=hD(this.editor.getOption(119)||e.lineHeight,8,1e3),i=this.editor.getOption(117).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Wn(430,i+12*t+s)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};f4.LOADING_MESSAGE=ue(0,"Loading..."),f4.NO_SUGGESTIONS_MESSAGE=ue(0,"No suggestions."),f4=h4=d4([c4(1,qN),c4(2,Rl),c4(3,R_),c4(4,Oa)],f4);class _4{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Wn(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var v4,b4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},C4=function(e,t){return function(i,n){t(i,n,e)}};class w4{constructor(e,t){this._model=e,this._position=t;if(e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);this._marker=e.deltaDecorations([],[{range:Mh.fromPositions(t,n),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let y4=v4=class{static get(e){return e.getContribution(v4.ID)}constructor(e,t,i,n,s,o,r){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=o,this._telemetryService=r,this._lineSuffix=new I,this._toDispose=new N,this._selectors=new S4((e=>e.priority)),this._onWillInsertSuggestItem=new U,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=s.createInstance(V2,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const a=E1.InsertMode.bindTo(n);a.set(e.getOption(117).insertMode),this._toDispose.add(this.model.onDidTrigger((()=>a.set(e.getOption(117).insertMode)))),this.widget=this._toDispose.add(new rd((()=>{const e=this._instantiationService.createInstance(f4,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new N2(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=E1.MakesTextEdit.bindTo(this._contextKeyService),n=E1.HasInsertAndReplaceRange.bindTo(this._contextKeyService),s=E1.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(x((()=>{i.reset(),n.reset(),s.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),o=e.editStart.column,r=t.column;let a=!0;if(!("smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-o!==e.completion.insertText.length)){a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:o,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText}i.set(a),n.set(!Ba.equals(e.editInsertEnd,e.editReplaceEnd)),s.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new _t(!0,!1,!1,!1,33))||Pe&&e.toKeyCodeChord().equals(new _t(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new rd((()=>this._toDispose.add(new H2(this.editor,this.model))))),this._alternatives=this._toDispose.add(new rd((()=>this._toDispose.add(new x2(this.editor,this._contextKeyService))))),this._toDispose.add(s.createInstance(S2,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new w4(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(e.triggerOptions.shy)return;let t=-1;for(const n of this._selectors.itemsOrderedByPriorityDesc)if(t=n.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;-1===t&&(t=0);let i=!1;if(e.triggerOptions.auto){const t=this.editor.getOption(117);"never"===t.selectionMode||"always"===t.selectionMode?i="never"===t.selectionMode:"whenTriggerCharacter"===t.selectionMode?i=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===t.selectionMode&&(i=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.triggerOptions.auto,i)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));const l=E1.AcceptSuggestionsOnEnter.bindTo(n),h=()=>{const e=this.editor.getOption(1);l.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>h()))),h()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=r2.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),s=n.getAlternativeVersionId(),{item:o}=e,l=[],h=new Uh;1&t||this.editor.pushUndoStop();const d=this.getOverwriteInfo(o,Boolean(8&t));this._memoryService.memorize(n,this.editor.getPosition(),o);const c=o.isResolved;let u=-1,g=-1;if(Array.isArray(o.completion.additionalTextEdits)){this.model.cancel();const e=PN.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map((e=>Aq.replaceMove(Mh.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!c){const e=new F;let i;const s=n.onDidChangeContent((e=>{if(e.isFlush)return h.cancel(),void s.dispose();for(const t of e.changes){const e=Mh.getEndPosition(t.range);i&&!Ba.isBefore(e,i)||(i=e)}})),r=t;t|=2;let a=!1;const d=this.editor.onWillType((()=>{d.dispose(),a=!0,2&r||this.editor.pushUndoStop()}));l.push(o.resolve(h.token).then((()=>{if(!o.completion.additionalTextEdits||h.token.isCancellationRequested)return;if(i&&o.completion.additionalTextEdits.some((e=>Ba.isBefore(i,Mh.getStartPosition(e.range)))))return!1;a&&this.editor.pushUndoStop();const e=PN.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map((e=>Aq.replaceMove(Mh.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!a&&2&r||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),g=!0===t?1:!1===t?0:-2})).finally((()=>{s.dispose(),d.dispose()})))}let{insertText:p}=o.completion;if(4&o.completion.insertTextRules||(p=l1.escape(p)),this.model.cancel(),i.insert(p,{overwriteBefore:d.overwriteBefore,overwriteAfter:d.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command)if(o.completion.command.id===L4.id)this.model.trigger({auto:!0,retrigger:!0});else{const e=new F;l.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch((e=>{o.completion.extensionId?a(e):r(e)})).finally((()=>{u=e.elapsed()})))}4&t&&this._alternatives.value.set(e,(e=>{for(h.cancel();n.canUndo();){s!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(o),Promise.all(l).finally((()=>{this._reportSuggestionAcceptedTelemetry(o,n,c,u,g),this.model.clear(),h.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i,n,s){var o,r,a;0!==Math.floor(100*Math.random())&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:null!==(r=null===(o=e.extensionId)||void 0===o?void 0:o.value)&&void 0!==r?r:"unknown",providerId:null!==(a=e.provider._debugDisplayName)&&void 0!==a?a:"unknown",kind:e.completion.kind,basenameHash:hE(ba(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:Ca(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:s})}getOverwriteInfo(e,t){jr(this.editor.hasModel());let i="replace"===this.editor.getOption(117).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:s+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if(Wd(e.completion.additionalTextEdits)){Os(ue(0,"Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length))}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:null!=t&&t,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;if(n-i!==e.completion.insertText.length)return!0;return this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};B.once(this.model.onDidTrigger)((e=>{const t=[];B.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{k(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if(k(t),0===e.items.length)return void i();const s=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),o=e.items[s];n(o)?(this.editor.pushUndoStop(),this._insertSuggestion({index:s,item:o,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};y4.ID="editor.contrib.suggestController",y4=v4=b4([C4(1,b2),C4(2,Ga),C4(3,Rl),C4(4,Oa),C4(5,ah),C4(6,rh)],y4);class S4{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class L4 extends _h{constructor(){super({id:L4.id,label:ue(0,"Trigger Suggest"),alias:"Trigger Suggest",precondition:ul.and(Rh.writable,Rh.hasCompletionItemProvider,E1.Visible.toNegated()),kbOpts:{kbExpr:Rh.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=y4.get(t);if(!n)return;let s;i&&"object"==typeof i&&!0===i.auto&&(s=!0),n.triggerSuggest(void 0,s,void 0)}}L4.id="editor.action.triggerSuggest",Lh(y4.ID,y4,2),yh(L4);const k4=190,D4=fh.bindToContribution(y4.get);wh(new D4({id:"acceptSelectedSuggestion",precondition:ul.and(E1.Visible,E1.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:ul.and(E1.Visible,Rh.textInputFocus),weight:k4},{primary:3,kbExpr:ul.and(E1.Visible,Rh.textInputFocus,E1.AcceptSuggestionsOnEnter,E1.MakesTextEdit),weight:k4}],menuOpts:[{menuId:I1,title:ue(0,"Insert"),group:"left",order:1,when:E1.HasInsertAndReplaceRange.toNegated()},{menuId:I1,title:ue(0,"Insert"),group:"left",order:1,when:ul.and(E1.HasInsertAndReplaceRange,E1.InsertMode.isEqualTo("insert"))},{menuId:I1,title:ue(0,"Replace"),group:"left",order:1,when:ul.and(E1.HasInsertAndReplaceRange,E1.InsertMode.isEqualTo("replace"))}]})),wh(new D4({id:"acceptAlternativeSelectedSuggestion",precondition:ul.and(E1.Visible,Rh.textInputFocus,E1.HasFocusedSuggestion),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:I1,group:"left",order:2,when:ul.and(E1.HasInsertAndReplaceRange,E1.InsertMode.isEqualTo("insert")),title:ue(0,"Replace")},{menuId:I1,group:"left",order:2,when:ul.and(E1.HasInsertAndReplaceRange,E1.InsertMode.isEqualTo("replace")),title:ue(0,"Insert")}]})),Za.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),wh(new D4({id:"hideSuggestWidget",precondition:E1.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:9,secondary:[1033]}})),wh(new D4({id:"selectNextSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),wh(new D4({id:"selectNextPageSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:12,secondary:[2060]}})),wh(new D4({id:"selectLastSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectLastSuggestion()})),wh(new D4({id:"selectPrevSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),wh(new D4({id:"selectPrevPageSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:11,secondary:[2059]}})),wh(new D4({id:"selectFirstSuggestion",precondition:ul.and(E1.Visible,ul.or(E1.MultipleSuggestions,E1.HasFocusedSuggestion.negate())),handler:e=>e.selectFirstSuggestion()})),wh(new D4({id:"focusSuggestion",precondition:ul.and(E1.Visible,E1.HasFocusedSuggestion.negate()),handler:e=>e.focusSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),wh(new D4({id:"focusAndAcceptSuggestion",precondition:ul.and(E1.Visible,E1.HasFocusedSuggestion.negate()),handler:e=>{e.focusSuggestion(),e.acceptSelectedSuggestion(!0,!1)}})),wh(new D4({id:"toggleSuggestionDetails",precondition:ul.and(E1.Visible,E1.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:I1,group:"right",order:1,when:ul.and(E1.DetailsVisible,E1.CanResolve),title:ue(0,"show less")},{menuId:I1,group:"right",order:1,when:ul.and(E1.DetailsVisible.toNegated(),E1.CanResolve),title:ue(0,"show more")}]})),wh(new D4({id:"toggleExplainMode",precondition:E1.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),wh(new D4({id:"toggleSuggestionFocus",precondition:E1.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:2570,mac:{primary:778}}})),wh(new D4({id:"insertBestCompletion",precondition:ul.and(Rh.textInputFocus,ul.equals("config.editor.tabCompletion","on"),S2.AtEnd,E1.Visible.toNegated(),x2.OtherSuggestions.toNegated(),r2.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest(Fr(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:k4,primary:2}})),wh(new D4({id:"insertNextSuggestion",precondition:ul.and(Rh.textInputFocus,ul.equals("config.editor.tabCompletion","on"),x2.OtherSuggestions,E1.Visible.toNegated(),r2.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:2}})),wh(new D4({id:"insertPrevSuggestion",precondition:ul.and(Rh.textInputFocus,ul.equals("config.editor.tabCompletion","on"),x2.OtherSuggestions,E1.Visible.toNegated(),r2.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:k4,kbExpr:Rh.textInputFocus,primary:1026}})),yh(class extends _h{constructor(){super({id:"editor.action.resetSuggestSize",label:ue(0,"Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){var i;null===(i=y4.get(t))||void 0===i||i.resetWidgetSize()}});class x4 extends E{get selectedItem(){return this._selectedItem}constructor(e,t,i,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=i,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=Mj(this,void 0),this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const s=y4.get(this.editor);if(s){this._register(s.registerSelector({priority:100,select:(e,t,i)=>{var n;Dj((e=>this.checkModelVersion(e)));const o=this.editor.getModel();if(!o)return-1;const r=null===(n=this.suggestControllerPreselector())||void 0===n?void 0:n.removeCommonPrefix(o);if(!r)return-1;const a=Ba.lift(t),l=_c(i.map(((e,t)=>{const i=N4.fromSuggestion(s,o,a,e,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(o);return{index:t,valid:r.augments(i),prefixLength:i.text.length,suggestItem:e}})).filter((e=>e&&e.valid&&e.prefixLength>0)),Yd((e=>e.prefixLength),Xd));return l?l.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(s.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(s.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(s.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(B.once(s.model.onDidTrigger)((e=>{t()}))),this._register(s.onWillInsertSuggestItem((e=>{const t=this.editor.getPosition(),i=this.editor.getModel();if(!t||!i)return;const n=N4.fromSuggestion(s,i,t,e.item,this.isShiftKeyPressed);this.onWillAccept(n)})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();this._isActive===e&&function(e,t){if(e===t)return!0;if(!e||!t)return!1;return e.equals(t)}(this._currentSuggestItemInfo,t)||(this._isActive=e,this._currentSuggestItemInfo=t,Dj((e=>{this.checkModelVersion(e),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,e)})))}getSuggestItemInfo(){const e=y4.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();return t&&i&&n?N4.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=y4.get(this.editor);null==e||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=y4.get(this.editor);null==e||e.forceRenderingAbove()}}class N4{static fromSuggestion(e,t,i,n,s){let{insertText:o}=n.completion,r=!1;if(4&n.completion.insertTextRules){const e=(new l1).parse(o);e.children.length<100&&t2.adjustWhitespace(t,i,!0,e),o=e.toString(),r=!0}const a=e.getOverwriteInfo(n,s);return new N4(Mh.fromPositions(i.delta(0,-a.overwriteBefore),i.delta(0,Math.max(a.overwriteAfter,0))),o,n.completion.kind,r)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new bC(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new m1(this.range,this.insertText)}}var E4,I4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},M4=function(e,t){return function(i,n){t(i,n,e)}};let T4=E4=class extends E{static get(e){return e.getContribution(E4.ID)}constructor(e,t,i,n,s,o,r,a,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.configurationService=n,this.commandService=s,this.debounceService=o,this.languageFeaturesService=r,this.audioCueService=a,this._keybindingService=l,this.model=Rj("inlineCompletionModel",void 0),this.textModelVersionId=Mj(this,-1),this.cursorPosition=Mj(this,new Ba(1,1)),this.suggestWidgetAdaptor=this._register(new x4(this.editor,(()=>{var e,t;return null===(t=null===(e=this.model.get())||void 0===e?void 0:e.selectedInlineCompletion.get())||void 0===t?void 0:t.toSingleTextEdit(void 0)}),(e=>this.updateObservables(e,l2.Other)),(e=>{Dj((t=>{var i;this.updateObservables(t,l2.Other),null===(i=this.model.get())||void 0===i||i.handleSuggestAccepted(e)}))}))),this._enabled=$j(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).enabled)),this.ghostTextWidget=this._register(this.instantiationService.createInstance($0,this.editor,{ghostText:this.model.map(((e,t)=>null==e?void 0:e.ghostText.read(t))),minReservedLineCount:jj(0),targetTextModel:this.model.map((e=>null==e?void 0:e.textModel))})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new A0(this.contextKeyService,this.model)),this._register(B.runAndSubscribe(e.onDidChangeModel,(()=>Dj((i=>{this.model.set(void 0,i),this.updateObservables(i,l2.Other);const n=e.getModel();if(n){const s=t.createInstance(u2,n,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,$j(e.onDidChangeConfiguration,(()=>e.getOption(117).preview)),$j(e.onDidChangeConfiguration,(()=>e.getOption(117).previewMode)),$j(e.onDidChangeConfiguration,(()=>e.getOption(62).mode)),this._enabled);this.model.set(s,i)}})))));const h=e=>{var t;return e.isUndoing?l2.Undo:e.isRedoing?l2.Redo:(null===(t=this.model.get())||void 0===t?void 0:t.isAcceptingPartially)?l2.AcceptWord:l2.Other};let d;this._register(e.onDidChangeModelContent((e=>Dj((t=>this.updateObservables(t,h(e))))))),this._register(e.onDidChangeCursorPosition((e=>Dj((t=>{var i;this.updateObservables(t,l2.Other),3!==e.reason&&"api"!==e.source||null===(i=this.model.get())||void 0===i||i.stop(t)}))))),this._register(e.onDidType((()=>Dj((e=>{var t;this.updateObservables(e,l2.Other),this._enabled.get()&&(null===(t=this.model.get())||void 0===t||t.trigger(e))}))))),this._register(this.commandService.onDidExecuteCommand((t=>{new Set([Oy.Tab.id,Oy.DeleteLeft.id,Oy.DeleteRight.id,tq,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this._enabled.get()&&Dj((e=>{var t;null===(t=this.model.get())||void 0===t||t.trigger(e)}))}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||fq.dropDownVisible||Dj((e=>{var t;null===(t=this.model.get())||void 0===t||t.stop(e)}))}))),this._register(Hj((e=>{var t;const i=null===(t=this.model.read(e))||void 0===t?void 0:t.state.read(e);(null==i?void 0:i.suggestItem)?i.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register(x((()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register(Hj((e=>{const t=this.model.read(e),i=null==t?void 0:t.state.read(e);if(t&&i&&i.inlineCompletion){if(i.inlineCompletion.semanticId!==d){d=i.inlineCompletion.semanticId;const e=t.textModel.getLineContent(i.ghostText.lineNumber);this.audioCueService.playAudioCue(y$.inlineSuggestion).then((()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(i.ghostText.renderForScreenReader(e))}))}}else d=void 0}))),this._register(new gq(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}))),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(e){const t=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(147)&&(n=ue(0,"Inspect this in the accessible view ({0})",i.getAriaLabel())),Os(n?e+", "+n:e)}updateObservables(e,t){var i,n;const s=this.editor.getModel();this.textModelVersionId.set(null!==(i=null==s?void 0:s.getVersionId())&&void 0!==i?i:-1,e,t),this.cursorPosition.set(null!==(n=this.editor.getPosition())&&void 0!==n?n:new Ba(1,1),e)}shouldShowHoverAt(e){var t;const i=null===(t=this.model.get())||void 0===t?void 0:t.ghostText.get();return!!i&&i.parts.some((t=>e.containsPosition(new Ba(i.lineNumber,t.column))))}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};T4.ID="editor.contrib.inlineCompletionsController",T4=E4=I4([M4(1,Oa),M4(2,Rl),M4(3,uu),M4(4,Ga),M4(5,CE),M4(6,iL),M4(7,b$),M4(8,PL)],T4);var R4=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class A4 extends _h{constructor(){super({id:A4.ID,label:ue(0,"Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ul.and(Rh.writable,A0.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);null===(i=null==e?void 0:e.model.get())||void 0===i||i.next()}))}}A4.ID=nq;class O4 extends _h{constructor(){super({id:O4.ID,label:ue(0,"Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ul.and(Rh.writable,A0.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);null===(i=null==e?void 0:e.model.get())||void 0===i||i.previous()}))}}O4.ID=iq;class P4 extends _h{constructor(){super({id:P4.ID,label:ue(0,"Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:A0.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return R4(this,void 0,void 0,(function*(){const e=T4.get(t);Dj((t=>{var i;null===(i=null==e?void 0:e.model.get())||void 0===i||i.stop(t)}))}))}}P4.ID="editor.action.inlineSuggest.hide";class F4 extends sh{constructor(){super({id:F4.ID,title:ue(0,"Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Ql.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ul.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return R4(this,void 0,void 0,(function*(){const t=e.get(uu),i="always"===t.getValue("editor.inlineSuggest.showToolbar")?"onHover":"always";t.updateValue("editor.inlineSuggest.showToolbar",i)}))}}F4.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var B4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W4=function(e,t){return function(i,n){t(i,n,e)}};class V4{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let H4=class{constructor(e,t,i,n,s,o){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=o,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=T4.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new hK(1e3,this,Mh.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}if(7===i.type&&t.shouldShowHoverAt(i.range))return new hK(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(6===i.type){if(i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range))return new hK(1e3,this,i.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if("always"===this._editor.getOption(62).showToolbar)return[];const i=T4.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new V4(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new N,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(e,n,i);const s=n.controller.model.get(),o=this._instantiationService.createInstance(fq,this._editor,!1,jj(null),s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map((e=>{var t;return null!==(t=null==e?void 0:e.inlineCompletion.source.inlineCompletions.commands)&&void 0!==t?t:[]})));return e.fragment.appendChild(o.getDomNode()),s.triggerExplicitly(),i.add(o),i}renderScreenReaderText(e,t,i){const n=fs,s=n("div.hover-row.markdown-hover"),o=ds(s,n("div.hover-contents",{"aria-live":"assertive"})),r=i.add(new Yk({editor:this._editor},this._languageService,this._openerService));i.add(Hj((n=>{var s;const a=null===(s=t.controller.model.read(n))||void 0===s?void 0:s.ghostText.read(n);if(a){const t=this._editor.getModel().getLineContent(a.lineNumber);(t=>{i.add(r.onDidRenderAsync((()=>{o.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=ue(0,"Suggestion:"),s=i.add(r.render((new Ia).appendText(n).appendCodeblock("text",t)));o.replaceChildren(s.element)})(a.renderForScreenReader(t))}else us(o)}))),e.fragment.appendChild(s)}};H4=B4([W4(1,yc),W4(2,Uk),W4(3,ZR),W4(4,Oa),W4(5,rh)],H4),Lh(T4.ID,T4,3),yh(class extends _h{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:ue(0,"Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:Rh.writable})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);null===(i=null==e?void 0:e.model.get())||void 0===i||i.triggerExplicitly()}))}}),yh(A4),yh(O4),yh(class extends _h{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:ue(0,"Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ul.and(Rh.writable,A0.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:ul.and(Rh.writable,A0.inlineSuggestionVisible)},menuOpts:[{menuId:Ql.InlineSuggestionToolbar,title:ue(0,"Accept Word"),group:"primary",order:2}]})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);yield null===(i=null==e?void 0:e.model.get())||void 0===i?void 0:i.acceptNextWord(e.editor)}))}}),yh(class extends _h{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:ue(0,"Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ul.and(Rh.writable,A0.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:Ql.InlineSuggestionToolbar,title:ue(0,"Accept Line"),group:"secondary",order:2}]})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);yield null===(i=null==e?void 0:e.model.get())||void 0===i?void 0:i.acceptNextLine(e.editor)}))}}),yh(class extends _h{constructor(){super({id:tq,label:ue(0,"Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:A0.inlineSuggestionVisible,menuOpts:[{menuId:Ql.InlineSuggestionToolbar,title:ue(0,"Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ul.and(A0.inlineSuggestionVisible,Rh.tabMovesFocus.toNegated(),A0.inlineSuggestionHasIndentationLessThanTabSize,E1.Visible.toNegated(),Rh.hoverFocused.toNegated())}})}run(e,t){var i;return R4(this,void 0,void 0,(function*(){const e=T4.get(t);e&&(null===(i=e.model.get())||void 0===i||i.accept(e.editor),e.editor.focus())}))}}),yh(P4),oh(F4),dK.register(H4);const z4=Pa("themeService");var U4,K4=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},j4=function(e,t){return function(i,n){t(i,n,e)}};let q4=U4=class extends E{static get(e){return e.getContribution(U4.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(DC.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new $4(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};q4.ID="editor.contrib.inspectTokens",q4=U4=K4([j4(1,z4),j4(2,yc)],q4);class $4 extends E{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){const i=DC.get(t);if(i)return i;const n=e.encodeLanguageId(t);return{getInitialState:()=>xC,tokenize:(e,i,n)=>NC(t,n),tokenizeEncoded:(e,t,i)=>EC(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return $4._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let a=t.tokens1.length-1;a>=0;a--){const n=t.tokens1[a];if(e.column-1>=n.offset){i=a;break}}let n=0;for(let a=t.tokens2.length>>>1;a>=0;a--)if(e.column-1>=t.tokens2[a<<1]){n=a;break}const s=this._model.getLineContent(e.lineNumber);let o="";if(ie.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let r=t.length-2;r>=0;r--)t[r].lineNumber===t[r+1].lineNumber&&t.splice(r,1);const i=[];let n=0,s=0;const o=t.length;for(let r=1,a=e.getLineCount();r<=a;r++){const a=e.getLineContent(r),l=a.length+1;let h=0;if(s=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},X4=function(e,t){return function(i,n){t(i,n,e)}};let Q4=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumbere.tokenization.getLineTokens(t),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){const i=n.startLineNumber,s=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(s)?t.addEditOperation(new Mh(1,1,1,1),null):(t.addEditOperation(new Mh(i,1,i,1),e.getLineContent(s)),t.addEditOperation(new Mh(s,1,s,e.getLineMaxColumn(s)),null)),n=new Th(s,1,s,1)}else{let i,o;if(this._isMovingDown){i=n.endLineNumber+1,o=e.getLineContent(i),t.addEditOperation(new Mh(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let h=o;if(this.shouldAutoIndent(e,n)){const d=this.matchEnterRule(e,a,s,i,n.startLineNumber-1);if(null!==d){const t=ZJ(d+GJ(ro(e.getLineContent(i)),s),s,r);h=t+this.trimStart(o)}else{l.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);const t=vy(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber,a,this._languageConfigurationService);if(null!==t){const n=ro(e.getLineContent(i)),a=GJ(t,s);if(a!==GJ(n,s)){const e=ZJ(a,s,r);h=e+this.trimStart(o)}}}t.addEditOperation(new Mh(n.startLineNumber,1,n.startLineNumber,1),h+"\n");const c=this.matchEnterRuleMovingDown(e,a,s,n.startLineNumber,i,h);if(null!==c)0!==c&&this.getIndentEditsOfMovingBlock(e,t,n,s,r,c);else{l.getLineContent=t=>t===n.startLineNumber?h:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);const o=vy(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,a,this._languageConfigurationService);if(null!==o){const i=ro(e.getLineContent(n.startLineNumber)),a=GJ(o,s),l=GJ(i,s);if(a!==l){const i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,s,r,i)}}}}else t.addEditOperation(new Mh(n.startLineNumber,1,n.startLineNumber,1),h+"\n")}else if(i=n.startLineNumber-1,o=e.getLineContent(i),t.addEditOperation(new Mh(i,1,i+1,1),null),t.addEditOperation(new Mh(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+o),this.shouldAutoIndent(e,n)){l.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);const o=this.matchEnterRule(e,a,s,n.startLineNumber,n.startLineNumber-2);if(null!==o)0!==o&&this.getIndentEditsOfMovingBlock(e,t,n,s,r,o);else{const o=vy(this._autoIndent,l,e.getLanguageIdAtPosition(n.startLineNumber,1),i,a,this._languageConfigurationService);if(null!==o){const i=ro(e.getLineContent(n.startLineNumber)),a=GJ(o,s),l=GJ(i,s);if(a!==l){const i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,s,r,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>py.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>py.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===Ec.None||s.indentAction===Ec.Indent?o=s.indentation+s.appendText:s.indentAction===Ec.IndentOutdent?o=s.indentation:s.indentAction===Ec.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);const r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(o))>=0){const s=ro(e.getLineContent(n));let r=ro(o);const a=by(e,n,this._languageConfigurationService);null!==a&&2&a&&(r=t.unshiftIndent(r));return GJ(r,i)-GJ(s,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(ao(o)>=0){const o=e.getLineMaxColumn(s),r=ly(this._autoIndent,e,new Mh(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let s=n-1;for(;s>=1;){if(ao(e.getLineContent(s))>=0)break;s--}if(s<1||n>e.getLineCount())return null;const o=e.getLineMaxColumn(s),r=ly(this._autoIndent,e,new Mh(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,s,o){let r=s;for(;r>=1;){let t;t=r===s&&void 0!==o?o:e.getLineContent(r);if(ao(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;const a=e.getLineMaxColumn(r),l=ly(this._autoIndent,e,new Mh(r,a,r,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,s,o){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const a=ro(e.getLineContent(r)),l=ZJ(GJ(a,n)+o,n,s);l!==a&&(t.addEditOperation(new Mh(r,1,r,a.length+1),l),r===i.endLineNumber&&i.endColumn<=a.length+1&&""===l&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=s)return null;const o=[];for(let a=n;a<=s;a++)o.push(e.getLineContent(a));let r=o.slice(0);return r.sort(J4.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:s,before:o,after:r}}J4._COLLATOR=null;class t5 extends _h{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>Mh.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let o=1;onew Ba(e.positionLineNumber,e.positionColumn))));const s=t.getSelection();if(null===s)return;const o=new G4(s,n);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop()}}s5.ID="editor.action.trimTrailingWhitespace";class o5 extends _h{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let a=0,l=n.length-1;aAq.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}}class r5 extends _h{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const s=t.getOption(129),o=[];for(const r of i)if(r.isEmpty()){const e=r.getStartPosition(),i=t.getConfiguredWordAtPosition(e);if(!i)continue;const a=new Mh(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),l=n.getValueInRange(a);o.push(Aq.replace(a,this._modifyText(l,s)))}else{const e=n.getValueInRange(r);o.push(Aq.replace(r,this._modifyText(e,s)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class a5{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class l5 extends r5{constructor(){super({id:"editor.action.transformToTitlecase",label:ue(0,"Transform to Title Case"),alias:"Transform to Title Case",precondition:Rh.writable})}_modifyText(e,t){const i=l5.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}l5.titleBoundary=new a5("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class h5 extends r5{constructor(){super({id:"editor.action.transformToSnakecase",label:ue(0,"Transform to Snake Case"),alias:"Transform to Snake Case",precondition:Rh.writable})}_modifyText(e,t){const i=h5.caseBoundary.get(),n=h5.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}h5.caseBoundary=new a5("(\\p{Ll})(\\p{Lu})","gmu"),h5.singleLetters=new a5("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class d5 extends r5{constructor(){super({id:"editor.action.transformToCamelcase",label:ue(0,"Transform to Camel Case"),alias:"Transform to Camel Case",precondition:Rh.writable})}_modifyText(e,t){const i=d5.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}d5.wordBoundary=new a5("[_\\s-]","gm");class c5 extends r5{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()))}constructor(){super({id:"editor.action.transformToKebabcase",label:ue(0,"Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:Rh.writable})}_modifyText(e,t){const i=c5.caseBoundary.get(),n=c5.singleLetters.get(),s=c5.underscoreBoundary.get();return i&&n&&s?e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}c5.caseBoundary=new a5("(\\p{Ll})(\\p{Lu})","gmu"),c5.singleLetters=new a5("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),c5.underscoreBoundary=new a5("(\\S)(_)(\\S)","gm"),yh(class extends t5{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:ue(0,"Copy Line Up"),alias:"Copy Line Up",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"&&Copy Line Up"),order:1}})}}),yh(class extends t5{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:ue(0,"Copy Line Down"),alias:"Copy Line Down",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"Co&&py Line Down"),order:2}})}}),yh(class extends _h{constructor(){super({id:"editor.action.duplicateSelection",label:ue(0,"Duplicate Selection"),alias:"Duplicate Selection",precondition:Rh.writable,menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],s=t.getSelections(),o=t.getModel();for(const r of s)if(r.isEmpty())n.push(new Z4(r,!0));else{const e=new Th(r.endLineNumber,r.endColumn,r.endLineNumber,r.endColumn);n.push(new Zw(e,o.getValueInRange(r)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}),yh(class extends i5{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:ue(0,"Move Line Up"),alias:"Move Line Up",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"Mo&&ve Line Up"),order:3}})}}),yh(class extends i5{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:ue(0,"Move Line Down"),alias:"Move Line Down",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"2_line",title:ue(0,"Move &&Line Down"),order:4}})}}),yh(class extends n5{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:ue(0,"Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:Rh.writable})}}),yh(class extends n5{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:ue(0,"Sort Lines Descending"),alias:"Sort Lines Descending",precondition:Rh.writable})}}),yh(class extends _h{constructor(){super({id:"editor.action.removeDuplicateLines",label:ue(0,"Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:Rh.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;const n=[],s=[];let o=0;for(const r of t.getSelections()){const e=new Set,t=[];for(let n=r.startLineNumber;n<=r.endLineNumber;n++){const s=i.getLineContent(n);e.has(s)||(t.push(s),e.add(s))}const a=new Th(r.startLineNumber,1,r.endLineNumber,i.getLineMaxColumn(r.endLineNumber)),l=r.startLineNumber-o,h=new Th(l,1,l+t.length-1,t[t.length-1].length);n.push(Aq.replace(a,t.join("\n"))),s.push(h),o+=r.endLineNumber-r.startLineNumber+1-t.length}t.pushUndoStop(),t.executeEdits(this.id,n,s),t.pushUndoStop()}}),yh(s5),yh(class extends _h{constructor(){super({id:"editor.action.deleteLines",label:ue(0,"Delete Line"),alias:"Delete Line",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let s=0;const o=[],r=[];for(let a=0,l=i.length;a1&&(t-=1,h=n.getLineMaxColumn(t)),o.push(Aq.replace(new Th(t,h,l,d),"")),r.push(new Th(t-s,e.positionColumn,t-s,e.positionColumn)),s+=e.endLineNumber-e.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let s=1;s=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}),yh(class extends _h{constructor(){super({id:"editor.action.indentLines",label:ue(0,"Indent Line"),alias:"Indent Line",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Cy.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}),yh(class extends _h{constructor(){super({id:"editor.action.outdentLines",label:ue(0,"Outdent Line"),alias:"Outdent Line",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:2140,weight:100}})}run(e,t){Oy.Outdent.runEditorCommand(e,t,null)}}),yh(class extends _h{constructor(){super({id:"editor.action.insertLineBefore",label:ue(0,"Insert Line Above"),alias:"Insert Line Above",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Cy.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}),yh(class extends _h{constructor(){super({id:"editor.action.insertLineAfter",label:ue(0,"Insert Line Below"),alias:"Insert Line Below",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Cy.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}),yh(class extends o5{constructor(){super({id:"deleteAllLeft",label:ue(0,"Delete All Left"),alias:"Delete All Left",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach((t=>{let o;if(1===t.endColumn&&s>0){const e=t.startLineNumber-s;o=new Th(e,t.startColumn,e,t.startColumn)}else o=new Th(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);s+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=o:n.push(o)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(Mh.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new Mh(t,i,e.startLineNumber,1)}return new Mh(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new Mh(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}),yh(class extends o5{constructor(){super({id:"deleteAllRight",label:ue(0,"Delete All Right"),alias:"Delete All Right",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let s=0,o=t.length,r=0;s{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new Mh(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new Mh(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(Mh.compareRangesUsingStarts),n}}),yh(class extends _h{constructor(){super({id:"editor.action.joinLines",label:ue(0,"Join Lines"),alias:"Join Lines",precondition:Rh.writable,kbOpts:{kbExpr:Rh.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(Mh.compareRangesUsingStarts);const s=[],o=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(s.push(e),t):new Th(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(s.push(e),t):new Th(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));s.push(o);const r=t.getModel();if(null===r)return;const a=[],l=[];let h=n,d=0;for(let c=0,u=s.length;c=1){let i=!0;""===m&&(i=!1),!i||" "!==m.charAt(m.length-1)&&"\t"!==m.charAt(m.length-1)||(i=!1,m=m.replace(/[\s\uFEFF\xA0]+$/g," "));const n=e.substr(t-1);m+=(i?" ":"")+n,g=i?n.length+1:n.length}else g=0}const f=new Mh(t,i,o,u);if(!f.isEmpty()){let i;e.isEmpty()?(a.push(Aq.replace(f,m)),i=new Th(f.startLineNumber-d,m.length-g+1,t-d,m.length-g+1)):e.startLineNumber===e.endLineNumber?(a.push(Aq.replace(f,m)),i=new Th(e.startLineNumber-d,e.startColumn,e.endLineNumber-d,e.endColumn)):(a.push(Aq.replace(f,m)),i=new Th(e.startLineNumber-d,e.startColumn,e.startLineNumber-d,m.length-p)),null!==Mh.intersectRanges(f,n)?h=i:l.push(i)}d+=f.endLineNumber-f.startLineNumber}l.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}),yh(class extends _h{constructor(){super({id:"editor.action.transpose",label:ue(0,"Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:Rh.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const s=[];for(let o=0,r=i.length;o=r){if(t.lineNumber===n.getLineCount())continue;const e=new Mh(t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i=n.getValueInRange(e).split("").reverse().join("");s.push(new Gw(new Th(t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i))}else{const e=new Mh(t.lineNumber,Math.max(1,t.column-1),t.lineNumber,t.column+1),i=n.getValueInRange(e).split("").reverse().join("");s.push(new Qw(e,i,new Th(t.lineNumber,t.column+1,t.lineNumber,t.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}),yh(class extends r5{constructor(){super({id:"editor.action.transformToUppercase",label:ue(0,"Transform to Uppercase"),alias:"Transform to Uppercase",precondition:Rh.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}),yh(class extends r5{constructor(){super({id:"editor.action.transformToLowercase",label:ue(0,"Transform to Lowercase"),alias:"Transform to Lowercase",precondition:Rh.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}),h5.caseBoundary.isSupported()&&h5.singleLetters.isSupported()&&yh(h5),d5.wordBoundary.isSupported()&&yh(d5),l5.titleBoundary.isSupported()&&yh(l5),c5.isSupported()&&yh(c5);var u5,g5=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},p5=function(e,t){return function(i,n){t(i,n,e)}},m5=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const f5=new Tl("LinkedEditingInputVisible",!1);let _5=u5=class extends E{static get(e){return e.getContribution(u5.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new N),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=f5.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new N),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(69)||e.hasChanged(92))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(69)||this._editor.getOption(92))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(B.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new Xh(this._debounceInformation.get(t)),s=()=>{var e;this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),null!==(e=this._debounceDuration)&&void 0!==e?e:this._debounceInformation.get(t))},o=new Xh(0),r=e=>{this._rangeSyncTriggerPromise=o.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{s()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void r(this._syncRangesToken)}s()}))),this._localToDispose.add({dispose:()=>{n.dispose(),o.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}const s=[];for(let o=1,r=this._currentDecorations.length;o1)return void this.clearRanges();const i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=n;const s=Gh((e=>m5(this,void 0,void 0,(function*(){try{const o=new F(!1),r=yield v5(this._providers,i,t,e);if(this._debounceInformation.update(i,o.elapsed()),s!==this._currentRequest)return;if(this._currentRequest=null,n!==i.getVersionId())return;let a=[];(null==r?void 0:r.ranges)&&(a=r.ranges),this._currentWordPattern=(null==r?void 0:r.wordPattern)||this._languageWordPattern;let l=!1;for(let e=0,i=a.length;e({range:e,options:u5.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(h),this._syncRangesToken++}catch(o){d(o)||r(o),this._currentRequest!==s&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=s,s}))}};_5.ID="editor.contrib.linkedEditing",_5.DECORATION=xw.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"}),_5=u5=g5([p5(1,Rl),p5(2,iL),p5(3,Xu),p5(4,CE)],_5);function v5(e,t,i,n){return td(e.ordered(t).map((e=>()=>m5(this,void 0,void 0,(function*(){try{return yield e.provideLinkedEditingRanges(t,i,n)}catch(Dre){return void a(Dre)}})))),(e=>!!e&&Wd(null==e?void 0:e.ranges)))}wh(new(fh.bindToContribution(_5.get))({id:"cancelLinkedEditingInput",precondition:f5,handler:e=>e.clearRanges(),kbOpts:{kbExpr:Rh.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));Sp("editor.linkedEditingBackground",{dark:rc.fromHex("#f00").transparent(.3),light:rc.fromHex("#f00").transparent(.3),hcDark:rc.fromHex("#f00").transparent(.3),hcLight:rc.white},ue(0,"Background color when the editor auto renames on type."));Ch("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(iL);return v5(n,t,i,Hh.None)})),Lh(_5.ID,_5,1),yh(class extends _h{constructor(){super({id:"editor.action.linkedEditing",label:ue(0,"Start Linked Editing"),alias:"Start Linked Editing",precondition:ul.and(Rh.writable,Rh.hasRenameProvider),kbOpts:{kbExpr:Rh.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(Fa),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return an.isUri(n)&&Ba.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(s),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r):super.runCommand(e,t)}run(e,t){const i=_5.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}});var b5=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class C5{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return b5(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}))}}class w5{constructor(e){this._disposables=new N;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new C5(e,n)));t=w5._union(t,e),L(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,s,o,r;for(n=0,o=0,s=e.length,r=t.length;nPromise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[s]=[t,e])}),a)));return Promise.all(s).then((()=>{const e=new w5(Pd(n));return i.isCancellationRequested?(e.dispose(),new w5([])):e}))}Za.registerCommand("_executeLinkProvider",((e,...t)=>b5(void 0,void 0,void 0,(function*(){let[i,n]=t;jr(i instanceof an),"number"!=typeof n&&(n=0);const{linkProvider:s}=e.get(iL),o=e.get(Wa).getModel(i);if(!o)return[];const r=yield y5(s,o,Hh.None);if(!r)return[];for(let e=0;e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},k5=function(e,t){return function(i,n){t(i,n,e)}},D5=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let x5=S5=class extends E{static get(e){return e.getContribution(S5.ID)}constructor(e,t,i,n,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new sd((()=>this.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const o=this._register(new IR(e));this._register(o.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(o.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(o.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(70)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}computeLinksNow(){return D5(this,void 0,void 0,(function*(){if(!this.editor.hasModel()||!this.editor.getOption(70))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Gh((t=>y5(this.providers,e,t)));try{const t=new F(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){r(t)}finally{this.computePromise=null}}}))}updateDecorations(e){const t="altKey"===this.editor.getOption(77),i=[],n=Object.keys(this.currentOccurrences);for(const o of n){const e=this.currentOccurrences[o];i.push(e.decorationId)}const s=[];if(e)for(const o of e)s.push(E5.decoration(o,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,s);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let i=0,s=n.length;i{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(77);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(Hh.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===vn.file&&e.startsWith(`${vn.file}:`)){const i=an.parse(e);if(i.scheme===vn.file){const n=pa(i);let s=null;n.startsWith("/./")?s=`.${n.substr(1)}`:n.startsWith("//./")&&(s=`.${n.substr(2)}`),s&&(e=ya(t,s))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(ue(0,"Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(ue(0,"Failed to open this link because its target is missing.")):r(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of t){const e=this.currentOccurrences[i.id];if(e)return e}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};x5.ID="editor.linkDetector",x5=S5=L5([k5(1,Uk),k5(2,uL),k5(3,iL),k5(4,CE)],x5);const N5={general:xw.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:xw.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class E5{static decoration(e,t){return{range:e.range,options:E5._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n=Object.assign({},i?N5.active:N5.general);return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:ue(0,i?"Execute command":"Follow link"),s=ue(0,t?Pe?"cmd + click":"ctrl + click":Pe?"option + click":"alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){t=ue(0,"Execute command {0}",i[1])}}return new Ia("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${s})`)}return(new Ia).appendText(`${n} (${s})`)}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,E5._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,E5._getOptions(this.link,t,!1))}}Lh(x5.ID,x5,1),yh(class extends _h{constructor(){super({id:"editor.action.openLink",label:ue(0,"Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=x5.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const s of n){const e=i.getLinkOccurrence(s.getEndPosition());e&&i.openLinkOccurrence(e,!1)}}});class I5 extends E{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(116);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}I5.ID="editor.contrib.longLinesHelper",Lh(I5.ID,I5,2);const M5=Sp("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},ue(0,"Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Sp("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},ue(0,"Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),Sp("editor.wordHighlightTextBackground",{light:M5,dark:M5,hcDark:M5,hcLight:M5},ue(0,"Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const T5=Sp("editor.wordHighlightBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of a symbol during read-access, like reading a variable."));Sp("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:Ep,hcLight:Ep},ue(0,"Border color of a symbol during write-access, like writing to a variable.")),Sp("editor.wordHighlightTextBorder",{light:T5,dark:T5,hcDark:T5,hcLight:T5},ue(0,"Border color of a textual occurrence for a symbol."));const R5=Sp("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},ue(0,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),A5=Sp("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},ue(0,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),O5=Sp("editorOverviewRuler.wordHighlightTextForeground",{dark:h_,light:h_,hcDark:h_,hcLight:h_},ue(0,"Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),P5=xw.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:A_(A5),position:vd.Center},minimap:{color:A_(c_),position:Cd.Inline}}),F5=xw.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:A_(O5),position:vd.Center},minimap:{color:A_(c_),position:Cd.Inline}}),B5=xw.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:A_(h_),position:vd.Center},minimap:{color:A_(c_),position:Cd.Inline}}),W5=xw.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),V5=xw.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:A_(R5),position:vd.Center},minimap:{color:A_(c_),position:Cd.Inline}});function H5(e){return e?W5:B5}B_(((e,t)=>{const i=e.getColor(Bm);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}));var z5,U5=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},K5=function(e,t){return function(i,n){t(i,n,e)}};function j5(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", ");Ps(1===i.length?ue(0,"Cursor added: {0}",e):ue(0,"Cursors added: {0}",e))}}class q5{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class $5{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new $5(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,s,o=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(o=!0,n=!0,s=!0):(n=i.wholeWord,s=i.matchCase);const a=e.getSelection();let l,h=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,h=new Th(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new $5(e,t,o,l,n,s,h)}constructor(e,t,i,n,s,o,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new q5(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new q5(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return i?new Th(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new q5(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new q5(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return i?new Th(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824)}}class G5 extends E{static get(e){return e.getContribution(G5.ID)}constructor(e){super(),this._sessionDispose=this._register(new N),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=$5.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new Th(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!Q5(this._editor.getModel(),t,i)){const e=this._editor.getModel(),i=[];for(let n=0,s=t.length;n0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(129):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(129):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew Th(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}G5.ID="editor.contrib.multiCursorController";class Z5 extends _h{run(e,t){const i=G5.get(t);if(!i)return;const n=t._getViewModel();if(n){const s=n.getCursorStates(),o=_Q.get(t);if(o)this._run(i,o);else{const n=e.get(Oa).createInstance(_Q,t);this._run(i,n),n.dispose()}j5(s,n.getCursorStates())}}}class Y5{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(Mh.compareRangesUsingStarts)),this._cachedFindMatches}}let X5=z5=class extends E{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(107),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new sd((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(107)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=_Q.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(z5._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const s=G5.get(i);if(!s)return null;const o=_Q.get(i);if(!o)return null;let r=s.getSession(o);if(!r){const e=i.getSelections();if(e.length>1){const t=o.getState().matchCase;if(!Q5(i.getModel(),e,t))return null}r=$5.create(i,o)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=o.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new Y5(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(129):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(Mh.compareRangesUsingStarts);const s=[];for(let a=0,l=0,h=i.length,d=n.length;a=d)s.push(e),a++;else{const t=Mh.compareRangesUsingStarts(e,n[l]);t<0?(!n[l].isEmpty()&&Mh.areIntersecting(e,n[l])||s.push(e),a++):(t>0||a++,l++)}}const o=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(80),r=s.map((e=>({range:e,options:H5(o)})));this._decorations.set(r)}dispose(){this._setState(null),super.dispose()}};function Q5(e,t,i){const n=J5(e,t[0],!i);for(let s=1,o=t.length;s1&&i.push(new Th(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),o=s.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),j5(o,s.getCursorStates())}}),yh(class extends Z5{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:ue(0,"Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:2082,weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"3_multi",title:ue(0,"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:ue(0,"Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"3_multi",title:ue(0,"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:ue(0,"Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:pt(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:ue(0,"Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.selectHighlights",label:ue(0,"Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:3114,weight:100},menuOpts:{menuId:Ql.MenubarSelectionMenu,group:"3_multi",title:ue(0,"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}),yh(class extends Z5{constructor(){super({id:"editor.action.changeAll",label:ue(0,"Change All Occurrences"),alias:"Change All Occurrences",precondition:ul.and(Rh.writable,Rh.editorTextFocus),kbOpts:{kbExpr:Rh.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}),yh(class extends _h{constructor(){super({id:"editor.action.addCursorsToBottom",label:ue(0,"Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let a=i[0].startLineNumber;a<=n;a++)s.push(new Th(a,i[0].startColumn,a,i[0].endColumn));const o=t._getViewModel(),r=o.getCursorStates();s.length>0&&t.setSelections(s),j5(r,o.getCursorStates())}}),yh(class extends _h{constructor(){super({id:"editor.action.addCursorsToTop",label:ue(0,"Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let r=i[0].startLineNumber;r>=1;r--)n.push(new Th(r,i[0].startColumn,r,i[0].endColumn));const s=t._getViewModel(),o=s.getCursorStates();n.length>0&&t.setSelections(n),j5(o,s.getCursorStates())}}),yh(class extends _h{constructor(){super({id:"editor.action.focusNextCursor",label:ue(0,"Focus Next Cursor"),description:{description:ue(0,"Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const s=Array.from(n.getCursorStates()),o=s.shift();o&&(s.push(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),j5(s,n.getCursorStates()))}}),yh(class extends _h{constructor(){super({id:"editor.action.focusPreviousCursor",label:ue(0,"Focus Previous Cursor"),description:{description:ue(0,"Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const s=Array.from(n.getCursorStates()),o=s.pop();o&&(s.unshift(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),j5(s,n.getCursorStates()))}});var e3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const t3={Visible:new Tl("parameterHintsVisible",!1),MultipleSignatures:new Tl("parameterHintsMultipleSignatures",!1)};function i3(e,t,i,n,s){return e3(this,void 0,void 0,(function*(){const o=e.ordered(t);for(const e of o)try{const o=yield e.provideSignatureHelp(t,i,s,n);if(o)return o}catch(r){a(r)}}))}Za.registerCommand("_executeSignatureHelpProvider",((e,...t)=>e3(void 0,void 0,void 0,(function*(){const[i,n,s]=t;jr(an.isUri(i)),jr(Ba.isIPosition(n)),jr("string"==typeof s||!s);const o=e.get(iL),r=yield e.get(Va).createModelReference(i);try{const e=yield i3(o.signatureHelpProvider,r.object.textEditorModel,Ba.lift(n),{triggerKind:uC.Invoke,isRetrigger:!1,triggerCharacter:s},Hh.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}}))));var n3,s3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e.Default={type:0};e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}};e.Active=class{constructor(e){this.hints=e,this.type=1}}}(n3||(n3={}));class o3 extends E{constructor(e,t,i=o3.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new U),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=n3.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new I),this.triggerChars=new Ub,this.retriggerChars=new Ub,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Xh(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=n3.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(r)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(85).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(85).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new n3.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return s3(this,void 0,void 0,(function*(){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(r3);this._pendingTriggers=[];const s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),a=this.editor.getPosition();this.state=new n3.Pending(Gh((e=>i3(this.providers,o,a,s,e))),i);try{const t=yield this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new n3.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(l){return e===this.triggerId&&(this.state=n3.Default),r(l),!1}}))}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:uC.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:uC.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:uC.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(85).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function r3(e,t){switch(t.triggerKind){case uC.Invoke:return t;case uC.ContentChange:return e;case uC.TriggerCharacter:default:return t}}o3.DEFAULT_DELAY=120;var a3,l3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},h3=function(e,t){return function(i,n){t(i,n,e)}};const d3=fs,c3=QT("parameter-hints-next",Qr.chevronDown,ue(0,"Icon for show next parameter hint.")),u3=QT("parameter-hints-previous",Qr.chevronUp,ue(0,"Icon for show previous parameter hint."));let g3=a3=class extends E{constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new N),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Yk({editor:e},s,n)),this.keyVisible=t3.Visible.bindTo(i),this.keyMultipleSignatures=t3.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=d3(".editor-widget.parameter-hints-widget"),t=ds(e,d3(".phwrapper"));t.tabIndex=-1;const i=ds(t,d3(".controls")),n=ds(i,d3(".button"+ea.asCSSSelector(u3))),s=ds(i,d3(".overloads")),o=ds(i,d3(".button"+ea.asCSSSelector(c3)));this._register(En(n,"click",(e=>{as(e),this.previous()}))),this._register(En(o,"click",(e=>{as(e),this.next()})));const r=d3(".body"),a=new TD(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=ds(r,d3(".signature")),h=ds(r,d3(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:s,docs:h,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const d=()=>{if(!this.domNodes)return;const e=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${e.fontSize}px`,this.domNodes.element.style.lineHeight=""+e.lineHeight/e.fontSize};d(),this._register(B.chain(this.editor.onDidChangeConfiguration.bind(this.editor),(e=>e.filter((e=>e.hasChanged(50)))))(d)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{var e;null===(e=this.domNodes)||void 0===e||e.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,null===(e=this.domNodes)||void 0===e||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const s=ds(this.domNodes.signature,d3(".code")),o=this.editor.getOption(50);s.style.fontSize=`${o.fontSize}px`,s.style.fontFamily=o.fontFamily;const r=n.parameters.length>0,a=null!==(t=n.activeParameter)&&void 0!==t?t:e.activeParameter;if(r)this.renderParameters(s,n,a);else{ds(s,d3("span")).textContent=n.label}const l=n.parameters[a];if(null==l?void 0:l.documentation){const e=d3("span.documentation");if("string"==typeof l.documentation)e.textContent=l.documentation;else{const t=this.renderMarkdownDocs(l.documentation);e.appendChild(t.element)}ds(this.domNodes.docs,d3("p",{},e))}if(void 0===n.documentation);else if("string"==typeof n.documentation)ds(this.domNodes.docs,d3("p",{},n.documentation));else{const e=this.renderMarkdownDocs(n.documentation);ds(this.domNodes.docs,e.element)}const h=this.hasDocs(n,l);if(this.domNodes.signature.classList.toggle("has-docs",h),this.domNodes.docs.classList.toggle("empty",!h),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,l){let e="";const t=n.parameters[a];e=Array.isArray(t.label)?n.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),n.documentation&&(e+="string"==typeof n.documentation?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==e&&(Os(ue(0,"{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&qr(t.documentation).length>0)||(!!(t&&"object"==typeof t.documentation&&qr(t.documentation).value.length>0)||(!!(e.documentation&&"string"==typeof e.documentation&&qr(e.documentation).length>0)||!!(e.documentation&&"object"==typeof e.documentation&&qr(e.documentation.value).length>0)))}renderParameters(e,t,i){const[n,s]=this.getParameterLabelOffsets(t,i),o=document.createElement("span");o.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,s),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(s),ds(e,o,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${Js(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return a3.ID}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};g3.ID="editor.widget.parameterHintsWidget",g3=a3=l3([h3(2,Rl),h3(3,Uk),h3(4,yc)],g3),Sp("editorHoverWidget.highlightForeground",{dark:yf,light:yf,hcDark:yf,hcLight:yf},ue(0,"Foreground color of the active item in the parameter hint."));var p3,m3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},f3=function(e,t){return function(i,n){t(i,n,e)}};let _3=p3=class extends E{static get(e){return e.getContribution(p3.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new o3(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{var t;e?(this.widget.value.show(),this.widget.value.render(e)):null===(t=this.widget.rawValue)||void 0===t||t.hide()}))),this.widget=new Gs((()=>this._register(t.createInstance(g3,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){var e;null===(e=this.widget.rawValue)||void 0===e||e.previous()}next(){var e;null===(e=this.widget.rawValue)||void 0===e||e.next()}trigger(e){this.model.trigger(e,0)}};_3.ID="editor.controller.parameterHints",_3=p3=m3([f3(1,Oa),f3(2,iL)],_3);Lh(_3.ID,_3,2),yh(class extends _h{constructor(){super({id:"editor.action.triggerParameterHints",label:ue(0,"Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:Rh.hasSignatureHelpProvider,kbOpts:{kbExpr:Rh.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=_3.get(t);null==i||i.trigger({triggerKind:uC.Invoke})}});const v3=fh.bindToContribution(_3.get);function b3(e,t){return t&&(e.stack||e.stacktrace)?ue(0,"{0}: {1}",w3(e),C3(e.stack)||C3(e.stacktrace)):w3(e)}function C3(e){return Array.isArray(e)?e.join("\n"):e}function w3(e){return"ERR_UNC_HOST_NOT_ALLOWED"===e.code?`${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?ue(0,"A system error occurred ({0})",e.message):e.message||ue(0,"An unknown error occurred. Please consult the log for more details.")}function y3(e=null,t=!1){if(!e)return ue(0,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=Pd(e),n=y3(i[0],t);return i.length>1?ue(0,"{0} ({1} errors in total)",n,i.length):n}if(Pr(e))return e;if(e.detail){const i=e.detail;if(i.error)return b3(i.error,t);if(i.exception)return b3(i.exception,t)}return e.stack?b3(e,t):e.message?e.message:ue(0,"An unknown error occurred. Please consult the log for more details.")}wh(new v3({id:"closeParameterHints",precondition:t3.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:Rh.focus,primary:9,secondary:[1033]}})),wh(new v3({id:"showPrevParameterHint",precondition:ul.and(t3.Visible,t3.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:Rh.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),wh(new v3({id:"showNextParameterHint",precondition:ul.and(t3.Visible,t3.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:Rh.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));class S3{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,s=[];for(const[o,r]of this.documents){if(t.isCancellationRequested)return[];for(const e of r.chunks){const t=this.computeSimilarityScore(e,i,n);t>0&&s.push({key:o,score:t})}}return s}static termFrequencies(e){return function(e){var t;const i=new Map;for(const n of e)i.set(n,(null!==(t=i.get(n))&&void 0!==t?t:0)+1);return i}(S3.splitTerms(e))}static*splitTerms(e){const t=e=>e.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const e=i.split(/(?<=[a-z])(?=[A-Z])/g);if(e.length>1)for(const i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){var t;for(const{key:i}of e)this.deleteDocument(i);for(const i of e){const e=[];for(const n of i.textChunks){const i=S3.termFrequencies(n);for(const e of i.keys())this.chunkOccurrences.set(e,(null!==(t=this.chunkOccurrences.get(e))&&void 0!==t?t:0)+1);e.push({text:n,tf:i})}this.chunkCount+=e.length,this.documents.set(i.key,{chunks:e})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const e of t.chunks)for(const t of e.tf.keys()){const e=this.chunkOccurrences.get(t);if("number"==typeof e){const i=e-1;i<=0?this.chunkOccurrences.delete(t):this.chunkOccurrences.set(t,i)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[s,o]of Object.entries(t)){const t=e.tf.get(s);if(!t)continue;let r=i.get(s);"number"!=typeof r&&(r=this.computeIdf(s),i.set(s,r));n+=t*r*o}return n}computeEmbedding(e){const t=S3.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const i=null!==(t=this.chunkOccurrences.get(e))&&void 0!==t?t:0;return i>0?Math.log((this.chunkCount+1)/i):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}const L3=Pa("dialogService");var k3,D3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function x3(e){const t=e;return Array.isArray(t.items)}function N3(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(k3||(k3={}));class E3 extends E{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const s=new N;let o;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=s.add(new I),a=()=>D3(this,void 0,void 0,(function*(){const n=r.value=new N;null==o||o.dispose(!0),e.busy=!1,o=new Uh(t);const s=o.token,a=e.value.substr(this.prefix.length).trim(),l=this._getPicks(a,n,s,i),h=(t,i)=>{var n;let s,o;if(x3(t)?(s=t.items,o=t.active):s=t,0===s.length){if(i)return!1;(a.length>0||e.hideInput)&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(s=$r(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=s,o&&(e.activeItems=[o]),!0},d=t=>D3(this,void 0,void 0,(function*(){let i=!1,n=!1;yield Promise.all([(()=>D3(this,void 0,void 0,(function*(){"number"==typeof t.mergeDelay&&(yield Jh(t.mergeDelay),s.isCancellationRequested)||n||(i=h(t.picks,!0))})))(),(()=>D3(this,void 0,void 0,(function*(){e.busy=!0;try{const n=yield t.additionalPicks;if(s.isCancellationRequested)return;let o,r,a,l;if(x3(t.picks)?(o=t.picks.items,r=t.picks.active):o=t.picks,x3(n)?(a=n.items,l=n.active):a=n,a.length>0||!i){let t;if(!r&&!l){const i=e.activeItems[0];i&&-1!==o.indexOf(i)&&(t=i)}h({items:[...o,...a],active:r||l||t})}}finally{s.isCancellationRequested||(e.busy=!1),n=!0}})))()])}));if(null===l);else if(N3(l))yield d(l);else if(l instanceof Promise){e.busy=!0;try{const e=yield l;if(s.isCancellationRequested)return;N3(e)?yield d(e):h(e)}finally{s.isCancellationRequested||(e.busy=!1)}}else h(l)}));return s.add(e.onDidChangeValue((()=>a()))),a(),s.add(e.onDidAccept((t=>{const[i]=e.selectedItems;"function"==typeof(null==i?void 0:i.accept)&&(t.inBackground||e.hide(),i.accept(e.keyMods,t))}))),s.add(e.onDidTriggerItemButton((({button:i,item:n})=>D3(this,void 0,void 0,(function*(){var s,o;if("function"==typeof n.trigger){const r=null!==(o=null===(s=n.buttons)||void 0===s?void 0:s.indexOf(i))&&void 0!==o?o:-1;if(r>=0){const i=n.trigger(r,e.keyMods),s="number"==typeof i?i:yield i;if(t.isCancellationRequested)return;switch(s){case k3.NO_ACTION:break;case k3.CLOSE_PICKER:e.hide();break;case k3.REFRESH_PICKER:a();break;case k3.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),s=e.activeItems.filter((e=>e!==n[0])),o=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,s&&(e.activeItems=s),e.keepScrollPosition=o}break}}}}}))))),s}}var I3,M3,T3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},R3=function(e,t){return function(i,n){t(i,n,e)}},A3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let O3=I3=class extends E3{constructor(e,t,i,n,s,o){super(I3.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=o,this.commandsHistory=this._register(this.instantiationService.createInstance(P3)),this.options=e}_getPicks(e,t,i,n){var s,o,r,a;return A3(this,void 0,void 0,(function*(){const t=yield this.getCommandPicks(i);if(i.isCancellationRequested)return[];const l=_((()=>{const n=new S3;n.updateDocuments(t.map((e=>({key:e.commandId,textChunks:[e.label+(e.commandAlias?` ${e.commandAlias}`:"")]}))));return function(e){var t,i;const n=e.slice(0);n.sort(((e,t)=>t.score-e.score));const s=null!==(i=null===(t=n[0])||void 0===t?void 0:t.score)&&void 0!==i?i:0;if(s>0)for(const o of n)o.score/=s;return n}(n.calculateScores(e,i)).filter((e=>e.score>I3.TFIDF_THRESHOLD)).slice(0,I3.TFIDF_MAX_RESULTS)})),h=[];for(const n of t){const t=null!==(s=I3.WORD_FILTER(e,n.label))&&void 0!==s?s:void 0,r=n.commandAlias&&null!==(o=I3.WORD_FILTER(e,n.commandAlias))&&void 0!==o?o:void 0;if(t||r)n.highlights={label:t,detail:this.options.showAlias?r:void 0},h.push(n);else if(e===n.commandId)h.push(n);else if(e.length>=3){const e=l();if(i.isCancellationRequested)return[];const t=e.find((e=>e.key===n.commandId));t&&(n.tfIdfScore=t.score,h.push(n))}}const d=new Map;for(const e of h){const t=d.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):d.set(e.label,e)}h.sort(((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return-1;const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const c=[];let u=!1,g=!0,p=!!this.options.suggestedCommandIds;for(let e=0;eA3(this,void 0,void 0,(function*(){var s;const o=yield this.getAdditionalCommandPicks(t,h,e,i);if(i.isCancellationRequested)return[];const r=o.map((e=>this.toCommandPick(e,n)));return g&&"separator"!==(null===(s=r[0])||void 0===s?void 0:s.type)&&r.unshift({type:"separator",label:ue(0,"similar commands")}),r})))()}:c}))}toCommandPick(e,t){if("separator"===e.type)return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?ue(0,"{0}, {1}",e.label,i.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:()=>A3(this,void 0,void 0,(function*(){var i,n;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:null!==(i=null==t?void 0:t.from)&&void 0!==i?i:"quick open"});try{(null===(n=e.args)||void 0===n?void 0:n.length)?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(s){d(s)||this.dialogService.error(ue(0,"Command '{0}' resulted in an error",e.label),y3(s))}}))})}};O3.PREFIX=">",O3.TFIDF_THRESHOLD=.5,O3.TFIDF_MAX_RESULTS=5,O3.WORD_FILTER=jo(qo,(function(e,t,i=!1){if(!t||0===t.length)return null;let n=null,s=0;for(e=e.toLowerCase(),t=t.toLowerCase();sthis.updateConfiguration(e))))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=M3.getConfiguredCommandHistoryLength(this.configurationService),M3.cache&&M3.cache.limit!==this.configuredCommandsHistoryLength&&(M3.cache.limit=this.configuredCommandsHistoryLength,M3.saveState(this.storageService)))}load(){const e=this.storageService.get(M3.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(n){}const i=M3.cache=new Ks(this.configuredCommandsHistoryLength,1);if(t){let e;e=t.usesLRU?t.entries:t.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}M3.counter=this.storageService.getNumber(M3.PREF_KEY_COUNTER,0,M3.counter)}push(e){M3.cache&&(M3.cache.set(e,M3.counter++),M3.saveState(this.storageService))}peek(e){var t;return null===(t=M3.cache)||void 0===t?void 0:t.peek(e)}static saveState(e){if(!M3.cache)return;const t={usesLRU:!0,entries:[]};M3.cache.forEach(((e,i)=>t.entries.push({key:i,value:e}))),e.store(M3.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(M3.PREF_KEY_COUNTER,M3.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const n=null===(i=null===(t=e.getValue().workbench)||void 0===t?void 0:t.commandPalette)||void 0===i?void 0:i.history;return"number"==typeof n?n:M3.DEFAULT_COMMANDS_HISTORY_LENGTH}};P3.DEFAULT_COMMANDS_HISTORY_LENGTH=50,P3.PREF_KEY_CACHE="commandPalette.mru.cache",P3.PREF_KEY_COUNTER="commandPalette.mru.counter",P3.counter=1,P3=M3=T3([R3(0,qN),R3(1,uu)],P3);class F3 extends O3{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:oa(i.label)||i.id});return t}}var B3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W3=function(e,t){return function(i,n){t(i,n,e)}},V3=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let H3=class extends F3{get activeTextEditorControl(){var e;return null!==(e=this.codeEditorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}constructor(e,t,i,n,s,o){super({showAlias:!1},e,i,n,s,o),this.codeEditorService=t}getCommandPicks(){return V3(this,void 0,void 0,(function*(){return this.getCodeEditorCommandPicks()}))}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return V3(this,void 0,void 0,(function*(){return[]}))}};H3=B3([W3(0,Oa),W3(1,Fa),W3(2,PL),W3(3,Ga),W3(4,rh),W3(5,L3)],H3);class z3 extends _h{constructor(){super({id:z3.ID,label:TJ.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:Rh.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(lE).quickAccess.show(H3.PREFIX)}}z3.ID="editor.action.quickCommand",yh(z3),Ul.as(NJ).registerQuickAccessProvider({ctor:H3,prefix:H3.PREFIX,helpEntries:[{description:TJ.quickCommandHelp,commandId:z3.ID}]});var U3,K3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},j3=function(e,t){return function(i,n){t(i,n,e)}};let q3=U3=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Ul.as(NJ)}provide(e){const t=new N;return t.add(e.onDidAccept((()=>{const[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),t.add(e.onDidChangeValue((e=>{const t=this.registry.getQuickAccessProvider(e.substr(U3.PREFIX.length));t&&t.prefix&&t.prefix!==U3.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),e.items=this.getQuickAccessProviders().filter((e=>e.prefix!==U3.PREFIX)),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)))}createPicks(e){return e.helpEntries.map((t=>{const i=t.prefix||e.prefix,n=i||"\u2026";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:ue(0,"{0}, {1}",n,t.description),description:t.description}}))}};q3.PREFIX="?",q3=U3=K3([j3(0,lE),j3(1,PL)],q3),Ul.as(NJ).registerQuickAccessProvider({ctor:q3,prefix:"",helpEntries:[{description:MJ.helpQuickAccessActionLabel}]});const $3=[void 0,[]];function G3(e,t,i=0,n=0){const s=t;return s.values&&s.values.length>1?function(e,t,i,n){let s=0;const o=[];for(const r of t){const[t,a]=Z3(e,r,i,n);if("number"!=typeof t)return $3;s+=t,o.push(...a)}return[s,Y3(o)]}(e,s.values,i,n):Z3(e,t,i,n)}function Z3(e,t,i,n){const s=Tr(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],fr(s)]:$3}Object.freeze({score:0});function Y3(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const s of t)n&&X3(n,s)?(n.start=Math.min(n.start,s.start),n.end=Math.max(n.end,s.end)):(n=s,i.push(s));return i}function X3(e,t){return!(e.end=0,r=Q3(e);let a;const l=e.split(" ");if(l.length>1)for(const h of l){const e=Q3(h),{pathNormalized:t,normalized:i,normalizedLowercase:n}=e6(h);i&&(a||(a=[]),a.push({original:h,originalLowercase:h.toLowerCase(),pathNormalized:t,normalized:i,normalizedLowercase:n,expectContiguousMatch:e}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:s,values:a,containsPathSeparator:o,expectContiguousMatch:r}}function e6(e){let t;t=Oe?e.replace(/\//g,Ji):e.replace(/\\/g,Ji);const i=(n=t,n.replace(/\*/g,"")).replace(/\s|"/g,"");var n;return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function t6(e){return Array.isArray(e)?J3(e.map((e=>e.original)).join(" ")):J3(e.original)}var i6,n6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},s6=function(e,t){return function(i,n){t(i,n,e)}},o6=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let r6=i6=class extends kJ{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,ue(0,"To go to a symbol, first open a text editor with symbol information.")),E.None}provideWithTextEditor(e,t,i){const n=e.editor,s=this.getModel(n);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,i):this.doProvideWithoutEditorSymbols(e,s,t,i):E.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new N;return this.provideLabelPick(i,ue(0,"The active text editor does not provide symbol information.")),(()=>{o6(this,void 0,void 0,(function*(){(yield this.waitForLanguageSymbolRegistry(t,s))&&!n.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,i,n))}))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return o6(this,void 0,void 0,(function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new ad,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))})));return t.add(x((()=>i.complete(!1)))),i.p}))}doProvideWithEditorSymbols(e,t,i,n){var s;const o=e.editor,r=new N;r.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),t.inBackground||i.hide())}))),r.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const a=this.getDocumentSymbols(t,n);let l;const h=e=>o6(this,void 0,void 0,(function*(){null==l||l.dispose(!0),i.busy=!1,l=new Uh(n),i.busy=!0;try{const t=J3(i.value.substr(i6.PREFIX.length).trim()),s=yield this.doGetSymbolPicks(a,t,void 0,l.token);if(n.isCancellationRequested)return;if(s.length>0){if(i.items=s,e&&0===t.original.length){const t=uc(s,(t=>Boolean("separator"!==t.type&&t.range&&Mh.containsPosition(t.range.decoration,e))));t&&(i.activeItems=[t])}}else t.original.length>0?this.provideLabelPick(i,ue(0,"No matching editor symbols")):this.provideLabelPick(i,ue(0,"No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}}));return r.add(i.onDidChangeValue((()=>h(void 0)))),h(null===(s=o.getSelection())||void 0===s?void 0:s.getPosition()),r.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;e&&e.range&&(o.revealRangeInCenter(e.range.selection,0),this.addDecorations(o,e.range.decoration))}))),r}doGetSymbolPicks(e,t,i,n){var s,o;return o6(this,void 0,void 0,(function*(){const r=yield e;if(n.isCancellationRequested)return[];const a=0===t.original.indexOf(i6.SCOPE_PREFIX),l=a?1:0;let h,d,c;t.values&&t.values.length>1?(h=t6(t.values[0]),d=t6(t.values.slice(1))):h=t;const u=null===(o=null===(s=this.options)||void 0===s?void 0:s.openSideBySideDirection)||void 0===o?void 0:o.call(s);u&&(c=[{iconClass:"right"===u?ea.asClassName(Qr.splitHorizontal):ea.asClassName(Qr.splitVertical),tooltip:ue(0,"right"===u?"Open to the Side":"Open to the Bottom")}]);const g=[];for(let v=0;vl){let E=!1;if(h!==t&&([S,L]=G3(w,Object.assign(Object.assign({},t),{values:void 0}),l,y),"number"==typeof S&&(E=!0)),"number"!=typeof S&&([S,L]=G3(w,h,l,y),"number"!=typeof S))continue;if(!E&&d){if(x&&d.original.length>0&&([k,D]=G3(x,d)),"number"!=typeof k)continue;"number"==typeof S&&(S+=k)}}const N=b.tags&&b.tags.indexOf(1)>=0;g.push({index:v,kind:b.kind,score:S,label:w,ariaLabel:(p=b.name,m=b.kind,ue(0,"{0} ({1})",p,CC[m])),description:x,highlights:N?void 0:{label:L,description:D},range:{selection:Mh.collapseToStart(b.selectionRange),decoration:b.range},strikethrough:N,buttons:c})}var p,m;const f=g.sort(((e,t)=>a?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let _=[];if(a){let I,M,T=0;function R(){M&&"number"==typeof I&&T>0&&(M.label=Xs(l6[I]||a6,T))}for(const A of f)I!==A.kind?(R(),I=A.kind,T=1,M={type:"separator"},_.push(M)):T++,_.push(A);R()}else f.length>0&&(_=[{label:ue(0,"symbols ({0})",g.length),type:"separator"},...f]);return _}))}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=l6[e.kind]||a6,n=l6[t.kind]||a6,s=i.localeCompare(n);return 0===s?this.compareByScore(e,t):s}getDocumentSymbols(e,t){return o6(this,void 0,void 0,(function*(){const i=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}))}};r6.PREFIX="@",r6.SCOPE_PREFIX=":",r6.PREFIX_BY_CATEGORY=`${i6.PREFIX}${i6.SCOPE_PREFIX}`,r6=i6=n6([s6(0,iL),s6(1,yZ)],r6);const a6=ue(0,"properties ({0})"),l6={5:ue(0,"methods ({0})"),11:ue(0,"functions ({0})"),8:ue(0,"constructors ({0})"),12:ue(0,"variables ({0})"),4:ue(0,"classes ({0})"),22:ue(0,"structs ({0})"),23:ue(0,"events ({0})"),24:ue(0,"operators ({0})"),10:ue(0,"interfaces ({0})"),2:ue(0,"namespaces ({0})"),3:ue(0,"packages ({0})"),25:ue(0,"type parameters ({0})"),1:ue(0,"modules ({0})"),6:ue(0,"properties ({0})"),9:ue(0,"enumerations ({0})"),21:ue(0,"enumeration members ({0})"),14:ue(0,"strings ({0})"),0:ue(0,"files ({0})"),17:ue(0,"arrays ({0})"),15:ue(0,"numbers ({0})"),16:ue(0,"booleans ({0})"),18:ue(0,"objects ({0})"),19:ue(0,"keys ({0})"),7:ue(0,"fields ({0})"),13:ue(0,"constants ({0})")};var h6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},d6=function(e,t){return function(i,n){t(i,n,e)}};let c6=class extends r6{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=B.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};c6=h6([d6(0,Fa),d6(1,iL),d6(2,yZ)],c6);class u6 extends _h{constructor(){super({id:u6.ID,label:RJ.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:Rh.hasDocumentSymbolProvider,kbOpts:{kbExpr:Rh.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(lE).quickAccess.show(r6.PREFIX,{itemActivation:aE.NONE})}}u6.ID="editor.action.quickOutline",yh(u6),Ul.as(NJ).registerQuickAccessProvider({ctor:c6,prefix:r6.PREFIX,helpEntries:[{description:RJ.quickOutlineActionLabel,prefix:r6.PREFIX,commandId:u6.ID},{description:RJ.quickOutlineByCategoryActionLabel,prefix:r6.PREFIX_BY_CATEGORY}]});class g6 extends E{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=iD.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(91);t||(t=this.editor.isSimpleWidget?new Ia(ue(0,"Cannot edit in read-only input")):new Ia(ue(0,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}g6.ID="editor.contrib.readOnlyMessageController",Lh(g6.ID,g6,2);var p6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m6=function(e,t){return function(i,n){t(i,n,e)}};let f6=class extends _U{constructor(e,t,i,n,s,o,r){super(!0,e,t,i,n,s,o,r)}};f6=p6([m6(1,Rl),m6(2,Fa),m6(3,uL),m6(4,Oa),m6(5,qN),m6(6,uu)],f6),Lh(_U.ID,f6,4);var _6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},v6=function(e,t){return function(i,n){t(i,n,e)}};const b6=new Tl("renameInputVisible",!1,ue(0,"Whether the rename input widget is visible"));let C6=class{constructor(e,t,i,n,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new N,this.allowEditorOverflow=!0,this._visibleContextKey=b6.bindTo(s),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",ue(0,"Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,i,n,s;if(!this._input||!this._domNode)return;const o=e.getColor(Mp),r=e.getColor(Tp);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(ym))&&void 0!==t?t:""),this._domNode.style.boxShadow=o?` 0 0 8px 2px ${o}`:"",this._domNode.style.border=r?`1px solid ${r}`:"",this._domNode.style.color=String(null!==(i=e.getColor(Ap))&&void 0!==i?i:""),this._input.style.backgroundColor=String(null!==(n=e.getColor(Rp))&&void 0!==n?n:"");const a=e.getColor(Op);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=null!==(s=null==a?void 0:a.toString())&&void 0!==s?s:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(50);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=.8*e.fontSize+"px"}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;const[i,n]=this._acceptKeybindings;return this._label.innerText=ue(0,"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(n))||void 0===t?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;null===(t=this._currentAcceptInput)||void 0===t||t.call(this,e)}cancelInput(e){var t;null===(t=this._currentCancelInput)||void 0===t||t.call(this,e)}getInput(e,t,i,n,s,o){this._domNode.classList.toggle("preview",s),this._position=new Ba(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const r=new N;return new Promise((e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=i=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:s&&i})):this.cancelInput(!0)},r.add(o.onCancellationRequested((()=>this.cancelInput(!0)))),r.add(this._editor.onDidBlurEditorWidget((()=>{var e;return this.cancelInput(!(null===(e=this._domNode)||void 0===e?void 0:e.ownerDocument.hasFocus()))}))),this._show()})).finally((()=>{r.dispose(),this._hide()}))}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))}),100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};C6=_6([v6(2,R_),v6(3,PL),v6(4,Rl)],C6);var w6,y6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},S6=function(e,t){return function(i,n){t(i,n,e)}},L6=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class k6{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return L6(this,void 0,void 0,(function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:Mh.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}))}provideRenameEdits(e,t){return L6(this,void 0,void 0,(function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}))}_provideRenameEdits(e,t,i,n){return L6(this,void 0,void 0,(function*(){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join("\n")};const o=yield s.provideRenameEdits(this.model,this.position,e,n);return o?o.rejectReason?this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n):o:this._provideRenameEdits(e,t+1,i.concat(ue(0,"No result.")),n)}))}}let D6=w6=class{static get(e){return e.getContribution(w6.ID)}constructor(e,t,i,n,s,o,r,a){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=o,this._configService=r,this._languageFeaturesService=a,this._disposableStore=new N,this._cts=new Uh,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(C6,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return L6(this,void 0,void 0,(function*(){if(this._cts.dispose(!0),this._cts=new Uh,!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new k6(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;const s=new aL(this.editor,5,void 0,this._cts.token);let o;try{const e=n.resolveRenameLocation(s.token);this._progressService.showWhile(e,250),o=yield e}catch(Dre){return void(null===(e=iD.get(this.editor))||void 0===e||e.showMessage(Dre||ue(0,"An unknown error occurred while resolving rename location"),i))}finally{s.dispose()}if(!o)return;if(o.rejectReason)return void(null===(t=iD.get(this.editor))||void 0===t||t.showMessage(o.rejectReason,i));if(s.token.isCancellationRequested)return;const r=new aL(this.editor,5,o.range,this._cts.token),a=this.editor.getSelection();let l=0,h=o.text.length;Mh.isEmpty(a)||Mh.spansMultipleLines(a)||!Mh.containsRange(o.range,a)||(l=Math.max(0,a.startColumn-o.range.startColumn),h=Math.min(o.range.endColumn,a.endColumn)-o.range.startColumn);const d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),c=yield this._renameInputField.getInput(o.range,o.text,l,h,d,r.token);if("boolean"==typeof c)return c&&this.editor.focus(),void r.dispose();this.editor.focus();const u=Zh(n.provideRenameEdits(c.newName,r.token),r.token).then((e=>L6(this,void 0,void 0,(function*(){e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):(this.editor.setSelection(Mh.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(e,{editor:this.editor,showPreview:c.wantsPreview,label:ue(0,"Renaming '{0}' to '{1}'",null==o?void 0:o.text,c.newName),code:"undoredo.rename",quotableLabel:ue(0,"Renaming {0} to {1}",null==o?void 0:o.text,c.newName),respectAutoSaveConfig:!0}).then((e=>{e.ariaSummary&&Os(ue(0,"Successfully renamed '{0}' to '{1}'. Summary: {2}",o.text,c.newName,e.ariaSummary))})).catch((e=>{this._notificationService.error(ue(0,"Rename failed to apply edits")),this._logService.error(e)}))))}))),(e=>{this._notificationService.error(ue(0,"Rename failed to compute edits")),this._logService.error(e)})).finally((()=>{r.dispose()}));return this._progressService.showWhile(u,250),u}))}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};D6.ID="editor.contrib.renameController",D6=w6=y6([S6(1,Oa),S6(2,uL),S6(3,QS),S6(4,mL),S6(5,ah),S6(6,cT),S6(7,iL)],D6);Lh(D6.ID,D6,4),yh(class extends _h{constructor(){super({id:"editor.action.rename",label:ue(0,"Rename Symbol"),alias:"Rename Symbol",precondition:ul.and(Rh.writable,Rh.hasRenameProvider),kbOpts:{kbExpr:Rh.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(Fa),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return an.isUri(n)&&Ba.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(s),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r):super.runCommand(e,t)}run(e,t){const i=D6.get(t);return i?i.run():Promise.resolve()}});const x6=fh.bindToContribution(D6.get);wh(new x6({id:"acceptRenameInput",precondition:b6,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:ul.and(Rh.focus,ul.not("isComposing")),primary:3}})),wh(new x6({id:"acceptRenameInputWithPreview",precondition:ul.and(b6,ul.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:ul.and(Rh.focus,ul.not("isComposing")),primary:1027}})),wh(new x6({id:"cancelRenameInput",precondition:b6,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:Rh.focus,primary:9,secondary:[1033]}})),Ch("_executeDocumentRenameProvider",(function(e,t,i,...n){const[s]=n;jr("string"==typeof s);const{renameProvider:o}=e.get(iL);return function(e,t,i,n){return L6(this,void 0,void 0,(function*(){const s=new k6(t,i,e),o=yield s.resolveRenameLocation(Hh.None);return(null==o?void 0:o.rejectReason)?{edits:[],rejectReason:o.rejectReason}:s.provideRenameEdits(n,Hh.None)}))}(o,t,i,s)})),Ch("_executePrepareRename",(function(e,t,i){return L6(this,void 0,void 0,(function*(){const{renameProvider:n}=e.get(iL),s=new k6(t,i,n),o=yield s.resolveRenameLocation(Hh.None);if(null==o?void 0:o.rejectReason)throw new Error(o.rejectReason);return o}))})),Ul.as(ku).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:ue(0,"Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});class N6{static create(e,t){return new N6(e,new E6(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new Mh(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,s,o]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new N6(this._startLineNumber,n),new N6(this._startLineNumber+o,s)]}applyEdit(e,t){const[i,n,s]=ac(t);this.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new Ba(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(0===t&&0===i)return;const o=e.lineNumber-this._startLineNumber;if(o<0)return void(this._startLineNumber+=t);o>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(o,e.column-1,t,i,n,s)}}class E6{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let s=n;for(;s>t&&this._getDeltaLine(s-1)===e;)s--;let o=n;for(;oe||d===e&&u>=t)&&(de||r===e&&g>=t){if(rs?p-=s-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>s)){h=!0;continue}p-=s-i}else if(us)){h=!0;continue}u=t,g=i,p=g+(p-s)}else if(u>n){if(0===a&&!h){l=r;break}u-=a}else{if(!(u===n&&g>=s))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=s-i,p-=s-i}const f=4*l;o[f]=u,o[f+1]=g,o[f+2]=p,o[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,s,o){const r=0===i&&1===n&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),a=this._tokens,l=this._tokenCount;for(let h=0;h=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},T6=function(e,t){return function(i,n){t(i,n,e)}};let R6=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new P6}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),s=this._hashTable.get(e,t,n);let o;if(s)o=s.metadata,this._logService.getLevel()===lh.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${jg.getForeground(o)}, fontStyle ${jg.getFontStyle(o).toString(2)}`);else{let s=this._legend.tokenTypes[e];const r=[];if(s){let e=t;for(let t=0;e>0&&t>=1;e>0&&this._logService.getLevel()===lh.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),r.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(s,r,i);if(void 0===n)o=2147483647;else{if(o=0,void 0!==n.italic){o|=1|(n.italic?1:0)<<11}if(void 0!==n.bold){o|=2|(n.bold?2:0)<<11}if(void 0!==n.underline){o|=4|(n.underline?4:0)<<11}if(void 0!==n.strikethrough){o|=8|(n.strikethrough?8:0)<<11}if(n.foreground){o|=16|n.foreground<<15}0===o&&(o=2147483647)}}else this._logService.getLevel()===lh.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),o=2147483647,s="not-in-legend";this._hashTable.add(e,t,n,o),this._logService.getLevel()===lh.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${s}) / ${t} (${r.join(" ")}): foreground ${jg.getForeground(o)}, fontStyle ${jg.getFontStyle(o).toString(2)}`)}return o}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};function A6(e,t,i){const n=e.data,s=e.data.length/5|0,o=Math.max(Math.ceil(s/1024),400),r=[];let a=0,l=1,h=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=d;for(;e+1d)t.warnOverlappingSemanticTokens(r,d+1);else{const e=t.getMetadata(_,v,i);2147483647!==e&&(0===g&&(g=r),c[u]=r-g,c[u+1]=d,c[u+2]=f,c[u+3]=e,u+=4,p=r,m=f)}l=r,h=d,a++}u!==c.length&&(c=c.subarray(0,u));const f=N6.create(g,c);r.push(f)}return r}R6=M6([T6(1,R_),T6(2,yc),T6(3,ah)],R6);class O6{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class P6{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=P6._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=P6._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10?i[0]:[]}(e,t),r=yield Promise.all(o.map((e=>B6(this,void 0,void 0,(function*(){let o,r=null;try{o=yield e.provideDocumentSemanticTokens(t,e===i?n:null,s)}catch(a){r=a,o=null}return o&&(W6(o)||V6(o))||(o=null),new H6(e,o,r)})))));for(const e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}))}class K6{constructor(e,t){this.provider=e,this.tokens=t}}function j6(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}function q6(e,t,i,n){return B6(this,void 0,void 0,(function*(){const s=j6(e,t),o=yield Promise.all(s.map((e=>B6(this,void 0,void 0,(function*(){let s;try{s=yield e.provideDocumentRangeSemanticTokens(t,i,n)}catch(o){a(o),s=null}return s&&W6(s)||(s=null),new K6(e,s)})))));for(const e of o)if(e.tokens)return e;return o.length>0?o[0]:null}))}Za.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>B6(void 0,void 0,void 0,(function*(){const[i]=t;jr(i instanceof an);const n=e.get(Wa).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=e.get(iL),o=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(s,n);return o?o[0].getLegend():e.get(Ga).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),Za.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>B6(void 0,void 0,void 0,(function*(){const[i]=t;jr(i instanceof an);const n=e.get(Wa).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=e.get(iL);if(!z6(s,n))return e.get(Ga).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const o=yield U6(s,n,null,null,Hh.None);if(!o)return;const{provider:r,tokens:a}=o;if(!a||!W6(a))return;const l=F6({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l})))),Za.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>B6(void 0,void 0,void 0,(function*(){const[i,n]=t;jr(i instanceof an);const s=e.get(Wa).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:o}=e.get(iL),r=j6(o,s);if(0===r.length)return;if(1===r.length)return r[0].getLegend();if(!n||!Mh.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=yield q6(o,s,Mh.lift(n),Hh.None);return a?a.provider.getLegend():void 0})))),Za.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>B6(void 0,void 0,void 0,(function*(){const[i,n]=t;jr(i instanceof an),jr(Mh.isIRange(n));const s=e.get(Wa).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:o}=e.get(iL),r=yield q6(o,s,Mh.lift(n),Hh.None);return r&&r.tokens?F6({id:0,type:"full",data:r.tokens.data}):void 0}))));const $6=Pa("semanticTokensStylingService"),G6="editor.semanticHighlighting";function Z6(e,t,i){var n;const s=null===(n=i.getValue(G6,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof s?s:t.getColorTheme().semanticHighlighting}var Y6,X6=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Q6=function(e,t){return function(i,n){t(i,n,e)}};let J6=class extends E{constructor(e,t,i,n,s,o){super(),this._watchers=Object.create(null);const r=t=>{this._watchers[t.uri.toString()]=new e9(t,e,i,s,o)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];Z6(e,i,n)?t||r(e):t&&a(e,t)}};this._register(t.onModelAdded((e=>{Z6(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(G6)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};J6=X6([Q6(0,$6),Q6(1,Wa),Q6(2,R_),Q6(3,uu),Q6(4,CE),Q6(5,iL)],J6);let e9=Y6=class extends E{constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:Y6.REQUEST_MIN_DELAY,max:Y6.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new sd((()=>this._fetchDocumentSemanticTokensNow()),Y6.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeAttached((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const o=()=>{k(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of this._provider.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};o(),this._register(this._provider.onDidChange((()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(i.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),k(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!z6(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));if(!this._model.isAttachedToEditor())return;const e=new Uh,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=U6(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const s=[],o=this._model.onDidChangeContent((e=>{s.push(e)})),a=new F(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,s)}else this._setDocumentSemanticTokens(null,null,null,s)}),(e=>{e&&(d(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||r(e),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),(s.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let o=0;o{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.tokenization.setSemanticTokens(null,!0),void o();if(V6(t)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const n=s.data,o=new Uint32Array(n.length+e);let r=n.length,a=o.length;for(let l=t.edits.length-1;l>=0;l--){const e=t.edits[l];if(e.start>n.length)return i.warnInvalidEditStart(s.resultId,t.resultId,l,e.start,n.length),void this._model.tokenization.setSemanticTokens(null,!0);const h=r-(e.start+e.deleteCount);h>0&&(Y6._copy(n,r-h,o,a-h,h),a-=h),e.data&&(Y6._copy(e.data,0,o,a-e.data.length,e.data.length),a-=e.data.length),r=e.start}r>0&&Y6._copy(n,0,o,0,r),t={resultId:t.resultId,data:o}}}if(W6(t)){this._currentDocumentResponse=new t9(e,t.resultId,t.data);const s=A6(t,i,this._model.getLanguageId());if(n.length>0)for(const e of n)for(const t of s)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(s,!0)}else this._model.tokenization.setSemanticTokens(null,!0);o()}else this._model.tokenization.setSemanticTokens(null,!1)}};e9.REQUEST_MIN_DELAY=300,e9.REQUEST_MAX_DELAY=2e3,e9=Y6=X6([Q6(1,$6),Q6(2,R_),Q6(3,CE),Q6(4,iL)],e9);class t9{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}DT(J6);var i9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},n9=function(e,t){return function(i,n){t(i,n,e)}};let s9=class extends E{constructor(e,t,i,n,s,o){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=o.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new sd((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const r=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{r()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),r()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),r()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),r()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(G6)&&(this._cancelAll(),r())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),r()}))),r()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),n=Gh((i=>Promise.resolve(q6(this._provider,e,t,i)))),s=new F(!1);return n.then((n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:o,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,A6(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(n)),(()=>this._removeOutstandingRequest(n))),n}};s9.ID="editor.contrib.viewportSemanticTokens",s9=i9([n9(1,$6),n9(2,R_),n9(3,uu),n9(4,CE),n9(5,iL)],s9),Lh(s9.ID,s9,1);class o9{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:o}=n,r=i.column-o;let a=r,l=r,h=0;for(;a>=0;a--){const e=s.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if(po(e)&&mo(h))break;h=e}for(a+=1;l0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new Mh(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var r9,a9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},l9=function(e,t){return function(i,n){t(i,n,e)}},h9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class d9{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new d9(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let c9=r9=class{static get(e){return e.getContribution(r9.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}run(e){return h9(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||(yield g9(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(112),Hh.None).then((e=>{var i;if(Wd(e)&&e.length===t.length&&this._editor.hasModel()&&Id(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new d9(0,e))),null===(i=this._selectionListener)||void 0===i||i.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}}))),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const n=this._state.map((e=>Th.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}))}};c9.ID="editor.contrib.smartSelectController",c9=r9=a9([l9(1,iL)],c9);class u9 extends _h{constructor(e,t){super(t),this._forward=e}run(e,t){return h9(this,void 0,void 0,(function*(){const e=c9.get(t);e&&(yield e.run(this._forward))}))}}Za.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");function g9(e,t,i,n,s){return h9(this,void 0,void 0,(function*(){const o=e.all(t).concat(new o9(n.selectSubwords));1===o.length&&o.unshift(new I2);const r=[],l=[];for(const e of o)r.push(Promise.resolve(e.provideSelectionRanges(t,i,s)).then((e=>{if(Wd(e)&&e.length===i.length)for(let t=0;t{if(0===e.length)return[];e.sort(((e,t)=>Ba.isBefore(e.getStartPosition(),t.getStartPosition())?1:Ba.isBefore(t.getStartPosition(),e.getStartPosition())||Ba.isBefore(e.getEndPosition(),t.getEndPosition())?-1:Ba.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let s;for(const t of e)(!s||Mh.containsRange(t,s)&&!Mh.equalsRange(t,s))&&(i.push(t),s=t);if(!n.selectLeadingAndTrailingWhitespace)return i;const o=[i[0]];for(let n=1;ne}),v9="data-sticky-line-index",b9="data-sticky-is-line",C9="data-sticky-is-folding-icon";class w9 extends E{constructor(e){super(),this._editor=e,this._foldingIconStore=new N,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof cW),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(114)&&t(),e.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))}))),this._register(this._editor.onDidScrollChange((e=>{e.scrollLeftChanged&&t(),e.scrollWidthChanged&&this._updateWidgetWidth()}))),this._register(this._editor.onDidChangeModel((()=>{t(),this._updateWidgetWidth()}))),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange((e=>{this._updateWidgetWidth()}))),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(e){return this._stickyLines.find((t=>t.lineNumber===e))}getCurrentLines(){return this._lineNumbers}setState(e,t,i=1/0){if((!this._previousState&&!e||this._previousState&&this._previousState.equals(e))&&i===1/0)return;this._previousState=e;const n=this._stickyLines;if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const t=[...e.startLineNumbers];null!==e.showEndForLine&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=t}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(n,t,i)}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",this._editor.getScrollWidth()-e.verticalScrollbarWidth+"px"),this._rootDomNode.style.width=e.width-e.verticalScrollbarWidth+"px"}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),Dn(this._lineNumbersDomNode),Dn(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._stickyLines){const i=t.foldingIcon;i&&i.setVisible(!!e||i.isCollapsed)}}_renderRootNode(e,t,i=1/0){return m9(this,void 0,void 0,(function*(){const n=this._editor.getLayoutInfo();for(const[o,r]of this._lineNumbers.entries()){const s=e[o],a=r>=i||(null==s?void 0:s.lineNumber)!==r?this._renderChildNode(o,r,t,n):this._updateTopAndZIndexOfStickyLine(s);a&&(this._linesDomNode.appendChild(a.lineDomNode),this._lineNumbersDomNode.appendChild(a.lineNumberDomNode),this._stickyLines.push(a))}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const s=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;0!==s?(this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${s}px`,this._linesDomNodeScrollable.style.height=`${s}px`,this._rootDomNode.style.height=`${s}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)):this._clearStickyWidget()}))}_setFoldingHoverListeners(){"mouseover"===this._editor.getOption(109)&&(this._foldingIconStore.add(En(this._lineNumbersDomNode,os.MOUSE_ENTER,(e=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)}))),this._foldingIconStore.add(En(this._lineNumbersDomNode,os.MOUSE_LEAVE,(()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)}))))}_renderChildNode(e,t,i,n){const s=this._editor._getViewModel();if(!s)return;const o=s.coordinatesConverter.convertModelPositionToViewPosition(new Ba(t,1)).lineNumber,r=s.getViewLineRenderingData(o),a=this._editor.getOption(67);let l;try{l=fA.filter(r.inlineDecorations,o,r.minColumn,r.maxColumn)}catch(b){l=[]}const h=new yA(!0,!0,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,0,r.tokens,l,r.tabSize,r.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new Qc(2e3),c=DA(h,d);let u;u=_9?_9.createHTML(d.build()):d.build();const g=document.createElement("span");g.setAttribute(v9,String(e)),g.setAttribute(b9,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=u;const p=document.createElement("span");p.setAttribute(v9,String(e)),p.setAttribute("data-sticky-is-line-number",""),p.className="sticky-line-number",p.style.lineHeight=`${this._lineHeight}px`;const m=n.contentLeft;p.style.width=`${m}px`;const f=document.createElement("span");1===a.renderType||3===a.renderType&&t%10==0?f.innerText=t.toString():2===a.renderType&&(f.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),f.className="sticky-line-number-inner",f.style.lineHeight=`${this._lineHeight}px`,f.style.width=`${n.lineNumbersWidth}px`,f.style.paddingLeft=`${n.lineNumbersLeft}px`,p.appendChild(f);const _=this._renderFoldingIconForLine(i,t);_&&p.appendChild(_.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(f),p.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const v=new y9(e,t,g,p,_,c.characterMapping);return this._updateTopAndZIndexOfStickyLine(v)}_updateTopAndZIndexOfStickyLine(e){var t;const i=e.index,n=e.lineDomNode,s=e.lineNumberDomNode,o=i===this._lineNumbers.length-1;n.style.zIndex=o?"0":"1",s.style.zIndex=o?"0":"1";const r=`${i*this._lineHeight+this._lastLineRelativePosition+((null===(t=e.foldingIcon)||void 0===t?void 0:t.isCollapsed)?1:0)}px`,a=i*this._lineHeight+"px";return n.style.top=o?r:a,s.style.top=o?r:a,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(109);if(!e||"never"===i)return;const n=e.regions,s=n.findRange(t),o=n.getStartLineNumber(s);if(!(t===o))return;const r=n.isCollapsed(s),a=new S9(r,o,n.getEndLineNumber(s),this._lineHeight);return a.setVisible(!!this._isOnGlyphMargin||(r||"always"===i)),a.domNode.setAttribute(C9,""),a}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=zA(t.characterMapping,e,0);return new Ba(t.lineNumber,i)}getLineNumberFromChildDomNode(e){var t,i;return null!==(i=null===(t=this._getRenderedStickyLineFromChildDomNode(e))||void 0===t?void 0:t.lineNumber)&&void 0!==i?i:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return null===t||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,v9);return t?parseInt(t,10):null}isInStickyLine(e){return void 0!==this._getAttributeValue(e,b9)}isInFoldingIconDomNode(e){return void 0!==this._getAttributeValue(e,C9)}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(null!==i)return i;e=e.parentElement}}}class y9{constructor(e,t,i,n,s,o){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=s,this.characterMapping=o}}class S9{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=ea.asClassName(e?UQ:zQ)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class L9{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class k9{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class D9{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var x9,N9,E9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},I9=function(e,t){return function(i,n){t(i,n,e)}},M9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e.OUTLINE_MODEL="outlineModel",e.FOLDING_PROVIDER_MODEL="foldingProviderModel",e.INDENTATION_MODEL="indentationModel"}(x9||(x9={})),function(e){e[e.VALID=0]="VALID",e[e.INVALID=1]="INVALID",e[e.CANCELED=2]="CANCELED"}(N9||(N9={}));let T9=class extends E{constructor(e,t,i,n){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=i,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Xh(300)),this._updateOperation=this._register(new N);const s=new A9(i),o=new F9(this._editor,i),r=new P9(this._editor,t);switch(n){case x9.OUTLINE_MODEL:this._modelProviders.push(s),this._modelProviders.push(o),this._modelProviders.push(r);break;case x9.FOLDING_PROVIDER_MODEL:this._modelProviders.push(o),this._modelProviders.push(r);break;case x9.INDENTATION_MODEL:this._modelProviders.push(r)}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,i){return M9(this,void 0,void 0,(function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger((()=>M9(this,void 0,void 0,(function*(){for(const n of this._modelProviders){const{statusPromise:s,modelPromise:o}=n.computeStickyModel(e,t,i);this._modelPromise=o;const r=yield s;if(this._modelPromise!==o)return null;switch(r){case N9.CANCELED:return this._updateOperation.clear(),null;case N9.VALID:return n.stickyModel}}return null})))).catch((e=>(r(e),null)))}))}};T9=E9([I9(1,Xu),I9(2,iL)],T9);class R9{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,N9.INVALID}computeStickyModel(e,t,i){if(i.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};const n=Gh((i=>this.createModelFromProvider(e,t,i)));return{statusPromise:n.then((n=>this.isModelValid(n)?i.isCancellationRequested?N9.CANCELED:(this._stickyModel=this.createStickyModel(e,t,i,n),N9.VALID):this._invalid())).then(void 0,(e=>(r(e),N9.CANCELED))),modelPromise:n}}isModelValid(e){return!0}isProviderValid(e){return!0}}let A9=class extends R9{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,i){return wZ.create(this._languageFeaturesService.documentSymbolProvider,e,i)}createStickyModel(e,t,i,n){var s;const{stickyOutlineElement:o,providerID:r}=this._stickyModelFromOutlineModel(n,null===(s=this._stickyModel)||void 0===s?void 0:s.outlineProviderId);return new D9(e.uri,t,o,r)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(v.first(e.children.values())instanceof CZ){const n=v.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,s="",o=-1;for(const[t,i]of e.children.entries()){const e=this._findSumOfRangesOfGroup(i);e>o&&(n=i,o=e,s=i.id)}t=s,i=n.children}}else i=e.children;const n=[],s=Array.from(i.values()).sort(((e,t)=>{const i=new L9(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new L9(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this._comparator(i,n)}));for(const o of s)n.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new k9(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const s of e.children.values())if(s.symbol.selectionRange.startLineNumber!==s.symbol.range.endLineNumber)if(s.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(s,s.symbol.selectionRange.startLineNumber));else for(const e of s.children.values())i.push(this._stickyModelFromOutlineElement(e,s.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this._comparator(e.range,t.range)));const n=new L9(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new k9(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof bZ?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};A9=E9([I9(0,iL)],A9);class O9 extends R9{constructor(e){super(),this._foldingLimitReporter=new nJ(e)}createStickyModel(e,t,i,n){const s=this._fromFoldingRegions(n);return new D9(e.uri,t,s,void 0)}isModelValid(e){return null!==e}_fromFoldingRegions(e){const t=e.length,i=[],n=new k9(void 0,[],void 0);for(let s=0;s0}createModelFromProvider(e,t,i){const n=iJ.getFoldingRangeProviders(this._languageFeaturesService,e);return new ZQ(e,n,(()=>this.createModelFromProvider(e,t,i)),this._foldingLimitReporter,void 0).compute(i)}};F9=E9([I9(1,iL)],F9);var B9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W9=function(e,t){return function(i,n){t(i,n,e)}},V9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class H9{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let z9=class extends E{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new U),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new N),this._updateSoon=this._register(new sd((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(114)&&this.readConfiguration()}))),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new T9(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel((()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()}))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas((()=>this.update()))),this._sessionStore.add(this._editor.onDidChangeModelContent((()=>this._updateSoon.schedule()))),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>this.update()))),this.update())}getVersionId(){var e;return null===(e=this._model)||void 0===e?void 0:e.version}update(){var e;return V9(this,void 0,void 0,(function*(){null===(e=this._cts)||void 0===e||e.dispose(!0),this._cts=new Uh,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}))}updateStickyModel(e){return V9(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization())return void(this._model=null);const t=this._editor.getModel(),i=t.getVersionId(),n=yield this._stickyModelProvider.update(t,i,e);e.isCancellationRequested||(this._model=n)}))}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,s){if(0===t.children.length)return;let o=s;const r=[];for(let h=0;he-t))),l=this.updateIndex(Md(r,e.startLineNumber+n,((e,t)=>e-t)));for(let h=a;h<=l;h++){const r=t.children[h];if(!r)return;if(r.range){const t=r.range.startLineNumber,s=r.range.endLineNumber;e.startLineNumber<=s+1&&t-1<=e.endLineNumber&&t!==o&&(o=t,i.push(new H9(t,s-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,r,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,r,i,n,s)}}getCandidateStickyLinesIntersecting(e){var t,i;if(!(null===(t=this._model)||void 0===t?void 0:t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);const s=null===(i=this._editor._getViewModel())||void 0===i?void 0:i.getHiddenAreas();if(s)for(const o of s)n=n.filter((e=>!(e.startLineNumber>=o.startLineNumber&&e.endLineNumber<=o.endLineNumber+1)));return n}};z9=B9([W9(1,iL),W9(2,Xu)],z9);var U9,K9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},j9=function(e,t){return function(i,n){t(i,n,e)}},q9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let $9=U9=class extends E{constructor(e,t,i,n,s,o,r){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=r,this._sessionStore=new N,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new w9(this._editor),this._stickyLineCandidateProvider=new z9(this._editor,i,s),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new f9([],[],0),this._readConfiguration();const a=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(114)||e.hasChanged(72)||e.hasChanged(66)||e.hasChanged(109))&&this._readConfiguration()}))),this._register(En(a,os.CONTEXT_MENU,(e=>q9(this,void 0,void 0,(function*(){this._onContextMenu(e)}))))),this._stickyScrollFocusedContextKey=Rh.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=Rh.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(hs(a));this._register(l.onDidBlur((e=>{!1===this._positionRevealed&&0===a.clientHeight?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()}))),this._register(l.onDidFocus((e=>{this.focus()}))),this._registerMouseListeners(),this._register(En(a,os.MOUSE_DOWN,(e=>{this._onMouseDown=!0})))}static get(e){return e.getContribution(U9.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),null===(e=this._focusDisposableStore)||void 0===e||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown)return this._onMouseDown=!1,void this._editor.focus();!0!==this._stickyScrollFocusedContextKey.get()&&(this._focused=!0,this._focusDisposableStore=new N,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,(()=>this._editor.revealPosition(e)))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,(()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0)))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(Mh.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new N),t=this._register(new IR(this._editor,{extractLineNumberFromMouseEvent:e=>{const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);return t?t.lineNumber:0}})),i=e=>{if(!this._editor.hasModel())return null;if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return null;const t=e.target.element;if(!t||t.innerText!==t.innerHTML)return null;const i=this._stickyScrollWidget.getEditorPositionFromNode(t);return i?{range:new Mh(i.lineNumber,i.column,i.lineNumber,i.column+t.innerText.length),textElement:t}:null},n=this._stickyScrollWidget.getDomNode();this._register(Mn(n,os.CLICK,(e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;if(!e.leftButton)return;if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t)return;const i=new Ba(this._endLineNumbers[t],1);return void this._revealLineInCenterIfOutsideViewport(i)}if(this._stickyScrollWidget.isInFoldingIconDomNode(e.target)){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);return void this._toggleFoldingRegionForLine(t)}if(!this._stickyScrollWidget.isInStickyLine(e.target))return;let t=this._stickyScrollWidget.getEditorPositionFromNode(e.target);if(!t){const i=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);if(null===i)return;t=new Ba(i,1)}this._revealPosition(t)}))),this._register(Mn(n,os.MOUSE_MOVE,(e=>{if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t||null!==this._showEndForLine&&this._showEndForLine===t)return;return this._showEndForLine=t,void this._renderStickyScroll()}null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(En(n,os.MOUSE_LEAVE,(e=>{null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(t.onMouseMoveOrRelevantKeyDown((([t,n])=>{const s=i(t);if(!s||!t.hasTriggerModifier||!this._editor.hasModel())return void e.clear();const{range:o,textElement:r}=s;if(o.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===r.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=o,e.clear();const a=new Uh;let l;e.add(x((()=>a.dispose(!0)))),xU(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new Ba(o.startLineNumber,o.startColumn+1),a.token).then((t=>{if(!a.token.isCancellationRequested)if(0!==t.length){this._candidateDefinitionsLength=t.length;const i=r;l!==i?(e.clear(),l=i,l.style.textDecoration="underline",e.add(x((()=>{l.style.textDecoration="none"})))):l||(l=i,l.style.textDecoration="underline",e.add(x((()=>{l.style.textDecoration="none"}))))}else e.clear()}))}))),this._register(t.onCancel((()=>{e.clear()}))),this._register(t.onExecute((e=>q9(this,void 0,void 0,(function*(){if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return;const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);t&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:t.lineNumber,column:1})),this._instaService.invokeFunction(_0,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))))}_onContextMenu(e){const t=new Nt(e);this._contextMenuService.showContextMenu({menuId:Ql.StickyScrollContext,getAnchor:()=>t})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||null===e)return;const t=this._stickyScrollWidget.getStickyLineForLine(e),i=null==t?void 0:t.foldingIcon;if(!i)return;IQ(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(66)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(114);if(!1===e.enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),void(this._enabled=!1);e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>{this._showEndForLine=null,this._renderStickyScroll()}))),this._enabled=!0);2===this._editor.getOption(67).renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>{this._showEndForLine=null,this._renderStickyScroll()})))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(-1)}_onDidResize(){const e=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(.25*e)}_renderStickyScroll(e=1/0){var t,i;return q9(this,void 0,void 0,(function*(){const n=this._editor.getModel();if(!n||n.isTooLargeForTokenization())return this._foldingModel=null,void this._stickyScrollWidget.setState(void 0,null,e);const s=this._stickyLineCandidateProvider.getVersionId();if(void 0===s||s===n.getVersionId())if(this._foldingModel=null!==(i=yield null===(t=iJ.get(this._editor))||void 0===t?void 0:t.getFoldingModel())&&void 0!==i?i:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(!(0===this._widgetState.startLineNumbers.length)),this._focused)if(-1===this._focusedStickyElementIndex)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,-1!==this._focusedStickyElementIndex&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const t=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];if(this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),0===this._stickyScrollWidget.lineNumberCount)this._focusedStickyElementIndex=-1;else{this._stickyScrollWidget.lineNumbers.includes(t)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}}else this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}))}findScrollWidgetState(){const e=this._editor.getOption(66),t=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),i=this._editor.getScrollTop();let n=0;const s=[],o=[],r=this._editor.getVisibleRanges();if(0!==r.length){const a=new L9(r[0].startLineNumber,r[r.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const r of l){const a=r.startLineNumber,l=r.endLineNumber,h=r.nestingDepth;if(l-a>0){const r=(h-1)*e,d=h*e,c=this._editor.getBottomForLineNumber(a)-i,u=this._editor.getTopForLineNumber(l)-i,g=this._editor.getBottomForLineNumber(l)-i;if(r>u&&r<=g){s.push(a),o.push(l+1),n=g-d;break}if(d>c&&d<=g&&(s.push(a),o.push(l+1)),s.length===t)break}}}return this._endLineNumbers=o,new f9(s,o,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};$9.ID="store.contrib.stickyScrollController",$9=U9=K9([j9(1,Hx),j9(2,iL),j9(3,Oa),j9(4,Xu),j9(5,CE),j9(6,Rl)],$9);var G9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Z9=100;Lh($9.ID,$9,1),oh(class extends sh{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:ue(0,"Toggle Sticky Scroll"),mnemonicTitle:ue(0,"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:p9.View,toggled:{condition:ul.equals("config.editor.stickyScroll.enabled",!0),title:ue(0,"Sticky Scroll"),mnemonicTitle:ue(0,"&&Sticky Scroll")},menu:[{id:Ql.CommandPalette},{id:Ql.MenubarAppearanceMenu,group:"4_editor",order:3},{id:Ql.StickyScrollContext}]})}run(e){return G9(this,void 0,void 0,(function*(){const t=e.get(uu),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}))}}),oh(class extends bh{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:ue(0,"Focus Sticky Scroll"),mnemonicTitle:ue(0,"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:ul.and(ul.has("config.editor.stickyScroll.enabled"),Rh.stickyScrollVisible),menu:[{id:Ql.CommandPalette}]})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.focus()}}),oh(class extends bh{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:ue(0,"Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:Rh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Z9,primary:16}})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.focusPrevious()}}),oh(class extends bh{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:ue(0,"Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:Rh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Z9,primary:18}})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.focusNext()}}),oh(class extends bh{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:ue(0,"Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:Rh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Z9,primary:3}})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.goToFocused()}}),oh(class extends bh{constructor(){super({id:"editor.action.selectEditor",title:{value:ue(0,"Select Editor"),original:"Select Editor"},precondition:Rh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Z9,primary:9}})}runEditorCommand(e,t){var i;null===(i=$9.get(t))||void 0===i||i.selectEditor()}});var Y9,X9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Q9=function(e,t){return function(i,n){t(i,n,e)}},J9=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class e7{constructor(e,t,i,n,s,o){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.completion=o}}let t7=class extends M{constructor(e,t,i,n,s,o){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=o}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&a.resolve(Hh.None)}return t}};t7=X9([Q9(5,b2)],t7);let i7=class{constructor(e,t,i,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=n}provideInlineCompletions(e,t,i,n){var s;return J9(this,void 0,void 0,(function*(){if(i.selectedSuggestionInfo)return;const o=this._getEditorOption(88,e);if(B1.isAllOff(o))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const r=e.tokenization.getLineTokens(t.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==B1.valueFor(o,a))return;let l,h,d=e.getWordAtPosition(t);if((null==d?void 0:d.word)||(l=this._getTriggerCharacterInfo(e,t)),!(null==d?void 0:d.word)&&!l)return;if(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column)return;const c=e.getValueInRange(new Mh(t.lineNumber,1,t.lineNumber,t.column));if(!l&&(null===(s=this._lastResult)||void 0===s?void 0:s.canBeReused(e,t.lineNumber,d))){const e=new R2(c,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),h=this._lastResult}else{const i=yield O1(this._languageFeatureService.completionProvider,e,t,new T1(void 0,void 0,null==l?void 0:l.providers),l&&{triggerKind:1,triggerCharacter:l.ch},n);let s;i.needsClipboard&&(s=yield this._clipboardService.readText());const o=new A2(i.items,t.column,new R2(c,0),T2.None,this._getEditorOption(117,e),this._getEditorOption(111,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},s);h=new t7(e,t.lineNumber,d,o,i,this._suggestMemoryService)}return this._lastResult=h,h}))}handleItemDidShow(e,t){t.completion.resolve(Hh.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(Mh.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const o of this._languageFeatureService.completionProvider.all(e))(null===(i=o.triggerCharacters)||void 0===i?void 0:i.includes(n))&&s.add(o);if(0!==s.size)return{providers:s,ch:n}}};i7=X9([Q9(1,iL),Q9(2,Xy),Q9(3,b2)],i7);let n7=Y9=class{constructor(e,t,i,n){if(1==++Y9._counter){const s=n.createInstance(i7,((t,n)=>{var s;return(null!==(s=i.listCodeEditors().find((e=>e.getModel()===n)))&&void 0!==s?s:e).getOption(t)}));Y9._disposable=t.inlineCompletionsProvider.register("*",s)}}dispose(){var e;0==--Y9._counter&&(null===(e=Y9._disposable)||void 0===e||e.dispose(),Y9._disposable=void 0)}};n7._counter=0,n7=Y9=X9([Q9(1,iL),Q9(2,Fa),Q9(3,Oa)],n7),Lh("suggest.inlineCompletionsProvider",n7,0);class s7{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}const o7=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class r7{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(o7);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=rc.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class a7{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,s=e.length;n{const i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",s="ffffff";for(;e.length>=1&&""===e[0].token;){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(s=t.background)}const o=new r7;for(const d of t)o.getId(d);const r=o.getId(n),a=o.getId(s),l=new h7(i,r,a),h=new d7(l);for(let d=0,c=e.length;d>>0,this._cache.set(t,i)}return(i|e)>>>0}}const l7=/\b(comment|string|regex|regexp)\b/;class h7{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new h7(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class d7{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const s=this._children.get(i);return void 0!==s?s.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const s=e.indexOf(".");let o,r;-1===s?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1));let a=this._children.get(o);void 0===a&&(a=new d7(this._mainRule.clone()),this._children.set(o,a)),a.insert(r,t,i,n)}}const c7={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Cm]:"#FFFFFE",[wm]:"#000000",[Fm]:"#E5EBF1",[G_]:"#D3D3D3",[ev]:"#939393",[Bm]:"#ADD6FF4D"}},u7={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Cm]:"#1E1E1E",[wm]:"#D4D4D4",[Fm]:"#3A3D41",[G_]:"#404040",[ev]:"#707070",[Bm]:"#ADD6FF26"}},g7={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Cm]:"#000000",[wm]:"#FFFFFF",[G_]:"#FFFFFF",[ev]:"#FFFFFF"}},p7={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Cm]:"#FFFFFF",[wm]:"#292929",[G_]:"#292929",[ev]:"#292929"}};class m7{getIcon(e){const t=JT();let i=e.defaults;for(;ea.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}const f7="vs",_7="vs-dark",v7="hc-black",b7="hc-light",C7=Ul.as(wp),w7=Ul.as(P_);class y7{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(S7(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,rc.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=L7(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,rc.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);return i||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=C7.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case f7:return I_.LIGHT;case v7:return I_.HIGH_CONTRAST_DARK;case b7:return I_.HIGH_CONTRAST_LIGHT;default:return I_.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=L7(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=a7.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=jg.getForeground(n),o=jg.getFontStyle(n);return{foreground:s,italic:Boolean(1&o),bold:Boolean(2&o),underline:Boolean(4&o),strikethrough:Boolean(8&o)}}}function S7(e){return e===f7||e===_7||e===v7||e===b7}function L7(e){switch(e){case f7:return c7;case _7:return u7;case v7:return g7;case b7:return p7}}function k7(e){const t=L7(e);return new y7(e,t)}yh(class extends _h{constructor(){super({id:"editor.action.toggleHighContrast",label:OJ.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(z4),n=i.getColorTheme();M_(n.type)?(i.setTheme(this._originalThemeName||(T_(n.type)?_7:f7)),this._originalThemeName=null):(i.setTheme(T_(n.type)?v7:b7),this._originalThemeName=n.themeName)}});class D7 extends sh{constructor(){super({id:D7.ID,title:{value:ue(0,"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const e=!GR.getTabFocusMode();GR.setTabFocusMode(e),Os(ue(0,e?"Pressing Tab will now move focus to the next focusable element":"Pressing Tab will now insert the tab character"))}}D7.ID="editor.action.toggleTabFocusMode",oh(D7);yh(class extends _h{constructor(){super({id:"editor.action.forceRetokenize",label:ue(0,"Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new F;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}});var x7=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},N7=function(e,t){return function(i,n){t(i,n,e)}};let E7=class extends E{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n){var s;super(),this._link=t,this._enabled=!0,this.el=ds(e,fs("a.monaco-link",{tabIndex:null!==(s=t.tabIndex)&&void 0!==s?s:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const o=this._register(new Hy(this.el,"click")),r=this._register(new Hy(this.el,"keypress")),a=B.chain(r.event,(e=>e.map((e=>new St(e))).filter((e=>3===e.keyCode)))),l=this._register(new Hy(this.el,KL.Tap)).event;this._register(qL.addTarget(this.el));const h=B.any(o.event,a,l);this._register(h((e=>{this.enabled&&(as(e,!0),(null==i?void 0:i.opener)?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}};E7=x7([N7(3,Uk)],E7);var I7=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},M7=function(e,t){return function(i,n){t(i,n,e)}};let T7=class extends E{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(R7))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),null===(t=e.onClose)||void 0===t||t.call(e)}})),this._editor.setBanner(this.banner.element,26)}};T7=I7([M7(1,Oa)],T7);let R7=class extends E{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Yk,{}),this.element=fs("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){const t=fs("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Dn(this.element)}show(e){Dn(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=ds(this.element,fs("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(fs(`div${ea.asCSSSelector(e.icon)}`));const n=ds(this.element,fs("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=ds(this.element,fs("div.message-actions-container")),e.actions)for(const o of e.actions)this._register(this.instantiationService.createInstance(E7,this.messageActionsContainer,Object.assign(Object.assign({},o),{tabIndex:-1}),{}));const s=ds(this.element,fs("div.action-container"));this.actionBar=this._register(new Ix(s)),this.actionBar.push(this._register(new za("banner.close","Close Banner",ea.asClassName(nR),!0,(()=>{"function"==typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};R7=I7([M7(0,Oa)],R7);const A7=Pa("workspaceTrustManagementService");var O7=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},P7=function(e,t){return function(i,n){t(i,n,e)}},F7=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const B7=QT("extensions-warning-message",Qr.warning,ue(0,"Icon shown with a warning message in the extensions editor."));let W7=class extends E{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:ue(0,"This document contains many non-basic ASCII unicode characters"),command:new X7};else if(e.ambiguousCharacterCount>=t)i={message:ue(0,"This document contains many ambiguous unicode characters"),command:new Z7};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:ue(0,"This document contains many invisible unicode characters"),command:new Y7}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:B7,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(T7,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(124),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(124)&&(this._options=e.getOption(124),this._updateHighlighter())}))),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=function(e,t){return{nonBasicASCII:t.nonBasicASCII===AS?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===AS?!e:t.includeComments,includeStrings:t.includeStrings===AS?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>{if("_os"===e){return(new Intl.NumberFormat).resolvedOptions().locale}return"_vscode"===e?Ke:e}))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new V7(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new H7(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};W7.ID="editor.contrib.unicodeHighlighter",W7=O7([P7(1,gG),P7(2,A7),P7(3,Oa)],W7);let V7=class extends E{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new sd((()=>this._update()),250)),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:q7.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!eB(t,e))return null;return{reason:j7(t.getValueInRange(e.range),this._options),inComment:tB(t,e),inString:iB(t,e)}}};V7=O7([P7(3,gG)],V7);class H7 extends E{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new sd((()=>this._update()),250)),this._register(this._editor.onDidLayoutChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidScrollChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeHiddenAreas((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const e=lM.computeUnicodeHighlights(this._model,this._options,n);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:q7.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return eB(t,e)?{reason:j7(i,this._options),inComment:tB(t,e),inString:iB(t,e)}:null}}let z7=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(W7.ID);if(!n)return[];const s=[],o=new Set;let r=300;for(const a of t){const e=n.getDecorationInfo(a);if(!e)continue;const t=i.getValueInRange(a.range).codePointAt(0),l=K7(t);let h;switch(e.reason.kind){case 0:h=Mo(e.reason.confusableWith)?ue(0,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",l,K7(e.reason.confusableWith.codePointAt(0))):ue(0,"The character {0} could be confused with the character {1}, which is more common in source code.",l,K7(e.reason.confusableWith.codePointAt(0)));break;case 1:h=ue(0,"The character {0} is invisible.",l);break;case 2:h=ue(0,"The character {0} is not a basic ASCII character.",l)}if(o.has(h))continue;o.add(h);const d={codePoint:t,reason:e.reason,inComment:e.inComment,inString:e.inString},c=ue(0,"Adjust settings"),u=`command:${Q7.ID}?${encodeURIComponent(JSON.stringify(d))}`,g=new Ia("",!0).appendMarkdown(h).appendText(" ").appendLink(u,c);s.push(new OK(this,a.range,[g],!1,r++))}return s}renderHoverParts(e,t){return FK(e,t,this._editor,this._languageService,this._openerService)}};function U7(e){return`U+${e.toString(16).padStart(4,"0")}`}function K7(e){let t=`\`${U7(e)}\``;return Ko.isInvisibleCharacter(e)||(t+=` "${function(e){if(96===e)return"`` ` ``";return"`"+String.fromCodePoint(e)+"`"}(e)}"`),t}function j7(e,t){return lM.computeUnicodeHighlightReason(e,t)}z7=O7([P7(1,yc),P7(2,Uk)],z7);class q7{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=xw.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}q7.instance=new q7;class $7 extends _h{constructor(){super({id:Z7.ID,label:ue(0,"Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=ue(0,"Disable Highlight In Comments")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(WS,!1,2)}))}}class G7 extends _h{constructor(){super({id:Z7.ID,label:ue(0,"Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=ue(0,"Disable Highlight In Strings")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(VS,!1,2)}))}}class Z7 extends _h{constructor(){super({id:Z7.ID,label:ue(0,"Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=ue(0,"Disable Ambiguous Highlight")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(BS,!1,2)}))}}Z7.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class Y7 extends _h{constructor(){super({id:Y7.ID,label:ue(0,"Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=ue(0,"Disable Invisible Highlight")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(PS,!1,2)}))}}Y7.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class X7 extends _h{constructor(){super({id:X7.ID,label:ue(0,"Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=ue(0,"Disable Non ASCII Highlight")}run(e,t,i){return F7(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(uu);t&&this.runAction(t)}))}runAction(e){return F7(this,void 0,void 0,(function*(){yield e.updateValue(FS,!1,2)}))}}X7.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class Q7 extends _h{constructor(){super({id:Q7.ID,label:ue(0,"Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,i){return F7(this,void 0,void 0,(function*(){const{codePoint:t,reason:n,inString:s,inComment:o}=i,r=String.fromCodePoint(t),a=e.get(lE),l=e.get(uu);const h=[];if(0===n.kind)for(const e of n.notAmbiguousInLocales)h.push({label:ue(0,'Allow unicode characters that are more common in the language "{0}".',e),run:()=>F7(this,void 0,void 0,(function*(){J7(l,[e])}))});if(h.push({label:function(e){return Ko.isInvisibleCharacter(e)?ue(0,"Exclude {0} (invisible character) from being highlighted",U7(e)):ue(0,"Exclude {0} from being highlighted",`${U7(e)} "${r}"`)}(t),run:()=>function(e,t){return F7(this,void 0,void 0,(function*(){const i=e.getValue(OS);let n;n="object"==typeof i&&i?i:{};for(const e of t)n[String.fromCodePoint(e)]=!0;yield e.updateValue(OS,n,2)}))}(l,[t])}),o){const e=new $7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}else if(s){const e=new G7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}if(0===n.kind){const e=new Z7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}else if(1===n.kind){const e=new Y7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}else if(2===n.kind){const e=new X7;h.push({label:e.label,run:()=>F7(this,void 0,void 0,(function*(){return e.runAction(l)}))})}else!function(e){throw new Error(`Unexpected value: ${e}`)}(n);const d=yield a.pick(h,{title:ue(0,"Configure Unicode Highlight Options")});d&&(yield d.run())}))}}function J7(e,t){var i;return F7(this,void 0,void 0,(function*(){const n=null===(i=e.inspect(HS).user)||void 0===i?void 0:i.value;let s;s="object"==typeof n&&n?Object.assign({},n):{};for(const e of t)s[e]=!0;yield e.updateValue(HS,s,2)}))}Q7.ID="editor.action.unicodeHighlight.showExcludeOptions",yh(Z7),yh(Y7),yh(X7),yh(Q7),Lh(W7.ID,W7,1),dK.register(z7);var e8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},t8=function(e,t){return function(i,n){t(i,n,e)}},i8=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const n8="ignoreUnusualLineTerminators";let s8=class extends E{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return i8(this,void 0,void 0,(function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,n8)}(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(90))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=yield this._dialogService.confirm({title:ue(0,"Unusual Line Terminators"),message:ue(0,"Detected unusual line terminators"),detail:ue(0,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",ba(e.uri)),primaryButton:ue(0,"&&Remove Unusual Line Terminators"),cancelButton:ue(0,"Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){e.setModelProperty(t.uri,n8,i)}(this._codeEditorService,e,!0)}))}};s8.ID="editor.contrib.unusualLineTerminatorsDetector",s8=e8([t8(1,L3),t8(2,Fa)],s8),Lh(s8.ID,s8,1);var o8,r8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},a8=function(e,t){return function(i,n){t(i,n,e)}};const l8=new Tl("hasWordHighlights",!1);function h8(e,t,i,n){return td(e.ordered(t).map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,a))),Wd)}class d8{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Gh((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new Mh(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,o=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let l=0,h=i.length;!a&&l=o&&(a=!0)}return a}cancel(){this.result.cancel()}}class c8 extends d8{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return h8(this._providers,e,t.getPosition(),n).then((e=>e||[]))}}class u8 extends d8{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return Jh(250,n).then((()=>{if(!t.isEmpty())return[];const n=e.getWordAtPosition(t.getPosition());if(!n||n.word.length>1e3)return[];return e.findMatches(n.word,!0,!1,!0,i,!1).map((e=>({range:e.range,kind:gC.Text})))}))}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}Ch("_executeDocumentHighlights",((e,t,i)=>h8(e.get(iL).documentHighlightProvider,t,i,Hh.None)));class g8{constructor(e,t,i,n){this.toUnhook=new N,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.linkedHighlighters=i,this._hasWordHighlights=l8.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(80);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(Mh.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){Os(`${this.editor.getModel().getLineContent(n.startLineNumber)}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){Os(`${this.editor.getModel().getLineContent(n.startLineNumber)}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();const t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())}),r)}}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const i of this.workerRequestValue)i.range&&e.push({range:i.range,options:(t=i.kind,t===gC.Write?P5:t===gC.Text?F5:V5)});var t;this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations());for(const i of this.linkedHighlighters())(null==i?void 0:i.editor.getModel())===this.editor.getModel()&&(i._stopAll(),i.decorations.set(e),i._hasWordHighlights.set(i.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}}let p8=o8=class extends E{static get(e){return e.getContribution(o8.ID)}constructor(e,t,i){super(),this.wordHighlighter=null,this.linkedContributions=new Set;const n=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this.wordHighlighter=new g8(e,i.documentHighlightProvider,(()=>v.map(this.linkedContributions,(e=>e.wordHighlighter))),t))};this._register(e.onDidChangeModel((e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()}))),n()}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){var e;null===(e=this.wordHighlighter)||void 0===e||e.moveNext()}moveBack(){var e;null===(e=this.wordHighlighter)||void 0===e||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};p8.ID="editor.contrib.wordHighlighter",p8=o8=r8([a8(1,Rl),a8(2,iL)],p8);class m8 extends _h{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=p8.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}Lh(p8.ID,p8,0),yh(class extends m8{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:ue(0,"Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:l8,kbOpts:{kbExpr:Rh.editorTextFocus,primary:65,weight:100}})}}),yh(class extends m8{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:ue(0,"Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:l8,kbOpts:{kbExpr:Rh.editorTextFocus,primary:1089,weight:100}})}}),yh(class extends _h{constructor(){super({id:"editor.action.wordHighlight.trigger",label:ue(0,"Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:l8.toNegated(),kbOpts:{kbExpr:Rh.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=p8.get(t);n&&n.restoreViewState(!0)}});class f8 extends fh{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=jb(t.getOption(129)),s=t.getModel(),o=t.getSelections().map((e=>{const t=new Ba(e.positionLineNumber,e.positionColumn),i=this._move(n,s,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)}));if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,o.map((e=>Hw.fromModelSelection(e)))),1===o.length){const e=new Ba(o[0].positionLineNumber,o[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new Th(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Th(t.lineNumber,t.column,t.lineNumber,t.column)}}class _8 extends f8{_move(e,t,i,n){return ny.moveWordLeft(e,t,i,n)}}class v8 extends f8{_move(e,t,i,n){return ny.moveWordRight(e,t,i,n)}}class b8 extends fh{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(Xu);if(!t.hasModel())return;const s=jb(t.getOption(129)),o=t.getModel(),r=t.getSelections(),a=t.getOption(6),l=t.getOption(11),h=n.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),c=r.map((e=>{const i=this._delete({wordSeparators:s,model:o,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:h,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Gw(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop()}}class C8 extends b8{_delete(e,t){const i=ny.deleteWordLeft(e,t);return i||new Mh(1,1,1,1)}}class w8 extends b8{_delete(e,t){const i=ny.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new Mh(n,s,n,s)}}wh(new class extends _8{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}),wh(new class extends _8{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}),wh(new class extends _8{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ul.and(Rh.textInputFocus,null===(e=ul.and(YR,MH))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}),wh(new class extends _8{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}),wh(new class extends _8{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}),wh(new class extends _8{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ul.and(Rh.textInputFocus,null===(e=ul.and(YR,MH))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}),wh(new class extends v8{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}),wh(new class extends v8{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ul.and(Rh.textInputFocus,null===(e=ul.and(YR,MH))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}),wh(new class extends v8{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}),wh(new class extends v8{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}),wh(new class extends v8{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ul.and(Rh.textInputFocus,null===(e=ul.and(YR,MH))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}),wh(new class extends v8{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}),wh(new class extends _8{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(jb(qS.wordSeparators.defaultValue),t,i,n)}}),wh(new class extends _8{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(jb(qS.wordSeparators.defaultValue),t,i,n)}}),wh(new class extends v8{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(jb(qS.wordSeparators.defaultValue),t,i,n)}}),wh(new class extends v8{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(jb(qS.wordSeparators.defaultValue),t,i,n)}}),wh(new class extends C8{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:Rh.writable})}}),wh(new class extends C8{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:Rh.writable})}}),wh(new class extends C8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}),wh(new class extends w8{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:Rh.writable})}}),wh(new class extends w8{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:Rh.writable})}}),wh(new class extends w8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}),yh(class extends _h{constructor(){super({id:"deleteInsideWord",precondition:Rh.writable,label:ue(0,"Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=jb(t.getOption(129)),s=t.getModel(),o=t.getSelections().map((e=>{const t=ny.deleteInsideWord(n,s,e);return new Gw(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}});class y8 extends f8{_move(e,t,i,n){return sy.moveWordPartLeft(e,t,i)}}Za.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");Za.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class S8 extends f8{_move(e,t,i,n){return sy.moveWordPartRight(e,t,i)}}wh(new class extends b8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=sy.deleteWordPartLeft(e);return i||new Mh(1,1,1,1)}}),wh(new class extends b8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:Rh.writable,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=sy.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new Mh(n,s,n,s)}}),wh(new class extends y8{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}),wh(new class extends y8{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}),wh(new class extends S8{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}),wh(new class extends S8{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:Rh.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}});class L8 extends LT{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(Dre){return Promise.reject(Dre)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?_d(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},s={};for(const e of t)s[e]=n(e,i);return s}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}function k8(e){return!function(e){return Array.isArray(e)}(e)}function D8(e){return"string"==typeof e}function x8(e){return!D8(e)}function N8(e){return!e}function E8(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function I8(e){return e.replace(/[&<>'"_]/g,"-")}function M8(e,t){console.log(`${e.languageId}: ${t}`)}function T8(e,t){return new Error(`${e.languageId}: ${t}`)}function R8(e,t,i,n,s){let o=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,h,d,c,u,g){return N8(a)?N8(l)?!N8(h)&&h0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}var O8,P8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},F8=function(e,t){return function(i,n){t(i,n,e)}};class B8{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new W8(e,t);let i=W8.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new W8(e,t),this._entries[i]=n,n)}}B8._INSTANCE=new B8(5);class W8{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return W8._equals(this,e)}push(e){return B8.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return B8.create(this.parent,e)}}class V8{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new V8(this.languageId,this.state)}}class H8{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new z8(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new z8(e,t);const i=W8.getStackElementId(e);let n=this._entries[i];return n||(n=new z8(e,null),this._entries[i]=n,n)}}H8._INSTANCE=new H8(5);class z8{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:H8.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof z8&&(!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData)))}}class U8{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new fC(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const s=i.languageId,o=i.state,r=DC.get(s);if(!r)return this.enterLanguage(s),this.emit(n,""),o;const a=r.tokenize(e,t,o);if(0!==n)for(const l of a.tokens)this._tokens.push(new fC(l.offset+n,l.type,l.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new _C(this._tokens,e)}}class K8{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,s=t.length,o=null!==i?i.length:0;if(0===n&&0===s&&0===o)return new Uint32Array(0);if(0===n&&0===s)return i;if(0===s&&0===o)return e;const r=new Uint32Array(n+s+o);null!==e&&r.set(e);for(let a=0;a{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=DC.get(t);if(i){if(i instanceof O8){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else DC.isResolved(t)||e.push(DC.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=B8.create(null,this._lexer.start);return H8.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return NC(this._languageId,i);const n=new U8,s=this._tokenize(e,t,i,n);return n.finalize(s)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return EC(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new K8(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),s=this._tokenize(e,t,i,n);return n.finalize(s)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=A8(this._lexer,t.stack.state),!i))throw T8(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const o of i){if(!x8(o.action)||"@pop"!==o.action.nextEmbedded)continue;s=!0;let t=o.regex;const i=o.regex.source;if("^(?:"===i.substr(0,4)&&")"===i.substr(i.length-1,1)){const e=(t.ignoreCase?"i":"")+(t.unicode?"u":"");t=new RegExp(i.substr(4,i.length-5),e)}const r=e.search(t);-1===r||0!==r&&o.matchOnlyAtLineStart||(-1===n||r0&&s.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(o);return this._myTokenize(a,t,i,n+o,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterLanguage(this._languageId);const o=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,h=i.stack,d=0,c=null,u=!0;for(;u||d=a)break;u=!1;let e=this._lexer.tokenizer[m];if(!e&&(e=A8(this._lexer,m),!e))throw T8(this._lexer,"tokenizer state is not defined: "+m);const t=r.substr(d);for(const i of e)if((0===d||!i.matchOnlyAtLineStart)&&(f=t.match(i.regex),f)){_=f[0],v=i.action;break}}if(f||(f=[""],_=""),v||(d=this._lexer.maxStack)throw T8(this._lexer,"maximum tokenizer stack size reached: ["+h.state+","+h.parent.state+",...]");h=h.push(m)}else if("@pop"===v.next){if(h.depth<=1)throw T8(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(b));h=h.pop()}else if("@popall"===v.next)h=h.popall();else{let e=R8(this._lexer,v.next,_,f,m);if("@"===e[0]&&(e=e.substr(1)),!A8(this._lexer,e))throw T8(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(b));h=h.push(e)}}v.log&&"string"==typeof v.log&&M8(this._lexer,this._lexer.languageId+": "+R8(this._lexer,v.log,_,f,m))}if(null===w)throw T8(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(b));const y=i=>{const o=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(o);if(d0)throw T8(this._lexer,"groups cannot be nested: "+this._safeRuleName(b));if(f.length!==w.length+1)throw T8(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(b));let e=0;for(let t=1;te});class Z8{static colorizeElement(e,t,i,n){const s=(n=n||{}).theme||"vs",o=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(o)||o;e.setTheme(s);const a=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;return this.colorize(t,a||"",r,n).then((e=>{var t;const n=null!==(t=null==G8?void 0:G8.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static colorize(e,t,i,n){return $8(this,void 0,void 0,(function*(){const s=e.languageIdCodec;let o=4;n&&"number"==typeof n.tabSize&&(o=n.tabSize),Fo(t)&&(t=t.substr(1));const r=so(t);if(!e.isRegisteredLanguageId(i))return Y8(r,o,s);const a=yield DC.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((s,o)=>{const r=()=>{const a=function(e,t,i,n){let s=[],o=i.getInitialState();for(let r=0,a=e.length;r"),o=l.endState}return s.join("")}(e,t,i,n);if(i instanceof j8){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,o)}s(a)};r()}))}(r,o,a,s):Y8(r,o,s)}))}static colorizeLine(e,t,i,n,s=4){const o=lP.isBasicASCII(e,t),r=lP.containsRTL(e,o,i);return NA(new yA(!1,!0,e,!1,o,r,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const s=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,i)}}function Y8(e,t,i){let n=[];const s=new Uint32Array(2);s[0]=0,s[1]=33587200;for(let o=0,r=e.length;o")}return n.join("")}var X8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Q8=function(e,t){return function(i,n){t(i,n,e)}},J8=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let eee=class extends E{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new U),this._onCodeEditorAdd=this._register(new U),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new U),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new U),this._onDiffEditorAdd=this._register(new U),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new U),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new O,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i)){return this._modelProperties.get(i).get(t)}}openCodeEditor(e,t,i){return J8(this,void 0,void 0,(function*(){for(const n of this._codeEditorOpenHandlers){const s=yield n(e,t,i);if(null!==s)return s}return null}))}registerCodeEditorOpenHandler(e){return x(this._codeEditorOpenHandlers.unshift(e))}};eee=X8([Q8(0,R_)],eee);var tee=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},iee=function(e,t){return function(i,n){t(i,n,e)}},nee=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let see=class extends eee{constructor(e,t){super(t),this._register(this.onCodeEditorAdd((()=>this._checkContextKey()))),this._register(this.onCodeEditorRemove((()=>this._checkContextKey()))),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(((e,t,i)=>nee(this,void 0,void 0,(function*(){return t?this.doOpenEditor(t,e):null})))))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===vn.http||i===vn.https)return Cs(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};see=tee([iee(0,Rl),iee(1,R_)],see),Cu(Fa,see,0);const oee=Pa("layoutService");var ree=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},aee=function(e,t){return function(i,n){t(i,n,e)}};let lee=class{get dimension(){return this._dimension||(this._dimension=Fn(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayout=B.None,this.offset={top:0,quickPickTop:0}}};lee=ree([aee(0,Fa)],lee);let hee=class extends lee{get hasContainer(){return!1}get container(){return this._container}constructor(e,t){super(t),this._container=e}};hee=ree([aee(1,Fa)],hee),Cu(oee,lee,1);var dee=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cee=function(e,t){return function(i,n){t(i,n,e)}},uee=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const gee=!1;function pee(e){return e.scheme===vn.file?e.fsPath:e.path}let mee=0;class fee{constructor(e,t,i,n,s,o,r){this.id=++mee,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class _ee{constructor(e,t){this.resourceLabel=e,this.reason=t}}class vee{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements){(0===n.reason?e:t).push(n.resourceLabel)}const i=[];return e.length>0&&i.push(ue(0,"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(ue(0,"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class bee{constructor(e,t,i,n,s,o,r){this.id=++mee,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new vee),this.removedResources.has(t)||this.removedResources.set(t,new _ee(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new vee),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new _ee(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Cee{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)1===t.type&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i=0;i--)t.push(this._future[i].id);return new aw(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let r=0,a=this._past.length;r=t||o.id!==e.elements[n])&&(i=!1,s=0),i||1!==o.type||o.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let r=this._future.length-1;r>=0;r--,n++){const s=this._future[r];i&&(n>=t||s.id!==e.elements[n])&&(i=!1,o=r),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}-1!==s&&(this._past=this._past.slice(0,s)),-1!==o&&(this._future=this._future.slice(o+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class wee{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;tt.sourceOrder)&&(t=o,i=n))}return[t,i]}canUndo(e){if(e instanceof hw){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){return this._editStacks.get(t).hasPastElements()}return!1}_onError(e,t){r(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const o=this._acquireLocks(i);let r;try{r=t()}catch(a){return o(),n.dispose(),this._onError(a,e)}return r?r.then((()=>(o(),n.dispose(),s())),(t=>(o(),n.dispose(),this._onError(t,e)))):(o(),n.dispose(),s())}_invokeWorkspacePrepare(e){return uee(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return E.None;const t=e.actual.prepareUndoRedo();return void 0===t?E.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(E.None);const i=e.actual.prepareUndoRedo();return i?L(i)?t(i):i.then((e=>t(e))):t(E.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||yee);return new wee(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Lee(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new Lee}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,ue(0,"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,ue(0,"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const r of i.editStacks)r.getClosestPastElement()!==t&&s.push(r.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,ue(0,"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const r of i.editStacks)r.locked&&o.push(r.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,ue(0,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,ue(0,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return uee(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let s;!function(e){e[e.All=0]="All",e[e.This=1]="This",e[e.Cancel=2]="Cancel"}(s||(s={}));const{result:o}=yield this._dialogService.prompt({type:dL.Info,message:ue(0,"Would you like to undo '{0}' across all files?",t.label),buttons:[{label:ue(0,"&&Undo in {0} Files",i.editStacks.length),run:()=>s.All},{label:ue(0,"Undo this &&File"),run:()=>s.This}],cancelButton:{run:()=>s.Cancel}});if(o===s.Cancel)return;if(o===s.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let s;try{s=yield this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const o=this._checkWorkspaceUndo(e,t,i,!0);if(o)return s.dispose(),o.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,s,(()=>this._continueUndoInGroup(t.groupId,n)))}))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new wee([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=ue(0,"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestPastElement();o&&(o.groupId===e&&(!t||o.groupOrder>t.groupOrder)&&(t=o,i=n))}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof hw){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(!s)return;if(s.groupId){const[e,n]=this._findClosestUndoElementInGroup(s.groupId);if(s!==e&&n)return this._undo(n,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return 1===s.type?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{gee}}_confirmAndContinueUndo(e,t,i){return uee(this,void 0,void 0,(function*(){if((yield this._dialogService.confirm({message:ue(0,"Would you like to undo '{0}'?",i.label),primaryButton:ue(0,"&&Yes"),cancelButton:ue(0,"No")})).confirmed)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&(o.sourceId===e&&(!t||o.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,ue(0,"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const r of i.editStacks)r.locked&&o.push(r.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,ue(0,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,ue(0,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return uee(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(o){return this._onError(o,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new wee([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=ue(0,"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&(o.groupId===e&&(!t||o.groupOrder=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Dee=function(e,t){return function(i,n){t(i,n,e)}};let xee=class extends E{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new R6(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};xee=kee([Dee(0,R_),Dee(1,ah),Dee(2,yc)],xee),Cu($6,xee,1);var Nee=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Eee="**",Iee="[/\\\\]",Mee="[^/\\\\]",Tee=/\//g;function Ree(e,t){switch(e){case 0:return"";case 1:return`${Mee}*?`;default:return`(?:${Iee}|${Mee}+${Iee}${t?`|${Iee}${Mee}+`:""})*?`}}function Aee(e,t){if(!e)return[];const i=[];let n=!1,s=!1,o="";for(const r of e){switch(r){case t:if(!n&&!s){i.push(o),o="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1}o+=r}return o&&i.push(o),i}function Oee(e){if(!e)return"";let t="";const i=Aee(e,"/");if(i.every((e=>e===Eee)))t=".*";else{let e=!1;i.forEach(((n,s)=>{if(n===Eee){if(e)return;t+=Ree(2,s===i.length-1)}else{let e=!1,o="",r=!1,a="";for(const i of n)if("}"!==i&&e)o+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=`(?:${Aee(o,",").map((e=>Oee(e))).join("|")})`;t+=i,e=!1,o="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+=Mee;continue;case"*":t+=Ree(1);continue;default:t+=Js(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?"/"===i?"":Js(i):"^",a+=e}sjee(e,t))).filter((e=>e!==Kee)),e),n=i.length;if(!n)return Kee;if(1===n)return i[0];const s=function(t,n){for(let s=0,o=i.length;s!!e.allBasenames));o&&(s.allBasenames=o.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);r.length&&(s.allPaths=r);return s}(i,t):(s=Vee.exec($ee(i,t)))?Gee(s[1].substr(1),i,!0):(s=Hee.exec($ee(i,t)))?Gee(s[1],i,!1):function(e){try{const t=new RegExp(`^${Oee(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(t){return Kee}}(i),zee.set(n,o)),qee(o,e)}function qee(e,t){if("string"==typeof t)return e;const i=function(i,n){return ua(i,t.base,!Fe)?e(to(i.substr(t.base.length),Ji),n):null};return i.allBasenames=e.allBasenames,i.allPaths=e.allPaths,i.basenames=e.basenames,i.patterns=e.patterns,i}function $ee(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function Gee(e,t,i){const n=Ji===qi.sep,s=n?e:e.replace(Tee,Ji),o=Ji+s,r=qi.sep+e;let a;return a=i?function(i,a){return"string"!=typeof i||i!==s&&!i.endsWith(o)&&(n||i!==e&&!i.endsWith(r))?null:t}:function(i,o){return"string"!=typeof i||i!==s&&(n||i!==e)?null:t},a.allPaths=[(i?"*/":"./")+e],a}function Zee(e,t={}){if(!e)return Uee;if("string"==typeof e||function(e){const t=e;if(!t)return!1;return"string"==typeof t.base&&"string"==typeof t.pattern}(e)){const i=jee(e,t);if(i===Kee)return Uee;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=Yee(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return Kee;const n=jee(e,i);if(n===Kee)return Kee;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,s,o,r)=>{if(!r||!n(t,s))return null;const a=r(i.replace("$(basename)",(()=>o)));return $h(a)?a.then((t=>t?e:null)):a?e:null};return t.requiresSiblings=!0,t}}return n}(i,e[i],t))).filter((e=>e!==Kee))),n=i.length;if(!n)return Kee;if(!i.some((e=>!!e.requiresSiblings))){if(1===n)return i[0];const e=function(e,t){let n;for(let s=0,o=i.length;sNee(this,void 0,void 0,(function*(){for(const e of n){const t=yield e;if("string"==typeof t)return t}return null})))():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,n){let s,o;for(let r=0,a=i.length;rNee(this,void 0,void 0,(function*(){for(const e of o){const t=yield e;if("string"==typeof t)return t}return null})))():null},o=i.find((e=>!!e.allBasenames));o&&(s.allBasenames=o.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);r.length&&(s.allPaths=r);return s}(e,t)}function Yee(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let s;if(t){s=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const o=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?s[i]:null};o.basenames=n,o.patterns=s,o.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(o),r}function Xee(e,t,i,n,s,o){if(Array.isArray(e)){let r=0;for(const a of e){const e=Xee(a,t,i,n,s,o);if(10===e)return e;e>r&&(r=e)}return r}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:h,pattern:d,scheme:c,hasAccessToAllModels:u,notebookType:g}=e;if(!n&&!u)return 0;g&&s&&(t=s);let p=0;if(c)if(c===t.scheme)p=10;else{if("*"!==c)return 0;p=5}if(h)if(h===i)p=10;else{if("*"!==h)return 0;p=Math.max(p,5)}if(g)if(g===o)p=10;else{if("*"!==g||void 0===o)return 0;p=Math.max(p,5)}if(d){let e;if(e="string"==typeof d?d:Object.assign(Object.assign({},d),{base:$i(d.base)}),e!==t.fsPath&&(r=e,a=t.fsPath,!r||"string"!=typeof a||!Zee(r)(a,void 0,l)))return 0;p=10}return p}return 0;var r,a,l}function Qee(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(Qee):!!e.exclusive)}class Jee{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&(null===(t=this.notebookUri)||void 0===t?void 0:t.toString())===(null===(i=e.notebookUri)||void 0===i?void 0:i.toString())}}class ete{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new U,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),x((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(const i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){this._updateScores(e);for(const i of this._entries)i._score>0&&t(i)}_updateScores(e){var t,i;const n=null===(t=this._notebookInfoResolver)||void 0===t?void 0:t.call(this,e.uri),s=n?new Jee(e.uri,e.getLanguageId(),n.uri,n.type):new Jee(e.uri,e.getLanguageId(),void 0,void 0);if(!(null===(i=this._lastCandidate)||void 0===i?void 0:i.equals(s))){this._lastCandidate=s;for(const t of this._entries)if(t._score=Xee(t.selector,s.uri,s.languageId,Nd(e),s.notebookUri,s.notebookType),Qee(t.selector)&&t._score>0){for(const e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(ete._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:tte(e.selector)&&!tte(t.selector)?1:!tte(e.selector)&&tte(t.selector)?-1:e._timet._time?-1:0}}function tte(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(tte):Boolean(e.isBuiltin))}function ite(e){return Object.isFrozen(e)?e:function(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(ud.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||Br(n)||t.push(n)}}return e}(e)}Cu(iL,class{constructor(){this.referenceProvider=new ete(this._score.bind(this)),this.renameProvider=new ete(this._score.bind(this)),this.codeActionProvider=new ete(this._score.bind(this)),this.definitionProvider=new ete(this._score.bind(this)),this.typeDefinitionProvider=new ete(this._score.bind(this)),this.declarationProvider=new ete(this._score.bind(this)),this.implementationProvider=new ete(this._score.bind(this)),this.documentSymbolProvider=new ete(this._score.bind(this)),this.inlayHintsProvider=new ete(this._score.bind(this)),this.colorProvider=new ete(this._score.bind(this)),this.codeLensProvider=new ete(this._score.bind(this)),this.documentFormattingEditProvider=new ete(this._score.bind(this)),this.documentRangeFormattingEditProvider=new ete(this._score.bind(this)),this.onTypeFormattingEditProvider=new ete(this._score.bind(this)),this.signatureHelpProvider=new ete(this._score.bind(this)),this.hoverProvider=new ete(this._score.bind(this)),this.documentHighlightProvider=new ete(this._score.bind(this)),this.selectionRangeProvider=new ete(this._score.bind(this)),this.foldingRangeProvider=new ete(this._score.bind(this)),this.linkProvider=new ete(this._score.bind(this)),this.inlineCompletionsProvider=new ete(this._score.bind(this)),this.completionProvider=new ete(this._score.bind(this)),this.linkedEditingRangeProvider=new ete(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new ete(this._score.bind(this)),this.documentSemanticTokensProvider=new ete(this._score.bind(this)),this.documentOnDropEditProvider=new ete(this._score.bind(this)),this.documentPasteEditProvider=new ete(this._score.bind(this))}_score(e){var t;return null===(t=this._notebookTypeResolver)||void 0===t?void 0:t.call(this,e)}},1);class nte{constructor(e={},t=[],i=[],n){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(null===(e=this.raw)||void 0===e?void 0:e.length){const e=this.raw.map((e=>{if(e instanceof nte)return e;const t=new ste("");return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?_u(this.contents,e):this.contents}inspect(e,t){const i=this.rawConfiguration.getValue(e);return{value:i,override:t?this.rawConfiguration.getOverrideValue(e,t):void 0,merged:t?this.rawConfiguration.override(t).getValue(e):i}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?_u(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,i;const n=cd(this.contents),s=cd(this.overrides),o=[...this.keys],r=(null===(t=this.raw)||void 0===t?void 0:t.length)?[...this.raw]:[this];for(const a of e)if(r.push(...(null===(i=a.raw)||void 0===i?void 0:i.length)?a.raw:[a]),!a.isEmpty()){this.mergeContents(n,a.contents);for(const e of a.overrides){const[t]=s.filter((t=>Id(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=Vd(t.keys)):s.push(cd(e))}for(const e of a.keys)-1===o.indexOf(e)&&o.push(e)}return new nte(n,o,s,r.every((e=>e instanceof nte))?void 0:r)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;const i={};for(const n of Vd([...Object.keys(this.contents),...Object.keys(t)])){let e=this.contents[n];const s=t[n];s&&("object"==typeof e&&"object"==typeof s?(e=cd(e),this.mergeContents(e,s)):e=s),i[n]=e}return new nte(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&Fr(e[i])&&Fr(t[i])?this.mergeContents(e[i],t[i]):e[i]=cd(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=cd(e))};for(const s of this.overrides)1===s.identifiers.length&&s.identifiers[0]===e?t=s.contents:s.identifiers.includes(e)&&n(s.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),mu(this.contents,e),Fu.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>Id(t.identifiers,Bu(e)))),1))}updateValue(e,t,i){pu(this.contents,e,t,(e=>console.error(e))),(i=i||-1===this.keys.indexOf(e))&&this.keys.push(e),Fu.test(e)&&this.overrides.push({identifiers:Bu(e),keys:Object.keys(this.contents[e]),contents:gu(this.contents[e],(e=>console.error(e)))})}}class ste{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new nte}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:s,restricted:o,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new nte(i,n,s,r?[e]:void 0),this._restrictedConfigurations=o||[]}doParseRaw(e,t){const i=Ul.as(ku).getConfigurationProperties(),n=this.filter(e,i,!0,t);return{contents:gu(e=n.raw,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),keys:Object.keys(e),overrides:this.toOverrides(e,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){var s,o,r;let a=!1;if(!(null==n?void 0:n.scopes)&&!(null==n?void 0:n.skipRestricted)&&!(null===(s=null==n?void 0:n.exclude)||void 0===s?void 0:s.length))return{raw:e,restricted:[],hasExcludedProperties:a};const l={},h=[];for(const d in e)if(Fu.test(d)&&i){const i=this.filter(e[d],t,!1,n);l[d]=i.raw,a=a||i.hasExcludedProperties,h.push(...i.restricted)}else{const i=t[d],s=i?void 0!==i.scope?i.scope:3:void 0;(null==i?void 0:i.restricted)&&h.push(d),(null===(o=n.exclude)||void 0===o?void 0:o.includes(d))||!(null===(r=n.include)||void 0===r?void 0:r.includes(d))&&(void 0!==s&&void 0!==n.scopes&&!n.scopes.includes(s)||n.skipRestricted&&(null==i?void 0:i.restricted))?a=!0:l[d]=e[d]}return{raw:l,restricted:h,hasExcludedProperties:a}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(Fu.test(n)){const s={};for(const t in e[n])s[t]=e[n][t];i.push({identifiers:Bu(n),keys:Object.keys(s),contents:gu(s,t)})}return i}}class ote{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=s,this.policyConfiguration=o,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=h,this.workspaceConfiguration=d,this.folderConfigurationModel=c,this.memoryConfigurationModel=u}inspect(e,t,i){const n=e.inspect(t,i);return{get value(){return ite(n.value)},get override(){return ite(n.override)},get merged(){return ite(n.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return void 0!==this.userInspectValue.value||void 0!==this.userInspectValue.override?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class rte{constructor(e,t,i,n,s=new nte,o=new nte,r=new zs,a=new nte,l=new zs){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=s,this._workspaceConfiguration=o,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new zs,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new nte,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),s=this.getFolderConfigurationModelForResource(t.resource,i),o=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const a of n.overrides)for(const t of a.identifiers)void 0!==n.getOverrideValue(e,t)&&r.add(t);return new ote(e,t,n.getValue(e),r.size?[...r]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,s||void 0,o)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.policy),n=this.parseConfigurationModel(e.application),s=this.parseConfigurationModel(e.user),o=this.parseConfigurationModel(e.workspace),r=e.folders.reduce(((e,t)=>(e.set(an.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new zs);return new rte(t,i,n,s,new nte,o,r,new nte,new zs)}static parseConfigurationModel(e){return new nte(e.contents,e.keys,e.overrides)}}class ate{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const s of e.keys)this.affectedKeys.add(s);for(const[,s]of e.overrides)for(const e of s)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=rte.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;const n=this._marker+e,s=this._affectsConfigStr.indexOf(n);if(s<0)return!1;const o=s+n.length;if(o>=this._affectsConfigStr.length)return!1;const r=this._affectsConfigStr.charCodeAt(o);if(r!==this._markerCode1&&r!==this._markerCode2)return!1;if(t){return!fd(this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,this.currentConfiguraiton.getValue(e,t,this.currentWorkspace))}return!0}}const lte={kind:0},hte={kind:1};class dte{constructor(e,t,i){var n;this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const s of e){const e=s.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=dte.handleRemovals([].concat(e).concat(t));for(let s=0,o=this._keybindings.length;s=0;n--){const e=i[n];if(e.command===t.command)continue;let s=!0;for(let i=1;i=0;n--){const e=i[n];if(t.contextMatchesRules(e.when))return e}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const s=this._map.get(n[0]);if(void 0===s)return this._log("\\ No keybinding entries."),lte;let o=null;if(n.length<2)o=s;else{o=[];for(let e=0,t=s.length;et.chords.length)continue;let i=!0;for(let e=1;e=0;i--){const n=t[i];if(dte._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function cte(e){return e?`${e.serialize()}`:"no when condition"}function ute(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}const gte=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class pte extends E{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:B.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new U),this._currentChords=[],this._currentChordChecker=new nd,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=mte.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new id,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),lte;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),lte;const s=this._contextKeyService.getContext(t),o=this._currentChords.map((({keypress:e})=>e));return this._getResolver().resolve(s,o,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-e>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw g("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(ue(0,"({0}) was pressed. Waiting for second key of chord...",t));break;default:{const e=this._currentChords.map((({label:e})=>e)).join(", ");this._currentChordStatusMessage=this._notificationService.status(ue(0,"({0}) was pressed. Waiting for next key of chord...",e))}}this._scheduleLeaveChordMode(),pO.enabled&&pO.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],pO.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=mte.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=mte.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getChords();return this._ignoreSingleModifiers=new mte(s),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){var n;let s=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let o=null,r=null;if(i){const[t]=e.getSingleModifierDispatchChords();o=t,r=t?[t]:[]}else[o]=e.getDispatchChords(),r=this._currentChords.map((({keypress:e})=>e));if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),s;const a=this._contextKeyService.getContext(t),l=e.getLabel(),h=this._getResolver().resolve(a,r,o);switch(h.kind){case 0:if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(ue(0,"The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),s=!0}return s;case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),s=!0,this._expectAnotherChord(o,l),this._log(1===this._currentChords.length?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),s;case 2:if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${h.commandId} ]`),null===h.commandId||""===h.commandId){if(this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(ue(0,"The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),s=!0}}else this.inChordMode&&this._leaveChordMode(),h.isBubble||(s=!0),this._log(`+ Invoking command ${h.commandId}.`),void 0===h.commandArgs?this._commandService.executeCommand(h.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(h.commandId,h.commandArgs).then(void 0,(e=>this._notificationService.warn(e))),gte.test(h.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:h.commandId,from:"keybinding",detail:null!==(n=e.getUserSettingsLabel())&&void 0!==n?n:void 0});return s}}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class mte{constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}mte.EMPTY=new mte(null);class fte{constructor(e,t,i,n,s,o,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?_te(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=_te(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=o,this.isBuiltinExtension=r}}function _te(e){const t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return Rx.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Ax.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}getUserSettingsLabel(){return Ox.toLabel(this._os,this._chords,(e=>this._getUserSettingsLabel(e)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((e=>this._getChord(e)))}_getChord(e){return new bt(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map((e=>this._getChordDispatch(e)))}getSingleModifierDispatchChords(){return this._chords.map((e=>this._getSingleModifierChordDispatch(e)))}}class bte extends vte{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return gt.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":gt.toString(e.keyCode)}_getElectronAccelerator(e){return gt.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=gt.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_getChordDispatch(e){return bte.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=gt.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=ct[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof _t)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new _t(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=_te(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new bte(i,t)]:[]}}var Cte;function wte(e,t,i){const n=i.mode===Cte.ALIGN?i.offset:i.offset+i.size,s=i.mode===Cte.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=s?s-t:Math.max(e-t,0):t<=s?s-t:t<=e-n?n:0}!function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(Cte||(Cte={}));class yte extends E{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=E.None,this.toDisposeOnSetContainer=E.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=fs(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,vs(this.view),this.setContainer(e,t),this._register(x((()=>this.setContainer(null,1))))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=fs(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Ste,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(fs("slot"))}else this.container.appendChild(this.view);const i=new N;yte.BUBBLE_UP_EVENTS.forEach((e=>{i.add(Mn(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),yte.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(Mn(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){var t,i;this.isVisible()&&this.hide(),Dn(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",_s(this.view),this.toDisposeOnClean=e.render(this.view)||E.None,this.delegate=e,this.doLayout(),null===(i=(t=this.delegate).focus)||void 0===i||i.call(t)}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||He&&tt?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(ss(e)){const i=Hn(e),n=function(e){let t=e,i=1;do{const e=Pn(t).zoom;null!=e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==t.ownerDocument.documentElement);return i}(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t=function(e){const t=e;return!!t&&"number"==typeof t.x&&"number"==typeof t.y}(e)?{top:e.y,left:e.x,width:e.width||1,height:e.height||2}:{top:e.posy,left:e.posx,width:2,height:2};const i=zn(this.view),n=jn(this.view),s=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0;let r,a;if(0===(this.delegate.anchorAxisAlignment||0)){const e={offset:t.top-window.pageYOffset,size:t.height,position:0===s?0:1},l={offset:t.left,size:t.width,position:0===o?0:1,mode:Cte.ALIGN};r=wte(window.innerHeight,n,e)+window.pageYOffset,RD.intersects({start:r,end:r+n},{start:e.offset,end:e.offset+e.size})&&(l.mode=Cte.AVOID),a=wte(window.innerWidth,i,l)}else{const e={offset:t.left,size:t.width,position:0===o?0:1},l={offset:t.top,size:t.height,position:0===s?0:1,mode:Cte.ALIGN};a=wte(window.innerWidth,i,e),RD.intersects({start:a,end:a+i},{start:e.offset,end:e.offset+e.size})&&(l.mode=Cte.AVOID),r=wte(window.innerHeight,n,l)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===s?"bottom":"top"),this.view.classList.add(0===o?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=Hn(this.container);this.view.style.top=r-(this.useFixedPosition?Hn(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?Hn(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),vs(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!qn(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}yte.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],yte.BUBBLE_DOWN_EVENTS=["click"];const Ste='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var Lte=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},kte=function(e,t){return function(i,n){t(i,n,e)}};let Dte=class extends E{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=E.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new yte(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t===this.container&&this.shadowRoot===i||(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=i,this.contextView.show(e);const n=x((()=>{this.currentViewDisposable===n&&this.hideContextView()}));return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};Dte=Lte([kte(0,oee)],Dte);let xte=[],Nte=[],Ete=[];function Ite(e,t=!1){!function(e,t,i){const n=function(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:t,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?Zee(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(qi.sep)>=0}}(e,t);xte.push(n),n.userConfigured?Ete.push(n):Nte.push(n);i&&!n.userConfigured&&xte.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}(e,!1,t)}function Mte(e,t){return function(e,t){let i;if(e)switch(e.scheme){case vn.file:i=e.fsPath;break;case vn.data:i=Na.parseMetaData(e).get(Na.META_DATA_LABEL);break;case vn.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:yu.unknown}];i=i.toLowerCase();const n=Xi(i),s=Tte(i,n,Ete);if(s)return[s,{id:zu,mime:yu.text}];const o=Tte(i,n,Nte);if(o)return[o,{id:zu,mime:yu.text}];if(t){const e=function(e){Fo(e)&&(e=e.substr(1));if(e.length>0)for(let t=xte.length-1;t>=0;t--){const i=xte[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}return}(t);if(e)return[e,{id:zu,mime:yu.text}]}return[{id:"unknown",mime:yu.unknown}]}(e,t).map((e=>e.id))}function Tte(e,t,i){var n;let s,o,r;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){s=l;break}if(l.filepattern&&(!o||l.filepattern.length>o.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(o=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return s||(o||(r||void 0))}const Rte=Object.prototype.hasOwnProperty,Ate="vs.editor.nullLanguage";class Ote{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Ate,0),this._register(zu,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Ate}}class Pte extends E{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new U),this.onDidChange=this._onDidChange.event,Pte.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Ote,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Hu.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){Pte.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},xte=xte.filter((e=>e.userConfigured)),Nte=[];const e=[].concat(Hu.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),Ul.as(ku).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;Rte.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)Ite({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const l of t.filenames)Ite({id:i,mime:n,filename:l},this._warnOnOverwrite),e.filenames.push(l);if(Array.isArray(t.filenamePatterns))for(const l of t.filenamePatterns)Ite({id:i,mime:n,filepattern:l},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);"^"!==(s=t).source&&"^$"!==s.source&&"$"!==s.source&&"^\\s*$"!==s.source&&s.exec("")&&0===s.lastIndex||Ite({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(a){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,a)}}var s;e.aliases.push(i);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const l of o)l&&0!==l.length&&e.aliases.push(l);const r=null!==o&&o.length>0;if(r&&null===o[0]);else{const t=(r?o[0]:null)||i;!r&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&Rte.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return Rte.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&Rte.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?Mte(e,t):[]}}Pte.instanceCount=0;class Fte extends E{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new U),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new U),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new U({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,Fte.instanceCount++,this._registry=this._register(new Pte(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){Fte.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){return Hd(this._registry.guessLanguageIdByFilepathOrFirstLine(e,t),null)}createById(e){return new Bte(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new Bte(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=zu),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),DC.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}Fte.instanceCount=0;class Bte{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages((()=>this._evaluate()))),this._emitter||(this._emitter=new U({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,null===(e=this._emitter)||void 0===e||e.fire(this.languageId))}}const Wte=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Vte=/(&)?(&)([^\s&])/g;var Hte;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(Hte||(Hte={}));class zte extends Ix{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const s=document.createElement("div");s.classList.add("monaco-menu"),s.setAttribute("role","presentation"),super(s,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Pe||Fe?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=s,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new N),this.initializeOrUpdateStyleSheet(e,n),this._register(qL.addTarget(s)),En(s,os.KEY_DOWN,(e=>{new St(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add(En(s,os.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){as(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof Kte&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),Fe&&this._register(En(s,os.KEY_DOWN,(e=>{const t=new St(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),as(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),as(e,!0))}))),this._register(En(this.domNode,os.MOUSE_OUT,(e=>{qn(e.relatedTarget,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register(En(this.actionsList,os.MOUSE_OVER,(e=>{let t=e.target;if(t&&qn(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(qL.addTarget(this.actionsList)),this._register(En(this.actionsList,KL.Tap,(e=>{let t=e.initialTarget;if(t&&qn(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new TD(s,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register(En(s,KL.Change,(e=>{as(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register(En(r,os.MOUSE_UP,(e=>{e.preventDefault()}))),s.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof jte))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(Zn(e)?this.styleSheet=Jn(e):(zte.globalStyleSheet||(zte.globalStyleSheet=Jn()),this.styleSheet=zte.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${qte(Qr.menuSelection)}\n${qte(Qr.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221a\u03c6 */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderHoverBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderActiveBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`)}return i}(t,Zn(e))}styleScrollElement(e,t){var i,n;const s=null!==(i=t.foregroundColor)&&void 0!==i?i:"",o=null!==(n=t.backgroundColor)&&void 0!==n?n:"",r=t.borderColor?`1px solid ${t.borderColor}`:"",a=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=r,e.style.borderRadius="5px",e.style.color=s,e.style.backgroundColor=o,e.style.boxShadow=a}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(En(this.element,os.MOUSE_UP,(e=>{if(as(e,!0),ne){if(new Nt(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register(En(this.element,os.CONTEXT_MENU,(e=>{as(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=ds(this.element,fs("a.action-menu-item")),this._action.id===Ka.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=ds(this.item,fs("span.menu-item-check"+ea.asCSSSelector(Qr.menuSelection))),this.check.setAttribute("role","none"),this.label=ds(this.item,fs("span.action-label")),this.options.label&&this.options.keybinding&&(ds(this.item,fs("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),null===(e=this.item)||void 0===e||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){Dn(this.label);let t=oa(this.action.label);if(t){const i=function(e){const t=Wte,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=Wte.exec(t);if(n){t=Qs(t),Vte.lastIndex=0;let i=Vte.exec(t);for(;i&&i[1];)i=Vte.exec(t);const s=e=>e.replace(/&&/g,"&");i?this.label.append(to(s(t.substr(0,i.index))," "),fs("u",{"aria-hidden":"true"},i[3]),io(s(t.substr(i.index+i[0].length))," ")):this.label.innerText=s(t).trim(),null===(e=this.item)||void 0===e||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=null!=t?t:"",this.item.style.backgroundColor=null!=i?i:"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=null!=t?t:"")}}class Kte extends Ute{constructor(e,t,i,n,s){super(e,e,n,s),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new N),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:Hte.Right,this.showScheduler=new sd((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new sd((()=>{this.element&&!qn(Xn(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=ds(this.item,fs("span.submenu-indicator"+ea.asCSSSelector(Qr.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(En(this.element,os.KEY_UP,(e=>{const t=new St(e);(t.equals(17)||t.equals(3))&&(as(e,!0),this.createSubmenu(!0))}))),this._register(En(this.element,os.KEY_DOWN,(e=>{const t=new St(e);Xn()===this.item&&(t.equals(17)||t.equals(3))&&as(e,!0)}))),this._register(En(this.element,os.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register(En(this.element,os.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register(En(this.element,os.FOCUS_OUT,(e=>{this.element&&!qn(Xn(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}))))}updateEnabled(){}onClick(e){as(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(ge){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=wte(e.width,t.width,{position:n===Hte.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left{new St(e).equals(15)&&(as(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add(En(this.submenuContainer,os.KEY_DOWN,(e=>{new St(e).equals(15)&&as(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=null!=e?e:"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class jte extends xx{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function qte(e){const t=Xr()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}class $te{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;const n=ss(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{var s;this.lastContainer=n;const o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild(fs(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",null===(s=this.blockDisposable)||void 0===s||s.dispose(),this.blockDisposable=En(this.block,os.MOUSE_DOWN,(e=>e.stopPropagation())));const r=new N,a=e.actionRunner||new Ua;return a.onWillRun((t=>this.onActionRun(t,!e.skipTelemetry)),this,r),a.onDidRun(this.onDidActionRun,this,r),i=new zte(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:a,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},eN),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r),r.add(En(window,os.BLUR,(()=>this.contextViewService.hideContextView(!0)))),r.add(En(window,os.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new Nt(e);let i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),D(r,i)},focus:()=>{null==i||i.focus(!!e.autoSelectFirstItem)},onHide:t=>{var i,n,s;null===(i=e.onHide)||void 0===i||i.call(e,!!t),this.block&&(this.block.remove(),this.block=null),null===(n=this.blockDisposable)||void 0===n||n.dispose(),this.blockDisposable=null,this.lastContainer&&(Xn()===this.lastContainer||qn(Xn(),this.lastContainer))&&(null===(s=this.focusToReturn)||void 0===s||s.focus()),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!d(e.error)&&this.notificationService.error(e.error)}}var Gte=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Zte=function(e,t){return function(i,n){t(i,n,e)}};let Yte=class extends E{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new $te(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,o){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=o,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new U),this._onDidHideContextMenu=this._store.add(new U)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Xte.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var i;null===(i=e.onHide)||void 0===i||i.call(e,t),this._onDidHideContextMenu.fire()}})),ks.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var Xte,Qte;Yte=Gte([Zte(0,rh),Zte(1,uL),Zte(2,Vx),Zte(3,PL),Zte(4,Jl),Zte(5,Rl)],Yte),function(e){e.transform=function(e,t,i){if(!((n=e)&&n.menuId instanceof Ql))return e;var n;const{menuId:s,menuActionOptions:o,contextKeyService:r}=e;return Object.assign(Object.assign({},e),{getActions:()=>{const n=[];if(s){const e=t.createMenu(s,null!=r?r:i);!function(e,t,i,n){const s=e.getActions(t),o=ks.getInstance();AW(s,i,o.keyStatus.altKey||(Oe||Fe)&&o.keyStatus.shiftKey,n?e=>e===n:e=>"navigation"===e)}(e,o,n),e.dispose()}return e.getActions?Ka.join(e.getActions(),n):n}})}}(Xte||(Xte={})),function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(Qte||(Qte={}));var Jte=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},eie=function(e,t){return function(i,n){t(i,n,e)}},tie=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let iie=class{constructor(e){this._commandService=e}open(e,t){return tie(this,void 0,void 0,(function*(){if(!Kk(e,vn.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;if("string"==typeof e&&(e=an.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=ck(decodeURIComponent(e.query))}catch(ge){try{i=ck(e.query)}catch(Ws){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};iie=Jte([eie(0,Ga)],iie);let nie=class{constructor(e){this._editorService=e}open(e,t){return tie(this,void 0,void 0,(function*(){"string"==typeof e&&(e=an.parse(e));const{selection:i,uri:n}=function(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}(e);return(e=n).scheme===vn.file&&(e=Sa(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,source:(null==t?void 0:t.fromUserGesture)?Qte.USER:Qte.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};nie=Jte([eie(0,Fa)],nie);let sie=class{constructor(e,t){this._openers=new O,this._validators=new O,this._resolvers=new O,this._resolvedUriTargets=new zs((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new O,this._defaultExternalOpener={openExternal:e=>tie(this,void 0,void 0,(function*(){return jk(e,vn.http,vn.https)?Cs(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>tie(this,void 0,void 0,(function*(){return!(!(null==t?void 0:t.openExternal)&&!jk(e,vn.mailto,vn.http,vn.https,vn.vsls))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new iie(t)),this._openers.push(new nie(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}open(e,t){var i;return tie(this,void 0,void 0,(function*(){const n="string"==typeof e?an.parse(e):e,s=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!(yield e.shouldOpen(s,t)))return!1;for(const i of this._openers){if(yield i.open(e,t))return!0}return!1}))}resolveExternalUri(e,t){return tie(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(ge){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return tie(this,void 0,void 0,(function*(){const i="string"==typeof e?an.parse(e):e;let n,s;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(ge){n=i}if(s="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners){if(yield t.openExternal(s,{sourceUri:i,preferredOpenerId:e},Hh.None))return!0}}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},Hh.None)}))}dispose(){this._validators.clear()}};sie=Jte([eie(0,Fa),eie(1,Ga)],sie);var oie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},rie=function(e,t){return function(i,n){t(i,n,e)}};let aie=class extends E{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new U),this._markerDecorations=new zs,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new lie(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==vn.inMemory&&e.uri.scheme!==vn.internal&&e.uri.scheme!==vn.vscode||null===(t=this._markerService)||void 0===t||t.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};aie=oie([rie(0,Wa),rie(1,wN)],aie);class lie extends E{constructor(e){super(),this.model=e,this._map=new js,this._register(x((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:i}=function(e,t){const i=[],n=[];for(const s of e)t.has(s)||i.push(s);for(const s of t)e.has(s)||n.push(s);return{removed:i,added:n}}(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===i.length)return!1;const n=i.map((e=>this._map.get(e))),s=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),o=this.model.deltaDecorations(n,s);for(const r of i)this._map.delete(r);for(let r=0;r=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new Mh(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}}var hie,die=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cie=function(e,t){return function(i,n){t(i,n,e)}};function uie(e){return e.toString()}class gie{constructor(e,t,i){this.model=e,this._modelEventListeners=new N,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}dispose(){this._modelEventListeners.dispose()}}const pie=Fe||Pe?1:2;class mie{constructor(e,t,i,n,s,o,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=o,this.versionId=r,this.alternativeVersionId=a}}let fie=hie=class extends E{constructor(e,t,i,n,s){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._languageService=n,this._languageConfigurationService=s,this._onModelAdded=this._register(new U),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new U),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new U),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var i;let n=wc.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let s="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(s=Math.max(t,1))}let o=wc.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=pie;const a=e.eol;"\r\n"===a?r=2:"\n"===a&&(r=1);let l=wc.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let h=wc.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(h="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=wc.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let c=wc.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(c={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:s,insertSpaces:o,detectIndentation:h,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:d,bracketPairColorizationOptions:c}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===$e||2===$e?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(e,t,i){const n="string"==typeof e?e:e.languageId;let s=this._modelCreationOptionsByLanguageAndResource[n+t];if(!s){const e=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),o=this._getEOL(t,n);s=hie._readModelOptions({editor:e,eol:o},i),this._modelCreationOptionsByLanguageAndResource[n+t]=s}return s}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;ne){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),o=new _w(e,t,s,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(uie(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=this._getSHA1Computer(),s=!!n.canComputeSHA1(o)&&n.computeSHA1(o)===e.sha1;if(s||e.sharesUndoRedoStack){for(const e of t.past)jv(e)&&e.matchesResource(i)&&e.setModel(o);for(const e of t.future)jv(e)&&e.matchesResource(i)&&e.setModel(o);this._undoRedoService.setElementsValidFlag(i,!0,(e=>jv(e)&&e.matchesResource(i))),s&&(o._overwriteVersionId(e.versionId),o._overwriteAlternativeVersionId(e.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=uie(o.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new gie(o,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=a,a}createModel(e,t,i,n=!1){let s;return s=t?this._createModelData(e,t,i,n):this._createModelData(e,zu,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||t.future.length>0){for(const i of t.past)jv(i)&&i.matchesResource(e.uri)&&(s=!0,o+=i.heapSize(e.uri),i.setModel(e.uri));for(const i of t.future)jv(i)&&i.matchesResource(e.uri)&&(s=!0,o+=i.heapSize(e.uri),i.setModel(e.uri))}}const r=hie.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(s)if(n||!(o>r)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(r-o),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>jv(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new mie(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,o,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!n){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),o=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);hie._setModelOptionsForModel(e,o,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new _ie}};fie.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,fie=hie=die([cie(0,uu),cie(1,uT),cie(2,rw),cie(3,yc),cie(4,Xu)],fie);class _ie{canComputeSHA1(e){return e.getValueLength()<=_ie.MAX_MODEL_SIZE}computeSHA1(e){const t=new fE,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}}_ie.MAX_MODEL_SIZE=10485760;var vie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},bie=function(e,t){return function(i,n){t(i,n,e)}};let Cie=class extends E{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Ul.as(NJ),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[s,o]=this.getOrInstantiateProvider(e),r=this.visibleQuickAccess,a=null==r?void 0:r.descriptor;if(r&&o&&a===o)return e===o.prefix||(null==i?void 0:i.preserveValue)||(r.picker.value=e),void this.adjustValueSelection(r.picker,o,i);if(o&&!(null==i?void 0:i.preserveValue)){let t;if(r&&a&&a!==o){const e=r.value.substr(a.prefix.length);e&&(t=`${o.prefix}${e}`)}if(!t){const e=null==s?void 0:s.defaultFilterValue;e===xJ.LAST?t=this.lastAcceptedPickerValues.get(o):"string"==typeof e&&(t=`${o.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new N,h=l.add(this.quickInputService.createQuickPick());let d;h.value=e,this.adjustValueSelection(h,o,i),h.placeholder=null==o?void 0:o.placeholder,h.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!r,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(h.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:aE.SECOND),h.contextKey=null==o?void 0:o.contextKey,h.filterValue=e=>e.substring(o?o.prefix.length:0),t&&(d=new ad,l.add(B.once(h.onWillAccept)((e=>{e.veto(),h.hide()})))),l.add(this.registerPickerListeners(h,s,o,e,null==i?void 0:i.providerOptions));const c=l.add(new Uh);return s&&l.add(s.provide(h,c.token,null==i?void 0:i.providerOptions)),B.once(h.onDidHide)((()=>{0===h.selectedItems.length&&c.cancel(),l.dispose(),null==d||d.complete(h.selectedItems.slice(0))})),h.show(),t?null==d?void 0:d.p:void 0}adjustValueSelection(e,t,i){var n;let s;s=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n,s){const o=new N,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add(x((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0,providerOptions:s}):r.value=e}))),i&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};Cie=vie([bie(0,lE),bie(1,Oa)],Cie);const wie="done",yie="active",Sie="infinite",Lie="infinite-long-running",kie="discrete";class Die extends E{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new sd((()=>_s(this.element)),0)),this.longRunningScheduler=this._register(new sd((()=>this.infiniteLongRunning()),Die.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(null==t?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(yie,Sie,Lie,kie),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(wie),this.element.classList.contains(Sie)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(kie,wie,Lie),this.element.classList.add(yie,Sie),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Lie)}getContainer(){return this.element}}Die.LONG_RUNNING_INFINITE_THRESHOLD=1e4;const xie=fs;class Nie extends E{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>En(this.findInput.inputBox.inputElement,os.KEY_DOWN,(t=>{e(new St(t))})),this.onMouseDown=e=>En(this.findInput.inputBox.inputElement,os.MOUSE_DOWN,(t=>{e(new Nt(t))})),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=ds(this.parent,xie(".quick-input-box")),this.findInput=this._register(new NV(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return"password"===this.findInput.inputBox.inputElement.type}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===dL.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===dL.Info?1:e===dL.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===dL.Info?1:e===dL.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}const Eie=new Gs((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new Gs((()=>({collator:new Intl.Collator(void 0,{numeric:!0})}))),new Gs((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));function Iie(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=function(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=n.startsWith(i),r=s.startsWith(i);if(o!==r)return o?-1:1;if(o&&r){if(n.lengths.length)return 1}return 0}(e,t,i);if(o)return o;const r=n.endsWith(i);if(r!==s.endsWith(i))return r?-1:1;const a=function(e,t){const i=e||"",n=t||"",s=Eie.value.collator.compare(i,n);return Eie.value.collatorIsNumeric&&0===s&&i!==n?i=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class Tie{constructor(e){this.nodes=e}toString(){return this.nodes.map((e=>"string"==typeof e?e:e.label)).join("")}}Mie([UL],Tie.prototype,"toString",null);const Rie=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;const Aie={},Oie=new ak("quick-input-button-icon-");function Pie(e){if(!e)return;let t;const i=e.dark.toString();return Aie[i]?t=Aie[i]:(t=Oie.nextId(),is(`.${t}, .hc-light .${t}`,`background-image: ${ws(e.light||e.dark)}`),is(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${ws(e.dark)}`),Aie[i]=t),t}function Fie(e,t,i){us(t);const n=function(e){const t=[];let i,n=0;for(;i=Rie.exec(e);){i.index-n>0&&t.push(e.substring(n,i.index));const[,s,o,,r]=i;r?t.push({label:s,href:o,title:r}):t.push({label:s,href:o}),n=i.index+i[0].length}return n{rs(e)&&as(e,!0),i.callback(o.href)},a=i.disposables.add(new Hy(n,os.CLICK)).event,l=i.disposables.add(new Hy(n,os.KEY_DOWN)).event,h=B.chain(l,(e=>e.filter((e=>{const t=new St(e);return t.equals(10)||t.equals(3)}))));i.disposables.add(qL.addTarget(n));const d=i.disposables.add(new Hy(n,KL.Tap)).event;B.any(a,d,h)(r,null,i.disposables),t.appendChild(n)}}var Bie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Wie=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Vie=fs;class Hie{constructor(e,t,i,n,s,o,r){var a,l,h;this._checked=!1,this._hidden=!1,this.hasCheckbox=n,this.index=i,this.fireButtonTriggered=s,this.fireSeparatorButtonTriggered=o,this._onChecked=r,this.onChecked=n?B.map(B.filter(this._onChecked.event,(e=>e.listElement===this)),(e=>e.checked)):B.None,"separator"===e.type?this._separator=e:(this.item=e,t&&"separator"===t.type&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=null===(a=this.item.highlights)||void 0===a?void 0:a.label,this._descriptionHighlights=null===(l=this.item.highlights)||void 0===l?void 0:l.description,this._detailHighlights=null===(h=this.item.highlights)||void 0===h?void 0:h.detail,this.saneTooltip=this.item.tooltip),this._init=new Gs((()=>{var t;const i=null!==(t=e.label)&&void 0!==t?t:"",n=aa(i).text.trim(),s=e.ariaLabel||[i,this.saneDescription,this.saneDetail].map((e=>{return(t=e)?t.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():"";var t})).filter((e=>!!e)).join(", ");return{saneLabel:i,saneSortLabel:n,saneAriaLabel:s}}))}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class zie{constructor(e){this.themeService=e}get templateId(){return zie.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=ds(e,Vie(".quick-input-list-entry"));const i=ds(t.entry,Vie("label.quick-input-list-label"));t.toDisposeTemplate.push(Mn(i,os.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=ds(i,Vie("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(Mn(t.checkbox,os.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=ds(i,Vie(".quick-input-list-rows")),s=ds(n,Vie(".quick-input-list-row")),o=ds(n,Vie(".quick-input-list-row"));t.label=new Uz(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.label),t.icon=cs(t.label.element,Vie(".quick-input-list-icon"));const r=ds(s,Vie(".quick-input-list-entry-keybinding"));t.keybinding=new Wx(r,$e);const a=ds(o,Vie(".quick-input-list-label-meta"));return t.detail=new Uz(a,{supportHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.detail),t.separator=ds(t.entry,Vie(".quick-input-list-separator")),t.actionBar=new Ix(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){var n,s,o,r;i.element=e,e.element=null!==(n=i.entry)&&void 0!==n?n:void 0;const a=e.item?e.item:e.separator;i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:l,descriptionHighlights:h,detailHighlights:d}=e;if(null===(s=e.item)||void 0===s?void 0:s.iconPath){const t=T_(this.themeService.getColorTheme().type)?e.item.iconPath.dark:null!==(o=e.item.iconPath.light)&&void 0!==o?o:e.item.iconPath.dark,n=an.revive(t);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=ws(n)}else i.icon.style.backgroundImage="",i.icon.className=(null===(r=e.item)||void 0===r?void 0:r.iconClass)?`quick-input-list-icon ${e.item.iconClass}`:"";const c={matches:l||[],descriptionTitle:e.saneDescription,descriptionMatches:h||[],labelEscapeNewLines:!0};"separator"!==a.type?(c.extraClasses=a.iconClasses,c.italic=a.italic,c.strikethrough=a.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item")):i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(e.saneLabel,e.saneDescription,c),i.keybinding.set("separator"===a.type?void 0:a.keybinding),e.saneDetail?(i.detail.element.style.display="",i.detail.setLabel(e.saneDetail,void 0,{matches:d,title:e.saneDetail,labelEscapeNewLines:!0})):i.detail.element.style.display="none",e.item&&e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);const u=a.buttons;u&&u.length?(i.actionBar.push(u.map(((t,i)=>{let n=t.iconClass||(t.iconPath?Pie(t.iconPath):void 0);return t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:`id-${i}`,class:n,enabled:!0,label:"",tooltip:t.tooltip||"",run:()=>{"separator"!==a.type?e.fireButtonTriggered({button:t,item:a}):e.fireSeparatorButtonTriggered({button:t,separator:a})}}})),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=k(i.toDisposeElement),i.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=k(e.toDisposeElement),e.toDisposeTemplate=k(e.toDisposeTemplate)}}zie.ID="listelement";class Uie{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return zie.ID}}var Kie;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(Kie||(Kie={}));class jie{constructor(e,t,i,n){this.parent=e,this.options=i,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new U,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new U,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new U,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new U,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new U,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new U,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new U,this.onKeyDown=this._onKeyDown.event,this._onLeave=new U,this.onLeave=this._onLeave.event,this._listElementChecked=new U,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=ds(this.parent,Vie(".quick-input-list"));const s=new Uie,o=new $ie;if(this.list=i.createList("QuickInput",this.container,s,[new zie(n)],{identityProvider:{getId:e=>{var t,i,n,s,o,r,a,l;return null!==(l=null!==(r=null!==(s=null!==(i=null===(t=e.item)||void 0===t?void 0:t.id)&&void 0!==i?i:null===(n=e.item)||void 0===n?void 0:n.label)&&void 0!==s?s:null===(o=e.separator)||void 0===o?void 0:o.id)&&void 0!==r?r:null===(a=e.separator)||void 0===a?void 0:a.label)&&void 0!==l?l:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new St(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(Pe?e.metaKey:e.ctrlKey)&&this.list.setFocus(zd(this.list.length));break;case 16:{const e=this.list.getFocus();1===e.length&&0===e[0]&&this._onLeave.fire();break}case 18:{const e=this.list.getFocus();1===e.length&&e[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(En(this.container,os.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),i.hoverDelegate){const e=new Qh(i.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver((t=>Wie(this,void 0,void 0,(function*(){var i;if(t.browserEvent.target instanceof HTMLAnchorElement)e.cancel();else if(t.browserEvent.relatedTarget instanceof HTMLAnchorElement||!qn(t.browserEvent.relatedTarget,null===(i=t.element)||void 0===i?void 0:i.element))try{yield e.trigger((()=>Wie(this,void 0,void 0,(function*(){t.element&&this.showHover(t.element)}))))}catch(t){if(!d(t))throw t}}))))),this.disposables.push(this.list.onMouseOut((t=>{var i;qn(t.browserEvent.relatedTarget,null===(i=t.element)||void 0===i?void 0:i.element)||e.cancel()}))),this.disposables.push(e)}this.disposables.push(this._listElementChecked.event((e=>this.fireCheckedEvents()))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return B.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return B.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=k(this.elementDisposables);const t=e=>this.fireButtonTriggered(e),i=e=>this.fireSeparatorButtonTriggered(e);this.inputElements=e;const n=new Map,s=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce(((o,r,a)=>{var l;const h=a>0?e[a-1]:void 0;if("separator"===r.type&&!r.buttons)return o;const d=new Hie(r,h,a,s,t,i,this._listElementChecked),c=o.length;return o.push(d),n.set(null!==(l=d.item)&&void 0!==l?l:d.separator,c),o}),[]),this.elementsToIndexes=n,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item)).filter((e=>!!e))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===Kie.Second&&this.list.length<2&&(e=Kie.First),e){case Kie.First:this.list.scrollTop=0,this.list.focusFirst(void 0,(e=>!!e.item));break;case Kie.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,(e=>!!e.item));break;case Kie.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,(e=>!!e.item));break;case Kie.Next:{this.list.focusNext(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case Kie.Previous:{this.list.focusPrevious(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case Kie.NextPage:this.list.focusNextPage(void 0,(e=>!!e.item));break;case Kie.PreviousPage:this.list.focusPreviousPage(void 0,(e=>!!e.item))}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,i,n;void 0!==this.options.hoverDelegate&&(this._lastHover&&!this._lastHover.isDisposed&&(null===(i=(t=this.options.hoverDelegate).onDidHideHover)||void 0===i||i.call(t),null===(n=this._lastHover)||void 0===n||n.dispose()),e.element&&e.saneTooltip&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:e=>{this.options.linkOpenerDelegate(e)},showPointer:!0,container:this.container,hoverPosition:1},!1)))}layout(e){this.list.getHTMLElement().style.maxHeight=e?44*Math.floor(e/44)+6+"px":"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this.elements.forEach((n=>{var s,o,r,a;let l;l="fuzzy"===this.matchOnLabelMode?this.matchOnLabel&&null!==(s=la(e,aa(n.saneLabel)))&&void 0!==s?s:void 0:this.matchOnLabel&&null!==(o=function(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return qie(e,i);const s=to(i," "),o=i.length-s.length,r=qie(e,s);if(r)for(const a of r){const e=n[a.start+o]+o;a.start+=e,a.end+=e}return r}(t,aa(n.saneLabel)))&&void 0!==o?o:void 0;const h=this.matchOnDescription&&null!==(r=la(e,aa(n.saneDescription||"")))&&void 0!==r?r:void 0,d=this.matchOnDetail&&null!==(a=la(e,aa(n.saneDetail||"")))&&void 0!==a?a:void 0;if(l||h||d?(n.labelHighlights=l,n.descriptionHighlights=h,n.detailHighlights=d,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const e=n.index&&this.inputElements[n.index-1];i=e&&"separator"===e.type?e:i,i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));const i=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const t=e.toLowerCase();i.sort(((e,i)=>function(e,t,i){const n=e.labelHighlights||[],s=t.labelHighlights||[];if(n.length&&!s.length)return-1;if(!n.length&&s.length)return 1;if(0===n.length&&0===s.length)return 0;return Iie(e.saneSortLabel,t.saneSortLabel,i)}(e,i,t)))}return this.elementsToIndexes=i.reduce(((e,t,i)=>{var n;return e.set(null!==(n=t.item)&&void 0!==n?n:t.separator,i),e}),new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=k(this.elementDisposables),this.disposables=k(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){const e=this.list.getFocusedElements()[0];if(!(null==e?void 0:e.saneTooltip))return;if(this._lastHover&&!this._lastHover.isDisposed)return void this._lastHover.dispose();const t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);const i=new N;i.add(this.list.onDidChangeFocus((e=>{e.indexes.length&&this.showHover(e.elements[0])}))),this._lastHover&&i.add(this._lastHover),this._toggleHover=i,this.elementDisposables.push(this._toggleHover)}}function qie(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}Bie([UL],jie.prototype,"onDidChangeFocus",null),Bie([UL],jie.prototype,"onDidChangeSelection",null);class $ie{getWidgetAriaLabel(){return ue(0,"Quick Input")}getAriaLabel(e){var t;return(null===(t=e.separator)||void 0===t?void 0:t.label)?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var Gie=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Zie={iconClass:ea.asClassName(Qr.quickInputBack),tooltip:ue(0,"Back"),handle:-1};class Yie extends E{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=Yie.noPromptMessage,this._severity=dL.Ignore,this.onDidTriggerButtonEmitter=this._register(new U),this.onDidHideEmitter=this._register(new U),this.onDisposeEmitter=this._register(new U),this.visibleDisposables=this._register(new N),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!He;this._ignoreFocusOut=e&&!He,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=null!=e?e:[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=rE.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const i=this.getTitle();i&&this.ui.title.textContent!==i?this.ui.title.textContent=i:i||" "===this.ui.title.innerHTML||(this.ui.title.innerText="\xa0");const n=this.getDescription();if(this.ui.description1.textContent!==n&&(this.ui.description1.textContent=n),this.ui.description2.textContent!==n&&(this.ui.description2.textContent=n),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?us(this.ui.widget,this._widget):us(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new id,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===Zie));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new za(`id-${t}`,"",e.iconClass||Pie(e.iconPath),!0,(()=>Gie(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==Zie));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new za(`id-${t}`,"",e.iconClass||Pie(e.iconPath),!0,(()=>Gie(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const i=null!==(t=null===(e=this.toggles)||void 0===e?void 0:e.filter((e=>e instanceof mV)))&&void 0!==t?t:[];this.ui.inputBox.toggles=i}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const s=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==s&&(this._lastValidationMessage=s,us(this.ui.message),Fie(s,this.ui.message,{callback:e=>{this.ui.linkOpenerDelegate(e)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?ue(0,"{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==dL.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}Yie.noPromptMessage=ue(0,"Press 'Enter' to confirm your input or 'Escape' to cancel");class Xie extends Yie{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new U),this.onWillAcceptEmitter=this._register(new U),this.onDidAcceptEmitter=this._register(new U),this.onDidCustomEmitter=this._register(new U),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=aE.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new U),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new U),this.onDidTriggerItemButtonEmitter=this._register(new U),this.onDidTriggerSeparatorButtonEmitter=this._register(new U),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){if(this._value!==e){if(this._value=e,t||this.update(),this.visible){this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst()}this.onDidChangeValueEmitter.fire(this._value)}}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?oE:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(Kie.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(Kie.Next),this.canSelectMany&&this.ui.list.domFocus(),as(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(Kie.Previous):this.ui.list.focus(Kie.Last),this.canSelectMany&&this.ui.list.domFocus(),as(e,!0);break;case 12:this.ui.list.focus(Kie.NextPage),this.canSelectMany&&this.ui.list.domFocus(),as(e,!0);break;case 11:this.ui.list.focus(Kie.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),as(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Kie.First),as(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Kie.Last),as(e,!0))}}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Id(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&Id(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&Id(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((e=>this.onDidTriggerSeparatorButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return En(this.ui.container,os.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new St(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const n=e.getChords();return!(n.length>1)&&(n[0].shiftKey&&4===i?!(t.ctrlKey||t.altKey||t.metaKey):!(!n[0].altKey||6!==i)||(!(!n[0].ctrlKey||5!==i)||!(!n[0].metaKey||57!==i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;if(!n&&i.inputBox&&(n=this.placeholder||Xie.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=null!=n?n:null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case aE.NONE:this._itemActivation=aE.FIRST;break;case aE.SECOND:this.ui.list.focus(Kie.Second),this._itemActivation=aE.FIRST;break;case aE.LAST:this.ui.list.focus(Kie.Last),this._itemActivation=aE.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Kie.First)),this.keepScrollPosition&&(this.scrollTop=e)}}Xie.DEFAULT_ARIA_LABEL=ue(0,"Type to narrow down results.");class Qie extends Yie{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new U),this.onDidAcceptEmitter=this._register(new U),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire()))),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}const Jie=fs;class ene extends E{constructor(e,t){super(),this.options=e,this.themeService=t,this.enabled=!0,this.onDidAcceptEmitter=this._register(new U),this.onDidCustomEmitter=this._register(new U),this.onDidTriggerButtonEmitter=this._register(new U),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new U),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new U),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(En(window,os.KEY_DOWN,e,!0)),this._register(En(window,os.KEY_UP,e,!0)),this._register(En(window,os.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=ds(this.parentElement,Jie(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Jn(e),i=ds(e,Jie(".quick-input-titlebar")),n=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,s=this._register(new Ix(i,n));s.domNode.classList.add("quick-input-left-action-bar");const o=ds(i,Jie(".quick-input-title")),r=this._register(new Ix(i,n));r.domNode.classList.add("quick-input-right-action-bar");const a=ds(e,Jie(".quick-input-header")),l=ds(a,Jie("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",ue(0,"Toggle all checkboxes")),this._register(Mn(l,os.CHANGE,(e=>{const t=l.checked;D.setAllVisibleChecked(t)}))),this._register(En(l,os.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const h=ds(a,Jie(".quick-input-description")),d=ds(a,Jie(".quick-input-and-message")),c=ds(d,Jie(".quick-input-filter")),u=this._register(new Nie(c,this.styles.inputBox,this.styles.toggle));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=ds(c,Jie(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new Vz(g,{countFormat:ue(0,"{0} Results")},this.styles.countBadge),m=ds(c,Jie(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new Vz(m,{countFormat:ue(0,"{0} Selected")},this.styles.countBadge),_=ds(a,Jie(".quick-input-action")),v=this._register(new GZ(_,this.styles.button));v.label=ue(0,"OK"),this._register(v.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=ds(a,Jie(".quick-input-action")),C=this._register(new GZ(b,this.styles.button));C.label=ue(0,"Custom"),this._register(C.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const w=ds(d,Jie(`#${this.idPrefix}message.quick-input-message`)),y=this._register(new Die(e,this.styles.progressBar));y.getContainer().classList.add("quick-input-progress");const S=ds(e,Jie(".quick-input-html-widget"));S.tabIndex=-1;const L=ds(e,Jie(".quick-input-description")),k=this.idPrefix+"list",D=this._register(new jie(e,k,this.options,this.themeService));u.setAttribute("aria-controls",k),this._register(D.onDidChangeFocus((()=>{var e;u.setAttribute("aria-activedescendant",null!==(e=D.getActiveDescendant())&&void 0!==e?e:"")}))),this._register(D.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(D.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(D.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(D.onLeave((()=>{setTimeout((()=>{u.setFocus(),this.controller instanceof Xie&&this.controller.canSelectMany&&D.clearFocus()}),0)})));const x=hs(e);return this._register(x),this._register(En(e,os.FOCUS,(t=>{qn(t.relatedTarget,e)||(this.previousFocusElement=t.relatedTarget instanceof HTMLElement?t.relatedTarget:void 0)}),!0)),this._register(x.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(rE.Blur),this.previousFocusElement=void 0}))),this._register(En(e,os.FOCUS,(e=>{u.setFocus()}))),this._register(Mn(e,os.KEY_DOWN,(t=>{if(!qn(t.target,S))switch(t.keyCode){case 3:as(t,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:as(t,!0),this.hide(rE.Gesture);break;case 2:if(!t.altKey&&!t.ctrlKey&&!t.metaKey){const i=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(e.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.isDisplayed()&&i.push(".monaco-list"),this.getUI().message&&i.push(".quick-input-message a"),this.getUI().widget){if(qn(t.target,this.getUI().widget))break;i.push(".quick-input-html-widget")}const n=e.querySelectorAll(i.join(", "));t.shiftKey&&t.target===n[0]?(as(t,!0),D.clearFocus()):!t.shiftKey&&qn(t.target,n[n.length-1])&&(as(t,!0),n[0].focus())}break;case 10:t.ctrlKey&&(as(t,!0),this.getUI().list.toggleHover())}}))),this.ui={container:e,styleSheet:t,leftActionBar:s,titleBar:i,title:o,description1:L,description2:h,widget:S,rightActionBar:r,checkAll:l,inputContainer:d,filterContainer:c,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:v,message:w,customButtonContainer:b,customButton:C,list:D,progressBar:y,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e),linkOpenerDelegate:e=>this.options.linkOpenerDelegate(e)},this.updateStyles(),this.ui}pick(e,t={},i=Hh.None){return new Promise(((n,s)=>{let o=e=>{var i;o=n,null===(i=t.onKeyMods)||void 0===i||i.call(t,r.keyMods),n(e)};if(i.isCancellationRequested)return void o(void 0);const r=this.createQuickPick();let a;const l=[r,r.onDidAccept((()=>{if(r.canSelectMany)o(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(o(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(o(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),s=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=s}}})))),r.onDidTriggerSeparatorButton((e=>{var i;return null===(i=t.onDidTriggerSeparatorButton)||void 0===i?void 0:i.call(t,e)})),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{k(l),o(void 0)}))];r.title=t.title,r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{s(e),r.hide()}))}))}createQuickPick(){const e=this.getUI();return new Xie(e)}createInputBox(){const e=this.getUI();return new Qie(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,null==i||i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",us(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(dL.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),us(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();Zie.tooltip=n?ue(0,"Back ({0})",n):ue(0,"Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,i,n;const s=this.controller;if(!s)return;const o=!qn(document.activeElement,null!==(i=null===(t=this.ui)||void 0===t?void 0:t.container)&&void 0!==i?i:null);if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!o){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=null!==(n=e.parentElement)&&void 0!==n?n:void 0;(null==e?void 0:e.offsetParent)?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}s.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,ene.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=null!=e?e:"",this.ui.container.style.backgroundColor=null!=t?t:"",this.ui.container.style.color=null!=i?i:"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.list.style(this.styles.list);const o=[];this.styles.pickerGroup.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(o.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&o.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&o.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&o.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&o.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&o.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),o.push("}"));const r=o.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}isDisplayed(){return this.ui&&"none"!==this.ui.container.style.display}}ene.MAX_WIDTH=600;var tne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ine=function(e,t){return function(i,n){t(i,n,e)}};let nne=class extends W_{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Cie))),this._quickAccess}constructor(e,t,i,n){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this._onShow=this._register(new U),this._onHide=this._register(new U),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),linkOpenerDelegate:e=>{this.instantiationService.invokeFunction((t=>{t.get(Uk).open(e,{allowCommands:!0,fromUserGesture:!0})}))},returnFocus:()=>e.focus(),createList:(e,t,i,n,s)=>this.instantiationService.createInstance(vz,e,t,i,n,s),styles:this.computeStyles()},n=this._register(new ene(Object.assign(Object.assign({},i),t),this.themeService));return n.layout(e.dimension,e.offset.quickPickTop),this._register(e.onDidLayout((t=>n.layout(t,e.offset.quickPickTop)))),this._register(n.onShow((()=>{this.resetContextKeys(),this._onShow.fire()}))),this._register(n.onHide((()=>{this.resetContextKeys(),this._onHide.fire()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Tl(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),null==t||t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=Hh.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:Cp(Dm),quickInputForeground:Cp(xm),quickInputTitleBackground:Cp(Nm),widgetBorder:Cp(Tp),widgetShadow:Cp(Mp)},inputBox:qx,toggle:jx,countBadge:Gx,button:Ux,progressBar:Kx,keybindingLabel:zx,list:Yx({listBackground:Dm,listFocusBackground:Hf,listFocusForeground:Wf,listInactiveFocusForeground:Wf,listInactiveSelectionIconForeground:Vf,listInactiveFocusBackground:Hf,listFocusOutline:Ep,listInactiveFocusOutline:Ep}),pickerGroup:{pickerGroupBorder:Cp(Im),pickerGroupForeground:Cp(Em)}}}};nne=tne([ine(0,Oa),ine(1,Rl),ine(2,R_),ine(3,oee)],nne);var sne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},one=function(e,t){return function(i,n){t(i,n,e)}};let rne=class extends nne{constructor(e,t,i,n,s){super(t,i,n,new hee(e.getContainerDomNode(),s)),this.host=void 0;const o=lne.get(e);if(o){const t=o.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return t.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};rne=sne([one(1,Oa),one(2,Rl),one(3,R_),one(4,Fa)],rne);let ane=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(rne,e);this.mapEditorToService.set(e,t),_(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},i=Hh.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};ane=sne([one(0,Oa),one(1,Fa)],ane);class lne{static get(e){return e.getContribution(lne.ID)}constructor(e){this.editor=e,this.widget=new hne(this.editor)}dispose(){this.widget.dispose()}}lne.ID="editor.controller.quickInput";class hne{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return hne.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}hne.ID="editor.contrib.quickInputWidget",Lh(lne.ID,lne,4);var dne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},cne=function(e,t){return function(i,n){t(i,n,e)}};let une=class extends E{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new U,this._onDidChangeReducedMotion=new U,this._accessibilityModeEnabledContext=YR.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const s=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(s)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register(En(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",e),this._layoutService.container.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};une=dne([cne(0,Rl),cne(1,oee),cne(2,uu)],une);var gne,pne,mne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fne=function(e,t){return function(i,n){t(i,n,e)}};let _ne=class{constructor(e,t){this._commandService=e,this._hiddenStates=new vne(t)}createMenu(e,t,i){return new Cne(e,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};_ne=mne([fne(0,Ga),fne(1,qN)],_ne);let vne=gne=class{constructor(e){this._storageService=e,this._disposables=new N,this._onDidChange=new U,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(gne._key,0,"{}");this._data=JSON.parse(t)}catch(t){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,gne._key,this._disposables)((()=>{if(!this._ignoreChangeEvent)try{const t=e.get(gne._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var i;return null!==(i=this._hiddenByDefaultCache.get(`${e.id}/${t}`))&&void 0!==i&&i}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){var i,n;const s=this._isHiddenByDefault(e,t),o=null!==(n=null===(i=this._data[e.id])||void 0===i?void 0:i.includes(t))&&void 0!==n&&n;return s?!o:o}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const n=this._data[e.id];if(i)if(n){n.indexOf(t)<0&&n.push(t)}else this._data[e.id]=[t];else if(n){const i=n.indexOf(t);i>=0&&function(e,t){const i=e.length-1;te[1])));s.length>0&&o.push(new ih(t,n,s))}}o.length>0&&t.push([n,o])}return t}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n)return-1;if("navigation"===i)return-1;if("navigation"===n)return 1;const e=i.localeCompare(n);if(0!==e)return e}const s=e.order||0,o=t.order||0;return so?1:pne._compareTitles(Xl(e)?e.command.title:e.title,Xl(t)?t.command.title:t.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};bne=pne=mne([fne(3,Ga),fne(4,Rl)],bne);let Cne=class{constructor(e,t,i,n,s){this._disposables=new N,this._menuInfo=new bne(e,t,i.emitEventsForSubmenuChanges,n,s);const o=new sd((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(o),this._disposables.add(th.onDidChangeMenu((t=>{t.has(e)&&o.schedule()})));const r=this._disposables.add(new N);this._onDidChange=new q({onWillAddFirstListener:()=>{r.add(s.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),r.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))},onDidRemoveLastListener:r.clear.bind(r),delay:i.eventDebounceDelay,merge:e=>{let t=!1,i=!1,n=!1;for(const s of e)if(t=t||s.isStructuralChange,i=i||s.isEnablementChange,n=n||s.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}}}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function wne(e,t,i){const n=void 0!==t.submenu?t.submenu.id:t.id;const s="string"==typeof t.title?t.title:t.title.value,o=$a({id:`hide/${e.id}/${n}`,label:ue(0,"Hide '{0}'",s),run(){i.updateHidden(e,n,!0)}}),r=$a({id:`toggle/${e.id}/${n}`,label:s,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:o,toggle:r,get isHidden(){return!r.checked}}}Cne=mne([fne(3,Ga),fne(4,Rl)],Cne);var yne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Sne=function(e,t){return function(i,n){t(i,n,e)}},Lne=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let kne=class extends E{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],(re||ae)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const e=new ad;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((t=>Lne(this,void 0,void 0,(function*(){t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))))};this.layoutService.hasContainer&&(this._register(En(this.layoutService.container,"click",e)),this._register(En(this.layoutService.container,"keydown",e)))}writeText(e,t){return Lne(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch(s){console.error(s)}const i=document.activeElement,n=document.body.appendChild(fs("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return Lne(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(t){return console.error(t),""}}))}readFindText(){return Lne(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return Lne(this,void 0,void 0,(function*(){this.findText=e}))}writeResources(e){return Lne(this,void 0,void 0,(function*(){this.resources=e}))}readResources(){return Lne(this,void 0,void 0,(function*(){return this.resources}))}};kne=yne([Sne(0,oee),Sne(1,ah)],kne);var Dne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},xne=function(e,t){return function(i,n){t(i,n,e)}};const Nne="data-keybinding-context";class Ene{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return Object.assign({},this._value)}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class Ine extends Ene{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Ine.INSTANCE=new Ine;class Mne extends Ene{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=Uq.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new Ane(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...v.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new Ane(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(Mne._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Mne._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Mne._keyPrefix="config.";class Tne{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Rne{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class Ane{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every((t=>e.has(t)))}}class One{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every((t=>t.allKeysContainedIn(e)))}}class Pne extends E{constructor(e){super(),this._onDidChangeContext=this._register(new j({merge:e=>new One(e)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Tne(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Bne(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return!e||e.evaluate(t)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new Rne(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Rne(e))}getContext(e){return this._isDisposed?Ine.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(Nne)){const t=e.getAttribute(Nne);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}dispose(){super.dispose(),this._isDisposed=!0}}let Fne=class extends Pne{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new Mne(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?Ine.INSTANCE:this._contexts.get(e)||Ine.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new Ene(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};Fne=Dne([xne(0,uu)],Fne);class Bne extends Pne{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new I),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Nne)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(Nne,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{const t=this._parent.getContextValuesContainer(this._myContextId).value;var i;i=t,e.allKeysContainedIn(new Set(Object.keys(i)))||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(Nne),super.dispose())}getContextValuesContainer(e){return this._isDisposed?Ine.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}Za.registerCommand("_setContext",(function(e,t,i){e.get(Rl).createKey(String(t),function(e){return gd(e,(e=>"object"==typeof e&&1===e.$mid?an.revive(e).toString():e instanceof an?e.toString():void 0))}(i))})),Za.registerCommand({id:"getContextKeyInfo",handler:()=>[...Tl.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:ue(0,"A command that returns information about context keys"),args:[]}}),Za.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of Tl.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));class Wne{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class Vne{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Wne(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}class Hne extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class zne{constructor(e=new SB,t=!1,i,n=false){var s;this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._activeInstantiations=new Set,this._services.set(Oa,this),this._globalGraph=n?null!==(s=null==i?void 0:i._globalGraph)&&void 0!==s?s:new Vne((e=>e)):void 0}createChild(e){return new zne(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){const i=Une.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:e=>{if(n)throw g("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof vu?(i=Une.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Une.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=Ea.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),s=[];for(const r of n){const t=this._getOrCreateServiceInstance(r.id,i);t||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${r.id}.`,!1),s.push(t)}const o=n.length>0?n[0].index:t.length;if(t.length!==o){console.trace(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);const i=o-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,o)}return Reflect.construct(e,t.concat(s))}_setServiceInstance(e,t){if(this._services.get(e)instanceof vu)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof vu?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){var n;const s=new Vne((e=>e.id.toString()));let o=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const t=r.pop();if(s.lookupOrInsertNode(t),o++>1e3)throw new Hne(s);for(const i of Ea.getServiceDependencies(t.desc.ctor)){const o=this._getServiceInstanceOrDescriptor(i.id);if(o||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),null===(n=this._globalGraph)||void 0===n||n.insertEdge(String(t.id),String(i.id)),o instanceof vu){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};s.insertEdge(t,e),r.push(e)}}}for(;;){const e=s.roots();if(0===e.length){if(!s.isEmpty())throw new Hne(s);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof vu){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}s.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof vu)return this._createServiceInstance(e,t,i,n,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s){if(n){const n=new zne(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const o=new Map,r=new rd((()=>{const e=n._createInstance(t,i,s);for(const[t,i]of o){const n=e[t];if("function"==typeof n)for(const t of i)n.apply(e,t)}return o.clear(),e}));return new Proxy(Object.create(null),{get(e,t){if(!r.isInitialized&&"string"==typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=o.get(t);e||(e=new O,o.set(t,e));return(t,i,n)=>x(e.push([t,i,n]))}if(t in e)return e[t];const i=r.value;let n=i[t];return"function"!=typeof n||(n=n.bind(i),e[t]=n),n},set:(e,t,i)=>(r.value[t]=i,!0),getPrototypeOf:e=>t.prototype})}return this._createInstance(t,i,s)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Une{static traceInvocation(e,t){return e?new Une(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):Une._None}static traceCreation(e,t){return e?new Une(1,t.name):Une._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Une(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Une._totals+=e;let t=!1;const i=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){const s=[],o=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,s.push(`${o}CREATES -> ${r}`);const n=e(i+1,l);n&&s.push(n)}else s.push(`${o}uses -> ${r}`);return s.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Une._totals.toFixed(2)}ms)`];(e>2||t)&&Une.all.add(i.join("\n"))}}Une.all=new Set,Une._None=new class extends Une{constructor(){super(0,null)}stop(){}branch(){return this}},Une._totals=0;const Kne=new Set([vn.inMemory,vn.vscodeSourceControl,vn.walkThrough,vn.walkThroughSnippet]);class jne{constructor(){this._byResource=new zs,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new zs,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){const i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const s=this._byResource.get(e);s&&(i=s.delete(t));const o=this._byOwner.get(t);if(o&&(n=o.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,s;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:v.empty():an.isUri(e)?null!==(s=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==s?s:v.empty():v.map(v.concat(...this._byOwner.values()),(e=>e[1]))}}class qne{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new zs,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Kne.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===bN.Error?t.errors+=1:i===bN.Warning?t.warnings+=1:i===bN.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class $ne{constructor(){this._onMarkerChanged=new q({delay:0,merge:$ne._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new jne,this._stats=new qne(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(Bd(i)){this._data.delete(t,e)&&this._onMarkerChanged.fire([t])}else{const n=[];for(const s of i){const i=$ne._toMarker(e,t,s);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:h,endColumn:d,relatedInformation:c,tags:u}=i;if(o)return a=a>0?a:1,l=l>0?l:1,h=h>=a?h:a,d=d>0?d:l,{resource:t,owner:e,code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:h,endColumn:d,relatedInformation:c,tags:u}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const s of n){const t=v.first(s);t&&(i.push(t.resource),this._data.delete(t.resource,e))}if(Wd(t)){const n=new zs;for(const{resource:s,marker:o}of t){const t=$ne._toMarker(e,s,o);if(!t)continue;const r=n.get(s);r?r.push(t):(n.set(s,[t]),i.push(s))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if($ne._accept(i,n)){const e=t.push(i);if(s>0&&e===s)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),o=[];for(const t of e)for(const e of t)if($ne._accept(e,n)){const t=o.push(e);if(s>0&&t===s)return o}return o}{const e=[];for(const t of this._data.values())for(const i of t)if($ne._accept(i,n)){const t=e.push(i);if(s>0&&t===s)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new zs;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}class Gne extends E{constructor(){super(...arguments),this._configurationModel=new nte}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new nte;const e=Ul.as(ku).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],s=t[n];void 0!==e?this._configurationModel.addValue(n,e):s?this._configurationModel.addValue(n,s.default):this._configurationModel.removeValue(n)}}}class Zne extends E{constructor(e,t=[]){super(),this.logger=new uh([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}var Yne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Xne=function(e,t){return function(i,n){t(i,n,e)}},Qne=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Jne{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new U}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let ese=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new T(new Jne(t))):Promise.reject(new Error("Model not found"))}};ese=Yne([Xne(0,Wa)],ese);class tse{show(){return tse.NULL_PROGRESS_RUNNER}showWhile(e,t){return Qne(this,void 0,void 0,(function*(){yield e}))}}tse.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class ise{info(e){return this.notify({severity:dL.Info,message:e})}warn(e){return this.notify({severity:dL.Warning,message:e})}error(e){return this.notify({severity:dL.Error,message:e})}notify(e){switch(e.severity){case dL.Error:console.error(e.message);break;case dL.Warning:console.warn(e.message);break;default:console.log(e.message)}return ise.NO_OP}prompt(e,t,i,n){return ise.NO_OP}status(e,t){return E.None}}ise.NO_OP=new class{};let nse=class{constructor(e){this._onWillExecuteCommand=new U,this._onDidExecuteCommand=new U,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Za.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};nse=Yne([Xne(0,Oa)],nse);let sse=class extends pte{constructor(e,t,i,n,s,o){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new N;t.add(En(e,os.KEY_DOWN,(e=>{const t=new St(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(En(e,os.KEY_UP,(e=>{const t=new St(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new ose(e,t))},a=e=>{for(let t=0;t{e.getOption(61)||r(e.getContainerDomNode())};this._register(o.onCodeEditorAdd(l)),this._register(o.onCodeEditorRemove((e=>{e.getOption(61)||a(e.getContainerDomNode())}))),o.listCodeEditors().forEach(l);const h=e=>{r(e.getContainerDomNode())};this._register(o.onDiffEditorAdd(h)),this._register(o.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),o.listDiffEditors().forEach(h)}addDynamicKeybinding(e,t,i,n){return D(Za.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>{var t;return{keybinding:mt(e.keybinding,$e),command:null!==(t=e.command)&&void 0!==t?t:null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),x((()=>{for(let e=0;ethis._log(e)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const e=s.when||void 0,o=s.keybinding;if(o){const r=bte.resolveKeybinding(o,$e);for(const o of r)i[n++]=new fte(o,s.command,s.commandArgs,e,t,null,!1)}else i[n++]=new fte(void 0,s.command,s.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new _t(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new bte([t],$e)}};sse=Yne([Xne(0,Rl),Xne(1,Ga),Xne(2,rh),Xne(3,uL),Xne(4,ah),Xne(5,Fa)],sse);class ose extends E{constructor(e,t){super(),this.domNode=e,this._register(t)}}function rse(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof an)}class ase{constructor(){this._onDidChangeConfiguration=new U,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const e=new Gne;this._configuration=new rte(e.reload(),new nte,new nte,new nte),e.dispose()}getValue(e,t){const i="string"==typeof e?e:void 0,n=rse(e)?e:rse(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[e,t]=n;this.getValue(e)!==t&&(this._configuration.updateValue(e,t),i.push(e))}if(i.length>0){const e=new ate({keys:i,overrides:[]},t,this._configuration);e.source=8,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let lse=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new U,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=Ba.isIPosition(t)?t:null,s=n?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0,o=e?this.getLanguage(e,n):void 0;return void 0===s?this.configurationService.getValue({resource:e,overrideIdentifier:o}):this.configurationService.getValue(s,{resource:e,overrideIdentifier:o})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};lse=Yne([Xne(0,uu),Xne(1,Wa),Xne(2,yc)],lse);let hse=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:Fe||Pe?"\n":"\r\n"}};hse=Yne([Xne(0,uu)],hse);class dse{constructor(){const e=an.from({scheme:dse.SCHEME,authority:"model",path:"/"});this.workspace={id:Xq,folders:[new Zq({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===dse.SCHEME?this.workspace.folders[0]:null}}function cse(e,t,i){if(!t)return;if(!(e instanceof ase))return;const n=[];Object.keys(t).forEach((e=>{(function(e){return XS()[`editor.${e}`]||!1})(e)&&n.push([`editor.${e}`,t[e]]),i&&function(e){return XS()[`diffEditor.${e}`]||!1}(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}dse.SCHEME="inmemory";let use=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return Qne(this,void 0,void 0,(function*(){const t=Array.isArray(e)?e:JS.convert(e),i=new Map;for(const e of t){if(!(e instanceof eL))throw new Error("bad edit - only text edits are supported");const t=this._modelService.getModel(e.resource);if(!t)throw new Error("bad edit - model not found");if("number"==typeof e.versionId&&t.getVersionId()!==e.versionId)throw new Error("bad state - model changed in the meantime");let n=i.get(t);n||(n=[],i.set(t,n)),n.push(Aq.replaceMove(Mh.lift(e.textEdit.range),e.textEdit.text))}let n=0,s=0;for(const[e,o]of i)e.pushStackElement(),e.pushEditOperations([],o,(()=>[])),e.pushStackElement(),s+=1,n+=o.length;return{ariaSummary:Xs(PJ.bulkEditServiceSummary,n,s),isApplied:n>0}}))}};use=Yne([Xne(0,Wa)],use);let gse=class extends Dte{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};gse=Yne([Xne(0,oee),Xne(1,Fa)],gse);let pse=class extends Yte{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o),this.configure({blockMouse:!1})}};pse=Yne([Xne(0,rh),Xne(1,uL),Xne(2,Vx),Xne(3,PL),Xne(4,Jl),Xne(5,Rl)],pse);var mse;Cu(uu,ase,0),Cu(cT,lse,0),Cu(uT,hse,0),Cu(Kq,dse,0),Cu(qz,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return ba(e)}},0),Cu(rh,class{publicLog2(){}},0),Cu(L3,class{confirm(e){return Qne(this,void 0,void 0,(function*(){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}))}doConfirm(e,t){let i=e;return t&&(i=i+"\n\n"+t),window.confirm(i)}prompt(e){var t,i;return Qne(this,void 0,void 0,(function*(){let n;if(this.doConfirm(e.message,e.detail)){const s=[...null!==(t=e.buttons)&&void 0!==t?t:[]];e.cancelButton&&"string"!=typeof e.cancelButton&&"boolean"!=typeof e.cancelButton&&s.push(e.cancelButton),n=yield null===(i=s[0])||void 0===i?void 0:i.run({checkboxChecked:!1})}return{result:n}}))}error(e,t){return Qne(this,void 0,void 0,(function*(){yield this.prompt({type:dL.Error,message:e,detail:t})}))}},0),Cu(_E,class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},0),Cu(uL,ise,0),Cu(wN,$ne,0),Cu(yc,class extends Fte{constructor(){super()}},0),Cu(z4,class extends E{constructor(){super(),this._onColorThemeChange=this._register(new U),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new U),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new m7,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(f7,k7(f7)),this._knownThemes.set(_7,k7(_7)),this._knownThemes.set(v7,k7(v7)),this._knownThemes.set(b7,k7(b7));const e=this._register(function(e){const t=new N,i=t.add(new U),n=JT();return t.add(n.onDidChange((()=>i.fire()))),e&&t.add(e.onDidProductIconThemeChange((()=>i.fire()))),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){const t=e?e.getProductIconTheme():new m7,i={},s=e=>{const n=t.getIcon(e);if(!n)return;const s=n.font;return s?(i[s.id]=s.definition,`.codicon-${e.id}:before { content: '${n.fontCharacter}'; font-family: ${ys(s.id)}; }`):`.codicon-${e.id}:before { content: '${n.fontCharacter}'; }`},o=[];for(const e of n.getIcons()){const t=s(e);t&&o.push(t)}for(const e in i){const t=i[e],n=t.weight?`font-weight: ${t.weight};`:"",s=t.style?`font-style: ${t.style};`:"",r=t.src.map((e=>`${ws(e.location)} format('${e.format}')`)).join(", ");o.push(`@font-face { src: ${r}; font-family: ${ys(e)};${n}${s} font-display: block; }`)}return o.join("\n")}}}(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(f7),this._onOSSchemeChanged(),this._register(e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}))),ee("(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return Zn(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Jn(void 0,(e=>{e.className="monaco-colors",e.textContent=this._allCSS})),this._styleElements.push(this._globalStyleElement)),E.None}_registerShadowDomContainer(e){const t=Jn(e,(e=>{e.className="monaco-colors",e.textContent=this._allCSS}));return this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(f7),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==M_(this._theme.type)){let t;t=T_(this._theme.type)?e?v7:_7:e?b7:f7,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};w7.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const o of C7.getColors()){const e=this._theme.getColor(o.id,!0);e&&n.push(`${bp(o.id)}: ${e.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor { ${n.join("\n")} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}},0),Cu(ah,class extends Zne{constructor(){super(new ch)}},0),Cu(Wa,fie,0),Cu(MR,aie,0),Cu(Rl,Fne,0),Cu(gL,class{withProgress(e,t,i){return t({report:()=>{}})}},0),Cu(mL,tse,0),Cu(qN,class extends GN{constructor(){super(),this.applicationStorage=this._register(new UN(new KN,{hint:VN.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new UN(new KN,{hint:VN.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new UN(new KN,{hint:VN.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e)))),this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}},0),Cu(gG,vT,0),Cu(QS,use,0),Cu(A7,class{constructor(){this._neverEmitter=new U,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},0),Cu(Va,ese,0),Cu(ZR,une,0),Cu(PH,class{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new N,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;new cx(Jn(),"").style(Zx)}if(this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),D(e.onDidFocus((()=>this.setLastFocusedList(e))),x((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}},0),Cu(Ga,nse,0),Cu(PL,sse,0),Cu(lE,ane,0),Cu(Vx,gse,0),Cu(Uk,sie,0),Cu(Xy,kne,0),Cu(Hx,pse,0),Cu(Jl,_ne,0),Cu(b$,class{playAudioCue(e,t){return Qne(this,void 0,void 0,(function*(){}))}},0),function(e){const t=new SB;for(const[r,a]of wu())t.set(r,a);const i=new zne(t,!0);t.set(Oa,i),e.get=function(e){n||o({});const s=t.get(e);if(!s)throw new Error("Missing service "+e);return s instanceof vu?i.invokeFunction((t=>t.get(e))):s};let n=!1;const s=new U;function o(e){if(n)return i;n=!0;for(const[i,n]of wu())t.get(i)||t.set(i,n);for(const i in e)if(e.hasOwnProperty(i)){const n=Pa(i);t.get(n)instanceof vu&&t.set(n,e[i])}const o=xT();for(const t of o)try{i.createInstance(t)}catch(a){r(a)}return s.fire(),i}e.initialize=o,e.withServices=function(e){if(n)return e();const t=new N,i=t.add(s.event((()=>{i.dispose(),t.add(e())})));return t}}(mse||(mse={}));var fse=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_se=function(e,t){return function(i,n){t(i,n,e)}};let vse=0,bse=!1;function Cse(e){if(!e){if(bse)return;bse=!0}!function(e){Is=document.createElement("div"),Is.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),Is.appendChild(e),e};Ms=t(),Ts=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),Is.appendChild(e),e};Rs=i(),As=i(),e.appendChild(Is)}(e||document.body)}let wse=class extends XB{constructor(e,t,i,n,s,o,r,a,l,h,d,c){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||AJ.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+AJ.accessibilityHelpMessage,super(e,u,{},i,n,s,o,a,l,h,d,c),this._standaloneKeybindingService=r instanceof sse?r:null,Cse(u.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++vse,s=ul.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),E.None;const t=e.id,i=e.label,n=ul.and(ul.equals("editorId",this.getId()),ul.deserialize(e.precondition)),s=e.keybindings,o=ul.and(n,ul.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),h=new N,d=this.getId()+":"+t;if(h.add(Za.registerCommand(d,l)),r){const e={command:{id:d,title:i},when:n,group:r,order:a};h.add(th.appendMenuItem(Ql.EditorContext,e))}if(Array.isArray(s))for(const u of s)h.add(this._standaloneKeybindingService.addDynamicKeybinding(d,u,l,o));const c=new nF(d,i,i,n,((...t)=>Promise.resolve(e.run(this,...t))),this._contextKeyService);return this._actions.set(t,c),h.add(x((()=>{this._actions.delete(t)}))),h}_triggerCommand(e,t){if(this._codeEditorService instanceof see)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};wse=fse([_se(2,Oa),_se(3,Fa),_se(4,Ga),_se(5,Rl),_se(6,PL),_se(7,R_),_se(8,uL),_se(9,ZR),_se(10,Xu),_se(11,iL)],wse);let yse=class extends wse{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p){const m=Object.assign({},t);cse(h,m,!1);const f=a.registerEditorContainer(e);"string"==typeof m.theme&&a.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&a.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const _=m.model;let v;if(delete m.model,super(e,m,i,n,s,o,r,a,l,d,g,p),this._configurationService=h,this._standaloneThemeService=a,this._register(f),void 0===_){const e=u.getLanguageIdByMimeType(m.language)||m.language||zu;v=Lse(c,u,m.value||"",e,void 0),this._ownsModel=!0}else v=_,this._ownsModel=!1;if(this._attachModel(v),v){const e={oldModelUrl:null,newModelUrl:v.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){cse(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};yse=fse([_se(2,Oa),_se(3,Fa),_se(4,Ga),_se(5,Rl),_se(6,PL),_se(7,z4),_se(8,uL),_se(9,uu),_se(10,ZR),_se(11,Wa),_se(12,yc),_se(13,Xu),_se(14,iL)],yse);let Sse=class extends iZ{constructor(e,t,i,n,s,o,r,a,l,h,d,c){const u=Object.assign({},t);cse(a,u,!0);const g=o.registerEditorContainer(e);"string"==typeof u.theme&&o.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&o.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},n,i,s,c,h),this._configurationService=a,this._standaloneThemeService=o,this._register(g)}dispose(){super.dispose()}updateOptions(e){cse(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(wse,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function Lse(e,t,i,n,s){if(i=i||"",!n){const n=i.indexOf("\n");let o=i;return-1!==n&&(o=i.substring(0,n)),kse(e,i,t.createByFilepathOrFirstLine(s||null,o),s)}return kse(e,i,t.createById(n),s)}function kse(e,t,i,n){return e.createModel(t,i,n)}Sse=fse([_se(2,Oa),_se(3,Rl),_se(4,Fa),_se(5,z4),_se(6,uL),_se(7,uu),_se(8,Hx),_se(9,mL),_se(10,Xy),_se(11,b$)],Sse);var Dse=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function xse(e,t,i){return mse.initialize(i||{}).createInstance(yse,e,t)}function Nse(e){return mse.get(Fa).onCodeEditorAdd((t=>{e(t)}))}function Ese(e){return mse.get(Fa).onDiffEditorAdd((t=>{e(t)}))}function Ise(){return mse.get(Fa).listCodeEditors()}function Mse(){return mse.get(Fa).listDiffEditors()}function Tse(e,t,i){return mse.initialize(i||{}).createInstance(Sse,e,t)}function Rse(e){if("string"!=typeof e.id||"function"!=typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Za.registerCommand(e.id,e.run)}function Ase(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=ul.deserialize(e.precondition),i=new N;if(i.add(Za.registerCommand(e.id,((i,...n)=>fh.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n))))))),e.contextMenuGroupId){const n={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};i.add(th.appendMenuItem(Ql.EditorContext,n))}if(Array.isArray(e.keybindings)){const n=mse.get(PL);if(n instanceof sse){const s=ul.and(t,ul.deserialize(e.keybindingContext));i.add(n.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:s})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return i}function Ose(e){return Pse([e])}function Pse(e){const t=mse.get(PL);return t instanceof sse?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:ul.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),E.None)}function Fse(e,t,i){const n=mse.get(yc),s=n.getLanguageIdByMimeType(t)||t;return Lse(mse.get(Wa),n,e,s,i)}function Bse(e,t){const i=mse.get(yc),n=i.getLanguageIdByMimeType(t)||t||zu;e.setLanguage(i.createById(n))}function Wse(e,t,i){if(e){mse.get(wN).changeOne(t,e.uri,i)}}function Vse(e){mse.get(wN).changeAll(e,[])}function Hse(e){return mse.get(wN).read(e)}function zse(e){return mse.get(wN).onMarkerChanged(e)}function Use(e){return mse.get(Wa).getModel(e)}function Kse(){return mse.get(Wa).getModels()}function jse(e){return mse.get(Wa).onModelAdded(e)}function qse(e){return mse.get(Wa).onModelRemoved(e)}function $se(e){return mse.get(Wa).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))}function Gse(e){return function(e,t,i){return new L8(e,t,i)}(mse.get(Wa),mse.get(Xu),e)}function Zse(e,t){const i=mse.get(yc),n=mse.get(z4);return Z8.colorizeElement(n,i,e,t).then((()=>{n.registerEditorContainer(e)}))}function Yse(e,t,i){const n=mse.get(yc);return mse.get(z4).registerEditorContainer(document.body),Z8.colorize(n,e,t,i)}function Xse(e,t,i=4){return mse.get(z4).registerEditorContainer(document.body),Z8.colorizeModelLine(e,t,i)}function Qse(e,t){DC.getOrCreate(t);const i=function(e){const t=DC.get(e);return t||{getInitialState:()=>xC,tokenize:(t,i,n)=>NC(e,n)}}(t),n=so(e),s=[];let o=i.getInitialState();for(let r=0,a=n.length;rDse(this,void 0,void 0,(function*(){var n;if(!i)return null;const s=null===(n=t.options)||void 0===n?void 0:n.selection;let o;return s&&"number"==typeof s.endLineNumber&&"number"==typeof s.endColumn?o=s:s&&(o={lineNumber:s.startLineNumber,column:s.startColumn}),(yield e.openCodeEditor(i,t.resource,o))?i:null}))))}function ooe(e,t){return"boolean"==typeof e?e:t}function roe(e,t){return"string"==typeof e?e:t}function aoe(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function loe(e,t){t=t.replace(/@@/g,"\x01");let i,n=0;do{i=!1,t=t.replace(/@(\w+)/g,(function(n,s){i=!0;let o="";if("string"==typeof e[s])o=e[s];else{if(!(e[s]&&e[s]instanceof RegExp))throw void 0===e[s]?T8(e,"language definition does not contain attribute '"+s+"', used at: "+t):T8(e,"attribute reference '"+s+"' must be a string, used at: "+t);o=e[s].source}return N8(o)?"":"(?:"+o+")"})),n++}while(i&&n<5);t=t.replace(/\x01/g,"@");const s=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,s)}function hoe(e,t,i,n){let s=-1,o=i,r=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(s=parseInt(r[3]),r[2]&&(s+=100)),o=r[4]);let a,l="~",h=o;if(o&&0!==o.length?/^\w*$/.test(h)?l="==":(r=o.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(l=r[1],h=r[2])):(l="!=",h=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(h))if("@"===l||"!@"===l){const i=e[h];if(!i)throw T8(e,"the @ match target '"+h+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const i of t)if(!e(i))return!1;return!0}((function(e){return"string"==typeof e}),i))throw T8(e,"the @ match target '"+h+"' must be an array of strings, in rule: "+t);const n=aoe(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(h.indexOf("$")<0){const t=loe(e,"^"+h+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,s){return loe(e,"^"+R8(e,h,i,n,s)+"$").test(t)};else if(h.indexOf("$")<0){const t=E8(e,h);a=function(e){return"=="===l?e===t:e!==t}}else{const t=E8(e,h);a=function(i,n,s,o,r){const a=R8(e,t,n,s,o);return"=="===l?i===a:i!==a}}else{const t=aoe(h.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===s?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){const o=function(e,t,i,n){if(n<0)return e;if(n=100){n-=100;const e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw T8(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw T8(e,"the next state must be a string value in rule: "+t);{let s=i.next;if(!/^(@pop|@push|@popall)$/.test(s)&&("@"===s[0]&&(s=s.substr(1)),s.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,R8(e,s,"",[],""))))throw T8(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=s}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let s=0,o=i.length;s0&&"^"===i[0],this.name=this.name+": "+i,this.regex=loe(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=doe(e,this.name,t)}}function uoe(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=e,i.includeLF=ooe(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=ooe(t.ignoreCase,!1),i.unicode=ooe(t.unicode,!1),i.tokenPostfix=roe(t.tokenPostfix,"."+i.languageId),i.defaultToken=roe(t.defaultToken,"source"),i.usesEmbedded=!1;const n=t;function s(e,o,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw T8(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw T8(i,"include target '"+r+"' is not defined at: "+e);s(e+"."+r,o,t.tokenizer[r])}else{const t=new coe(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw T8(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw T8(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=ooe(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}o.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw T8(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const r in t.tokenizer)if(t.tokenizer.hasOwnProperty(r)){i.start||(i.start=r);const e=t.tokenizer[r];i.tokenizer[r]=new Array,s("tokenizer."+r,i.tokenizer[r],e)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw T8(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const o=[];for(const r of t.brackets){let e=r;if(e&&Array.isArray(e)&&3===e.length&&(e={token:e[2],open:e[0],close:e[1]}),e.open===e.close)throw T8(i,"open and close brackets in a 'brackets' attribute must be different: "+e.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof e.open||"string"!=typeof e.token||"string"!=typeof e.close)throw T8(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");o.push({token:e.token+i.tokenPostfix,open:E8(i,e.open),close:E8(i,e.close)})}return i.brackets=o,i.noThrow=!0,i}var goe=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(Dre){o(Dre)}}function a(e){try{l(n.throw(e))}catch(Dre){o(Dre)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function poe(e){Hu.registerLanguage(e)}function moe(){let e=[];return e=e.concat(Hu.getLanguages()),e}function foe(e){return mse.get(yc).languageIdCodec.encodeLanguageId(e)}function _oe(e,t){return mse.withServices((()=>{const i=mse.get(yc).onDidRequestRichLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))}function voe(e,t){return mse.withServices((()=>{const i=mse.get(yc).onDidRequestBasicLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))}function boe(e,t){if(!mse.get(yc).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return mse.get(Xu).register(e,t,100)}class Coe{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return woe.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new vC(n.tokens,n.endState)}}class woe{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,o=e.length;s0&&s[o-1]===a)continue;let h=e.startIndex;0===l?h=0:hgoe(this,void 0,void 0,(function*(){const i=yield Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?Loe(e,i):new j8(mse.get(yc),mse.get(z4),e,uoe(e,i),mse.get(uu)):null}))));return DC.registerFactory(e,i)}function Doe(e,t){if(!mse.get(yc).isRegisteredLanguageId(e))throw new Error(`Cannot set tokens provider for unknown language ${e}`);return yoe(t)?koe(e,{create:()=>t}):DC.register(e,Loe(e,t))}function xoe(e,t){return yoe(t)?koe(e,{create:()=>t}):DC.register(e,(t=>new j8(mse.get(yc),mse.get(z4),e,uoe(e,t),mse.get(uu)))(t))}function Noe(e,t){return mse.get(iL).referenceProvider.register(e,t)}function Eoe(e,t){return mse.get(iL).renameProvider.register(e,t)}function Ioe(e,t){return mse.get(iL).signatureHelpProvider.register(e,t)}function Moe(e,t){return mse.get(iL).hoverProvider.register(e,{provideHover:(e,i,n)=>{const s=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&s&&(e.range=new Mh(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn)),e.range||(e.range=new Mh(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})}function Toe(e,t){return mse.get(iL).documentSymbolProvider.register(e,t)}function Roe(e,t){return mse.get(iL).documentHighlightProvider.register(e,t)}function Aoe(e,t){return mse.get(iL).linkedEditingRangeProvider.register(e,t)}function Ooe(e,t){return mse.get(iL).definitionProvider.register(e,t)}function Poe(e,t){return mse.get(iL).implementationProvider.register(e,t)}function Foe(e,t){return mse.get(iL).typeDefinitionProvider.register(e,t)}function Boe(e,t){return mse.get(iL).codeLensProvider.register(e,t)}function Woe(e,t,i){return mse.get(iL).codeActionProvider.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,documentation:null==i?void 0:i.documentation,provideCodeActions:(e,i,n,s)=>{const o=mse.get(wN).read({resource:e.uri}).filter((e=>Mh.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:o,only:n.only,trigger:n.trigger},s)},resolveCodeAction:t.resolveCodeAction})}function Voe(e,t){return mse.get(iL).documentFormattingEditProvider.register(e,t)}function Hoe(e,t){return mse.get(iL).documentRangeFormattingEditProvider.register(e,t)}function zoe(e,t){return mse.get(iL).onTypeFormattingEditProvider.register(e,t)}function Uoe(e,t){return mse.get(iL).linkProvider.register(e,t)}function Koe(e,t){return mse.get(iL).completionProvider.register(e,t)}function joe(e,t){return mse.get(iL).colorProvider.register(e,t)}function qoe(e,t){return mse.get(iL).foldingRangeProvider.register(e,t)}function $oe(e,t){return mse.get(iL).declarationProvider.register(e,t)}function Goe(e,t){return mse.get(iL).selectionRangeProvider.register(e,t)}function Zoe(e,t){return mse.get(iL).documentSemanticTokensProvider.register(e,t)}function Yoe(e,t){return mse.get(iL).documentRangeSemanticTokensProvider.register(e,t)}function Xoe(e,t){return mse.get(iL).inlineCompletionsProvider.register(e,t)}function Qoe(e,t){return mse.get(iL).inlayHintsProvider.register(e,t)}qS.wrappingIndent.defaultValue=0,qS.glyphMargin.defaultValue=!1,qS.autoIndent.defaultValue=3,qS.overviewRulerLanes.defaultValue=2,pJ.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const Joe=aM();Joe.editor={create:xse,getEditors:Ise,getDiffEditors:Mse,onDidCreateEditor:Nse,onDidCreateDiffEditor:Ese,createDiffEditor:Tse,addCommand:Rse,addEditorAction:Ase,addKeybindingRule:Ose,addKeybindingRules:Pse,createModel:Fse,setModelLanguage:Bse,setModelMarkers:Wse,getModelMarkers:Hse,removeAllMarkers:Vse,onDidChangeMarkers:zse,getModels:Kse,getModel:Use,onDidCreateModel:jse,onWillDisposeModel:qse,onDidChangeModelLanguage:$se,createWebWorker:Gse,colorizeElement:Zse,colorize:Yse,colorizeModelLine:Xse,tokenize:Qse,defineTheme:Jse,setTheme:eoe,remeasureFonts:toe,registerCommand:ioe,registerLinkOpener:noe,registerEditorOpener:soe,AccessibilitySupport:wI,ContentWidgetPositionPreference:xI,CursorChangeReason:NI,DefaultEndOfLine:EI,EditorAutoIndentStrategy:MI,EditorOption:TI,EndOfLinePreference:RI,EndOfLineSequence:AI,MinimapPosition:UI,MouseTargetType:KI,OverlayWidgetPositionPreference:jI,OverviewRulerLane:qI,GlyphMarginLane:OI,RenderLineNumbersType:GI,RenderMinimap:ZI,ScrollbarVisibility:XI,ScrollType:YI,TextEditorCursorBlinkingStyle:iM,TextEditorCursorStyle:nM,TrackedRangeStickiness:sM,WrappingIndent:oM,InjectedTextCursorStops:FI,PositionAffinity:$I,ConfigurationChangedEvent:dS,BareFontInfo:VR,FontInfo:HR,TextModelResolvedOptions:Sd,FindMatch:Ld,ApplyUpdateResult:gS,EditorZoom:BR,EditorType:sF,EditorOptions:qS},Joe.languages={register:poe,getLanguages:moe,onLanguage:_oe,onLanguageEncountered:voe,getEncodedLanguageId:foe,setLanguageConfiguration:boe,setColorMap:Soe,registerTokensProviderFactory:koe,setTokensProvider:Doe,setMonarchTokensProvider:xoe,registerReferenceProvider:Noe,registerRenameProvider:Eoe,registerCompletionItemProvider:Koe,registerSignatureHelpProvider:Ioe,registerHoverProvider:Moe,registerDocumentSymbolProvider:Toe,registerDocumentHighlightProvider:Roe,registerLinkedEditingRangeProvider:Aoe,registerDefinitionProvider:Ooe,registerImplementationProvider:Poe,registerTypeDefinitionProvider:Foe,registerCodeLensProvider:Boe,registerCodeActionProvider:Woe,registerDocumentFormattingEditProvider:Voe,registerDocumentRangeFormattingEditProvider:Hoe,registerOnTypeFormattingEditProvider:zoe,registerLinkProvider:Uoe,registerColorProvider:joe,registerFoldingRangeProvider:qoe,registerDeclarationProvider:$oe,registerSelectionRangeProvider:Goe,registerDocumentSemanticTokensProvider:Zoe,registerDocumentRangeSemanticTokensProvider:Yoe,registerInlineCompletionsProvider:Xoe,registerInlayHintsProvider:Qoe,DocumentHighlightKind:II,CompletionItemKind:LI,CompletionItemTag:kI,CompletionItemInsertTextRule:SI,SymbolKind:eM,SymbolTag:tM,IndentAction:PI,CompletionTriggerKind:DI,SignatureHelpTriggerKind:JI,InlayHintKind:BI,InlineCompletionTriggerKind:WI,CodeActionTriggerType:yI,FoldingRangeKind:LC,SelectedSuggestionInfo:bC};const ere=Joe.CancellationTokenSource,tre=Joe.Emitter,ire=Joe.KeyCode,nre=Joe.KeyMod,sre=Joe.Position,ore=Joe.Range,rre=Joe.Selection,are=Joe.SelectionDirection,lre=Joe.MarkerSeverity,hre=Joe.MarkerTag,dre=Joe.Uri,cre=Joe.Token,ure=Joe.editor,gre=Joe.languages,pre=globalThis.MonacoEnvironment;((null==pre?void 0:pre.globalAPI)||"function"==typeof define&&i.amdO)&&(globalThis.monaco=Joe),void 0!==globalThis.require&&"function"==typeof globalThis.require.config&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});var mre,fre,_re=Object.defineProperty,vre=Object.getOwnPropertyDescriptor,bre=Object.getOwnPropertyNames,Cre=Object.prototype.hasOwnProperty,wre=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of bre(t))Cre.call(e,s)||s===i||_re(e,s,{get:()=>t[s],enumerable:!(n=vre(t,s))||n.enumerable});return e},yre={};wre(yre,mre=s,"default"),fre&&wre(fre,mre,"default");var Sre,Lre=new class{_onDidChange=new yre.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(e,t,i){this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});yre.languages.json={jsonDefaults:Lre},yre.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),yre.languages.onLanguage("json",(()=>{i.e(2499).then(i.bind(i,52499)).then((e=>e.setupMode(Lre)))})),self.MonacoEnvironment=(Sre={editorWorkerService:"editor.worker.js",json:"json.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var n=i.p,s=(n?n.replace(/\/$/,"")+"/":"")+Sre[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(s)){var o=String(window.location),r=o.substr(0,o.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(s.substring(0,r.length)!==r){/^(\/\/)/.test(s)&&(s=window.location.protocol+s);var a=new Blob(["/*"+t+'*/importScripts("'+s+'");'],{type:"application/javascript"});return URL.createObjectURL(a)}}return s}});const kre=n},39781:(e,t,i)=>{i.r(t),i.d(t,{MonacoDiffEditor:()=>h,default:()=>g,monaco:()=>n});var n=i(85868),s=i(63696);function o(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function r(){}var a=function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i{i.r(t),i.d(t,{default:()=>o});i(63696);var n=i(9136),s=i(62540);function o(e){let{children:t,fallback:i}=e;return(0,n.A)()?(0,s.jsx)(s.Fragment,{children:t?.()}):i??null}}}]); \ No newline at end of file diff --git a/assets/js/5274.2f36e9f9.js.LICENSE.txt b/assets/js/9295.254bd121.js.LICENSE.txt similarity index 100% rename from assets/js/5274.2f36e9f9.js.LICENSE.txt rename to assets/js/9295.254bd121.js.LICENSE.txt diff --git a/assets/js/93cebb7f.c04117be.js b/assets/js/93cebb7f.5f889604.js similarity index 95% rename from assets/js/93cebb7f.c04117be.js rename to assets/js/93cebb7f.5f889604.js index c9f7cb47..1a2a7cf0 100644 --- a/assets/js/93cebb7f.c04117be.js +++ b/assets/js/93cebb7f.5f889604.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3601,8288],{39731:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>p,contentTitle:()=>m,default:()=>j,frontMatter:()=>u,metadata:()=>t,resolverOptions:()=>h,toc:()=>$});const t=JSON.parse('{"id":"demo-viewer/refs/ref","title":"\ud83d\udca1 $ref (inline)","description":"References inline $ref showcase","source":"@site/docs/demo-viewer/refs/ref.mdx","sourceDirName":"demo-viewer/refs","slug":"/demo-viewer/refs/ref","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/refs/ref.mdx","tags":[],"version":"current","frontMatter":{"description":"References inline $ref showcase","title":"\ud83d\udca1 $ref (inline)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcc1$ref (as local file)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile"},"next":{"title":"\ud83c\udf10 $ref (as remote file)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile"}}');var i=r(62540),n=r(28453),a=r(21432),l=r(63601),o=r(21344),d=r.n(o),f=r(11470),c=r(19365);const u={description:"References inline $ref showcase",title:"\ud83d\udca1 $ref (inline)"},m="$ref",p={},h={jsonPointer:"#/definitions/user"},$=[];function v(e){const s={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"ref",children:"$ref"})}),"\n",(0,i.jsxs)(f.default,{children:[(0,i.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(d(),{schema:l,resolverOptions:h})}),(0,i.jsx)(c.default,{value:"resolverOptions",label:"resolverOptions",children:(0,i.jsx)(a.default,{language:"json",children:JSON.stringify(h,null,2)})}),(0,i.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(a.default,{language:"json-schema",children:JSON.stringify(l,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(v,{...e})}):v(e)}},63601:e=>{e.exports=JSON.parse('{"$ref":"#/definitions/user","definitions":{"user":{"properties":{"first_name":{"$ref":"#/$defs/name"},"last_name":{"$ref":"#/$defs/name"},"addresses":{"type":"array","items":false,"prefixItems":[{"$ref":"#/$defs/street_name"},{"$ref":"#/$defs/street_type"},{"$ref":"#/$defs/direction"}]}},"required":["first_name","last_name"]}},"$defs":{"name":{"type":"string"},"postal_code":{"type":"number","minimum":1000,"exclusiveMaximum":10000},"street_name":{"type":"string","minLength":3},"direction":{"enum":["NW","NE","SW","SE"]},"street_type":{"enum":["Street","Avenue","Boulevard"]}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3601,8288],{44976:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>p,contentTitle:()=>m,default:()=>j,frontMatter:()=>u,metadata:()=>t,resolverOptions:()=>h,toc:()=>$});const t=JSON.parse('{"id":"demo-viewer/refs/ref","title":"\ud83d\udca1 $ref (inline)","description":"References inline $ref showcase","source":"@site/docs/demo-viewer/refs/ref.mdx","sourceDirName":"demo-viewer/refs","slug":"/demo-viewer/refs/ref","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/refs/ref.mdx","tags":[],"version":"current","frontMatter":{"description":"References inline $ref showcase","title":"\ud83d\udca1 $ref (inline)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcc1$ref (as local file)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile"},"next":{"title":"\ud83c\udf10 $ref (as remote file)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile"}}');var i=r(62540),n=r(28453),a=r(58069),l=r(63601),o=r(88307),d=r.n(o),f=r(65537),c=r(79329);const u={description:"References inline $ref showcase",title:"\ud83d\udca1 $ref (inline)"},m="$ref",p={},h={jsonPointer:"#/definitions/user"},$=[];function v(e){const s={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"ref",children:"$ref"})}),"\n",(0,i.jsxs)(f.default,{children:[(0,i.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(d(),{schema:l,resolverOptions:h})}),(0,i.jsx)(c.default,{value:"resolverOptions",label:"resolverOptions",children:(0,i.jsx)(a.default,{language:"json",children:JSON.stringify(h,null,2)})}),(0,i.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(a.default,{language:"json-schema",children:JSON.stringify(l,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(v,{...e})}):v(e)}},63601:e=>{e.exports=JSON.parse('{"$ref":"#/definitions/user","definitions":{"user":{"properties":{"first_name":{"$ref":"#/$defs/name"},"last_name":{"$ref":"#/$defs/name"},"addresses":{"type":"array","items":false,"prefixItems":[{"$ref":"#/$defs/street_name"},{"$ref":"#/$defs/street_type"},{"$ref":"#/$defs/direction"}]}},"required":["first_name","last_name"]}},"$defs":{"name":{"type":"string"},"postal_code":{"type":"number","minimum":1000,"exclusiveMaximum":10000},"street_name":{"type":"string","minLength":3},"direction":{"enum":["NW","NE","SW","SE"]},"street_type":{"enum":["Street","Avenue","Boulevard"]}}}')}}]); \ No newline at end of file diff --git a/assets/js/9a079c62.3d1859d5.js b/assets/js/9a079c62.16365c2e.js similarity index 91% rename from assets/js/9a079c62.3d1859d5.js rename to assets/js/9a079c62.16365c2e.js index e4e24281..0e75fe3f 100644 --- a/assets/js/9a079c62.3d1859d5.js +++ b/assets/js/9a079c62.16365c2e.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[8142,9086],{88270:(e,s,i)=>{i.r(s),i.d(s,{assets:()=>x,contentTitle:()=>h,default:()=>v,frontMatter:()=>d,metadata:()=>n,toc:()=>g});const n=JSON.parse('{"id":"demo-viewer/numeric/ranges","title":"\ud83c\udf21\ufe0f Ranges","description":"number with minimum / exclusiveMinimum / exclusiveMaximum / maximum showcase","source":"@site/docs/demo-viewer/numeric/ranges.mdx","sourceDirName":"demo-viewer/numeric","slug":"/demo-viewer/numeric/ranges","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/numeric/ranges.mdx","tags":[],"version":"current","frontMatter":{"description":"number with minimum / exclusiveMinimum / exclusiveMaximum / maximum showcase","title":"\ud83c\udf21\ufe0f Ranges"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd22 Number","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number"},"next":{"title":"\ud83d\udce6 Object","permalink":"/docusaurus-json-schema-plugin/docs/category/-object"}}');var r=i(62540),t=i(28453),u=i(21432),m=i(9086),a=i(21344),c=i.n(a),l=i(11470),o=i(19365);const d={description:"number with minimum / exclusiveMinimum / exclusiveMaximum / maximum showcase",title:"\ud83c\udf21\ufe0f Ranges"},h="Ranges",x={},g=[];function p(e){const s={h1:"h1",header:"header",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"ranges",children:"Ranges"})}),"\n",(0,r.jsxs)(l.default,{children:[(0,r.jsx)(o.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(c(),{schema:m})}),(0,r.jsx)(o.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(u.default,{language:"json-schema",children:JSON.stringify(m,null,2)})})]})]})}function v(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},9086:e=>{e.exports=JSON.parse('{"type":"number","minimum":0,"exclusiveMaximum":100}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[8142,9086],{24171:(e,s,i)=>{i.r(s),i.d(s,{assets:()=>x,contentTitle:()=>h,default:()=>v,frontMatter:()=>d,metadata:()=>n,toc:()=>g});const n=JSON.parse('{"id":"demo-viewer/numeric/ranges","title":"\ud83c\udf21\ufe0f Ranges","description":"number with minimum / exclusiveMinimum / exclusiveMaximum / maximum showcase","source":"@site/docs/demo-viewer/numeric/ranges.mdx","sourceDirName":"demo-viewer/numeric","slug":"/demo-viewer/numeric/ranges","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/numeric/ranges.mdx","tags":[],"version":"current","frontMatter":{"description":"number with minimum / exclusiveMinimum / exclusiveMaximum / maximum showcase","title":"\ud83c\udf21\ufe0f Ranges"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd22 Number","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number"},"next":{"title":"\ud83d\udce6 Object","permalink":"/docusaurus-json-schema-plugin/docs/category/-object"}}');var r=i(62540),t=i(28453),u=i(58069),m=i(9086),a=i(88307),c=i.n(a),l=i(65537),o=i(79329);const d={description:"number with minimum / exclusiveMinimum / exclusiveMaximum / maximum showcase",title:"\ud83c\udf21\ufe0f Ranges"},h="Ranges",x={},g=[];function p(e){const s={h1:"h1",header:"header",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"ranges",children:"Ranges"})}),"\n",(0,r.jsxs)(l.default,{children:[(0,r.jsx)(o.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(c(),{schema:m})}),(0,r.jsx)(o.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(u.default,{language:"json-schema",children:JSON.stringify(m,null,2)})})]})]})}function v(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},9086:e=>{e.exports=JSON.parse('{"type":"number","minimum":0,"exclusiveMaximum":100}')}}]); \ No newline at end of file diff --git a/assets/js/9a29e754.a83532dc.js b/assets/js/9a29e754.e6470b7f.js similarity index 93% rename from assets/js/9a29e754.a83532dc.js rename to assets/js/9a29e754.e6470b7f.js index 294bf232..c2252ae5 100644 --- a/assets/js/9a29e754.a83532dc.js +++ b/assets/js/9a29e754.e6470b7f.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3693,7095],{22479:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>r,toc:()=>w});const r=JSON.parse('{"id":"demo-viewer/array/uniqueItems","title":"\ud83e\udd84 Unique items","description":"array with uniqueItems showcase","source":"@site/docs/demo-viewer/array/uniqueItems.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/uniqueItems","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/uniqueItems.mdx","tags":[],"version":"current","frontMatter":{"description":"array with uniqueItems showcase","title":"\ud83e\udd84 Unique items"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccb UnevaluatedItems (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2"},"next":{"title":"\u2705 Boolean","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean"}}');var a=t(62540),i=t(28453),n=t(21432),u=t(97095),o=t(21344),d=t.n(o),c=t(11470),l=t(19365);const m={description:"array with uniqueItems showcase",title:"\ud83e\udd84 Unique items"},h="Unique items",p={},w=[];function f(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"unique-items",children:"Unique items"})}),"\n",(0,a.jsxs)(c.default,{children:[(0,a.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:u})}),(0,a.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(n.default,{language:"json-schema",children:JSON.stringify(u,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(f,{...e})}):f(e)}},97095:e=>{e.exports=JSON.parse('{"type":"array","uniqueItems":true}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3693,7095],{12217:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>r,toc:()=>w});const r=JSON.parse('{"id":"demo-viewer/array/uniqueItems","title":"\ud83e\udd84 Unique items","description":"array with uniqueItems showcase","source":"@site/docs/demo-viewer/array/uniqueItems.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/uniqueItems","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/uniqueItems.mdx","tags":[],"version":"current","frontMatter":{"description":"array with uniqueItems showcase","title":"\ud83e\udd84 Unique items"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccb UnevaluatedItems (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2"},"next":{"title":"\u2705 Boolean","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean"}}');var a=t(62540),i=t(28453),n=t(58069),u=t(97095),o=t(88307),d=t.n(o),c=t(65537),l=t(79329);const m={description:"array with uniqueItems showcase",title:"\ud83e\udd84 Unique items"},h="Unique items",p={},w=[];function f(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"unique-items",children:"Unique items"})}),"\n",(0,a.jsxs)(c.default,{children:[(0,a.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:u})}),(0,a.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(n.default,{language:"json-schema",children:JSON.stringify(u,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(f,{...e})}):f(e)}},97095:e=>{e.exports=JSON.parse('{"type":"array","uniqueItems":true}')}}]); \ No newline at end of file diff --git a/assets/js/9dfa20e1.995fc52b.js b/assets/js/9dfa20e1.15a760d4.js similarity index 92% rename from assets/js/9dfa20e1.995fc52b.js rename to assets/js/9dfa20e1.15a760d4.js index 5b603acf..338096c3 100644 --- a/assets/js/9dfa20e1.995fc52b.js +++ b/assets/js/9dfa20e1.15a760d4.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[513,5771],{73957:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>g,default:()=>w,frontMatter:()=>u,metadata:()=>i,toc:()=>m});const i=JSON.parse('{"id":"demo-viewer/string/contentEncodingWithContentMediaType","title":"\ud83d\udcc4 ContentEncoding & ContentMediaType","description":"string with contentEncoding & contentMediaType showcase","source":"@site/docs/demo-viewer/string/contentEncodingWithContentMediaType.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/contentEncodingWithContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/contentEncodingWithContentMediaType.mdx","tags":[],"version":"current","frontMatter":{"description":"string with contentEncoding & contentMediaType showcase","title":"\ud83d\udcc4 ContentEncoding & ContentMediaType"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcdc ContentEncoding","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding"},"next":{"title":"\ud83d\udd16 ContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType"}}');var o=t(62540),s=t(28453),c=t(21432),d=t(80513),a=t(21344),r=t.n(a),l=t(11470),p=t(19365);const u={description:"string with contentEncoding & contentMediaType showcase",title:"\ud83d\udcc4 ContentEncoding & ContentMediaType"},g="ContentEncoding & ContentMediaType",h={},m=[];function y(e){const n={h1:"h1",header:"header",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"contentencoding--contentmediatype",children:"ContentEncoding & ContentMediaType"})}),"\n",(0,o.jsxs)(l.default,{children:[(0,o.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(r(),{schema:d})}),(0,o.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(c.default,{language:"json-schema",children:JSON.stringify(d,null,2)})})]})]})}function w(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(y,{...e})}):y(e)}},80513:e=>{e.exports=JSON.parse('{"type":"string","contentEncoding":"base64","contentMediaType":"application/json"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[513,5771],{92614:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>g,default:()=>w,frontMatter:()=>u,metadata:()=>i,toc:()=>m});const i=JSON.parse('{"id":"demo-viewer/string/contentEncodingWithContentMediaType","title":"\ud83d\udcc4 ContentEncoding & ContentMediaType","description":"string with contentEncoding & contentMediaType showcase","source":"@site/docs/demo-viewer/string/contentEncodingWithContentMediaType.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/contentEncodingWithContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/contentEncodingWithContentMediaType.mdx","tags":[],"version":"current","frontMatter":{"description":"string with contentEncoding & contentMediaType showcase","title":"\ud83d\udcc4 ContentEncoding & ContentMediaType"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcdc ContentEncoding","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding"},"next":{"title":"\ud83d\udd16 ContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType"}}');var o=t(62540),s=t(28453),c=t(58069),d=t(80513),a=t(88307),r=t.n(a),l=t(65537),p=t(79329);const u={description:"string with contentEncoding & contentMediaType showcase",title:"\ud83d\udcc4 ContentEncoding & ContentMediaType"},g="ContentEncoding & ContentMediaType",h={},m=[];function y(e){const n={h1:"h1",header:"header",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"contentencoding--contentmediatype",children:"ContentEncoding & ContentMediaType"})}),"\n",(0,o.jsxs)(l.default,{children:[(0,o.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(r(),{schema:d})}),(0,o.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(c.default,{language:"json-schema",children:JSON.stringify(d,null,2)})})]})]})}function w(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(y,{...e})}):y(e)}},80513:e=>{e.exports=JSON.parse('{"type":"string","contentEncoding":"base64","contentMediaType":"application/json"}')}}]); \ No newline at end of file diff --git a/assets/js/a78d2520.27e4d878.js b/assets/js/a78d2520.a7de0c0a.js similarity index 92% rename from assets/js/a78d2520.27e4d878.js rename to assets/js/a78d2520.a7de0c0a.js index 34823629..c43edcfc 100644 --- a/assets/js/a78d2520.27e4d878.js +++ b/assets/js/a78d2520.a7de0c0a.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5150,6368],{18453:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>r,toc:()=>j});const r=JSON.parse('{"id":"demo-viewer/object/additionalProperties","title":"\ud83d\udddd\ufe0f AdditionalProperties (1)","description":"object with properties / additionalProperties (false) showcase","source":"@site/docs/demo-viewer/object/additionalProperties.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/additionalProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/additionalProperties.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / additionalProperties (false) showcase","title":"\ud83d\udddd\ufe0f AdditionalProperties (1)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udce6 Object","permalink":"/docusaurus-json-schema-plugin/docs/category/-object"},"next":{"title":"\ud83d\udee0\ufe0f AdditionalProperties (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2"}}');var s=i(62540),o=i(28453),a=i(21432),d=i(16368),n=i(21344),l=i.n(n),c=i(11470),p=i(19365);const u={description:"object with properties / additionalProperties (false) showcase",title:"\ud83d\udddd\ufe0f AdditionalProperties (1)"},h="AdditionalProperties (1)",m={},j=[];function b(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"additionalproperties-1",children:"AdditionalProperties (1)"})}),"\n",(0,s.jsxs)(c.default,{children:[(0,s.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(l(),{schema:d})}),(0,s.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(a.default,{language:"json-schema",children:JSON.stringify(d,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(b,{...e})}):b(e)}},16368:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"additionalProperties":false}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5150,6368],{87014:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>r,toc:()=>j});const r=JSON.parse('{"id":"demo-viewer/object/additionalProperties","title":"\ud83d\udddd\ufe0f AdditionalProperties (1)","description":"object with properties / additionalProperties (false) showcase","source":"@site/docs/demo-viewer/object/additionalProperties.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/additionalProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/additionalProperties.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / additionalProperties (false) showcase","title":"\ud83d\udddd\ufe0f AdditionalProperties (1)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udce6 Object","permalink":"/docusaurus-json-schema-plugin/docs/category/-object"},"next":{"title":"\ud83d\udee0\ufe0f AdditionalProperties (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2"}}');var s=i(62540),o=i(28453),a=i(58069),d=i(16368),n=i(88307),l=i.n(n),c=i(65537),p=i(79329);const u={description:"object with properties / additionalProperties (false) showcase",title:"\ud83d\udddd\ufe0f AdditionalProperties (1)"},h="AdditionalProperties (1)",m={},j=[];function b(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"additionalproperties-1",children:"AdditionalProperties (1)"})}),"\n",(0,s.jsxs)(c.default,{children:[(0,s.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(l(),{schema:d})}),(0,s.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(a.default,{language:"json-schema",children:JSON.stringify(d,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(b,{...e})}):b(e)}},16368:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"additionalProperties":false}')}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.c2280aea.js b/assets/js/a7bd4aaa.c379f6a0.js similarity index 72% rename from assets/js/a7bd4aaa.c2280aea.js rename to assets/js/a7bd4aaa.c379f6a0.js index 5c588a74..e92a81e6 100644 --- a/assets/js/a7bd4aaa.c2280aea.js +++ b/assets/js/a7bd4aaa.c379f6a0.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7098],{74532:(e,n,s)=>{s.r(n),s.d(n,{default:()=>x});s(63696);var t=s(69024),r=s(82565),o=s(23025),i=s(22831),c=s(41463),u=s(62540);function a(e){const{version:n}=e;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.A,{version:n.version,tag:(0,r.k)(n.pluginId,n.version)}),(0,u.jsx)(t.be,{children:n.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(e){const{version:n,route:s}=e;return(0,u.jsx)(t.e3,{className:n.className,children:(0,u.jsx)(o.n,{version:n,children:(0,i.v)(s.routes)})})}function x(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...e}),(0,u.jsx)(l,{...e})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7098],{15047:(e,n,s)=>{s.r(n),s.d(n,{default:()=>x});s(63696);var t=s(59144),r=s(23716),o=s(21858),i=s(22831),c=s(37220),u=s(62540);function a(e){const{version:n}=e;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.A,{version:n.version,tag:(0,r.k)(n.pluginId,n.version)}),(0,u.jsx)(t.be,{children:n.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(e){const{version:n,route:s}=e;return(0,u.jsx)(t.e3,{className:n.className,children:(0,u.jsx)(o.n,{version:n,children:(0,i.v)(s.routes)})})}function x(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...e}),(0,u.jsx)(l,{...e})]})}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.2841e30a.js b/assets/js/a94703ab.2841e30a.js deleted file mode 100644 index c4c4f9eb..00000000 --- a/assets/js/a94703ab.2841e30a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[9048],{11377:(e,t,n)=>{n.r(t),n.d(t,{default:()=>pe});var a=n(63696),o=n(34164),i=n(69024),s=n(17559),l=n(26972),r=n(60609),c=n(21312),d=n(23104),u=n(75062);const m={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};var b=n(62540);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.gk)();return(0,d.Mq)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a{e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,c.translate)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",s.G.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(53109),x=n(56347),f=n(24581),j=n(6342),v=n(23465);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,b.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}const g="collapseSidebarButton_PEFL",C="collapseSidebarButtonIcon_kv0_";function k(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,c.translate)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,c.translate)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",g),onClick:t,children:(0,b.jsx)(_,{className:C})})}var A=n(65041),S=n(89532);const N=Symbol("EmptyContext"),I=a.createContext(N);function T(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(I.Provider,{value:i,children:t})}var y=n(41422),B=n(99169),w=n(28774),L=n(92303);function E(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,c.translate)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,c.translate)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:a})}function M(e){let{item:t,onItemClick:n,activePath:i,level:r,index:c,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:f}}}=(0,j.p)(),v=function(e){const t=(0,L.A)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.Nr)(e):void 0),[e,t])}(t),_=(0,l.w8)(t,i),g=(0,B.ys)(x,i),{collapsed:C,setCollapsed:k}=(0,y.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:A,setExpandedItem:T}=function(){const e=(0,a.useContext)(I);if(e===N)throw new S.dV("DocSidebarItemsExpandedStateProvider");return e}(),M=function(e){void 0===e&&(e=!C),T(e?null:c),k(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,S.ZC)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:C,updateCollapsed:M}),(0,a.useEffect)((()=>{h&&null!=A&&A!==c&&f&&k(!0)}),[h,A,c,k,f]),(0,b.jsxs)("li",{className:(0,o.A)(s.G.docs.docSidebarItemCategory,s.G.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":C},p),children:[(0,b.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":g}),children:[(0,b.jsx)(w.A,{className:(0,o.A)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?M(!1):(e.preventDefault(),M())}:()=>{n?.(t)},"aria-current":g?"page":void 0,role:h&&!x?"button":void 0,"aria-expanded":h&&!x?!C:void 0,href:h?v??"#":v,...d,children:m}),x&&h&&(0,b.jsx)(E,{collapsed:C,categoryLabel:m,onClick:e=>{e.preventDefault(),M()}})]}),(0,b.jsx)(y.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:C,children:(0,b.jsx)(V,{items:u,tabIndex:C?-1:0,onItemClick:n,activePath:i,level:r+1})})]})}var H=n(16654),G=n(43186);const P="menuExternalLink_NmtK";function R(e){let{item:t,onItemClick:n,activePath:a,level:i,index:r,...c}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l.w8)(t,a),x=(0,H.A)(d);return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(w.A,{className:(0,o.A)("menu__link",!x&&P,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...c,children:[u,!x&&(0,b.jsx)(G.A,{})]})},u)}const W="menuHtmlItem_M9Kj";function D(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:r}=t;return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(n),l&&[W,"menu__list-item"],r),dangerouslySetInnerHTML:{__html:i}},a)}function F(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(M,{item:t,...n});case"html":return(0,b.jsx)(D,{item:t,...n});default:return(0,b.jsx)(R,{item:t,...n})}}function U(e){let{items:t,...n}=e;const a=(0,l.Y)(t,n.activePath);return(0,b.jsx)(T,{children:a.map(((e,t)=>(0,b.jsx)(F,{item:e,index:t,...n},t)))})}const V=(0,a.memo)(U),Y="menu_SIkG",K="menuWithAnnouncementBar_GW3s";function z(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,A.M)(),[t,n]=(0,a.useState)(e);return(0,d.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,c.translate)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",Y,l&&K,i),children:(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:n,activePath:t,level:1})})})}const q="sidebar_njMd",O="sidebarWithHideableNavbar_wUlq",J="sidebarHidden_VK0M",Q="sidebarLogo_isFc";function X(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,j.p)();return(0,b.jsxs)("div",{className:(0,o.A)(q,s&&O,i&&J),children:[s&&(0,b.jsx)(v.A,{tabIndex:-1,className:Q}),(0,b.jsx)(z,{path:t,sidebar:n}),l&&(0,b.jsx)(k,{onClick:a})]})}const Z=a.memo(X);var $=n(75600),ee=n(22069);const te=e=>{let{sidebar:t,path:n}=e;const a=(0,ee.M)();return(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ne(e){return(0,b.jsx)($.GX,{component:te,props:e})}const ae=a.memo(ne);function oe(e){const t=(0,f.l)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(Z,{...e}),a&&(0,b.jsx)(ae,{...e})]})}const ie={expandButton:"expandButton_TmdG",expandButtonIcon:"expandButtonIcon_i1dp"};function se(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ie.expandButton,title:(0,c.translate)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,c.translate)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,b.jsx)(_,{className:ie.expandButtonIcon})})}const le={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function re(e){let{children:t}=e;const n=(0,r.t)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function ce(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.zy)(),[r,c]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{r&&c(!1),!r&&(0,p.O)()&&c(!0),i((e=>!e))}),[i,r]);return(0,b.jsx)("aside",{className:(0,o.A)(s.G.docs.docSidebarContainer,le.docSidebarContainer,n&&le.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(le.docSidebarContainer)&&n&&c(!0)},children:(0,b.jsx)(re,{children:(0,b.jsxs)("div",{className:(0,o.A)(le.sidebarViewport,r&&le.sidebarViewportHidden),children:[(0,b.jsx)(oe,{sidebar:t,path:l,onCollapse:d,isHidden:r}),r&&(0,b.jsx)(se,{toggleSidebar:d})]})})})}const de={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function ue(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,r.t)();return(0,b.jsx)("main",{className:(0,o.A)(de.docMainContainer,(t||!a)&&de.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",de.docItemWrapper,t&&de.docItemWrapperEnhanced),children:n})})}const me={docRoot:"docRoot_UBD9",docsWrapper:"docsWrapper_hBAB"};function be(e){let{children:t}=e;const n=(0,r.t)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:me.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:me.docRoot,children:[n&&(0,b.jsx)(ce,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(ue,{hiddenSidebarContainer:o,children:t})]})]})}var he=n(23363);function pe(e){const t=(0,l.B5)(e);if(!t)return(0,b.jsx)(he.A,{});const{docElement:n,sidebarName:a,sidebarItems:c}=t;return(0,b.jsx)(i.e3,{className:(0,o.A)(s.G.page.docsDocPage),children:(0,b.jsx)(r.V,{name:a,items:c,children:(0,b.jsx)(be,{children:n})})})}},23363:(e,t,n)=>{n.d(t,{A:()=>l});n(63696);var a=n(34164),o=n(21312),i=n(51107),s=n(62540);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.default,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.default,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.default,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.ece806c0.js b/assets/js/a94703ab.ece806c0.js new file mode 100644 index 00000000..9ef13431 --- /dev/null +++ b/assets/js/a94703ab.ece806c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[9048],{91841:(e,t,n)=>{n.r(t),n.d(t,{default:()=>pe});var a=n(63696),o=n(34164),i=n(59144),s=n(204),l=n(93751),r=n(22306),c=n(50539),d=n(65627),u=n(77685);const m={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};var b=n(62540);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.gk)();return(0,d.Mq)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a{e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,c.translate)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",s.G.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(84924),x=n(56347),f=n(86682),j=n(53115),v=n(12862);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,b.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}const g="collapseSidebarButton_PEFL",C="collapseSidebarButtonIcon_kv0_";function k(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,c.translate)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,c.translate)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",g),onClick:t,children:(0,b.jsx)(_,{className:C})})}var A=n(23380),S=n(26849);const N=Symbol("EmptyContext"),I=a.createContext(N);function T(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(I.Provider,{value:i,children:t})}var y=n(33535),B=n(30214),w=n(56289),L=n(9136);function E(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,c.translate)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,c.translate)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:a})}function M(e){let{item:t,onItemClick:n,activePath:i,level:r,index:c,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:f}}}=(0,j.p)(),v=function(e){const t=(0,L.A)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.Nr)(e):void 0),[e,t])}(t),_=(0,l.w8)(t,i),g=(0,B.ys)(x,i),{collapsed:C,setCollapsed:k}=(0,y.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:A,setExpandedItem:T}=function(){const e=(0,a.useContext)(I);if(e===N)throw new S.dV("DocSidebarItemsExpandedStateProvider");return e}(),M=function(e){void 0===e&&(e=!C),T(e?null:c),k(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,S.ZC)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:C,updateCollapsed:M}),(0,a.useEffect)((()=>{h&&null!=A&&A!==c&&f&&k(!0)}),[h,A,c,k,f]),(0,b.jsxs)("li",{className:(0,o.A)(s.G.docs.docSidebarItemCategory,s.G.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":C},p),children:[(0,b.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":g}),children:[(0,b.jsx)(w.A,{className:(0,o.A)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?M(!1):(e.preventDefault(),M())}:()=>{n?.(t)},"aria-current":g?"page":void 0,role:h&&!x?"button":void 0,"aria-expanded":h&&!x?!C:void 0,href:h?v??"#":v,...d,children:m}),x&&h&&(0,b.jsx)(E,{collapsed:C,categoryLabel:m,onClick:e=>{e.preventDefault(),M()}})]}),(0,b.jsx)(y.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:C,children:(0,b.jsx)(V,{items:u,tabIndex:C?-1:0,onItemClick:n,activePath:i,level:r+1})})]})}var H=n(22887),G=n(15891);const P="menuExternalLink_NmtK";function R(e){let{item:t,onItemClick:n,activePath:a,level:i,index:r,...c}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l.w8)(t,a),x=(0,H.A)(d);return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(w.A,{className:(0,o.A)("menu__link",!x&&P,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...c,children:[u,!x&&(0,b.jsx)(G.A,{})]})},u)}const W="menuHtmlItem_M9Kj";function D(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:r}=t;return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(n),l&&[W,"menu__list-item"],r),dangerouslySetInnerHTML:{__html:i}},a)}function F(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(M,{item:t,...n});case"html":return(0,b.jsx)(D,{item:t,...n});default:return(0,b.jsx)(R,{item:t,...n})}}function U(e){let{items:t,...n}=e;const a=(0,l.Y)(t,n.activePath);return(0,b.jsx)(T,{children:a.map(((e,t)=>(0,b.jsx)(F,{item:e,index:t,...n},t)))})}const V=(0,a.memo)(U),Y="menu_SIkG",K="menuWithAnnouncementBar_GW3s";function z(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,A.M)(),[t,n]=(0,a.useState)(e);return(0,d.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,c.translate)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",Y,l&&K,i),children:(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:n,activePath:t,level:1})})})}const q="sidebar_njMd",O="sidebarWithHideableNavbar_wUlq",J="sidebarHidden_VK0M",Q="sidebarLogo_isFc";function X(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,j.p)();return(0,b.jsxs)("div",{className:(0,o.A)(q,s&&O,i&&J),children:[s&&(0,b.jsx)(v.A,{tabIndex:-1,className:Q}),(0,b.jsx)(z,{path:t,sidebar:n}),l&&(0,b.jsx)(k,{onClick:a})]})}const Z=a.memo(X);var $=n(63065),ee=n(5528);const te=e=>{let{sidebar:t,path:n}=e;const a=(0,ee.M)();return(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ne(e){return(0,b.jsx)($.GX,{component:te,props:e})}const ae=a.memo(ne);function oe(e){const t=(0,f.l)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(Z,{...e}),a&&(0,b.jsx)(ae,{...e})]})}const ie={expandButton:"expandButton_TmdG",expandButtonIcon:"expandButtonIcon_i1dp"};function se(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ie.expandButton,title:(0,c.translate)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,c.translate)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,b.jsx)(_,{className:ie.expandButtonIcon})})}const le={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function re(e){let{children:t}=e;const n=(0,r.t)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function ce(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.zy)(),[r,c]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{r&&c(!1),!r&&(0,p.O)()&&c(!0),i((e=>!e))}),[i,r]);return(0,b.jsx)("aside",{className:(0,o.A)(s.G.docs.docSidebarContainer,le.docSidebarContainer,n&&le.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(le.docSidebarContainer)&&n&&c(!0)},children:(0,b.jsx)(re,{children:(0,b.jsxs)("div",{className:(0,o.A)(le.sidebarViewport,r&&le.sidebarViewportHidden),children:[(0,b.jsx)(oe,{sidebar:t,path:l,onCollapse:d,isHidden:r}),r&&(0,b.jsx)(se,{toggleSidebar:d})]})})})}const de={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function ue(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,r.t)();return(0,b.jsx)("main",{className:(0,o.A)(de.docMainContainer,(t||!a)&&de.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",de.docItemWrapper,t&&de.docItemWrapperEnhanced),children:n})})}const me={docRoot:"docRoot_UBD9",docsWrapper:"docsWrapper_hBAB"};function be(e){let{children:t}=e;const n=(0,r.t)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:me.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:me.docRoot,children:[n&&(0,b.jsx)(ce,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(ue,{hiddenSidebarContainer:o,children:t})]})]})}var he=n(65932);function pe(e){const t=(0,l.B5)(e);if(!t)return(0,b.jsx)(he.A,{});const{docElement:n,sidebarName:a,sidebarItems:c}=t;return(0,b.jsx)(i.e3,{className:(0,o.A)(s.G.page.docsDocPage),children:(0,b.jsx)(r.V,{name:a,items:c,children:(0,b.jsx)(be,{children:n})})})}},65932:(e,t,n)=>{n.d(t,{A:()=>l});n(63696);var a=n(34164),o=n(50539),i=n(9303),s=n(62540);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.default,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.default,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.default,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/a9655ce0.c1051c25.js b/assets/js/a9655ce0.c7064e79.js similarity index 90% rename from assets/js/a9655ce0.c1051c25.js rename to assets/js/a9655ce0.c7064e79.js index e6220f7c..27e7b47c 100644 --- a/assets/js/a9655ce0.c1051c25.js +++ b/assets/js/a9655ce0.c7064e79.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2837,8210],{90726:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>w,frontMatter:()=>h,metadata:()=>a,toc:()=>g});const a=JSON.parse('{"id":"demo-viewer/array/length","title":"\ud83d\udcd0 Length","description":"array with minItems / maxItems showcase","source":"@site/docs/demo-viewer/array/length.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/length.mdx","tags":[],"version":"current","frontMatter":{"description":"array with minItems / maxItems showcase","title":"\ud83d\udcd0 Length"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udecd\ufe0f Items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items"},"next":{"title":"\ud83d\udcca minContains & maxContains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains"}}');var r=s(62540),n=s(28453),i=s(21432),o=s(18210),l=s(21344),d=s.n(l),m=s(11470),c=s(19365);const h={description:"array with minItems / maxItems showcase",title:"\ud83d\udcd0 Length"},u="Length",p={},g=[];function x(e){const t={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"length",children:"Length"})}),"\n",(0,r.jsxs)(m.default,{children:[(0,r.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:o})}),(0,r.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(i.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(x,{...e})}):x(e)}},18210:e=>{e.exports=JSON.parse('{"type":"array","minItems":2,"maxItems":3}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2837,8210],{67530:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>w,frontMatter:()=>h,metadata:()=>a,toc:()=>g});const a=JSON.parse('{"id":"demo-viewer/array/length","title":"\ud83d\udcd0 Length","description":"array with minItems / maxItems showcase","source":"@site/docs/demo-viewer/array/length.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/length.mdx","tags":[],"version":"current","frontMatter":{"description":"array with minItems / maxItems showcase","title":"\ud83d\udcd0 Length"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udecd\ufe0f Items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items"},"next":{"title":"\ud83d\udcca minContains & maxContains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains"}}');var r=s(62540),n=s(28453),i=s(58069),o=s(18210),l=s(88307),d=s.n(l),m=s(65537),c=s(79329);const h={description:"array with minItems / maxItems showcase",title:"\ud83d\udcd0 Length"},u="Length",p={},g=[];function x(e){const t={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"length",children:"Length"})}),"\n",(0,r.jsxs)(m.default,{children:[(0,r.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:o})}),(0,r.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(i.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(x,{...e})}):x(e)}},18210:e=>{e.exports=JSON.parse('{"type":"array","minItems":2,"maxItems":3}')}}]); \ No newline at end of file diff --git a/assets/js/a998845c.405e7606.js b/assets/js/a998845c.405e7606.js new file mode 100644 index 00000000..50064842 --- /dev/null +++ b/assets/js/a998845c.405e7606.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7846,9569],{71289:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>f,contentTitle:()=>u,default:()=>x,frontMatter:()=>d,metadata:()=>s,toc:()=>g});const s=JSON.parse('{"id":"demo-viewer/string/format","title":"\ud83d\udcc5 Format","description":"string with format showcase","source":"@site/docs/demo-viewer/string/format.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/format","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/format.mdx","tags":[],"version":"current","frontMatter":{"description":"string with format showcase","title":"\ud83d\udcc5 Format"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcd1 ContentSchema","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema"},"next":{"title":"\ud83d\udccf Length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length"}}');var a=r(62540),o=r(28453),i=r(58069),p=r(9569),n=r(88307),m=r.n(n),l=r(65537),c=r(79329);const d={description:"string with format showcase",title:"\ud83d\udcc5 Format"},u="Format",f={},g=[];function h(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.header,{children:(0,a.jsx)(t.h1,{id:"format",children:"Format"})}),"\n",(0,a.jsxs)(l.default,{children:[(0,a.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(m(),{schema:p})}),(0,a.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(i.default,{language:"json-schema",children:JSON.stringify(p,null,2)})})]})]})}function x(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},9569:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","properties":{"prop1":{"type":"string","format":"date-time","examples":["2018-11-13T20:20:39+00:00"]},"prop2":{"type":"string","format":"time","examples":["20:20:39+00:00"]},"prop3":{"type":"string","format":"date","examples":["2018-11-13"]},"prop4":{"type":"string","format":"duration","examples":["P3D"]},"prop5":{"type":"string","format":"email","examples":["test@gmail.com"]},"prop6":{"type":"string","format":"idn-email","examples":["test@gmail.com"]},"prop7":{"type":"string","format":"hostname","examples":["example"]},"prop8":{"type":"string","format":"idn-hostname","examples":["example"]},"prop9":{"type":"string","format":"ipv4","examples":["192.168.1.1"]},"prop10":{"type":"string","format":"ipv6","examples":["2001:db8:3333:4444:5555:6666:7777:8888"]},"prop11":{"type":"string","format":"uuid","examples":["3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a"]},"prop12":{"type":"string","format":"uri","examples":["https://www.perdu.com/"]},"prop12B":{"type":"string","format":"uri-reference"},"prop13":{"type":"string","format":"iri","examples":["https://www.perdu.com/"]},"prop13B":{"type":"string","format":"iri-reference"},"prop14":{"type":"string","format":"uri-template"},"prop15":{"type":"string","format":"json-pointer"},"prop16":{"type":"string","format":"relative-json-pointer"},"prop17":{"type":"string","format":"regex","examples":["^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$"]}}}')}}]); \ No newline at end of file diff --git a/assets/js/a998845c.4a60ce85.js b/assets/js/a998845c.4a60ce85.js deleted file mode 100644 index 25827664..00000000 --- a/assets/js/a998845c.4a60ce85.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[7846,9569],{9118:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>f,contentTitle:()=>u,default:()=>x,frontMatter:()=>d,metadata:()=>s,toc:()=>g});const s=JSON.parse('{"id":"demo-viewer/string/format","title":"\ud83d\udcc5 Format","description":"string with format showcase","source":"@site/docs/demo-viewer/string/format.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/format","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/format.mdx","tags":[],"version":"current","frontMatter":{"description":"string with format showcase","title":"\ud83d\udcc5 Format"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcd1 ContentSchema","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema"},"next":{"title":"\ud83d\udccf Length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length"}}');var a=r(62540),o=r(28453),i=r(21432),p=r(9569),n=r(21344),m=r.n(n),l=r(11470),c=r(19365);const d={description:"string with format showcase",title:"\ud83d\udcc5 Format"},u="Format",f={},g=[];function h(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.header,{children:(0,a.jsx)(t.h1,{id:"format",children:"Format"})}),"\n",(0,a.jsxs)(l.default,{children:[(0,a.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(m(),{schema:p})}),(0,a.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(i.default,{language:"json-schema",children:JSON.stringify(p,null,2)})})]})]})}function x(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},9569:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","properties":{"prop1":{"type":"string","format":"date-time","examples":["2018-11-13T20:20:39+00:00"]},"prop2":{"type":"string","format":"time","examples":["20:20:39+00:00"]},"prop3":{"type":"string","format":"date","examples":["2018-11-13"]},"prop4":{"type":"string","format":"duration","examples":["P3D"]},"prop5":{"type":"string","format":"email","examples":["test@gmail.com"]},"prop6":{"type":"string","format":"idn-email","examples":["test@gmail.com"]},"prop7":{"type":"string","format":"hostname","examples":["example"]},"prop8":{"type":"string","format":"idn-hostname","examples":["example"]},"prop9":{"type":"string","format":"ipv4","examples":["192.168.1.1"]},"prop10":{"type":"string","format":"ipv6","examples":["2001:db8:3333:4444:5555:6666:7777:8888"]},"prop11":{"type":"string","format":"uuid","examples":["3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a"]},"prop12":{"type":"string","format":"uri","examples":["https://www.perdu.com/"]},"prop12B":{"type":"string","format":"uri-reference"},"prop13":{"type":"string","format":"iri","examples":["https://www.perdu.com/"]},"prop13B":{"type":"string","format":"iri-reference"},"prop14":{"type":"string","format":"uri-template"},"prop15":{"type":"string","format":"json-pointer"},"prop16":{"type":"string","format":"relative-json-pointer"},"prop17":{"type":"string","format":"regex","examples":["^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$"]}}}')}}]); \ No newline at end of file diff --git a/assets/js/b34a7af0.7f862df7.js b/assets/js/b34a7af0.aababcaf.js similarity index 92% rename from assets/js/b34a7af0.7f862df7.js rename to assets/js/b34a7af0.aababcaf.js index c8a6f5d0..9dfbd715 100644 --- a/assets/js/b34a7af0.7f862df7.js +++ b/assets/js/b34a7af0.aababcaf.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3563,5533],{52841:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>w,contentTitle:()=>m,default:()=>x,frontMatter:()=>p,metadata:()=>t,toc:()=>g});const t=JSON.parse('{"id":"demo-viewer/generic_keywords/annotations","title":"\ud83d\udccc Annotations","description":"annotations showcase","source":"@site/docs/demo-viewer/generic_keywords/annotations.mdx","sourceDirName":"demo-viewer/generic_keywords","slug":"/demo-viewer/generic_keywords/annotations","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/generic_keywords/annotations.mdx","tags":[],"version":"current","frontMatter":{"description":"annotations showcase","title":"\ud83d\udccc Annotations"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddec Generic keywords","permalink":"/docusaurus-json-schema-plugin/docs/category/-generic-keywords"},"next":{"title":"\ud83e\uddca Const","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const"}}');var i=s(62540),o=s(28453),a=s(21432),r=s(63563),c=s(21344),d=s.n(c),l=s(54655),u=s(11470),h=s(19365);const p={description:"annotations showcase",title:"\ud83d\udccc Annotations"},m="Annotations",w={},g=[];function j(e){const n={code:"code",h1:"h1",header:"header",pre:"pre",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"annotations",children:"Annotations"})}),"\n",(0,i.jsxs)(u.default,{children:[(0,i.jsx)(h.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(d(),{schema:r,viewerOptions:{showExamples:!0,DescriptionComponent:({description:e})=>(0,i.jsx)(l.o,{children:e})}})}),(0,i.jsx)(h.default,{value:"viewerOptions",label:"viewerOptions",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"{\n showExamples: true,\n DescriptionComponent: ({description}) => \n}\n"})})}),(0,i.jsx)(h.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(a.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(j,{...e})}):j(e)}},63563:e=>{e.exports=JSON.parse('{"title":"Match anything","description":"This is a *schema* that matches **anything.**","default":"Default value","examples":["Anything",4035],"deprecated":true,"readOnly":true,"writeOnly":false}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3563,5533],{12109:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>w,contentTitle:()=>m,default:()=>x,frontMatter:()=>p,metadata:()=>t,toc:()=>g});const t=JSON.parse('{"id":"demo-viewer/generic_keywords/annotations","title":"\ud83d\udccc Annotations","description":"annotations showcase","source":"@site/docs/demo-viewer/generic_keywords/annotations.mdx","sourceDirName":"demo-viewer/generic_keywords","slug":"/demo-viewer/generic_keywords/annotations","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/generic_keywords/annotations.mdx","tags":[],"version":"current","frontMatter":{"description":"annotations showcase","title":"\ud83d\udccc Annotations"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\uddec Generic keywords","permalink":"/docusaurus-json-schema-plugin/docs/category/-generic-keywords"},"next":{"title":"\ud83e\uddca Const","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const"}}');var i=s(62540),o=s(28453),a=s(58069),r=s(63563),c=s(88307),d=s.n(c),l=s(54655),u=s(65537),h=s(79329);const p={description:"annotations showcase",title:"\ud83d\udccc Annotations"},m="Annotations",w={},g=[];function j(e){const n={code:"code",h1:"h1",header:"header",pre:"pre",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"annotations",children:"Annotations"})}),"\n",(0,i.jsxs)(u.default,{children:[(0,i.jsx)(h.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(d(),{schema:r,viewerOptions:{showExamples:!0,DescriptionComponent:({description:e})=>(0,i.jsx)(l.o,{children:e})}})}),(0,i.jsx)(h.default,{value:"viewerOptions",label:"viewerOptions",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"{\n showExamples: true,\n DescriptionComponent: ({description}) => \n}\n"})})}),(0,i.jsx)(h.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(a.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(j,{...e})}):j(e)}},63563:e=>{e.exports=JSON.parse('{"title":"Match anything","description":"This is a *schema* that matches **anything.**","default":"Default value","examples":["Anything",4035],"deprecated":true,"readOnly":true,"writeOnly":false}')}}]); \ No newline at end of file diff --git a/assets/js/bb96c887.b3bd3d50.js b/assets/js/bb96c887.373aa900.js similarity index 94% rename from assets/js/bb96c887.b3bd3d50.js rename to assets/js/bb96c887.373aa900.js index 66266bcd..678fd05c 100644 --- a/assets/js/bb96c887.b3bd3d50.js +++ b/assets/js/bb96c887.373aa900.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5184,6546],{37306:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>h,contentTitle:()=>p,default:()=>g,frontMatter:()=>m,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/custom/values","title":"\ud83c\udfa8 Custom value Component","description":"customize display of values","source":"@site/docs/demo-viewer/custom/values.mdx","sourceDirName":"demo-viewer/custom","slug":"/demo-viewer/custom/values","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/custom/values.mdx","tags":[],"version":"current","frontMatter":{"description":"customize display of values","title":"\ud83c\udfa8 Custom value Component"},"sidebar":"tutorialSidebar","previous":{"title":"\u26a0\ufe0f Custom Unresolved Refs Component","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs"},"next":{"title":"\ud83e\uddec Generic keywords","permalink":"/docusaurus-json-schema-plugin/docs/category/-generic-keywords"}}');var o=t(62540),a=t(28453),i=t(21432),r=t(66546),l=t(21344),u=t.n(l),c=t(11470),d=t(19365);const m={description:"customize display of values",title:"\ud83c\udfa8 Custom value Component"},p="Custom value component",h={},f=[];function v(e){const s={code:"code",h1:"h1",header:"header",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"custom-value-component",children:"Custom value component"})}),"\n",(0,o.jsxs)(c.default,{children:[(0,o.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(u(),{schema:r,viewerOptions:{ValueComponent:({value:e,schema:t})=>{if(!["string","number","undefined"].includes(typeof e))return(0,o.jsx)(i.default,{language:"json",children:`${JSON.stringify(e,null,2)}`});const n=(0,o.jsx)(s.code,{children:`${e}`});return t.default&&e===t.default?(0,o.jsx)(s.strong,{children:n}):n}}})}),(0,o.jsx)(d.default,{value:"viewerOptions",label:"viewerOptions",children:(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-js",children:'{\n ValueComponent: ({ value, schema }) => {\n // render complex values as multiline JSON with 2 space indentation\n if (!(["string", "number", "undefined"].includes(typeof value))) {\n return {`${\n JSON.stringify(value, null, 2)\n }`};\n }\n\n // display elementary values inline.\n const component = {`${value}`};\n\n // if schema defines a default value, ensure it is bold wherever it\n // appears (e.g. in an enum)\n if (schema.default && value === schema.default) {\n return {component}\n }\n\n return component;\n }\n}\n'})})}),(0,o.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(i.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function g(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(v,{...e})}):v(e)}},66546:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","title":"CustomizationOptions","description":"JSON schema for customized options","type":"object","properties":{"customField":{"type":"string","description":"A customized or personalized field","enum":["palette","teddyBear","tools","laptop","thread","phone","puzzle","scissors","hammer","note"],"default":"palette","examples":["tools","note"]},"customConstObject":{"type":"object","const":{"version":5}}},"required":["customField"],"additionalProperties":false}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5184,6546],{70609:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>h,contentTitle:()=>p,default:()=>g,frontMatter:()=>m,metadata:()=>n,toc:()=>f});const n=JSON.parse('{"id":"demo-viewer/custom/values","title":"\ud83c\udfa8 Custom value Component","description":"customize display of values","source":"@site/docs/demo-viewer/custom/values.mdx","sourceDirName":"demo-viewer/custom","slug":"/demo-viewer/custom/values","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/custom/values.mdx","tags":[],"version":"current","frontMatter":{"description":"customize display of values","title":"\ud83c\udfa8 Custom value Component"},"sidebar":"tutorialSidebar","previous":{"title":"\u26a0\ufe0f Custom Unresolved Refs Component","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs"},"next":{"title":"\ud83e\uddec Generic keywords","permalink":"/docusaurus-json-schema-plugin/docs/category/-generic-keywords"}}');var o=t(62540),a=t(28453),i=t(58069),r=t(66546),l=t(88307),u=t.n(l),c=t(65537),d=t(79329);const m={description:"customize display of values",title:"\ud83c\udfa8 Custom value Component"},p="Custom value component",h={},f=[];function v(e){const s={code:"code",h1:"h1",header:"header",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"custom-value-component",children:"Custom value component"})}),"\n",(0,o.jsxs)(c.default,{children:[(0,o.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(u(),{schema:r,viewerOptions:{ValueComponent:({value:e,schema:t})=>{if(!["string","number","undefined"].includes(typeof e))return(0,o.jsx)(i.default,{language:"json",children:`${JSON.stringify(e,null,2)}`});const n=(0,o.jsx)(s.code,{children:`${e}`});return t.default&&e===t.default?(0,o.jsx)(s.strong,{children:n}):n}}})}),(0,o.jsx)(d.default,{value:"viewerOptions",label:"viewerOptions",children:(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-js",children:'{\n ValueComponent: ({ value, schema }) => {\n // render complex values as multiline JSON with 2 space indentation\n if (!(["string", "number", "undefined"].includes(typeof value))) {\n return {`${\n JSON.stringify(value, null, 2)\n }`};\n }\n\n // display elementary values inline.\n const component = {`${value}`};\n\n // if schema defines a default value, ensure it is bold wherever it\n // appears (e.g. in an enum)\n if (schema.default && value === schema.default) {\n return {component}\n }\n\n return component;\n }\n}\n'})})}),(0,o.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(i.default,{language:"json-schema",children:JSON.stringify(r,null,2)})})]})]})}function g(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(v,{...e})}):v(e)}},66546:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","title":"CustomizationOptions","description":"JSON schema for customized options","type":"object","properties":{"customField":{"type":"string","description":"A customized or personalized field","enum":["palette","teddyBear","tools","laptop","thread","phone","puzzle","scissors","hammer","note"],"default":"palette","examples":["tools","note"]},"customConstObject":{"type":"object","const":{"version":5}}},"required":["customField"],"additionalProperties":false}')}}]); \ No newline at end of file diff --git a/assets/js/bf17fbd2.79b6a006.js b/assets/js/bf17fbd2.79b6a006.js new file mode 100644 index 00000000..fd407843 --- /dev/null +++ b/assets/js/bf17fbd2.79b6a006.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1616,7949],{6381:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>w,frontMatter:()=>l,metadata:()=>s,toc:()=>g});const s=JSON.parse('{"id":"demo-viewer/string/contentSchema","title":"\ud83d\udcd1 ContentSchema","description":"string with contentSchema showcase","source":"@site/docs/demo-viewer/string/contentSchema.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/contentSchema","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/contentSchema.mdx","tags":[],"version":"current","frontMatter":{"description":"string with contentSchema showcase","title":"\ud83d\udcd1 ContentSchema"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd16 ContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType"},"next":{"title":"\ud83d\udcc5 Format","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format"}}');var r=n(62540),a=n(28453),i=n(58069),c=n(1616),o=n(88307),d=n.n(o),h=n(65537),m=n(79329);const l={description:"string with contentSchema showcase",title:"\ud83d\udcd1 ContentSchema"},u="ContentSchema",p={},g=[];function S(e){const t={h1:"h1",header:"header",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"contentschema",children:"ContentSchema"})}),"\n",(0,r.jsxs)(h.default,{children:[(0,r.jsx)(m.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:c})}),(0,r.jsx)(m.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(i.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(S,{...e})}):S(e)}},1616:e=>{e.exports=JSON.parse('{"type":"string","contentSchema":{"type":"object","required":["name","age"]}}')}}]); \ No newline at end of file diff --git a/assets/js/bf17fbd2.8da83418.js b/assets/js/bf17fbd2.8da83418.js deleted file mode 100644 index ecc868fd..00000000 --- a/assets/js/bf17fbd2.8da83418.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1616,7949],{65665:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>w,frontMatter:()=>l,metadata:()=>s,toc:()=>g});const s=JSON.parse('{"id":"demo-viewer/string/contentSchema","title":"\ud83d\udcd1 ContentSchema","description":"string with contentSchema showcase","source":"@site/docs/demo-viewer/string/contentSchema.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/contentSchema","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/contentSchema.mdx","tags":[],"version":"current","frontMatter":{"description":"string with contentSchema showcase","title":"\ud83d\udcd1 ContentSchema"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd16 ContentMediaType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType"},"next":{"title":"\ud83d\udcc5 Format","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format"}}');var r=n(62540),a=n(28453),i=n(21432),c=n(1616),o=n(21344),d=n.n(o),h=n(11470),m=n(19365);const l={description:"string with contentSchema showcase",title:"\ud83d\udcd1 ContentSchema"},u="ContentSchema",p={},g=[];function S(e){const t={h1:"h1",header:"header",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"contentschema",children:"ContentSchema"})}),"\n",(0,r.jsxs)(h.default,{children:[(0,r.jsx)(m.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:c})}),(0,r.jsx)(m.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(i.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(S,{...e})}):S(e)}},1616:e=>{e.exports=JSON.parse('{"type":"string","contentSchema":{"type":"object","required":["name","age"]}}')}}]); \ No newline at end of file diff --git a/assets/js/c179f821.7a79e1d7.js b/assets/js/c179f821.ae12719a.js similarity index 98% rename from assets/js/c179f821.7a79e1d7.js rename to assets/js/c179f821.ae12719a.js index d703d7b8..eb8883c3 100644 --- a/assets/js/c179f821.7a79e1d7.js +++ b/assets/js/c179f821.ae12719a.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1110],{86387:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>t,toc:()=>u});const t=JSON.parse('{"id":"quick-start","title":"\u26a1 Quick Start","description":"Getting started with docusaurus-json-schema-plugin","source":"@site/docs/quick-start.mdx","sourceDirName":".","slug":"/quick-start","permalink":"/docusaurus-json-schema-plugin/docs/quick-start","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/quick-start.mdx","tags":[],"version":"current","frontMatter":{"title":"\u26a1 Quick Start","description":"Getting started with docusaurus-json-schema-plugin"},"sidebar":"tutorialSidebar","next":{"title":"\ud83d\udca1 Demos","permalink":"/docusaurus-json-schema-plugin/docs/demo"}}');var i=s(62540),a=s(28453),c=s(11470),r=s(19365);const o={title:"\u26a1 Quick Start",description:"Getting started with docusaurus-json-schema-plugin"},l=void 0,d={},u=[{value:"Installation",id:"installation",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Configuring docusaurus.config.js",id:"configuring-docusaurusconfigjs",level:3},{value:"Configuring website tsconfig.json",id:"configuring-website-tsconfigjson",level:3},{value:"Usage",id:"usage",level:2},{value:"Output examples",id:"output-examples",level:2}];function h(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:["Getting started with ",(0,i.jsx)(n.code,{children:"docusaurus-json-schema-plugin"})]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsxs)(n.p,{children:["Install ",(0,i.jsx)(n.code,{children:"docusaurus-json-schema-plugin"})," using your desired package manager :"]}),"\n",(0,i.jsxs)(c.default,{groupId:"npm2yarn",children:[(0,i.jsx)(r.default,{value:"npm",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm install docusaurus-json-schema-plugin\n"})})}),(0,i.jsx)(r.default,{value:"yarn",label:"Yarn",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"yarn add docusaurus-json-schema-plugin\n"})})}),(0,i.jsx)(r.default,{value:"pnpm",label:"pnpm",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"pnpm add docusaurus-json-schema-plugin\n"})})})]}),"\n",(0,i.jsxs)(n.admonition,{title:"NPM only",type:"tip",children:[(0,i.jsxs)(n.p,{children:["When installing with npm, add this to the previous command : ",(0,i.jsx)(n.code,{children:"--prefer-dedupe"})]}),(0,i.jsxs)(n.p,{children:["Why ",(0,i.jsx)(n.code,{children:"--prefer-dedupe"})," ? Because of ",(0,i.jsx)(n.a,{href:"https://reactjs.org/warnings/invalid-hook-call-warning.html",children:"Invalid Hook Call Warning"})," common issue in projets"]})]}),"\n",(0,i.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,i.jsxs)(n.h3,{id:"configuring-docusaurusconfigjs",children:["Configuring ",(0,i.jsx)(n.code,{children:"docusaurus.config.js"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-tsx",metastring:'title="docusaurus.config.js"',children:'{\n // Allows use of @theme/JSONSchemaEditor or @theme/JSONSchemaViewer\n themes: ["docusaurus-json-schema-plugin"],\n}\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"configuring-website-tsconfigjson",children:["Configuring website ",(0,i.jsx)(n.code,{children:"tsconfig.json"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'title="tsconfig.json"',children:'{\n "extends": "@tsconfig/docusaurus/tsconfig.json",\n "compilerOptions": {\n "baseUrl": ".",\n "resolveJsonModule": true,\n // Extending "@tsconfig/docusaurus/tsconfig.json".types with "docusaurus-json-schema-plugin"\n "types": ["node", "@docusaurus/module-type-aliases", "@docusaurus/theme-classic", "docusaurus-json-schema-plugin"]\n }\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsxs)(n.p,{children:["You are free to fetch your JSON Schema ",(0,i.jsx)(n.strong,{children:"the way you want"})]}),"\n",(0,i.jsxs)(c.default,{children:[(0,i.jsxs)(r.default,{value:"staticAsset",label:"From a static asset",default:!0,children:[(0,i.jsx)(n.p,{children:"Suppose you have the following asset defined :"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'title="/static/schemas/mySuperSchema.json"',children:'{\n "type":"array",\n "description":"Represent a street address such as [\'1600\',\'Pennsylvania\',\'Avenue\',\'NW\']",\n "items":false,\n "prefixItems":[\n {\n "type":"number",\n "description":"The address number"\n },\n {\n "type":"string",\n "description":"The name of the street"\n },\n {\n "enum":[\n "Street",\n "Avenue",\n "Boulevard"\n ],\n "description":"The type of street"\n },\n {\n "enum":[\n "NW",\n "NE",\n "SW",\n "SE"\n ],\n "description":"The city quadrant of the address"\n }\n ]\n}\n'})}),(0,i.jsx)(n.p,{children:"Which you can use in your MDX pages as :"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-tsx",metastring:'title="/docs/example.mdx"',children:'import CodeBlock from \'@theme/CodeBlock\';\nimport Schema from "@site/static/schemas/mySuperSchema.json";\nimport JSONSchemaViewer from "@theme/JSONSchemaViewer";\n\n# My super Schema \n\n\n\n# Source :\n\n{JSON.stringify(Schema, null, 2)}\n'})})]}),(0,i.jsxs)(r.default,{value:"fetch",label:"From the web",children:[(0,i.jsxs)(n.p,{children:["Suppose your specifications are available somewhere ( ",(0,i.jsx)(n.a,{href:"https://gist.github.com/",children:"Github Gists"})," / ",(0,i.jsx)(n.a,{href:"https://bitbucket.org/snippets/new",children:"Bitbucket Snippets"})," / ... )"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-tsx",metastring:'title="/src/pages/API.tsx"',children:'import React from "react"\nimport Layout from "@theme/Layout"\nimport JSONSchemaViewer from "@theme/JSONSchemaViewer"\n\nexport default function ExamplePage(): JSX.Element {\n const [schema, setSchema] = React.useState(undefined as undefined | Error | unknown);\n\n React.useEffect( () => {\n fetch(\n // TODO Your link here\n "https://gist.githubusercontent.com/jy95/...",\n {\n headers: {\n \'Accept\': \'application/json\',\n }\n }\n )\n .then((response) => response.json())\n .then((data) => setSchema(data))\n .catch( (err) => setSchema(err) )\n }, [schema])\n\n return (\n \n {schema === undefined &&
    Loading ...
    }\n {schema !== undefined && schema instanceof Error &&
    Houston we have a problem : {schema.message}
    }\n {schema !== undefined && !(schema instanceof Error) && }\n \n )\n}\n'})}),(0,i.jsxs)(n.p,{children:["Which you can see by access related page (e.g. ",(0,i.jsx)(n.code,{children:"/API"})," in that case )"]})]}),(0,i.jsxs)(r.default,{value:"other",label:"From ...",children:[(0,i.jsxs)(n.p,{children:["With the two previous ",(0,i.jsx)(n.code,{children:"From"})," sections, you get the point that there are unlimited possibilities :"]}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"JSON Schema directly defined in the code"}),"\n",(0,i.jsxs)(n.li,{children:["NPM packages that exports ",(0,i.jsx)(n.a,{href:"https://www.schemastore.org/json/",children:"JSON Schema"})," directly"]}),"\n",(0,i.jsx)(n.li,{children:"..."}),"\n"]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"output-examples",children:"Output examples"}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["We have many examples available on ",(0,i.jsx)(n.a,{href:"demo/viewer",children:"documentation"})," . Check them to see lib in action \ud83d\ude09"]})})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1110],{53215:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>t,toc:()=>u});const t=JSON.parse('{"id":"quick-start","title":"\u26a1 Quick Start","description":"Getting started with docusaurus-json-schema-plugin","source":"@site/docs/quick-start.mdx","sourceDirName":".","slug":"/quick-start","permalink":"/docusaurus-json-schema-plugin/docs/quick-start","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/quick-start.mdx","tags":[],"version":"current","frontMatter":{"title":"\u26a1 Quick Start","description":"Getting started with docusaurus-json-schema-plugin"},"sidebar":"tutorialSidebar","next":{"title":"\ud83d\udca1 Demos","permalink":"/docusaurus-json-schema-plugin/docs/demo"}}');var i=s(62540),a=s(28453),c=s(65537),r=s(79329);const o={title:"\u26a1 Quick Start",description:"Getting started with docusaurus-json-schema-plugin"},l=void 0,d={},u=[{value:"Installation",id:"installation",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Configuring docusaurus.config.js",id:"configuring-docusaurusconfigjs",level:3},{value:"Configuring website tsconfig.json",id:"configuring-website-tsconfigjson",level:3},{value:"Usage",id:"usage",level:2},{value:"Output examples",id:"output-examples",level:2}];function h(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:["Getting started with ",(0,i.jsx)(n.code,{children:"docusaurus-json-schema-plugin"})]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsxs)(n.p,{children:["Install ",(0,i.jsx)(n.code,{children:"docusaurus-json-schema-plugin"})," using your desired package manager :"]}),"\n",(0,i.jsxs)(c.default,{groupId:"npm2yarn",children:[(0,i.jsx)(r.default,{value:"npm",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm install docusaurus-json-schema-plugin\n"})})}),(0,i.jsx)(r.default,{value:"yarn",label:"Yarn",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"yarn add docusaurus-json-schema-plugin\n"})})}),(0,i.jsx)(r.default,{value:"pnpm",label:"pnpm",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"pnpm add docusaurus-json-schema-plugin\n"})})})]}),"\n",(0,i.jsxs)(n.admonition,{title:"NPM only",type:"tip",children:[(0,i.jsxs)(n.p,{children:["When installing with npm, add this to the previous command : ",(0,i.jsx)(n.code,{children:"--prefer-dedupe"})]}),(0,i.jsxs)(n.p,{children:["Why ",(0,i.jsx)(n.code,{children:"--prefer-dedupe"})," ? Because of ",(0,i.jsx)(n.a,{href:"https://reactjs.org/warnings/invalid-hook-call-warning.html",children:"Invalid Hook Call Warning"})," common issue in projets"]})]}),"\n",(0,i.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,i.jsxs)(n.h3,{id:"configuring-docusaurusconfigjs",children:["Configuring ",(0,i.jsx)(n.code,{children:"docusaurus.config.js"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-tsx",metastring:'title="docusaurus.config.js"',children:'{\n // Allows use of @theme/JSONSchemaEditor or @theme/JSONSchemaViewer\n themes: ["docusaurus-json-schema-plugin"],\n}\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"configuring-website-tsconfigjson",children:["Configuring website ",(0,i.jsx)(n.code,{children:"tsconfig.json"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'title="tsconfig.json"',children:'{\n "extends": "@tsconfig/docusaurus/tsconfig.json",\n "compilerOptions": {\n "baseUrl": ".",\n "resolveJsonModule": true,\n // Extending "@tsconfig/docusaurus/tsconfig.json".types with "docusaurus-json-schema-plugin"\n "types": ["node", "@docusaurus/module-type-aliases", "@docusaurus/theme-classic", "docusaurus-json-schema-plugin"]\n }\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsxs)(n.p,{children:["You are free to fetch your JSON Schema ",(0,i.jsx)(n.strong,{children:"the way you want"})]}),"\n",(0,i.jsxs)(c.default,{children:[(0,i.jsxs)(r.default,{value:"staticAsset",label:"From a static asset",default:!0,children:[(0,i.jsx)(n.p,{children:"Suppose you have the following asset defined :"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'title="/static/schemas/mySuperSchema.json"',children:'{\n "type":"array",\n "description":"Represent a street address such as [\'1600\',\'Pennsylvania\',\'Avenue\',\'NW\']",\n "items":false,\n "prefixItems":[\n {\n "type":"number",\n "description":"The address number"\n },\n {\n "type":"string",\n "description":"The name of the street"\n },\n {\n "enum":[\n "Street",\n "Avenue",\n "Boulevard"\n ],\n "description":"The type of street"\n },\n {\n "enum":[\n "NW",\n "NE",\n "SW",\n "SE"\n ],\n "description":"The city quadrant of the address"\n }\n ]\n}\n'})}),(0,i.jsx)(n.p,{children:"Which you can use in your MDX pages as :"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-tsx",metastring:'title="/docs/example.mdx"',children:'import CodeBlock from \'@theme/CodeBlock\';\nimport Schema from "@site/static/schemas/mySuperSchema.json";\nimport JSONSchemaViewer from "@theme/JSONSchemaViewer";\n\n# My super Schema \n\n\n\n# Source :\n\n{JSON.stringify(Schema, null, 2)}\n'})})]}),(0,i.jsxs)(r.default,{value:"fetch",label:"From the web",children:[(0,i.jsxs)(n.p,{children:["Suppose your specifications are available somewhere ( ",(0,i.jsx)(n.a,{href:"https://gist.github.com/",children:"Github Gists"})," / ",(0,i.jsx)(n.a,{href:"https://bitbucket.org/snippets/new",children:"Bitbucket Snippets"})," / ... )"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-tsx",metastring:'title="/src/pages/API.tsx"',children:'import React from "react"\nimport Layout from "@theme/Layout"\nimport JSONSchemaViewer from "@theme/JSONSchemaViewer"\n\nexport default function ExamplePage(): JSX.Element {\n const [schema, setSchema] = React.useState(undefined as undefined | Error | unknown);\n\n React.useEffect( () => {\n fetch(\n // TODO Your link here\n "https://gist.githubusercontent.com/jy95/...",\n {\n headers: {\n \'Accept\': \'application/json\',\n }\n }\n )\n .then((response) => response.json())\n .then((data) => setSchema(data))\n .catch( (err) => setSchema(err) )\n }, [schema])\n\n return (\n \n {schema === undefined &&
    Loading ...
    }\n {schema !== undefined && schema instanceof Error &&
    Houston we have a problem : {schema.message}
    }\n {schema !== undefined && !(schema instanceof Error) && }\n \n )\n}\n'})}),(0,i.jsxs)(n.p,{children:["Which you can see by access related page (e.g. ",(0,i.jsx)(n.code,{children:"/API"})," in that case )"]})]}),(0,i.jsxs)(r.default,{value:"other",label:"From ...",children:[(0,i.jsxs)(n.p,{children:["With the two previous ",(0,i.jsx)(n.code,{children:"From"})," sections, you get the point that there are unlimited possibilities :"]}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"JSON Schema directly defined in the code"}),"\n",(0,i.jsxs)(n.li,{children:["NPM packages that exports ",(0,i.jsx)(n.a,{href:"https://www.schemastore.org/json/",children:"JSON Schema"})," directly"]}),"\n",(0,i.jsx)(n.li,{children:"..."}),"\n"]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"output-examples",children:"Output examples"}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["We have many examples available on ",(0,i.jsx)(n.a,{href:"demo/viewer",children:"documentation"})," . Check them to see lib in action \ud83d\ude09"]})})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/c37467e1.9fbf24db.js b/assets/js/c37467e1.5a06d16f.js similarity index 90% rename from assets/js/c37467e1.9fbf24db.js rename to assets/js/c37467e1.5a06d16f.js index 7d2b8d50..5232d071 100644 --- a/assets/js/c37467e1.9fbf24db.js +++ b/assets/js/c37467e1.5a06d16f.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1201,7279],{40690:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>i,toc:()=>g});const i=JSON.parse('{"id":"demo-viewer/type/singleType","title":"\ud83c\udf1f Single type","description":"single type showcase","source":"@site/docs/demo-viewer/type/singleType.mdx","sourceDirName":"demo-viewer/type","slug":"/demo-viewer/type/singleType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/type/singleType.mdx","tags":[],"version":"current","frontMatter":{"description":"single type showcase","title":"\ud83c\udf1f Single type"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udc3e Multiple types","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType"},"next":{"title":"\ud83e\udde9 Contributing","permalink":"/docusaurus-json-schema-plugin/docs/contributing"}}');var n=s(62540),r=s(28453),l=s(21432),a=s(41201),o=s(21344),c=s.n(o),d=s(11470),p=s(19365);const u={description:"single type showcase",title:"\ud83c\udf1f Single type"},h="Single type",m={},g=[];function y(e){const t={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"single-type",children:"Single type"})}),"\n",(0,n.jsxs)(d.default,{children:[(0,n.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(c(),{schema:a})}),(0,n.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(l.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(y,{...e})}):y(e)}},41201:e=>{e.exports={type:"number"}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1201,7279],{36982:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>i,toc:()=>g});const i=JSON.parse('{"id":"demo-viewer/type/singleType","title":"\ud83c\udf1f Single type","description":"single type showcase","source":"@site/docs/demo-viewer/type/singleType.mdx","sourceDirName":"demo-viewer/type","slug":"/demo-viewer/type/singleType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/type/singleType.mdx","tags":[],"version":"current","frontMatter":{"description":"single type showcase","title":"\ud83c\udf1f Single type"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udc3e Multiple types","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType"},"next":{"title":"\ud83e\udde9 Contributing","permalink":"/docusaurus-json-schema-plugin/docs/contributing"}}');var n=s(62540),r=s(28453),l=s(58069),a=s(41201),o=s(88307),c=s.n(o),d=s(65537),p=s(79329);const u={description:"single type showcase",title:"\ud83c\udf1f Single type"},h="Single type",m={},g=[];function y(e){const t={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"single-type",children:"Single type"})}),"\n",(0,n.jsxs)(d.default,{children:[(0,n.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(c(),{schema:a})}),(0,n.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(l.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(y,{...e})}):y(e)}},41201:e=>{e.exports={type:"number"}}}]); \ No newline at end of file diff --git a/assets/js/c3bb5603.3b0a84de.js b/assets/js/c3bb5603.c1e207ca.js similarity index 98% rename from assets/js/c3bb5603.3b0a84de.js rename to assets/js/c3bb5603.c1e207ca.js index 56a8d618..44301bc2 100644 --- a/assets/js/c3bb5603.3b0a84de.js +++ b/assets/js/c3bb5603.c1e207ca.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5887],{17712:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"api/config","title":"\u2699\ufe0f Theme Configuration","description":"Theme configuration of docusaurus-json-schema-plugin","source":"@site/docs/api/config.mdx","sourceDirName":"api","slug":"/api/config","permalink":"/docusaurus-json-schema-plugin/docs/api/config","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/api/config.mdx","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"title":"\u2699\ufe0f Theme Configuration","description":"Theme configuration of docusaurus-json-schema-plugin","sidebar_position":1},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcd6 API Reference","permalink":"/docusaurus-json-schema-plugin/docs/api"},"next":{"title":"\u270f\ufe0f @theme/JSONSchemaEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor"}}');var i=o(62540),s=o(28453);const a={title:"\u2699\ufe0f Theme Configuration",description:"Theme configuration of docusaurus-json-schema-plugin",sidebar_position:1},r=void 0,c={},d=[{value:"Configuration",id:"configuration",level:2},{value:"Types",id:"types",level:3},{value:"Example configuration",id:"example-configuration",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Name"}),(0,i.jsx)(n.th,{children:"Type"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsx)(n.tbody,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"monacoConfig"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MonacoConfig"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)("code",{children:'{ "languages": ["json"] }'})}),(0,i.jsx)(n.td,{children:"To customize monaco editor, depending of your needs."})]})})]}),"\n",(0,i.jsx)(n.h3,{id:"types",children:"Types"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-tsx",children:"type MonacoConfig = {\n // More info on https://github.com/microsoft/monaco-editor/tree/main/webpack-plugin#options\n /**\n * Include only a subset of the languages supported.\n * @default [\"json\"]\n */\n languages?: EditorLanguage[]\n /**\n * Custom languages (outside of the ones shipped with the `monaco-editor`).\n */\n customLanguages?: IFeatureDefinition[]\n /**\n * Include only a subset of the editor features.\n * Use e.g. '!contextmenu' to exclude a certain feature.\n * (By default, all features are enabled)\n */\n features?: (EditorFeature | NegatedEditorFeature)[]\n /**\n * Specify a filename template to use for generated files.\n * Use e.g. '[name].worker.[contenthash].js' to include content-based hashes.\n */\n filename?: string\n /**\n * The absolute file system path to the monaco-editor npm module.\n * Use e.g. `C:\\projects\\my-project\\node-modules\\monaco-editor`\n */\n monacoEditorPath?: string\n /**\n * Override the public path from which files generated by this plugin will be served.\n * This wins out over Webpack's dynamic runtime path and can be useful to avoid attempting to load workers cross-\n * origin when using a CDN for other static resources.\n * Use e.g. '/' if you want to load your resources from the current origin.\n */\n publicPath?: string\n /**\n * Specify whether the editor API should be exposed through a global `monaco` object or not. This\n * option is applicable to `0.22.0` and newer version of `monaco-editor`. Since `0.22.0`, the ESM\n * version of the monaco editor does no longer define a global `monaco` object unless\n * `global.MonacoEnvironment = { globalAPI: true }` is set\n * @see https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md#0220-29012021\n */\n globalAPI?: boolean\n}\n"})}),"\n",(0,i.jsx)(n.h2,{id:"example-configuration",children:"Example configuration"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-jsx",metastring:'title="docusaurus.config.js"',children:"module.exports = {\n themes: [\n [\n 'docusaurus-json-schema-plugin',\n {\n monacoConfig: {\n languages: [\"json\"]\n }\n },\n ],\n ],\n};\n"})}),"\n",(0,i.jsxs)(n.p,{children:["// Example : ",(0,i.jsx)(n.a,{href:"https://lars-waechter.gitbook.io/voici.js/reference/api-reference/accumulation",children:"https://lars-waechter.gitbook.io/voici.js/reference/api-reference/accumulation"})]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5887],{82121:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"api/config","title":"\u2699\ufe0f Theme Configuration","description":"Theme configuration of docusaurus-json-schema-plugin","source":"@site/docs/api/config.mdx","sourceDirName":"api","slug":"/api/config","permalink":"/docusaurus-json-schema-plugin/docs/api/config","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/api/config.mdx","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"title":"\u2699\ufe0f Theme Configuration","description":"Theme configuration of docusaurus-json-schema-plugin","sidebar_position":1},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcd6 API Reference","permalink":"/docusaurus-json-schema-plugin/docs/api"},"next":{"title":"\u270f\ufe0f @theme/JSONSchemaEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor"}}');var i=o(62540),s=o(28453);const a={title:"\u2699\ufe0f Theme Configuration",description:"Theme configuration of docusaurus-json-schema-plugin",sidebar_position:1},r=void 0,c={},d=[{value:"Configuration",id:"configuration",level:2},{value:"Types",id:"types",level:3},{value:"Example configuration",id:"example-configuration",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Name"}),(0,i.jsx)(n.th,{children:"Type"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsx)(n.tbody,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"monacoConfig"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MonacoConfig"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)("code",{children:'{ "languages": ["json"] }'})}),(0,i.jsx)(n.td,{children:"To customize monaco editor, depending of your needs."})]})})]}),"\n",(0,i.jsx)(n.h3,{id:"types",children:"Types"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-tsx",children:"type MonacoConfig = {\n // More info on https://github.com/microsoft/monaco-editor/tree/main/webpack-plugin#options\n /**\n * Include only a subset of the languages supported.\n * @default [\"json\"]\n */\n languages?: EditorLanguage[]\n /**\n * Custom languages (outside of the ones shipped with the `monaco-editor`).\n */\n customLanguages?: IFeatureDefinition[]\n /**\n * Include only a subset of the editor features.\n * Use e.g. '!contextmenu' to exclude a certain feature.\n * (By default, all features are enabled)\n */\n features?: (EditorFeature | NegatedEditorFeature)[]\n /**\n * Specify a filename template to use for generated files.\n * Use e.g. '[name].worker.[contenthash].js' to include content-based hashes.\n */\n filename?: string\n /**\n * The absolute file system path to the monaco-editor npm module.\n * Use e.g. `C:\\projects\\my-project\\node-modules\\monaco-editor`\n */\n monacoEditorPath?: string\n /**\n * Override the public path from which files generated by this plugin will be served.\n * This wins out over Webpack's dynamic runtime path and can be useful to avoid attempting to load workers cross-\n * origin when using a CDN for other static resources.\n * Use e.g. '/' if you want to load your resources from the current origin.\n */\n publicPath?: string\n /**\n * Specify whether the editor API should be exposed through a global `monaco` object or not. This\n * option is applicable to `0.22.0` and newer version of `monaco-editor`. Since `0.22.0`, the ESM\n * version of the monaco editor does no longer define a global `monaco` object unless\n * `global.MonacoEnvironment = { globalAPI: true }` is set\n * @see https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md#0220-29012021\n */\n globalAPI?: boolean\n}\n"})}),"\n",(0,i.jsx)(n.h2,{id:"example-configuration",children:"Example configuration"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-jsx",metastring:'title="docusaurus.config.js"',children:"module.exports = {\n themes: [\n [\n 'docusaurus-json-schema-plugin',\n {\n monacoConfig: {\n languages: [\"json\"]\n }\n },\n ],\n ],\n};\n"})}),"\n",(0,i.jsxs)(n.p,{children:["// Example : ",(0,i.jsx)(n.a,{href:"https://lars-waechter.gitbook.io/voici.js/reference/api-reference/accumulation",children:"https://lars-waechter.gitbook.io/voici.js/reference/api-reference/accumulation"})]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file diff --git a/assets/js/c4f5d8e4.8ba158b4.js b/assets/js/c4f5d8e4.0cd8d07c.js similarity index 92% rename from assets/js/c4f5d8e4.8ba158b4.js rename to assets/js/c4f5d8e4.0cd8d07c.js index 2ca0b59a..33684f8a 100644 --- a/assets/js/c4f5d8e4.8ba158b4.js +++ b/assets/js/c4f5d8e4.0cd8d07c.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2634],{62468:(e,t,s)=>{s.r(t),s.d(t,{default:()=>d});s(63696);var r=s(34164),i=s(41957),n=s(28774),a=s(44586),c=s(86025);const o={heroBanner:"heroBanner_UJJx",buttons:"buttons_pzbO",features:"features_keug",featureImage:"featureImage_yA8i"};var l=s(62540);const u=[{title:"JSON Schema Viewer / Editor",imageUrl:"img/undraw_code_review.svg",description:(0,l.jsx)(l.Fragment,{children:"Explore your JSON Schema directly from your Docusaurus website."})},{title:"Configurable",imageUrl:"img/gear-tools.svg",description:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("a",{href:"https://docusaurus.io/docs/i18n/introduction",children:"Internationalization"}),", Theme-able (as follow"," ",(0,l.jsx)("a",{href:"https://infima.dev/",children:"Infima styling framework"})," that powers the Docusaurus UI), ..."]})},{title:"Open source",imageUrl:"img/opensource-icon.svg",description:(0,l.jsxs)(l.Fragment,{children:["Want to improve this plugin ? We welcome your"," ",(0,l.jsx)("a",{href:"https://github.com/jy95/docusaurus-json-schema-plugin",children:"contributions"})," ","!"]})}];function h(e){let{imageUrl:t,title:s,description:i}=e;const n=(0,c.Ay)(t);return(0,l.jsxs)("div",{className:(0,r.A)("col col--4",o.feature),children:[n&&(0,l.jsx)("div",{className:"text--center",children:(0,l.jsx)("img",{className:o.featureImage,src:n,alt:s})}),(0,l.jsx)("h3",{className:"text--center",children:s}),(0,l.jsx)("p",{className:"text--center",children:i})]})}const d=function(){const e=(0,a.A)(),{siteConfig:t={}}=e;return(0,l.jsxs)(i.A,{title:`Hello from ${t.title}`,description:"Description will go into a meta tag in ",children:[(0,l.jsx)("header",{className:(0,r.A)("hero hero--primary",o.heroBanner),children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsx)("h1",{className:"hero__title",children:t.title}),(0,l.jsx)("p",{className:"hero__subtitle",children:t.tagline}),(0,l.jsx)("div",{className:o.buttons,children:(0,l.jsx)(n.A,{className:(0,r.A)("button button--outline button--secondary button--lg",o.getStarted),to:(0,c.Ay)("docs/quick-start"),children:"Get Started"})})]})}),(0,l.jsx)("main",{children:u&&u.length>0&&(0,l.jsx)("section",{className:o.features,children:(0,l.jsx)("div",{className:"container",children:(0,l.jsx)("div",{className:"row",children:u.map(((e,t)=>(0,l.jsx)(h,{...e},t)))})})})})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2634],{67025:(e,t,s)=>{s.r(t),s.d(t,{default:()=>d});s(63696);var r=s(34164),i=s(27912),n=s(56289),a=s(40797),c=s(29030);const o={heroBanner:"heroBanner_UJJx",buttons:"buttons_pzbO",features:"features_keug",featureImage:"featureImage_yA8i"};var l=s(62540);const u=[{title:"JSON Schema Viewer / Editor",imageUrl:"img/undraw_code_review.svg",description:(0,l.jsx)(l.Fragment,{children:"Explore your JSON Schema directly from your Docusaurus website."})},{title:"Configurable",imageUrl:"img/gear-tools.svg",description:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("a",{href:"https://docusaurus.io/docs/i18n/introduction",children:"Internationalization"}),", Theme-able (as follow"," ",(0,l.jsx)("a",{href:"https://infima.dev/",children:"Infima styling framework"})," that powers the Docusaurus UI), ..."]})},{title:"Open source",imageUrl:"img/opensource-icon.svg",description:(0,l.jsxs)(l.Fragment,{children:["Want to improve this plugin ? We welcome your"," ",(0,l.jsx)("a",{href:"https://github.com/jy95/docusaurus-json-schema-plugin",children:"contributions"})," ","!"]})}];function h(e){let{imageUrl:t,title:s,description:i}=e;const n=(0,c.Ay)(t);return(0,l.jsxs)("div",{className:(0,r.A)("col col--4",o.feature),children:[n&&(0,l.jsx)("div",{className:"text--center",children:(0,l.jsx)("img",{className:o.featureImage,src:n,alt:s})}),(0,l.jsx)("h3",{className:"text--center",children:s}),(0,l.jsx)("p",{className:"text--center",children:i})]})}const d=function(){const e=(0,a.A)(),{siteConfig:t={}}=e;return(0,l.jsxs)(i.A,{title:`Hello from ${t.title}`,description:"Description will go into a meta tag in ",children:[(0,l.jsx)("header",{className:(0,r.A)("hero hero--primary",o.heroBanner),children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsx)("h1",{className:"hero__title",children:t.title}),(0,l.jsx)("p",{className:"hero__subtitle",children:t.tagline}),(0,l.jsx)("div",{className:o.buttons,children:(0,l.jsx)(n.A,{className:(0,r.A)("button button--outline button--secondary button--lg",o.getStarted),to:(0,c.Ay)("docs/quick-start"),children:"Get Started"})})]})}),(0,l.jsx)("main",{children:u&&u.length>0&&(0,l.jsx)("section",{className:o.features,children:(0,l.jsx)("div",{className:"container",children:(0,l.jsx)("div",{className:"row",children:u.map(((e,t)=>(0,l.jsx)(h,{...e},t)))})})})})]})}}}]); \ No newline at end of file diff --git a/assets/js/c7088344.939fde1f.js b/assets/js/c7088344.abdb46c4.js similarity index 90% rename from assets/js/c7088344.939fde1f.js rename to assets/js/c7088344.abdb46c4.js index 8096a548..8f40ce4e 100644 --- a/assets/js/c7088344.939fde1f.js +++ b/assets/js/c7088344.abdb46c4.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4130,6358],{84269:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>f,frontMatter:()=>m,metadata:()=>n,toc:()=>w});const n=JSON.parse('{"id":"demo-viewer/generic_keywords/const","title":"\ud83e\uddca Const","description":"const showcase","source":"@site/docs/demo-viewer/generic_keywords/const.mdx","sourceDirName":"demo-viewer/generic_keywords","slug":"/demo-viewer/generic_keywords/const","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/generic_keywords/const.mdx","tags":[],"version":"current","frontMatter":{"description":"const showcase","title":"\ud83e\uddca Const"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccc Annotations","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations"},"next":{"title":"\ud83d\udd12 Enum","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum"}}');var r=t(62540),o=t(28453),i=t(21432),c=t(14130),a=t(21344),d=t.n(a),u=t(11470),l=t(19365);const m={description:"const showcase",title:"\ud83e\uddca Const"},h="Const",p={},w=[];function g(e){const s={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"const",children:"Const"})}),"\n",(0,r.jsxs)(u.default,{children:[(0,r.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:c})}),(0,r.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(i.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function f(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}},14130:e=>{e.exports=JSON.parse('{"properties":{"country":{"const":"United States of America"}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4130,6358],{63575:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>f,frontMatter:()=>m,metadata:()=>n,toc:()=>w});const n=JSON.parse('{"id":"demo-viewer/generic_keywords/const","title":"\ud83e\uddca Const","description":"const showcase","source":"@site/docs/demo-viewer/generic_keywords/const.mdx","sourceDirName":"demo-viewer/generic_keywords","slug":"/demo-viewer/generic_keywords/const","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/generic_keywords/const.mdx","tags":[],"version":"current","frontMatter":{"description":"const showcase","title":"\ud83e\uddca Const"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccc Annotations","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations"},"next":{"title":"\ud83d\udd12 Enum","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum"}}');var r=t(62540),o=t(28453),i=t(58069),c=t(14130),a=t(88307),d=t.n(a),u=t(65537),l=t(79329);const m={description:"const showcase",title:"\ud83e\uddca Const"},h="Const",p={},w=[];function g(e){const s={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"const",children:"Const"})}),"\n",(0,r.jsxs)(u.default,{children:[(0,r.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:c})}),(0,r.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(i.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function f(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}},14130:e=>{e.exports=JSON.parse('{"properties":{"country":{"const":"United States of America"}}}')}}]); \ No newline at end of file diff --git a/assets/js/ca1962f0.1276d244.js b/assets/js/ca1962f0.3f6e151e.js similarity index 90% rename from assets/js/ca1962f0.1276d244.js rename to assets/js/ca1962f0.3f6e151e.js index ae2db1c6..3f64da0d 100644 --- a/assets/js/ca1962f0.1276d244.js +++ b/assets/js/ca1962f0.3f6e151e.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4082,4923],{44567:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>u,metadata:()=>r,toc:()=>w});const r=JSON.parse('{"id":"demo-viewer/array/items","title":"\ud83d\udecd\ufe0f Items","description":"array with items showcase","source":"@site/docs/demo-viewer/array/items.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/items.mdx","tags":[],"version":"current","frontMatter":{"description":"array with items showcase","title":"\ud83d\udecd\ufe0f Items"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf71 Contains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains"},"next":{"title":"\ud83d\udcd0 Length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length"}}');var a=t(62540),i=t(28453),n=t(21432),o=t(4082),c=t(21344),d=t.n(c),l=t(11470),m=t(19365);const u={description:"array with items showcase",title:"\ud83d\udecd\ufe0f Items"},h="Items",p={},w=[];function f(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"items",children:"Items"})}),"\n",(0,a.jsxs)(l.default,{children:[(0,a.jsx)(m.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:o})}),(0,a.jsx)(m.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(n.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(f,{...e})}):f(e)}},4082:e=>{e.exports=JSON.parse('{"type":"array","items":{"type":"number"}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4082,4923],{44480:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>u,metadata:()=>r,toc:()=>w});const r=JSON.parse('{"id":"demo-viewer/array/items","title":"\ud83d\udecd\ufe0f Items","description":"array with items showcase","source":"@site/docs/demo-viewer/array/items.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/items.mdx","tags":[],"version":"current","frontMatter":{"description":"array with items showcase","title":"\ud83d\udecd\ufe0f Items"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udf71 Contains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains"},"next":{"title":"\ud83d\udcd0 Length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length"}}');var a=t(62540),i=t(28453),n=t(58069),o=t(4082),c=t(88307),d=t.n(c),l=t(65537),m=t(79329);const u={description:"array with items showcase",title:"\ud83d\udecd\ufe0f Items"},h="Items",p={},w=[];function f(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"items",children:"Items"})}),"\n",(0,a.jsxs)(l.default,{children:[(0,a.jsx)(m.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:o})}),(0,a.jsx)(m.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(n.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(f,{...e})}):f(e)}},4082:e=>{e.exports=JSON.parse('{"type":"array","items":{"type":"number"}}')}}]); \ No newline at end of file diff --git a/assets/js/ca1c8d76.cb228c00.js b/assets/js/ca1c8d76.8190ae83.js similarity index 90% rename from assets/js/ca1c8d76.cb228c00.js rename to assets/js/ca1c8d76.8190ae83.js index 911d7640..9e26dd48 100644 --- a/assets/js/ca1c8d76.cb228c00.js +++ b/assets/js/ca1c8d76.8190ae83.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[6864,7368],{30262:(e,s,a)=>{a.r(s),a.d(s,{assets:()=>h,contentTitle:()=>p,default:()=>w,frontMatter:()=>m,metadata:()=>r,toc:()=>f});const r=JSON.parse('{"id":"demo-viewer/array/simple","title":"\ud83d\udfe6 Simple","description":"basic array showcase","source":"@site/docs/demo-viewer/array/simple.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/simple.mdx","tags":[],"version":"current","frontMatter":{"description":"basic array showcase","title":"\ud83d\udfe6 Simple"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcca minContains & maxContains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains"},"next":{"title":"\ud83d\udccb Tuples","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples"}}');var i=a(62540),t=a(28453),n=a(21432),l=a(56864),o=a(21344),c=a.n(o),d=a(11470),u=a(19365);const m={description:"basic array showcase",title:"\ud83d\udfe6 Simple"},p="Simple",h={},f=[];function j(e){const s={h1:"h1",header:"header",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"simple",children:"Simple"})}),"\n",(0,i.jsxs)(d.default,{children:[(0,i.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(c(),{schema:l})}),(0,i.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(n.default,{language:"json-schema",children:JSON.stringify(l,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(j,{...e})}):j(e)}},56864:e=>{e.exports={type:"array"}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[6864,7368],{84720:(e,s,a)=>{a.r(s),a.d(s,{assets:()=>h,contentTitle:()=>p,default:()=>w,frontMatter:()=>m,metadata:()=>r,toc:()=>f});const r=JSON.parse('{"id":"demo-viewer/array/simple","title":"\ud83d\udfe6 Simple","description":"basic array showcase","source":"@site/docs/demo-viewer/array/simple.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/simple.mdx","tags":[],"version":"current","frontMatter":{"description":"basic array showcase","title":"\ud83d\udfe6 Simple"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcca minContains & maxContains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains"},"next":{"title":"\ud83d\udccb Tuples","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples"}}');var i=a(62540),t=a(28453),n=a(58069),l=a(56864),o=a(88307),c=a.n(o),d=a(65537),u=a(79329);const m={description:"basic array showcase",title:"\ud83d\udfe6 Simple"},p="Simple",h={},f=[];function j(e){const s={h1:"h1",header:"header",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"simple",children:"Simple"})}),"\n",(0,i.jsxs)(d.default,{children:[(0,i.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(c(),{schema:l})}),(0,i.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(n.default,{language:"json-schema",children:JSON.stringify(l,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(j,{...e})}):j(e)}},56864:e=>{e.exports={type:"array"}}}]); \ No newline at end of file diff --git a/assets/js/cbc552c0.12b16dc1.js b/assets/js/cbc552c0.bcbe40c2.js similarity index 90% rename from assets/js/cbc552c0.12b16dc1.js rename to assets/js/cbc552c0.bcbe40c2.js index f9805561..0809710b 100644 --- a/assets/js/cbc552c0.12b16dc1.js +++ b/assets/js/cbc552c0.bcbe40c2.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5188,8272],{41498:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>f,frontMatter:()=>h,metadata:()=>r,toc:()=>g});const r=JSON.parse('{"id":"demo-viewer/string/pattern","title":"\ud83d\udd2e Pattern","description":"string with pattern showcase","source":"@site/docs/demo-viewer/string/pattern.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/pattern","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/pattern.mdx","tags":[],"version":"current","frontMatter":{"description":"string with pattern showcase","title":"\ud83d\udd2e Pattern"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccf Length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length"},"next":{"title":"\ud83d\udfe6 Basic","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple"}}');var n=s(62540),i=s(28453),a=s(21432),c=s(75188),o=s(21344),d=s.n(o),l=s(11470),u=s(19365);const h={description:"string with pattern showcase",title:"\ud83d\udd2e Pattern"},p="Pattern",m={},g=[];function w(e){const t={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"pattern",children:"Pattern"})}),"\n",(0,n.jsxs)(l.default,{children:[(0,n.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(d(),{schema:c})}),(0,n.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(w,{...e})}):w(e)}},75188:e=>{e.exports=JSON.parse('{"type":"string","pattern":"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5188,8272],{57245:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>f,frontMatter:()=>h,metadata:()=>r,toc:()=>g});const r=JSON.parse('{"id":"demo-viewer/string/pattern","title":"\ud83d\udd2e Pattern","description":"string with pattern showcase","source":"@site/docs/demo-viewer/string/pattern.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/pattern","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/pattern.mdx","tags":[],"version":"current","frontMatter":{"description":"string with pattern showcase","title":"\ud83d\udd2e Pattern"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccf Length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length"},"next":{"title":"\ud83d\udfe6 Basic","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple"}}');var n=s(62540),i=s(28453),a=s(58069),c=s(75188),o=s(88307),d=s.n(o),l=s(65537),u=s(79329);const h={description:"string with pattern showcase",title:"\ud83d\udd2e Pattern"},p="Pattern",m={},g=[];function w(e){const t={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"pattern",children:"Pattern"})}),"\n",(0,n.jsxs)(l.default,{children:[(0,n.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(d(),{schema:c})}),(0,n.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(w,{...e})}):w(e)}},75188:e=>{e.exports=JSON.parse('{"type":"string","pattern":"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$"}')}}]); \ No newline at end of file diff --git a/assets/js/cd537aaf.f60955ae.js b/assets/js/cd537aaf.07ce0099.js similarity index 93% rename from assets/js/cd537aaf.f60955ae.js rename to assets/js/cd537aaf.07ce0099.js index 8f22ffff..6eff5d94 100644 --- a/assets/js/cd537aaf.f60955ae.js +++ b/assets/js/cd537aaf.07ce0099.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3263,3536],{19584:(e,s,o)=>{o.r(s),o.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>w,frontMatter:()=>u,metadata:()=>t,toc:()=>f});const t=JSON.parse('{"id":"demo-viewer/schema_composition/oneOf","title":"\ud83c\udfaf oneOf","description":"schema composition with oneOf showcase","source":"@site/docs/demo-viewer/schema_composition/oneOf.mdx","sourceDirName":"demo-viewer/schema_composition","slug":"/demo-viewer/schema_composition/oneOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_composition/oneOf.mdx","tags":[],"version":"current","frontMatter":{"description":"schema composition with oneOf showcase","title":"\ud83c\udfaf oneOf"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udeab not","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not"},"next":{"title":"\ud83d\udea6 Schema Conditionally","permalink":"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally"}}');var n=o(62540),i=o(28453),c=o(21432),a=o(33536),r=o(21344),m=o.n(r),l=o(11470),d=o(19365);const u={description:"schema composition with oneOf showcase",title:"\ud83c\udfaf oneOf"},h="oneOf",p={},f=[];function O(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"oneof",children:"oneOf"})}),"\n",(0,n.jsxs)(l.default,{children:[(0,n.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(m(),{schema:a})}),(0,n.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(c.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(O,{...e})}):O(e)}},33536:e=>{e.exports=JSON.parse('{"oneOf":[{"type":"number","multipleOf":5},{"type":"number","multipleOf":3}]}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3263,3536],{22241:(e,s,o)=>{o.r(s),o.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>w,frontMatter:()=>u,metadata:()=>t,toc:()=>f});const t=JSON.parse('{"id":"demo-viewer/schema_composition/oneOf","title":"\ud83c\udfaf oneOf","description":"schema composition with oneOf showcase","source":"@site/docs/demo-viewer/schema_composition/oneOf.mdx","sourceDirName":"demo-viewer/schema_composition","slug":"/demo-viewer/schema_composition/oneOf","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_composition/oneOf.mdx","tags":[],"version":"current","frontMatter":{"description":"schema composition with oneOf showcase","title":"\ud83c\udfaf oneOf"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udeab not","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not"},"next":{"title":"\ud83d\udea6 Schema Conditionally","permalink":"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally"}}');var n=o(62540),i=o(28453),c=o(58069),a=o(33536),r=o(88307),m=o.n(r),l=o(65537),d=o(79329);const u={description:"schema composition with oneOf showcase",title:"\ud83c\udfaf oneOf"},h="oneOf",p={},f=[];function O(e){const s={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"oneof",children:"oneOf"})}),"\n",(0,n.jsxs)(l.default,{children:[(0,n.jsx)(d.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(m(),{schema:a})}),(0,n.jsx)(d.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(c.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(O,{...e})}):O(e)}},33536:e=>{e.exports=JSON.parse('{"oneOf":[{"type":"number","multipleOf":5},{"type":"number","multipleOf":3}]}')}}]); \ No newline at end of file diff --git a/assets/js/common.51e9c859.js b/assets/js/common.128e1352.js similarity index 66% rename from assets/js/common.51e9c859.js rename to assets/js/common.128e1352.js index a3ab1a60..5db9f971 100644 --- a/assets/js/common.51e9c859.js +++ b/assets/js/common.128e1352.js @@ -1,2 +1,2 @@ -/*! For license information please see common.51e9c859.js.LICENSE.txt */ -(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2076],{69911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;t.Cache=class{constructor(e={}){this._stats={hits:0,misses:0},this._data={},this._stdTTL=e.stdTTL}get stats(){return this._stats}get(e){const t=this._data[e];if(t&&(!this._stdTTL||(new Date).getTime()-t.ts{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveCrawler=void 0;const n=r(68971),o=r(59559),a=r(62832),i=r(79764);t.ResolveCrawler=class{constructor(e,t,r){this._resolved=r,this.resolvers=[],this.pointerGraph=new o.DepGraph({circular:!0}),this.pointerStemGraph=new o.DepGraph({circular:!0}),this.computeGraph=(e,t=[],r="#",n=[])=>{r||(r="#");let o=this._runner.computeRef({val:e,jsonPointer:r,pointerStack:n});if(void 0!==o)this._resolveRef({ref:o,val:e,parentPath:t,pointerStack:n,parentPointer:r,cacheKey:r,resolvingPointer:this.jsonPointer});else if("object"==typeof e)for(const a in e){if(!e.hasOwnProperty(a))continue;const u=e[a],s=i.addToJSONPointer(r,a);o=this._runner.computeRef({key:a,val:u,jsonPointer:s,pointerStack:n}),t.push(a),void 0!==o?this._resolveRef({ref:o,val:u,parentPath:t,parentPointer:s,pointerStack:n,cacheKey:i.uriToJSONPointer(o),resolvingPointer:this.jsonPointer}):"object"==typeof u&&this.computeGraph(u,t,s,n),t.pop()}},this._resolveRef=e=>{const{pointerStack:t,parentPath:r,parentPointer:o,ref:u}=e;if(i.uriIsJSONPointer(u)){if(this._runner.dereferenceInline){const e=i.uriToJSONPointer(u);let l;try{l=(0,n.pointerToPath)(e)}catch(s){return void this._resolved.errors.push({code:"PARSE_POINTER",message:`'${u}' JSON pointer is invalid`,uri:this._runner.baseUri,uriStack:this._runner.uriStack,pointerStack:[],path:[]})}let c=l.length>0;for(const t in l)if(r[t]!==l[t]){c=!1;break}if(c)return;this.pointerStemGraph.hasNode(e)||this.pointerStemGraph.addNode(e);let f="#",d="";for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultGetRef=t.Cache=void 0;r(34629).__exportStar(r(84351),t);var n=r(69911);Object.defineProperty(t,"Cache",{enumerable:!0,get:function(){return n.Cache}});var o=r(22971);Object.defineProperty(t,"defaultGetRef",{enumerable:!0,get:function(){return o.defaultGetRef}})},84351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resolver=void 0;const n=r(59559),o=r(69911),a=r(22971);t.Resolver=class{constructor(e={}){this.ctx={},this.uriCache=e.uriCache||new o.Cache,this.resolvers=e.resolvers||{},this.getRef=e.getRef,this.transformRef=e.transformRef,this.dereferenceInline=void 0===e.dereferenceInline||e.dereferenceInline,this.dereferenceRemote=void 0===e.dereferenceRemote||e.dereferenceRemote,this.parseResolveResult=e.parseResolveResult,this.transformDereferenceResult=e.transformDereferenceResult,this.ctx=e.ctx}resolve(e,t={}){const r=new n.DepGraph({circular:!0});return new a.ResolveRunner(e,r,Object.assign(Object.assign({uriCache:this.uriCache,resolvers:this.resolvers,getRef:this.getRef,transformRef:this.transformRef,dereferenceInline:this.dereferenceInline,dereferenceRemote:this.dereferenceRemote,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult},t),{ctx:Object.assign({},this.ctx||{},t.ctx||{})})).resolve(t)}}},22971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveRunner=t.defaultGetRef=void 0;const n=r(34629),o=r(68971),a=r(54727),i=r(59559),u=r(83346),s=r(62832),l=r(17748),c=r(68949),f=r(40467),d=r(69911),h=r(70177),p=r(79764),m=r(75919);let v=0;t.defaultGetRef=(e,t)=>{if(t&&"object"==typeof t&&"string"==typeof t.$ref)return t.$ref};class g{constructor(e,r=new i.DepGraph({circular:!0}),u={}){this.ctx={},this.computeRef=e=>{const t=this.getRef(e.key,e.val);if(void 0===t)return;let r=new f.ExtendedURI(t);if("#"!==t[0]){if(this.isFile(r)){let e=r.toString();r.is("absolute")||(e=this.baseUri.toString()?(0,a.join)((0,a.dirname)(this.baseUri.toString()),(0,a.stripRoot)(e)):""),e&&(r=new c((0,a.toFSPath)(e)).fragment(r.fragment()))}else(r.scheme().includes("http")||""===r.scheme()&&this.baseUri.scheme().includes("http"))&&""!==this.baseUri.authority()&&""===r.authority()&&(r=r.absoluteTo(this.baseUri))}return String(r).length>0&&this.isFile(this.baseUri)&&this.isFile(r)&&this.baseUri.path()===r.path()&&(r=new f.ExtendedURI(`#${r.fragment()}`)),this.transformRef?this.transformRef(Object.assign(Object.assign({},e),{ref:r,uri:this.baseUri}),this.ctx):r},this.atMaxUriDepth=()=>this.uriStack.length>=100,this.lookupUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{ref:t}=e;let r=t.scheme();!this.resolvers[r]&&this.isFile(t)&&(r="file");const n=this.resolvers[r];if(!n)throw new Error(`No resolver defined for scheme '${t.scheme()||"file"}' in ref ${t.toString()}`);let o=yield n.resolve(t,this.ctx);if(this.parseResolveResult)try{o=(yield this.parseResolveResult({uriResult:o,result:o,targetAuthority:t,parentAuthority:this.baseUri,parentPath:e.parentPath,fragment:e.fragment})).result}catch(a){throw new Error(`Could not parse remote reference response for '${t.toString()}' - ${String(a)}`)}return new g(o,this.graph,{depth:this.depth+1,baseUri:t.toString(),root:t,uriStack:this.uriStack,uriCache:this.uriCache,resolvers:this.resolvers,transformRef:this.transformRef,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult,dereferenceRemote:this.dereferenceRemote,dereferenceInline:this.dereferenceInline,ctx:this.ctx})})),this.lookupAndResolveUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{val:t,ref:r,resolvingPointer:n,parentPointer:a,pointerStack:i}=e,u=e.parentPath?e.parentPath.slice():[],s=this.computeUriCacheKey(r),c={uri:r,pointerStack:i,targetPath:n===a?[]:u};if(this.uriStack.includes(s))return c.resolved={result:t,graph:this.graph,refMap:{},errors:[],runner:this},c;{let e;const n=this.baseUri.toString(),a=n&&0!==this.depth?n:null;try{if(this.atMaxUriDepth())throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`);e=yield this.lookupUri({ref:r.clone().fragment(""),fragment:r.fragment(),cacheKey:s,parentPath:u}),a&&(e.uriStack=e.uriStack.concat(a))}catch(f){c.error={code:"RESOLVE_URI",message:String(f),uri:r,uriStack:a?this.uriStack.concat(a):this.uriStack,pointerStack:i,path:u}}if(e&&(c.resolved=yield e.resolve({jsonPointer:p.uriToJSONPointer(r),parentPath:u}),c.resolved.errors.length))for(const i of c.resolved.errors)if("POINTER_MISSING"===i.code&&i.path.join("/")===r.fragment().slice(1)){const e=r.fragment?(0,o.trimStart)(i.path,(0,o.trimStart)(r.fragment(),"/").split("/")):i.path;e&&e.length?l(c.resolved.result,e,t):c.resolved.result&&(c.resolved.result=t)}}return c})),this.id=v+=1,this.depth=u.depth||0,this._source=e,this.resolvers=u.resolvers||{};const s=u.baseUri||"";let h=new c(s||"");this.isFile(h)&&(h=new c((0,a.toFSPath)(s))),this.baseUri=h,this.uriStack=u.uriStack||[],this.uriCache=u.uriCache||new d.Cache,this.root=u.root&&u.root.toString()||this.baseUri.toString()||"root",this.graph=r,this.graph.hasNode(this.root)||this.graph.addNode(this.root,{refMap:{},data:this._source}),this.baseUri&&0===this.depth&&this.uriCache.set(this.computeUriCacheKey(this.baseUri),this),this.getRef=u.getRef||t.defaultGetRef,this.transformRef=u.transformRef,this.depth?this.dereferenceInline=!0:this.dereferenceInline=void 0===u.dereferenceInline||u.dereferenceInline,this.dereferenceRemote=void 0===u.dereferenceRemote||u.dereferenceRemote,this.parseResolveResult=u.parseResolveResult,this.transformDereferenceResult=u.transformDereferenceResult,this.ctx=u.ctx,this.lookupUri=m(this.lookupUri,{serializer:this._cacheKeySerializer,cache:{create:()=>this.uriCache}})}get source(){return this._source}resolve(e){return n.__awaiter(this,void 0,void 0,(function*(){const t={result:this.source,graph:this.graph,refMap:{},errors:[],runner:this};let r;const n=e&&e.jsonPointer&&e.jsonPointer.trim();if(n&&"#"!==n&&"#/"!==n){try{r=(0,o.pointerToPath)(n)}catch(f){return t.errors.push({code:"PARSE_POINTER",message:`'${n}' JSON pointer is invalid`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:[]}),t}t.result=s(t.result,r)}if(void 0===t.result)return t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist @ '${this.baseUri.toString()}'`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:r||[]}),t;const a=new h.ResolveCrawler(this,n,t);a.computeGraph(t.result,r,n||"");let i=[];if(a.resolvers.length&&(i=yield Promise.all(a.resolvers)),i.length)for(const e of i){let n=e.targetPath;n.length||(n=r||[]),t.refMap[String(this.baseUri.clone().fragment((0,o.pathToPointer)(n)))]=String(e.uri),this._setGraphNodeEdge(String(this.root),(0,o.pathToPointer)(n),String(e.uri)),e.error&&t.errors.push(e.error),e.resolved&&(e.resolved.errors&&(t.errors=t.errors.concat(e.resolved.errors)),void 0!==e.resolved.result&&(this._source=(0,u.default)(this._source,(t=>{if(e.resolved){if(!n.length)return e.resolved.result;l(t,n,e.resolved.result),this._setGraphNodeData(String(e.uri),e.resolved.result)}}))))}if("object"==typeof this._source?(this.dereferenceInline&&(this._source=(0,u.default)(this._source,(e=>{let r=[];try{r=a.pointerGraph.overallOrder();for(const n of r){const r=a.pointerGraph.dependantsOf(n);if(!r.length)continue;const i=(0,o.pointerToPath)(n),c=0===i.length?(0,u.original)(e):s(e,i);for(const u of r){let r;const s=(0,o.pointerToPath)(u),f=a.pointerStemGraph.dependenciesOf(n);for(const e of f)if((0,o.startsWith)(s,(0,o.pointerToPath)(e))){r=!0;break}r||(t.refMap[(0,o.pathToPointer)(s)]=(0,o.pathToPointer)(i),this._setGraphNodeEdge(this.root,(0,o.pathToPointer)(s),(0,o.pathToPointer)(i)),void 0!==c?(l(e,s,c),this._setGraphNodeData((0,o.pathToPointer)(i),c)):t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist`,path:s,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[]}))}}}catch(n){}}))),t.result=r?s(this._source,r):this._source):t.result=this._source,this.transformDereferenceResult){const o=new c(n||"");try{const{result:r,error:n}=yield this.transformDereferenceResult({source:this.source,result:t.result,targetAuthority:o,parentAuthority:this.baseUri,parentPath:e&&e.parentPath||[],fragment:o.fragment()});if(t.result=r,n)throw new Error(`Could not transform dereferenced result for '${o.toString()}' - ${String(n)}`)}catch(d){t.errors.push({code:"TRANSFORM_DEREFERENCED",message:`Error: Could not transform dereferenced result for '${this.baseUri.toString()}${""!==o.fragment()?`#${o.fragment()}`:""}' - ${String(d)}`,uri:o,uriStack:this.uriStack,pointerStack:[],path:r})}}return this._setGraphNodeData(this.root,this._source),t}))}_cacheKeySerializer(e){return e&&"object"==typeof e&&e.cacheKey?e.cacheKey:JSON.stringify(arguments)}computeUriCacheKey(e){return e.clone().fragment("").toString()}isFile(e){const t=e.scheme();if("file"===t)return!0;if(t){if(!this.resolvers[t])return!0}else{if("/"===e.toString().charAt(0))return!0;if(this.baseUri){const e=this.baseUri.scheme();return Boolean(!e||"file"===e||!this.resolvers[e])}}return!1}_setGraphNodeData(e,t){if(!this.graph.hasNode(e))return;const r=this.graph.getNodeData(e)||{};r.data=t,this.graph.setNodeData(e,r)}_setGraphNodeEdge(e,t,r){if(!this.graph.hasNode(e))return;const n=this.graph.getNodeData(e)||{};n.refMap=n.refMap||{},n.refMap[t]=r,this.graph.setNodeData(e,n)}}t.ResolveRunner=g},40467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedURI=void 0;const n=r(68949);t.ExtendedURI=class extends n{constructor(e){super(e),this._value=e.trim()}get length(){return this._value.length}}},79764:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uriIsJSONPointer=t.uriToJSONPointer=t.addToJSONPointer=void 0;const r=(e,t,r)=>{const n=e.toString();let o="",a=n,i=0,u=a.indexOf(t);for(;u>-1;)o+=n.substring(i,i+u)+r,a=a.substring(u+t.length,a.length),i+=u+t.length,u=a.indexOf(t);return a.length>0&&(o+=n.substring(n.length-a.length,n.length)),o};t.addToJSONPointer=(e,t)=>{return`${e}/${n=t,r(r(n,"~","~0"),"/","~1")}`;var n};t.uriToJSONPointer=e=>"length"in e&&0===e.length?"":""!==e.fragment()?`#${e.fragment()}`:""===e.href()?"#":"";t.uriIsJSONPointer=e=>(!("length"in e)||e.length>0)&&""===e.path()},68971:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BUNDLE_ROOT:()=>ne,ERRORS_ROOT:()=>oe,KEYS:()=>Re,bundleTarget:()=>ae,decodePointer:()=>V,decodePointerFragment:()=>ue,decodePointerUriFragment:()=>V,decycle:()=>se,encodePointer:()=>le,encodePointerFragment:()=>L,encodePointerUriFragment:()=>F,encodeUriPointer:()=>z,extractPointerFromRef:()=>ce,extractSourceFromRef:()=>Y,getFirstPrimitiveProperty:()=>fe,getJsonPathForPosition:()=>de,getLastPathSegment:()=>he,getLocationForJsonPath:()=>pe,hasRef:()=>N,isExternalRef:()=>Z,isLocalRef:()=>D,isPlainObject:()=>A,parseTree:()=>ve,parseWithPointers:()=>me,pathToPointer:()=>U,pointerToPath:()=>J,remapRefs:()=>K,renameObjectKey:()=>be,reparentBundleTarget:()=>Oe,resolveExternalRef:()=>je,resolveExternalRefWithLocation:()=>xe,resolveInlineRef:()=>te,resolveInlineRefWithLocation:()=>re,safeParse:()=>Pe,safeStringify:()=>ke,startsWith:()=>Ce,stringify:()=>Ae,toPropertyPath:()=>Me,trapAccess:()=>De,traverse:()=>G,trimStart:()=>Te});var n,o=r(17243),a=r(54727);function i(e,t){void 0===t&&(t=!1);var r=e.length,n=0,o="",a=0,i=16,c=0,f=0,d=0,h=0,p=0;function m(t,r){for(var o=0,a=0;o=48&&i<=57)a=16*a+i-48;else if(i>=65&&i<=70)a=16*a+i-65+10;else{if(!(i>=97&&i<=102))break;a=16*a+i-97+10}n++,o++}return o=r)return a=r,i=17;var t=e.charCodeAt(n);if(u(t)){do{n++,o+=String.fromCharCode(t),t=e.charCodeAt(n)}while(u(t));return i=15}if(s(t))return n++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,o+="\n"),c++,d=n,i=14;switch(t){case 123:return n++,i=1;case 125:return n++,i=2;case 91:return n++,i=3;case 93:return n++,i=4;case 58:return n++,i=6;case 44:return n++,i=5;case 34:return n++,o=function(){for(var t="",o=n;;){if(n>=r){t+=e.substring(o,n),p=2;break}var a=e.charCodeAt(n);if(34===a){t+=e.substring(o,n),n++;break}if(92!==a){if(a>=0&&a<=31){if(s(a)){t+=e.substring(o,n),p=2;break}p=6}n++}else{if(t+=e.substring(o,n),++n>=r){p=2;break}switch(e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var i=m(4,!0);i>=0?t+=String.fromCharCode(i):p=4;break;default:p=5}o=n}}return t}(),i=10;case 47:var v=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n=12&&e<=15);return e}:v,getToken:function(){return i},getTokenValue:function(){return o},getTokenOffset:function(){return a},getTokenLength:function(){return n-a},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return a-h},getTokenError:function(){return p}}}function u(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function s(e){return 10===e||13===e||8232===e||8233===e}function l(e){return e>=48&&e<=57}function c(e,t,r){void 0===r&&(r=n.DEFAULT);var o=i(e,!1);function a(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function u(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}var s=a(t.onObjectBegin),l=u(t.onObjectProperty),c=a(t.onObjectEnd),f=a(t.onArrayBegin),d=a(t.onArrayEnd),h=u(t.onLiteralValue),p=u(t.onSeparator),m=a(t.onComment),v=u(t.onError),g=r&&r.disallowComments,y=r&&r.allowTrailingComma;function _(){for(;;){var e=o.scan();switch(o.getTokenError()){case 4:b(14);break;case 5:b(15);break;case 3:b(13);break;case 1:g||b(11);break;case 2:b(12);break;case 6:b(16)}switch(e){case 12:case 13:g?b(10):m();break;case 16:b(1);break;case 15:case 14:break;default:return e}}}function b(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=[]),v(e),t.length+r.length>0)for(var n=o.getToken();17!==n;){if(-1!==t.indexOf(n)){_();break}if(-1!==r.indexOf(n))break;n=_()}}function E(e){var t=o.getTokenValue();return e?h(t):l(t),_(),!0}function O(){switch(o.getToken()){case 3:return function(){f(),_();for(var e=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||b(4,[],[]),p(","),_(),4===o.getToken()&&y)break}else e&&b(6,[],[]);O()||b(4,[],[4,5]),e=!0}return d(),4!==o.getToken()?b(8,[4],[]):_(),!0}();case 1:return function(){s(),_();for(var e=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||b(4,[],[]),p(","),_(),2===o.getToken()&&y)break}else e&&b(6,[],[]);(10!==o.getToken()?(b(3,[],[2,5]),0):(E(!1),6===o.getToken()?(p(":"),_(),O()||b(4,[],[2,5])):b(5,[],[2,5]),1))||b(4,[],[2,5]),e=!0}return c(),2!==o.getToken()?b(7,[2],[]):_(),!0}();case 10:return E(!0);default:return function(){switch(o.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(o.getTokenValue()))&&(b(2),e=0)}catch(t){b(2)}h(e);break;case 7:h(null);break;case 8:h(!0);break;case 9:h(!1);break;default:return!1}return _(),!0}()}}return _(),17===o.getToken()?!!r.allowEmptyContent||(b(4,[],[]),!1):O()?(17!==o.getToken()&&b(9,[],[]),!0):(b(4,[],[]),!1)}!function(e){e.DEFAULT={allowTrailingComma:!1}}(n||(n={}));var f=i,d=function e(t,r,n){if(void 0===n&&(n=!1),function(e,t,r){return void 0===r&&(r=!1),t>=e.offset&&t"}const v=`__object_order_${Math.floor(Date.now()/36e5)}__`,g=Symbol.for(v),y=(String(g),{defineProperty:(e,t,r)=>(!Object.prototype.hasOwnProperty.call(e,t)&&g in e?e[g].push(t):"value"in r&&t===g&&-1===r.value.lastIndexOf(g)&&r.value.push(g),Reflect.defineProperty(e,t,r)),deleteProperty(e,t){const r=Object.prototype.hasOwnProperty.call(e,t),n=Reflect.deleteProperty(e,t);if(n&&r&&g in e){const r=e[g].indexOf(t);-1!==r&&e[g].splice(r,1)}return n},ownKeys:e=>g in e?e[g]:Reflect.ownKeys(e),set(e,t,r){const n=Object.prototype.hasOwnProperty.call(e,t),o=Reflect.set(e,t,r);return o&&!n&&g in e&&e[g].push(t),o}});function _(e,t=Reflect.ownKeys(e)){O(e);const r=new Proxy(e,y);return function(e,t){g in e?(e[g].length=0,e[g].push(...t)):Reflect.defineProperty(e,g,{configurable:!0,value:t})}(r,t),r}function b(e){return null!==e&&"object"==typeof e}function E(e){if(!b(e))return!1;if(void 0!==e[Symbol.toStringTag]){const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}return"Object"===function(e){const t=e[Symbol.toStringTag];if("string"==typeof t)return t;const r=Reflect.apply(Object.prototype.toString,e,[]);return r.slice(8,r.length-1)}(e)}function O(e,t){if(function(){if("undefined"==typeof process||!b(process)||!b(process.env))return!1;return!1}()&&!E(e))throw new TypeError(t)}var w,j,x,P,S;!function(e){e.None="none",e.Declared="declared",e.InheritedFromService="inheritedFromService"}(w||(w={})),function(e){e.Unspecified="unspecified",e.Simple="simple",e.Matrix="matrix",e.Label="label",e.Form="form",e.CommaDelimited="commaDelimited",e.SpaceDelimited="spaceDelimited",e.PipeDelimited="pipeDelimited",e.DeepObject="deepObject",e.TabDelimited="tabDelimited"}(j||(j={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information",e[e.Hint=3]="Hint"}(x||(x={})),function(e){e.Article="article",e.HttpService="http_service",e.HttpServer="http_server",e.HttpOperation="http_operation",e.HttpCallback="http_callback",e.Model="model",e.Generic="generic",e.Unknown="unknown",e.TableOfContents="table_of_contents",e.SpectralRuleset="spectral_ruleset",e.Styleguide="styleguide",e.Image="image",e.StoplightResolutions="stoplight_resolutions",e.StoplightOverride="stoplight_override"}(P||(P={})),function(e){e.Json="json",e.Markdown="markdown",e.Yaml="yaml",e.Javascript="javascript",e.Apng="apng",e.Avif="avif",e.Bmp="bmp",e.Gif="gif",e.Jpeg="jpeg",e.Png="png",e.Svg="svg",e.Webp="webp"}(S||(S={}));var k=r(9312),C=r.n(k);function A(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype||"function"==typeof e.constructor&&Function.toString.call(Object)===Function.toString.call(e.constructor)}function M(e,t,r){if(!A(e)&&!Array.isArray(e)||!(t in e))throw new ReferenceError(`Could not resolve '${r}'`)}function I(e){if("string"!=typeof e.$ref)throw new TypeError("$ref should be a string")}const R=e=>A(e)&&"$ref"in e,N=e=>R(e)&&"string"==typeof e.$ref,D=e=>e.length>0&&("#"===e||/^#\S*$/.test(e)),T=(e,t,r)=>{const n=e.toString();let o="",a=n,i=0,u=a.indexOf(t);for(;u>-1;)o+=n.substring(i,i+u)+r,a=a.substring(u+t.length,a.length),i+=u+t.length,u=a.indexOf(t);return a.length>0&&(o+=n.substring(n.length-a.length,n.length)),o},L=e=>"number"==typeof e?e:T(T(e,"~","~0"),"/","~1"),$=/[^a-zA\u2013Z0\u20139_.!~*'()\/\-\u{D800}-\u{DFFF}]/gu;function z(e){return e.replace($,encodeURIComponent)}const F=e=>{const t=L(e);return"number"==typeof t?t:z(t)},U=e=>Q(e),Q=e=>{if(e&&"object"!=typeof e)throw new TypeError("Invalid type: path must be an array of segments.");return 0===e.length?"#":`#/${e.map(F).join("/")}`};function B(e){try{return decodeURIComponent(e)}catch(t){return e}}const q=/%[0-9a-f]+/gi,V=e=>{let t;try{t=decodeURIComponent(e)}catch(r){t=e.replace(q,B)}return T(T(t,"~1","/"),"~0","~")},J=e=>H(e),H=e=>{if("string"!=typeof e)throw new TypeError("Invalid type: JSON Pointers are represented as strings.");if(0===e.length||"#"!==e[0])throw new URIError("Invalid JSON Pointer syntax; URI fragment identifiers must begin with a hash.");if(1===e.length)return[];if("/"!==e[1])throw new URIError("Invalid JSON Pointer syntax.");return(e=>{const t=e.length,r=[];let n=-1;for(;++n{const n={value:e,path:r};t.onEnter&&t.onEnter(n);for(const o of Object.keys(e)){const n=e[o];t.onProperty&&t.onProperty({parent:e,parentPath:r,property:o,propertyValue:n}),"object"==typeof n&&null!==n&&W(n,t,r.concat(o))}t.onLeave&&t.onLeave(n)},G=(e,t)=>{"object"==typeof e&&null!==e&&W(e,"function"==typeof t?{onProperty:t}:t,[])};function K(e,t,r){G(e,{onProperty({property:e,propertyValue:n,parent:o}){"$ref"===e&&"string"==typeof n&&n.startsWith(t)&&(o.$ref=`${r}${n.slice(t.length)}`)}})}const Z=e=>e.length>0&&"#"!==e[0],Y=e=>{if("string"!=typeof e||0===e.length||!Z(e))return null;const t=e.indexOf("#");return-1===t?e:e.slice(0,t)};function X(e,t){return A(t)&&A(e)&&("summary"in e||"description"in e)?Object.assign(Object.assign(Object.assign({},t),"description"in e?{description:e.description}:null),"summary"in e?{summary:e.summary}:null):t}function*ee(e,t,r){R(e.value)&&(I(e.value),yield[-1,e.value]);for(const[n,o]of t.entries())M(e.value,o,r),e.value=e.value[o],R(e.value)&&(I(e.value),yield[n,e.value])}function te(e,t){return re(e,t).value}function re(e,t){return function e(t,r,n,o){if(null!==Y(r))throw new ReferenceError("Cannot resolve external references");const a=J(r);let i=[...a];"#"===r&&R(t)&&(I(t),a.unshift(...J(t.$ref)));const u={value:t};for(const[s,l]of ee(u,a,r)){if(n.includes(l))return{source:null,location:null!=o?o:i,value:n[n.length-1]};n.push(l);const r=e(t,l.$ref,n,i);u.value=r.value,(i=r.location).push(...a.slice(s+1))}return{source:null,location:i,value:n.length>0?X(n[n.length-1],u.value):u.value}}(e,t,[])}const ne="#/__bundled__",oe="#/__errors__",ae=({document:e,path:t,bundleRoot:r="#/__bundled__",errorsRoot:n="#/__errors__",cloneDocument:a=!0,keyProvider:i},u)=>{if(t===r||t===n)throw new Error("Roots do not make any sense");const s=a?(0,o.cloneDeep)(e):e;return ie(s,J(r),J(n),t,i)(t,{[t]:!0},u)},ie=(e,t,r,n,a)=>{const i=new Set,u=(s,l,c,f={},d={},h={})=>{const p=J(s),m=(0,o.get)(e,p);G(c||m,{onEnter:({value:r})=>{if(N(r)&&D(r.$ref)){const c=r.$ref;if(h[c])return;if(c===s&&(f[c]="#"),f[c])return void(r.$ref=f[c]);let p,m,v,g,y;try{let r;p=J(c),a&&(r=a({document:e,path:p})),r||(r=(({document:e,path:t})=>0===t.length?"root":Array.isArray((0,o.get)(e,t.slice(0,-1)))?`${t[t.length-2]}_${t[t.length-1]}`:String(t[t.length-1]))({document:e,path:p})),v=r;let n=1;for(;i.has(v);)if(v=`${r}_${++n}`,n>20)throw new Error(`Keys ${r}_2 through ${r}_20 already taken.`);i.add(v),m=[...t,v],g=U(m)}catch(e){h[c]=e instanceof Error?e.message:String(e)}if(!p||!m||!g)return;if("object"==typeof e&&null!==e&&!(y=(0,o.get)(e,p)))try{y=te(Object(e),c)}catch(e){}void 0!==y&&(f[c]=g,r.$ref=g,(0,o.has)(d,m)||(Array.isArray(y)?(0,o.set)(d,m,new Array(y.length).fill(null)):"object"==typeof y&&(0,o.setWith)(d,m,{},Object),(0,o.set)(d,m,y),"#"===c?function(e,t,r,n){const a=r.map((e=>`[${JSON.stringify(e)}]`)).join(""),i=JSON.parse(JSON.stringify((0,o.omit)(Object(e),a))),u={};(0,o.set)(t,n,i),(0,o.set)(i,r,u),K(i,"#",U(n)),u.$ref="#"}(e,d,J(n),m):l[c]||(l[c]=!0,u(s,l,y,f,d,h),l[c]=!1)))}}});const v=(0,o.get)(d,t);return v&&Object.keys(v).length&&(0,o.set)(m,t,v),(Object.keys(h).length||(0,o.has)(e,r))&&(0,o.set)(m,r,(0,o.has)(e,r)?(0,o.get)(e,r):h),m};return u},ue=e=>T(T(e,"~1","/"),"~0","~"),se=(e,t)=>{const r=new WeakMap;return function e(n,o){let a;if(t&&(n=t(n)),A(n)||Array.isArray(n)){const t=r.get(n);return t?{$ref:t}:(r.set(n,U(o)),Array.isArray(n)?a=n.map(((t,r)=>e(t,[...o,String(r)]))):(a={},Object.keys(n).forEach((t=>{a[t]=e(n[t],[...o,t])}))),r.delete(n),a)}return n}(e,[])},le=e=>T(T(e,"~","~0"),"//","/~1"),ce=e=>{if("string"!=typeof e||0===e.length)return null;const t=e.indexOf("#");return-1===t?null:e.slice(t)},fe=e=>{const t=f(e,!0);if(t.scan(),1!==t.getToken())return;if(t.scan(),2===t.getToken())return;if(10!==t.getToken())throw new SyntaxError("Unexpected character");const r=t.getTokenValue();if(t.scan(),6!==t.getToken())throw new SyntaxError("Colon expected");switch(t.scan(),t.getToken()){case 10:return[r,t.getTokenValue()];case 11:return[r,Number(t.getTokenValue())];case 8:return[r,!0];case 9:return[r,!1];case 7:return[r,null];case 16:throw new SyntaxError("Unexpected character");case 17:throw new SyntaxError("Unexpected end of file");default:return}},de=({lineMap:e,ast:t},r)=>{const n=e[r.line],o=e[r.line+1];if(void 0===n)return;const a=d(t,void 0===o?n+r.character:Math.min(o,n+r.character),!0);if(void 0===a)return;const i=h(a);return 0!==i.length?i:void 0};function he(e){return ue(e.split("/").pop()||"")}const pe=({ast:e},t,r=!1)=>{const n=function(e,t,r){e:for(const n of t){const t=Number.isInteger(Number(n))?Number(n):n;if("string"==typeof t||"number"==typeof t&&"array"!==e.type){if("object"!==e.type||!Array.isArray(e.children))return r?e:void 0;for(const r of e.children)if(Array.isArray(r.children)&&r.children[0].value===String(t)&&2===r.children.length){e=r.children[1];continue e}return r?e:void 0}if("array"!==e.type||t<0||!Array.isArray(e.children)||t>=e.children.length)return r?e:void 0;e=e.children[t]}return e}(e,t,r);if(void 0!==n&&void 0!==n.range)return{range:n.range}},me=(e,t={disallowComments:!0})=>{const r=[],{ast:n,data:o,lineMap:a}=ve(e,r,t);return{data:o,diagnostics:r,ast:n,lineMap:a}};function ve(e,t=[],r){const n=ye(e);let o={type:"array",offset:-1,length:-1,children:[],parent:void 0},a=null,i=[];const u=new WeakMap,s=[];function l(e){"property"===o.type&&(o.length=e-o.offset,o=o.parent)}function c(e,t,r){return{start:{line:e,character:t},end:{line:e,character:t+r}}}function f(e){return o.children.push(e),e}function d(e){Array.isArray(i)?i.push(e):null!==a&&(i[a]=e)}function h(e){d(e),s.push(i),i=e,a=null}function v(){i=s.pop()}p(e,{onObjectBegin:(e,t,n,a)=>{o=f({type:"object",offset:e,length:-1,parent:o,children:[],range:c(n,a,t)}),!1===r.ignoreDuplicateKeys&&u.set(o,[]),h(function(e){return e?_({}):{}}(!0===r.preserveKeyOrder))},onObjectProperty:(e,n,s,l,d)=>{if((o=f({type:"property",offset:n,length:-1,parent:o,children:[]})).children.push({type:"string",value:e,offset:n,length:s,parent:o}),!1===r.ignoreDuplicateKeys){const r=u.get(o.parent);r&&(0!==r.length&&r.includes(e)?t.push({range:c(l,d,s),message:"DuplicateKey",severity:x.Error,path:_e(o),code:20}):r.push(e))}!0===r.preserveKeyOrder&&function(e,t){if(!(t in e))return;const r=e[g],n=r.indexOf(t);-1!==n&&(r.splice(n,1),r.push(t))}(i,e),a=e},onObjectEnd:(e,t,n,a)=>{!1===r.ignoreDuplicateKeys&&u.delete(o),o.length=e+t-o.offset,o.range&&(o.range.end.line=n,o.range.end.character=a+t),o=o.parent,l(e+t),v()},onArrayBegin:(e,t,r,n)=>{o=f({type:"array",offset:e,length:-1,parent:o,children:[],range:c(r,n,t)}),h([])},onArrayEnd:(e,t,r,n)=>{o.length=e+t-o.offset,o.range&&(o.range.end.line=r,o.range.end.character=n+t),o=o.parent,l(e+t),v()},onLiteralValue:(e,t,r,n,a)=>{f({type:ge(e),offset:t,length:r,parent:o,value:e,range:c(n,a,r)}),l(t+r),d(e)},onSeparator:(e,t)=>{"property"===o.type&&(":"===e?o.colonOffset=t:","===e&&l(t))},onError:(e,r,n,o,a)=>{t.push({range:c(o,a,n),message:m(e),severity:x.Error,code:e})}},r);const y=o.children[0];return y&&delete y.parent,{ast:y,data:i[0],lineMap:n}}function ge(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}const ye=e=>{const t=[0];let r=0;for(;r{if(!e||!Object.hasOwnProperty.call(e,t)||t===r)return e;const n={};for(const[o,a]of Object.entries(e))o===t?n[r]=a:o in n||(n[o]=a);return n};function Ee(e){return A(e)||Array.isArray(e)}function Oe(e,t,r){if(r.length<=1||t.length<=1)throw Error("Source/target path must not be empty and point at root");if(0===t.indexOf(r))throw Error("Target path cannot be contained within source");const n=J(t);let o=e;for(const u of n){if(!Ee(o))return;o=o[u]}if(!Ee(o))return;const a=J(r);let i=e;for(const[u,s]of a.entries()){if(!Ee(i)||s in i)return;const e=u===a.length-1?o:{};i[s]=e,i=e}delete e[n[0]],function e(t,r,n){for(const o of Object.keys(t)){const a=t[o];if("$ref"!==o)Ee(a)&&e(a,r,n);else{if("string"!=typeof a||!D(a))continue;0===a.indexOf(r)&&(t[o]=a.replace(r,n))}}}(e,t,r)}async function we(e,t,r,n,o){let i=function(e,t){const r=Y(t);return null===r?e:(0,a.isAbsolute)(r)?r:(0,a.join)((0,a.dirname)(e),r)}(t,r);const u=ce(r)||"#",s=await e[i],l=J(u);let c=[...l];const f={value:s};for(const[a,d]of ee(f,l,u)){if(n.includes(d))return{source:t,location:null!=o?o:c,value:n[n.length-1]};n.push(d);const r=await we(e,i,d.$ref,n,c);({source:i,location:c}=r),f.value=r.value,c.push(...l.slice(a+1))}return{source:i,location:c,value:n.length>0?X(n[n.length-1],f.value):f.value}}async function je(e,t,r){return(await xe(e,t,r)).value}function xe(e,t,r){return we(e,t,r,[])}const Pe=(e,t)=>{if("string"!=typeof e)return e;try{const r=Se(e);return"string"==typeof r?r:JSON.parse(e,t)}catch(e){return}},Se=e=>{const t=Number(e);return Number.isFinite(t)?String(t)===e?t:e:NaN},ke=(e,t,r)=>{if("string"==typeof e)return e;try{return JSON.stringify(e,t,r)}catch(n){return C()(e,t,r)}},Ce=(e,t)=>{if(e instanceof Array){if(t instanceof Array){if(t.length>e.length)return!1;for(const r in t){if(!t.hasOwnProperty(r))continue;const n=parseInt(e[r]),o=parseInt(t[r]);if(isNaN(n)&&isNaN(o)){if(e[r]!==t[r])return!1}else if(n!==o)return!1}}}else{if("string"!=typeof e)return!1;if("string"==typeof t)return e.startsWith(t)}return!0},Ae=(e,t,r)=>{const n=ke(e,t,r);if(void 0===n)throw new Error("The value could not be stringified");return n};function Me(e){return e.replace(/^(\/|#\/)/,"").split("/").map(ue).map(Ie).join(".")}function Ie(e){return e.includes(".")?`["${e.replace(/"/g,'\\"')}"]`:e}const Re=Symbol.for(v),Ne={ownKeys:e=>Re in e?e[Re]:Reflect.ownKeys(e)},De=e=>new Proxy(e,Ne);function Te(e,t){if("string"==typeof e&&"string"==typeof t)return(0,o.trimStart)(e,t);if(!(e&&Array.isArray(e)&&e.length&&t&&Array.isArray(t)&&t.length))return e;let r=0;for(const n in e)if(e.hasOwnProperty(n)){if(e[n]!==t[n])break;r++}return e.slice(r)}},54727:(e,t,r)=>{"use strict";function n(e){let t="";return e.absolute&&("file"===e.protocol?(e.drive&&(t+=e.drive),t+="/"):(t+=e.protocol+"://",e.origin&&(t+=e.origin+"/"))),""===(t+=e.path.join("/"))&&(t="."),t}function o(e,t,r,n){this.message=e,this.expected=t,this.found=r,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,o)}r.r(t),r.d(t,{basename:()=>c,deserializeSrn:()=>E,dirname:()=>f,extname:()=>d,format:()=>n,isAbsolute:()=>h,isURL:()=>p,join:()=>m,normalize:()=>u,parse:()=>i,relative:()=>v,resolve:()=>g,sep:()=>y,serializeSrn:()=>O,startsWithWindowsDrive:()=>_,stripRoot:()=>b,toFSPath:()=>u}),function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(o,Error),o.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;tW&&(W=J,G=[]),G.push(e))}function te(){var t;return(t=function(){var e,t,r,n,o;return e=J,(t=re())!==u&&(r=ne())!==u&&(n=ae())!==u&&(o=ie())!==u?e=t=c(t,r,n,o):(J=e,e=u),e===u&&(e=J,(t=re())!==u&&(r=ne())!==u&&(n=function(){var e;return(e=y)!==u&&(e=R()),e}())!==u?e=t=f(t,r,n):(J=e,e=u)),e}())===u&&(t=function(){var t,r,n,o;return t=J,(r=function(){var t;return e.substr(J,7).toLowerCase()===E?(t=e.substr(J,7),J+=7):(t=u,ee(O)),t===u&&(e.substr(J,5).toLowerCase()===w?(t=e.substr(J,5),J+=5):(t=u,ee(j))),t!==u&&(t=x()),t}())!==u&&(n=oe())!==u&&(o=ie())!==u?t=r=b(r,n,o):(J=t,t=u),t}())===u&&(t=function(){var e,t,r;return e=J,(t=oe())!==u&&(r=ie())!==u?e=t=P(t,r):(J=e,e=u),e}())===u&&(t=function(){var t,r;return t=J,function(){var t;return(t=function(){var t,r,n;return t=J,46===e.charCodeAt(J)?(r=$,J++):(r=u,ee(z)),r!==u&&(n=se())!==u?t=r=[r,n]:(J=t,t=u),t}())===u&&(t=y),t}()!==u&&(r=ie())!==u?t=N(r):(J=t,t=u),t}()),t}function re(){var t,r;return e.substr(J,7).toLowerCase()===d?(r=e.substr(J,7),J+=7):(r=u,ee(h)),r!==u&&(r=p()),(t=r)===u&&(t=function(){var t;return e.substr(J,8).toLowerCase()===m?(t=e.substr(J,8),J+=8):(t=u,ee(v)),t!==u&&(t=g()),t}()),t}function ne(){var t,r,n;if(t=J,r=[],(n=le())!==u)for(;n!==u;)r.push(n),n=le();else r=u;return(t=r!==u?e.substring(t,J):r)===u&&(t=J,(r=y)!==u&&(r=_()),t=r),t}function oe(){var t;return(t=function(){var t,r,n,o;return t=J,(r=se())===u&&(r=null),r!==u?(S.test(e.charAt(J))?(n=e.charAt(J),J++):(n=u,ee(k)),n!==u?(58===e.charCodeAt(J)?(o=C,J++):(o=u,ee(A)),o!==u&&se()!==u?t=r=M(n):(J=t,t=u)):(J=t,t=u)):(J=t,t=u),t}())===u&&(t=ae()),t}function ae(){var e;return(e=se())!==u&&(e=I()),e}function ie(){var e;return(e=function e(){var t,r,n;return t=J,(r=ue())!==u&&se()!==u&&(n=e())!==u?t=r=T(r,n):(J=t,t=u),t===u&&(t=J,(r=ue())!==u&&(r=L(r)),t=r),t}())!==u&&(e=D(e)),e}function ue(){var t,r,n;if(t=J,r=[],(n=le())!==u)for(;n!==u;)r.push(n),n=le();else r=u;return(t=r!==u?e.substring(t,J):r)===u&&(t=y),t}function se(){var t;return 47===e.charCodeAt(J)?(t=F,J++):(t=u,ee(U)),t===u&&(92===e.charCodeAt(J)?(t=Q,J++):(t=u,ee(B))),t}function le(){var t;return q.test(e.charAt(J))?(t=e.charAt(J),J++):(t=u,ee(V)),t}if((r=l())!==u&&J===e.length)return r;throw r!==u&&J""!==e&&"."!==e));const r=[];for(const n of t)".."===n&&r.length&&".."!==r[r.length-1]?r.pop():".."===n&&e.absolute||r.push(n);return e.path=r,e}function l(e){let t=e.lastIndexOf(".");".."===e&&(t=-1),"."===e&&(t=-1);let r=e,n="";return t>0&&(r=e.slice(0,t),n=e.slice(t)),{name:r,ext:n}}const c=(e,t)=>{const r=s(i(e)).path.pop();if(!r)return"";const{name:n,ext:o}=l(r);return!0===t||t===o?n:`${n}${o}`},f=e=>{const t=s(i(e));return t.path.pop(),n(s(t))},d=e=>{const t=s(i(e)).path.pop();if(!t)return"";const{ext:r}=l(t);return r};function h(e){return i(e).absolute}function p(e){const t=i(e);return"http"===t.protocol||"https"===t.protocol}const m=(...e)=>{if(0===e.length)return".";const t=e.map(i),r=Object.assign({},t[0]);for(let n=1;nnull!==i(e).drive,b=e=>i(e).path.filter(Boolean).join("/");function E(e){const[t,r,n,...o]=e.split("/"),a=o.length?`/${o.join("/")}`:void 0;let i,u;return a&&(i=o.find((e=>e.includes("."))))&&(u=l(i).ext),{shortcode:t,orgSlug:r,projectSlug:n,uri:a,file:i,ext:u}}function O({shortcode:e,orgSlug:t,projectSlug:r,uri:n=""}){return[e,t,r,n.replace(/^\//,"")].filter(Boolean).join("/")}},59559:(e,t)=>{function r(e,t,r,n){var a={};return function(i){if(!a[i]){var u={},s=[],l=[];for(l.push({node:i,processed:!1});l.length>0;){var c=l[l.length-1],f=c.processed,d=c.node;if(f)l.pop(),s.pop(),u[d]=!1,a[d]=!0,t&&0!==e[d].length||r.push(d);else{if(a[d]){l.pop();continue}if(u[d]){if(n){l.pop();continue}throw s.push(d),new o(s)}u[d]=!0,s.push(d);for(var h=e[d],p=h.length-1;p>=0;p--)l.push({node:h[p],processed:!1});c.processed=!0}}}}}var n=t.DepGraph=function(e){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=e&&!!e.circular};n.prototype={size:function(){return Object.keys(this.nodes).length},addNode:function(e,t){this.hasNode(e)||(this.nodes[e]=2===arguments.length?t:e,this.outgoingEdges[e]=[],this.incomingEdges[e]=[])},removeNode:function(e){this.hasNode(e)&&(delete this.nodes[e],delete this.outgoingEdges[e],delete this.incomingEdges[e],[this.incomingEdges,this.outgoingEdges].forEach((function(t){Object.keys(t).forEach((function(r){var n=t[r].indexOf(e);n>=0&&t[r].splice(n,1)}),this)})))},hasNode:function(e){return this.nodes.hasOwnProperty(e)},getNodeData:function(e){if(this.hasNode(e))return this.nodes[e];throw new Error("Node does not exist: "+e)},setNodeData:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);this.nodes[e]=t},addDependency:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);if(!this.hasNode(t))throw new Error("Node does not exist: "+t);return-1===this.outgoingEdges[e].indexOf(t)&&this.outgoingEdges[e].push(t),-1===this.incomingEdges[t].indexOf(e)&&this.incomingEdges[t].push(e),!0},removeDependency:function(e,t){var r;this.hasNode(e)&&(r=this.outgoingEdges[e].indexOf(t))>=0&&this.outgoingEdges[e].splice(r,1),this.hasNode(t)&&(r=this.incomingEdges[t].indexOf(e))>=0&&this.incomingEdges[t].splice(r,1)},clone:function(){var e=this,t=new n;return Object.keys(e.nodes).forEach((function(r){t.nodes[r]=e.nodes[r],t.outgoingEdges[r]=e.outgoingEdges[r].slice(0),t.incomingEdges[r]=e.incomingEdges[r].slice(0)})),t},directDependenciesOf:function(e){if(this.hasNode(e))return this.outgoingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},directDependantsOf:function(e){if(this.hasNode(e))return this.incomingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},dependenciesOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.outgoingEdges,t,n,this.circular)(e);var o=n.indexOf(e);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+e)},dependantsOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.incomingEdges,t,n,this.circular)(e);var o=n.indexOf(e);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+e)},overallOrder:function(e){var t=this,n=[],o=Object.keys(this.nodes);if(0===o.length)return n;if(!this.circular){var a=r(this.outgoingEdges,!1,[],this.circular);o.forEach((function(e){a(e)}))}var i=r(this.outgoingEdges,e,n,this.circular);return o.filter((function(e){return 0===t.incomingEdges[e].length})).forEach((function(e){i(e)})),this.circular&&o.filter((function(e){return-1===n.indexOf(e)})).forEach((function(e){i(e)})),n},entryNodes:function(){var e=this;return Object.keys(this.nodes).filter((function(t){return 0===e.incomingEdges[t].length}))}},n.prototype.directDependentsOf=n.prototype.directDependantsOf,n.prototype.dependentsOf=n.prototype.dependantsOf;var o=t.DepGraphCycleError=function(e){var t="Dependency Cycle Found: "+e.join(" -> "),r=new Error(t);return r.cyclePath=e,Object.setPrototypeOf(r,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(r,o),r};o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error)},75919:e=>{function t(e,t,r,n){var o,a=null==(o=n)||"number"==typeof o||"boolean"==typeof o?n:r(n),i=t.get(a);return void 0===i&&(i=e.call(this,n),t.set(a,i)),i}function r(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),a=t.get(o);return void 0===a&&(a=e.apply(this,n),t.set(o,a)),a}function n(e,t,r,n,o){return r.bind(t,e,n,o)}function o(e,o){return n(e,this,1===e.length?t:r,o.cache.create(),o.serializer)}function a(){return JSON.stringify(arguments)}function i(){this.cache=Object.create(null)}i.prototype.has=function(e){return e in this.cache},i.prototype.get=function(e){return this.cache[e]},i.prototype.set=function(e,t){this.cache[e]=t};var u={create:function(){return new i}};e.exports=function(e,t){var r=t&&t.cache?t.cache:u,n=t&&t.serializer?t.serializer:a;return(t&&t.strategy?t.strategy:o)(e,{cache:r,serializer:n})},e.exports.strategies={variadic:function(e,t){return n(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,r){return n(e,this,t,r.cache.create(),r.serializer)}}},64617:(e,t)=>{function r(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.t-4:t.t:Array.isArray(e)?1:f(e)?2:d(e)?3:0}function u(e,t){return 2===i(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function s(e,t){return 2===i(e)?e.get(t):e[t]}function l(e,t,r){var n=i(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function c(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return B&&e instanceof Map}function d(e){return q&&e instanceof Set}function h(e){return e.i||e.u}function p(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Y(e);delete t[W];for(var r=Z(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&a(e,(function(e,t){return m(t,!0)}),!0)),e}function v(){r(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function y(e){var t=X[e];return t||r(18,e),t}function _(e,t){X[e]||(X[e]=t)}function b(){return U}function E(e,t){t&&(y("Patches"),e.o=[],e.v=[],e.s=t)}function O(e){w(e),e.p.forEach(x),e.p=null}function w(e){e===U&&(U=e.l)}function j(e){return U={p:[],l:U,h:e,_:!0,m:0}}function x(e){var t=e[W];0===t.t||1===t.t?t.j():t.O=!0}function P(e,t){t.m=t.p.length;var n=t.p[0],a=void 0!==e&&e!==n;return t.h.S||y("ES5").P(t,e,a),a?(n[W].g&&(O(t),r(4)),o(e)&&(e=S(t,e),t.l||C(t,e)),t.o&&y("Patches").M(n[W].u,e,t.o,t.v)):e=S(t,n,[]),O(t),t.o&&t.s(t.o,t.v),e!==J?e:void 0}function S(e,t,r){if(g(t))return t;var n=t[W];if(!n)return a(t,(function(o,a){return k(e,n,t,o,a,r)}),!0),t;if(n.A!==e)return t;if(!n.g)return C(e,n.u,!0),n.u;if(!n.R){n.R=!0,n.A.m--;var o=4===n.t||5===n.t?n.i=p(n.k):n.i,i=o,u=!1;3===n.t&&(i=new Set(o),o.clear(),u=!0),a(i,(function(t,a){return k(e,n,o,t,a,r,u)})),C(e,o,!1),r&&e.o&&y("Patches").F(n,r,e.o,e.v)}return n.i}function k(e,t,r,a,i,s,c){if(n(i)){var f=S(e,i,s&&t&&3!==t.t&&!u(t.N,a)?s.concat(a):void 0);if(l(r,a,f),!n(f))return;e._=!1}else c&&r.add(i);if(o(i)&&!g(i)){if(!e.h.D&&e.m<1)return;S(e,i),t&&t.A.l||C(e,i)}}function C(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e._&&m(t,r)}function A(e,t){var r=e[W];return(r?h(r):e)[t]}function M(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function I(e){e.g||(e.g=!0,e.l&&I(e.l))}function R(e){e.i||(e.i=p(e.u))}function N(e,t,r){var n=f(t)?y("MapSet").K(t,r):d(t)?y("MapSet").$(t,r):e.S?function(e,t){var r=Array.isArray(e),n={t:r?1:0,A:t?t.A:b(),g:!1,R:!1,N:{},l:t,u:e,k:null,i:null,j:null,C:!1},o=n,a=ee;r&&(o=[n],a=te);var i=Proxy.revocable(o,a),u=i.revoke,s=i.proxy;return n.k=s,n.j=u,s}(t,r):y("ES5").I(t,r);return(r?r.A:b()).p.push(n),n}function D(e){return n(e)||r(22,e),function e(t){if(!o(t))return t;var r,n=t[W],u=i(t);if(n){if(!n.g&&(n.t<4||!y("ES5").J(n)))return n.u;n.R=!0,r=T(t,u),n.R=!1}else r=T(t,u);return a(r,(function(t,o){n&&s(n.u,t)===o||l(r,t,e(o))})),3===u?new Set(r):r}(e)}function T(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return p(e)}function L(){function e(e,t){var r=i[e];return r?r.enumerable=t:i[e]=r={configurable:!0,enumerable:t,get:function(){return ee.get(this[W],e)},set:function(t){ee.set(this[W],e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var n=e[t][W];if(!n.g)switch(n.t){case 5:o(n)&&I(n);break;case 4:r(n)&&I(n)}}}function r(e){for(var t=e.u,r=e.k,n=Z(r),o=n.length-1;o>=0;o--){var a=n[o];if(a!==W){var i=t[a];if(void 0===i&&!u(t,a))return!0;var s=r[a],l=s&&s[W];if(l?l.u!==i:!c(s,i))return!0}}var f=!!t[W];return n.length!==Z(t).length+(f?0:1)}function o(e){var t=e.k;if(t.length!==e.u.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;n1?r-1:0),a=1;a1?n-1:0),a=1;a=0;r--){var o=t[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(t=t.slice(r+1));var a=y("Patches").W;return n(e)?a(e,t):this.produce(e,(function(e){return a(e,t)}))},e}(),ne=new re,oe=ne.produce,ae=ne.produceWithPatches.bind(ne),ie=ne.setAutoFreeze.bind(ne),ue=ne.setUseProxies.bind(ne),se=ne.applyPatches.bind(ne),le=ne.createDraft.bind(ne),ce=ne.finishDraft.bind(ne);t.Immer=re,t.applyPatches=se,t.castDraft=function(e){return e},t.castImmutable=function(e){return e},t.createDraft=le,t.current=D,t.default=oe,t.enableAllPlugins=function(){L(),z(),$()},t.enableES5=L,t.enableMapSet=z,t.enablePatches=$,t.finishDraft=ce,t.freeze=m,t.immerable=H,t.isDraft=n,t.isDraftable=o,t.nothing=J,t.original=function(e){return n(e)||r(23,e),e[W].u},t.produce=oe,t.produceWithPatches=ae,t.setAutoFreeze=ie,t.setUseProxies=ue},83346:(e,t,r)=>{"use strict";e.exports=r(64617)},9073:(e,t,r)=>{var n=r(82316),o=r(76458),a=r(2149),i=r(44297),u=r(33121);function s(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(39714),o=r(33812),a=r(14727),i=r(8379),u=r(8291);function s(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(99138)(r(41433),"Map");e.exports=n},90369:(e,t,r)=>{var n=r(72092),o=r(49626),a=r(79925),i=r(26809),u=r(94385);function s(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(41433).Symbol;e.exports=n},44272:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r{var n=r(14772),o=r(39316),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var i=e[t];a.call(e,t)&&o(i,r)&&(void 0!==r||t in e)||n(e,t,r)}},58301:(e,t,r)=>{var n=r(39316);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},14772:(e,t,r)=>{var n=r(18559);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},17722:(e,t,r)=>{var n=r(87181),o=r(86729);e.exports=function(e,t){for(var r=0,a=(t=n(t,e)).length;null!=e&&r{var n=r(32781),o=r(17903),a=r(71738),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},16567:(e,t,r)=>{var n=r(18446),o=r(18092),a=r(58953),i=r(81485),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,f=l.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(n(e)?d:u).test(i(e))}},68230:(e,t,r)=>{var n=r(82863),o=r(87181),a=r(42845),i=r(58953),u=r(86729);e.exports=function(e,t,r,s){if(!i(e))return e;for(var l=-1,c=(t=o(t,e)).length,f=c-1,d=e;null!=d&&++l{var n=r(32781),o=r(44272),a=r(6397),i=r(75414),u=n?n.prototype:void 0,s=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return s?s.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},87181:(e,t,r)=>{var n=r(6397),o=r(13726),a=r(43614),i=r(53506);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:a(i(e))}},38109:(e,t,r)=>{var n=r(41433)["__core-js_shared__"];e.exports=n},18559:(e,t,r)=>{var n=r(99138),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},75380:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},15535:(e,t,r)=>{var n=r(95662);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},99138:(e,t,r)=>{var n=r(16567),o=r(6772);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},17903:(e,t,r)=>{var n=r(32781),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(s){}var o=i.call(e);return n&&(t?e[u]=r:delete e[u]),o}},6772:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},82316:(e,t,r)=>{var n=r(4558);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},76458:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},2149:(e,t,r)=>{var n=r(4558),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},44297:(e,t,r)=>{var n=r(4558),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},33121:(e,t,r)=>{var n=r(4558);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},42845:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(6397),o=r(75414),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(i.test(e)||!a.test(e)||null!=t&&e in Object(t))}},95662:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},18092:(e,t,r)=>{var n,o=r(38109),a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!a&&a in e}},39714:e=>{e.exports=function(){this.__data__=[],this.size=0}},33812:(e,t,r)=>{var n=r(58301),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},14727:(e,t,r)=>{var n=r(58301);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},8379:(e,t,r)=>{var n=r(58301);e.exports=function(e){return n(this.__data__,e)>-1}},8291:(e,t,r)=>{var n=r(58301);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},72092:(e,t,r)=>{var n=r(9073),o=r(72707),a=r(91955);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},49626:(e,t,r)=>{var n=r(15535);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},79925:(e,t,r)=>{var n=r(15535);e.exports=function(e){return n(this,e).get(e)}},26809:(e,t,r)=>{var n=r(15535);e.exports=function(e){return n(this,e).has(e)}},94385:(e,t,r)=>{var n=r(15535);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},79268:(e,t,r)=>{var n=r(14556);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},4558:(e,t,r)=>{var n=r(99138)(Object,"create");e.exports=n},71738:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},41433:(e,t,r)=>{var n=r(75380),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},43614:(e,t,r)=>{var n=r(79268),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(a,"$1"):r||e)})),t}));e.exports=i},86729:(e,t,r)=>{var n=r(75414);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},81485:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},39316:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},62832:(e,t,r)=>{var n=r(17722);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},6397:e=>{var t=Array.isArray;e.exports=t},18446:(e,t,r)=>{var n=r(87148),o=r(58953);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},58953:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},22934:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},75414:(e,t,r)=>{var n=r(87148),o=r(22934);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},17243:function(e,t,r){var n;e=r.nmd(e),function(){var o,a="Expected a function",i="__lodash_hash_undefined__",u="__lodash_placeholder__",s=16,l=32,c=64,f=128,d=256,h=1/0,p=9007199254740991,m=NaN,v=4294967295,g=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",c],["rearg",d]],y="[object Arguments]",_="[object Array]",b="[object Boolean]",E="[object Date]",O="[object Error]",w="[object Function]",j="[object GeneratorFunction]",x="[object Map]",P="[object Number]",S="[object Object]",k="[object Promise]",C="[object RegExp]",A="[object Set]",M="[object String]",I="[object Symbol]",R="[object WeakMap]",N="[object ArrayBuffer]",D="[object DataView]",T="[object Float32Array]",L="[object Float64Array]",$="[object Int8Array]",z="[object Int16Array]",F="[object Int32Array]",U="[object Uint8Array]",Q="[object Uint8ClampedArray]",B="[object Uint16Array]",q="[object Uint32Array]",V=/\b__p \+= '';/g,J=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,K=RegExp(W.source),Z=RegExp(G.source),Y=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),ie=/^\s+/,ue=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,_e=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,Ee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Oe=/($^)/,we=/['\n\r\u2028\u2029\\]/g,je="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Pe="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",ke="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="['\u2019]",Ie="["+je+"]",Re="["+Ae+"]",Ne="["+xe+"]",De="\\d+",Te="["+Pe+"]",Le="["+Se+"]",$e="[^"+je+Ae+De+Pe+Se+ke+"]",ze="\\ud83c[\\udffb-\\udfff]",Fe="[^"+je+"]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",Qe="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+ke+"]",qe="\\u200d",Ve="(?:"+Le+"|"+$e+")",Je="(?:"+Be+"|"+$e+")",He="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",We="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Ne+"|"+ze+")"+"?",Ke="["+Ce+"]?",Ze=Ke+Ge+("(?:"+qe+"(?:"+[Fe,Ue,Qe].join("|")+")"+Ke+Ge+")*"),Ye="(?:"+[Te,Ue,Qe].join("|")+")"+Ze,Xe="(?:"+[Fe+Ne+"?",Ne,Ue,Qe,Ie].join("|")+")",et=RegExp(Me,"g"),tt=RegExp(Ne,"g"),rt=RegExp(ze+"(?="+ze+")|"+Xe+Ze,"g"),nt=RegExp([Be+"?"+Le+"+"+He+"(?="+[Re,Be,"$"].join("|")+")",Je+"+"+We+"(?="+[Re,Be+Ve,"$"].join("|")+")",Be+"?"+Ve+"+"+He,Be+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",De,Ye].join("|"),"g"),ot=RegExp("["+qe+je+xe+Ce+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ut=-1,st={};st[T]=st[L]=st[$]=st[z]=st[F]=st[U]=st[Q]=st[B]=st[q]=!0,st[y]=st[_]=st[N]=st[b]=st[D]=st[E]=st[O]=st[w]=st[x]=st[P]=st[S]=st[C]=st[A]=st[M]=st[R]=!1;var lt={};lt[y]=lt[_]=lt[N]=lt[D]=lt[b]=lt[E]=lt[T]=lt[L]=lt[$]=lt[z]=lt[F]=lt[x]=lt[P]=lt[S]=lt[C]=lt[A]=lt[M]=lt[I]=lt[U]=lt[Q]=lt[B]=lt[q]=!0,lt[O]=lt[w]=lt[R]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,dt=parseInt,ht="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,pt="object"==typeof self&&self&&self.Object===Object&&self,mt=ht||pt||Function("return this")(),vt=t&&!t.nodeType&&t,gt=vt&&e&&!e.nodeType&&e,yt=gt&>.exports===vt,_t=yt&&ht.process,bt=function(){try{var e=gt&>.require&>.require("util").types;return e||_t&&_t.binding&&_t.binding("util")}catch(t){}}(),Et=bt&&bt.isArrayBuffer,Ot=bt&&bt.isDate,wt=bt&&bt.isMap,jt=bt&&bt.isRegExp,xt=bt&&bt.isSet,Pt=bt&&bt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function kt(e,t,r,n){for(var o=-1,a=null==e?0:e.length;++o-1}function Nt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n-1;);return r}function nr(e,t){for(var r=e.length;r--&&Bt(t,e[r],0)>-1;);return r}var or=Wt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),ar=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+ct[e]}function ur(e){return ot.test(e)}function sr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function lr(e,t){return function(r){return e(t(r))}}function cr(e,t){for(var r=-1,n=e.length,o=0,a=[];++r",""":'"',"'":"'"});var gr=function e(t){var r,n=(t=null==t?mt:gr.defaults(mt.Object(),t,gr.pick(mt,it))).Array,ue=t.Date,je=t.Error,xe=t.Function,Pe=t.Math,Se=t.Object,ke=t.RegExp,Ce=t.String,Ae=t.TypeError,Me=n.prototype,Ie=xe.prototype,Re=Se.prototype,Ne=t["__core-js_shared__"],De=Ie.toString,Te=Re.hasOwnProperty,Le=0,$e=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",ze=Re.toString,Fe=De.call(Se),Ue=mt._,Qe=ke("^"+De.call(Te).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=yt?t.Buffer:o,qe=t.Symbol,Ve=t.Uint8Array,Je=Be?Be.allocUnsafe:o,He=lr(Se.getPrototypeOf,Se),We=Se.create,Ge=Re.propertyIsEnumerable,Ke=Me.splice,Ze=qe?qe.isConcatSpreadable:o,Ye=qe?qe.iterator:o,Xe=qe?qe.toStringTag:o,rt=function(){try{var e=ha(Se,"defineProperty");return e({},"",{}),e}catch(t){}}(),ot=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,ct=ue&&ue.now!==mt.Date.now&&ue.now,ht=t.setTimeout!==mt.setTimeout&&t.setTimeout,pt=Pe.ceil,vt=Pe.floor,gt=Se.getOwnPropertySymbols,_t=Be?Be.isBuffer:o,bt=t.isFinite,Ft=Me.join,Wt=lr(Se.keys,Se),yr=Pe.max,_r=Pe.min,br=ue.now,Er=t.parseInt,Or=Pe.random,wr=Me.reverse,jr=ha(t,"DataView"),xr=ha(t,"Map"),Pr=ha(t,"Promise"),Sr=ha(t,"Set"),kr=ha(t,"WeakMap"),Cr=ha(Se,"create"),Ar=kr&&new kr,Mr={},Ir=za(jr),Rr=za(xr),Nr=za(Pr),Dr=za(Sr),Tr=za(kr),Lr=qe?qe.prototype:o,$r=Lr?Lr.valueOf:o,zr=Lr?Lr.toString:o;function Fr(e){if(ru(e)&&!Vi(e)&&!(e instanceof qr)){if(e instanceof Br)return e;if(Te.call(e,"__wrapped__"))return Fa(e)}return new Br(e)}var Ur=function(){function e(){}return function(t){if(!tu(t))return{};if(We)return We(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function Qr(){}function Br(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function qr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ln(e,t,r,n,a,i){var u,s=1&t,l=2&t,c=4&t;if(r&&(u=a?r(e,n,a,i):r(e)),u!==o)return u;if(!tu(e))return e;var f=Vi(e);if(f){if(u=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!s)return Mo(e,u)}else{var d=va(e),h=d==w||d==j;if(Gi(e))return xo(e,s);if(d==S||d==y||h&&!a){if(u=l||h?{}:ya(e),!s)return l?function(e,t){return Io(e,ma(e),t)}(e,function(e,t){return e&&Io(t,Ru(t),e)}(u,e)):function(e,t){return Io(e,pa(e),t)}(e,on(u,e))}else{if(!lt[d])return a?e:{};u=function(e,t,r){var n=e.constructor;switch(t){case N:return Po(e);case b:case E:return new n(+e);case D:return function(e,t){var r=t?Po(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case T:case L:case $:case z:case F:case U:case Q:case B:case q:return So(e,r);case x:return new n;case P:case M:return new n(e);case C:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new n;case I:return o=e,$r?Se($r.call(o)):{}}var o}(e,d,s)}}i||(i=new Gr);var p=i.get(e);if(p)return p;i.set(e,u),uu(e)?e.forEach((function(n){u.add(ln(n,t,r,n,e,i))})):nu(e)&&e.forEach((function(n,o){u.set(o,ln(n,t,r,o,e,i))}));var m=f?o:(c?l?ia:aa:l?Ru:Iu)(e);return Ct(m||e,(function(n,o){m&&(n=e[o=n]),tn(u,o,ln(n,t,r,o,e,i))})),u}function cn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Se(e);n--;){var a=r[n],i=t[a],u=e[a];if(u===o&&!(a in e)||!i(u))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new Ae(a);return Ia((function(){e.apply(o,r)}),t)}function dn(e,t,r,n){var o=-1,a=Rt,i=!0,u=e.length,s=[],l=t.length;if(!u)return s;r&&(t=Dt(t,Xt(r))),n?(a=Nt,i=!1):t.length>=200&&(a=tr,i=!1,t=new Wr(t));e:for(;++o-1},Jr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new Vr,map:new(xr||Jr),string:new Vr}},Hr.prototype.delete=function(e){var t=fa(this,e).delete(e);return this.size-=t?1:0,t},Hr.prototype.get=function(e){return fa(this,e).get(e)},Hr.prototype.has=function(e){return fa(this,e).has(e)},Hr.prototype.set=function(e,t){var r=fa(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Wr.prototype.add=Wr.prototype.push=function(e){return this.__data__.set(e,i),this},Wr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.clear=function(){this.__data__=new Jr,this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Gr.prototype.get=function(e){return this.__data__.get(e)},Gr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Jr){var n=r.__data__;if(!xr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(e,t),this.size=r.size,this};var hn=Do(En),pn=Do(On,!0);function mn(e,t){var r=!0;return hn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function vn(e,t,r){for(var n=-1,a=e.length;++n0&&r(u)?t>1?yn(u,t-1,r,n,o):Tt(o,u):n||(o[o.length]=u)}return o}var _n=To(),bn=To(!0);function En(e,t){return e&&_n(e,t,Iu)}function On(e,t){return e&&bn(e,t,Iu)}function wn(e,t){return It(t,(function(t){return Yi(e[t])}))}function jn(e,t){for(var r=0,n=(t=Eo(t,e)).length;null!=e&&rt}function kn(e,t){return null!=e&&Te.call(e,t)}function Cn(e,t){return null!=e&&t in Se(e)}function An(e,t,r){for(var a=r?Nt:Rt,i=e[0].length,u=e.length,s=u,l=n(u),c=1/0,f=[];s--;){var d=e[s];s&&t&&(d=Dt(d,Xt(t))),c=_r(d.length,c),l[s]=!r&&(t||i>=120&&d.length>=120)?new Wr(s&&d):o}d=e[0];var h=-1,p=l[0];e:for(;++h=u?s:s*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Jn(e,t,r){for(var n=-1,o=t.length,a={};++n-1;)u!==e&&Ke.call(u,s,1),Ke.call(e,s,1);return e}function Wn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==a){var a=o;ba(o)?Ke.call(e,o,1):ho(e,o)}}return e}function Gn(e,t){return e+vt(Or()*(t-e+1))}function Kn(e,t){var r="";if(!e||t<1||t>p)return r;do{t%2&&(r+=e),(t=vt(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Ra(ka(e,t,os),e+"")}function Yn(e){return Zr(Uu(e))}function Xn(e,t){var r=Uu(e);return Ta(r,sn(t,0,r.length))}function eo(e,t,r,n){if(!tu(e))return e;for(var a=-1,i=(t=Eo(t,e)).length,u=i-1,s=e;null!=s&&++aa?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=n(a);++o>>1,i=e[a];null!==i&&!lu(i)&&(r?i<=t:i=200){var l=t?null:Zo(e);if(l)return fr(l);i=!1,o=tr,s=new Wr}else s=t?[]:u;e:for(;++n=n?e:oo(e,t,r)}var jo=ot||function(e){return mt.clearTimeout(e)};function xo(e,t){if(t)return e.slice();var r=e.length,n=Je?Je(r):new e.constructor(r);return e.copy(n),n}function Po(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function So(e,t){var r=t?Po(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function ko(e,t){if(e!==t){var r=e!==o,n=null===e,a=e==e,i=lu(e),u=t!==o,s=null===t,l=t==t,c=lu(t);if(!s&&!c&&!i&&e>t||i&&u&&l&&!s&&!c||n&&u&&l||!r&&l||!a)return 1;if(!n&&!i&&!c&&e1?r[a-1]:o,u=a>2?r[2]:o;for(i=e.length>3&&"function"==typeof i?(a--,i):o,u&&Ea(r[0],r[1],u)&&(i=a<3?o:i,a=1),t=Se(t);++n-1?a[i?t[u]:u]:o}}function Uo(e){return oa((function(t){var r=t.length,n=r,i=Br.prototype.thru;for(e&&t.reverse();n--;){var u=t[n];if("function"!=typeof u)throw new Ae(a);if(i&&!s&&"wrapper"==sa(u))var s=new Br([],!0)}for(n=s?n:r;++n1&&b.reverse(),h&&c<_&&(b.length=c),this&&this!==mt&&this instanceof f&&(P=y||zo(P)),P.apply(x,b)}}function Bo(e,t){return function(r,n){return function(e,t,r,n){return En(e,(function(e,o,a){t(n,r(e),o,a)})),n}(r,e,t(n),{})}}function qo(e,t){return function(r,n){var a;if(r===o&&n===o)return t;if(r!==o&&(a=r),n!==o){if(a===o)return n;"string"==typeof r||"string"==typeof n?(r=co(r),n=co(n)):(r=lo(r),n=lo(n)),a=e(r,n)}return a}}function Vo(e){return oa((function(t){return t=Dt(t,Xt(ca())),Zn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Jo(e,t){var r=(t=t===o?" ":co(t)).length;if(r<2)return r?Kn(t,e):t;var n=Kn(t,pt(e/hr(t)));return ur(t)?wo(pr(n),0,e).join(""):n.slice(0,e)}function Ho(e){return function(t,r,a){return a&&"number"!=typeof a&&Ea(t,r,a)&&(r=a=o),t=pu(t),r===o?(r=t,t=0):r=pu(r),function(e,t,r,o){for(var a=-1,i=yr(pt((t-e)/(r||1)),0),u=n(i);i--;)u[o?i:++a]=e,e+=r;return u}(t,r,a=a===o?ts))return!1;var c=i.get(e),f=i.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=2&r?new Wr:o;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Ct(g,(function(r){var n="_."+r[0];t&r[1]&&!Rt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ce):[]}(n),r)))}function Da(e){var t=0,r=0;return function(){var n=br(),a=16-(n-r);if(r=n,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ta(e,t){var r=-1,n=e.length,a=n-1;for(t=t===o?n:t;++r1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,ii(e,r)}));function hi(e){var t=Fr(e);return t.__chain__=!0,t}function pi(e,t){return t(e)}var mi=oa((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,a=function(t){return un(t,e)};return!(t>1||this.__actions__.length)&&n instanceof qr&&ba(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:pi,args:[a],thisArg:o}),new Br(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(a)}));var vi=Ro((function(e,t,r){Te.call(e,r)?++e[r]:an(e,r,1)}));var gi=Fo(qa),yi=Fo(Va);function _i(e,t){return(Vi(e)?Ct:hn)(e,ca(t,3))}function bi(e,t){return(Vi(e)?At:pn)(e,ca(t,3))}var Ei=Ro((function(e,t,r){Te.call(e,r)?e[r].push(t):an(e,r,[t])}));var Oi=Zn((function(e,t,r){var o=-1,a="function"==typeof t,i=Hi(e)?n(e.length):[];return hn(e,(function(e){i[++o]=a?St(t,e,r):Mn(e,t,r)})),i})),wi=Ro((function(e,t,r){an(e,r,t)}));function ji(e,t){return(Vi(e)?Dt:Fn)(e,ca(t,3))}var xi=Ro((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Pi=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Ea(e,t[0],t[1])?t=[]:r>2&&Ea(t[0],t[1],t[2])&&(t=[t[0]]),Vn(e,yn(t,1),[])})),Si=ct||function(){return mt.Date.now()};function ki(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Xo(e,f,o,o,o,o,t)}function Ci(e,t){var r;if("function"!=typeof t)throw new Ae(a);return e=mu(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var Ai=Zn((function(e,t,r){var n=1;if(r.length){var o=cr(r,la(Ai));n|=l}return Xo(e,n,t,r,o)})),Mi=Zn((function(e,t,r){var n=3;if(r.length){var o=cr(r,la(Mi));n|=l}return Xo(t,n,e,r,o)}));function Ii(e,t,r){var n,i,u,s,l,c,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ae(a);function m(t){var r=n,a=i;return n=i=o,f=t,s=e.apply(a,r)}function v(e){var r=e-c;return c===o||r>=t||r<0||h&&e-f>=u}function g(){var e=Si();if(v(e))return y(e);l=Ia(g,function(e){var r=t-(e-c);return h?_r(r,u-(e-f)):r}(e))}function y(e){return l=o,p&&n?m(e):(n=i=o,s)}function _(){var e=Si(),r=v(e);if(n=arguments,i=this,c=e,r){if(l===o)return function(e){return f=e,l=Ia(g,t),d?m(e):s}(c);if(h)return jo(l),l=Ia(g,t),m(c)}return l===o&&(l=Ia(g,t)),s}return t=gu(t)||0,tu(r)&&(d=!!r.leading,u=(h="maxWait"in r)?yr(gu(r.maxWait)||0,t):u,p="trailing"in r?!!r.trailing:p),_.cancel=function(){l!==o&&jo(l),f=0,n=c=i=l=o},_.flush=function(){return l===o?s:y(Si())},_}var Ri=Zn((function(e,t){return fn(e,1,t)})),Ni=Zn((function(e,t,r){return fn(e,gu(t)||0,r)}));function Di(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(a);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Di.Cache||Hr),r}function Ti(e){if("function"!=typeof e)throw new Ae(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Di.Cache=Hr;var Li=Oo((function(e,t){var r=(t=1==t.length&&Vi(t[0])?Dt(t[0],Xt(ca())):Dt(yn(t,1),Xt(ca()))).length;return Zn((function(n){for(var o=-1,a=_r(n.length,r);++o=t})),qi=In(function(){return arguments}())?In:function(e){return ru(e)&&Te.call(e,"callee")&&!Ge.call(e,"callee")},Vi=n.isArray,Ji=Et?Xt(Et):function(e){return ru(e)&&Pn(e)==N};function Hi(e){return null!=e&&eu(e.length)&&!Yi(e)}function Wi(e){return ru(e)&&Hi(e)}var Gi=_t||gs,Ki=Ot?Xt(Ot):function(e){return ru(e)&&Pn(e)==E};function Zi(e){if(!ru(e))return!1;var t=Pn(e);return t==O||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!au(e)}function Yi(e){if(!tu(e))return!1;var t=Pn(e);return t==w||t==j||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xi(e){return"number"==typeof e&&e==mu(e)}function eu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function tu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ru(e){return null!=e&&"object"==typeof e}var nu=wt?Xt(wt):function(e){return ru(e)&&va(e)==x};function ou(e){return"number"==typeof e||ru(e)&&Pn(e)==P}function au(e){if(!ru(e)||Pn(e)!=S)return!1;var t=He(e);if(null===t)return!0;var r=Te.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&De.call(r)==Fe}var iu=jt?Xt(jt):function(e){return ru(e)&&Pn(e)==C};var uu=xt?Xt(xt):function(e){return ru(e)&&va(e)==A};function su(e){return"string"==typeof e||!Vi(e)&&ru(e)&&Pn(e)==M}function lu(e){return"symbol"==typeof e||ru(e)&&Pn(e)==I}var cu=Pt?Xt(Pt):function(e){return ru(e)&&eu(e.length)&&!!st[Pn(e)]};var fu=Wo(zn),du=Wo((function(e,t){return e<=t}));function hu(e){if(!e)return[];if(Hi(e))return su(e)?pr(e):Mo(e);if(Ye&&e[Ye])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ye]());var t=va(e);return(t==x?sr:t==A?fr:Uu)(e)}function pu(e){return e?(e=gu(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function mu(e){var t=pu(e),r=t%1;return t==t?r?t-r:t:0}function vu(e){return e?sn(mu(e),0,v):0}function gu(e){if("number"==typeof e)return e;if(lu(e))return m;if(tu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var r=ge.test(e);return r||_e.test(e)?dt(e.slice(2),r?2:8):ve.test(e)?m:+e}function yu(e){return Io(e,Ru(e))}function _u(e){return null==e?"":co(e)}var bu=No((function(e,t){if(xa(t)||Hi(t))Io(t,Iu(t),e);else for(var r in t)Te.call(t,r)&&tn(e,r,t[r])})),Eu=No((function(e,t){Io(t,Ru(t),e)})),Ou=No((function(e,t,r,n){Io(t,Ru(t),e,n)})),wu=No((function(e,t,r,n){Io(t,Iu(t),e,n)})),ju=oa(un);var xu=Zn((function(e,t){e=Se(e);var r=-1,n=t.length,a=n>2?t[2]:o;for(a&&Ea(t[0],t[1],a)&&(n=1);++r1),t})),Io(e,ia(e),r),n&&(r=ln(r,7,ra));for(var o=t.length;o--;)ho(r,t[o]);return r}));var Lu=oa((function(e,t){return null==e?{}:function(e,t){return Jn(e,t,(function(t,r){return ku(e,r)}))}(e,t)}));function $u(e,t){if(null==e)return{};var r=Dt(ia(e),(function(e){return[e]}));return t=ca(t),Jn(e,r,(function(e,r){return t(e,r[0])}))}var zu=Yo(Iu),Fu=Yo(Ru);function Uu(e){return null==e?[]:er(e,Iu(e))}var Qu=$o((function(e,t,r){return t=t.toLowerCase(),e+(r?Bu(t):t)}));function Bu(e){return Zu(_u(e).toLowerCase())}function qu(e){return(e=_u(e))&&e.replace(Ee,or).replace(tt,"")}var Vu=$o((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ju=$o((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Hu=Lo("toLowerCase");var Wu=$o((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Gu=$o((function(e,t,r){return e+(r?" ":"")+Zu(t)}));var Ku=$o((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Zu=Lo("toUpperCase");function Yu(e,t,r){return e=_u(e),(t=r?o:t)===o?function(e){return at.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var Xu=Zn((function(e,t){try{return St(e,o,t)}catch(r){return Zi(r)?r:new je(r)}})),es=oa((function(e,t){return Ct(t,(function(t){t=$a(t),an(e,t,Ai(e[t],e))})),e}));function ts(e){return function(){return e}}var rs=Uo(),ns=Uo(!0);function os(e){return e}function as(e){return Tn("function"==typeof e?e:ln(e,1))}var is=Zn((function(e,t){return function(r){return Mn(r,e,t)}})),us=Zn((function(e,t){return function(r){return Mn(e,r,t)}}));function ss(e,t,r){var n=Iu(t),o=wn(t,n);null!=r||tu(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=wn(t,Iu(t)));var a=!(tu(r)&&"chain"in r&&!r.chain),i=Yi(e);return Ct(o,(function(r){var n=t[r];e[r]=n,i&&(e.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=e(this.__wrapped__);return(r.__actions__=Mo(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Tt([this.value()],arguments))})})),e}function ls(){}var cs=Vo(Dt),fs=Vo(Mt),ds=Vo(zt);function hs(e){return Oa(e)?Ht($a(e)):function(e){return function(t){return jn(t,e)}}(e)}var ps=Ho(),ms=Ho(!0);function vs(){return[]}function gs(){return!1}var ys=qo((function(e,t){return e+t}),0),_s=Ko("ceil"),bs=qo((function(e,t){return e/t}),1),Es=Ko("floor");var Os,ws=qo((function(e,t){return e*t}),1),js=Ko("round"),xs=qo((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Ae(a);return e=mu(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=ki,Fr.assign=bu,Fr.assignIn=Eu,Fr.assignInWith=Ou,Fr.assignWith=wu,Fr.at=ju,Fr.before=Ci,Fr.bind=Ai,Fr.bindAll=es,Fr.bindKey=Mi,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vi(e)?e:[e]},Fr.chain=hi,Fr.chunk=function(e,t,r){t=(r?Ea(e,t,r):t===o)?1:yr(mu(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var i=0,u=0,s=n(pt(a/t));ia?0:a+r),(n=n===o||n>a?a:mu(n))<0&&(n+=a),n=r>n?0:vu(n);r>>0)?(e=_u(e))&&("string"==typeof t||null!=t&&!iu(t))&&!(t=co(t))&&ur(e)?wo(pr(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new Ae(a);return t=null==t?0:yr(mu(t),0),Zn((function(r){var n=r[t],o=wo(r,0,t);return n&&Tt(o,n),St(e,this,o)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===o?1:mu(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=n-(t=r||t===o?1:mu(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?mo(e,ca(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?mo(e,ca(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new Ae(a);return tu(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ii(e,t,{leading:n,maxWait:t,trailing:o})},Fr.thru=pi,Fr.toArray=hu,Fr.toPairs=zu,Fr.toPairsIn=Fu,Fr.toPath=function(e){return Vi(e)?Dt(e,$a):lu(e)?[e]:Mo(La(_u(e)))},Fr.toPlainObject=yu,Fr.transform=function(e,t,r){var n=Vi(e),o=n||Gi(e)||cu(e);if(t=ca(t,4),null==r){var a=e&&e.constructor;r=o?n?new a:[]:tu(e)&&Yi(a)?Ur(He(e)):{}}return(o?Ct:En)(e,(function(e,n,o){return t(r,e,n,o)})),r},Fr.unary=function(e){return ki(e,1)},Fr.union=ri,Fr.unionBy=ni,Fr.unionWith=oi,Fr.uniq=function(e){return e&&e.length?fo(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?fo(e,ca(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?fo(e,o,t):[]},Fr.unset=function(e,t){return null==e||ho(e,t)},Fr.unzip=ai,Fr.unzipWith=ii,Fr.update=function(e,t,r){return null==e?e:po(e,t,bo(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:po(e,t,bo(r),n)},Fr.values=Uu,Fr.valuesIn=function(e){return null==e?[]:er(e,Ru(e))},Fr.without=ui,Fr.words=Yu,Fr.wrap=function(e,t){return $i(bo(t),e)},Fr.xor=si,Fr.xorBy=li,Fr.xorWith=ci,Fr.zip=fi,Fr.zipObject=function(e,t){return yo(e||[],t||[],tn)},Fr.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Fr.zipWith=di,Fr.entries=zu,Fr.entriesIn=Fu,Fr.extend=Eu,Fr.extendWith=Ou,ss(Fr,Fr),Fr.add=ys,Fr.attempt=Xu,Fr.camelCase=Qu,Fr.capitalize=Bu,Fr.ceil=_s,Fr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=gu(r))==r?r:0),t!==o&&(t=(t=gu(t))==t?t:0),sn(gu(e),t,r)},Fr.clone=function(e){return ln(e,4)},Fr.cloneDeep=function(e){return ln(e,5)},Fr.cloneDeepWith=function(e,t){return ln(e,5,t="function"==typeof t?t:o)},Fr.cloneWith=function(e,t){return ln(e,4,t="function"==typeof t?t:o)},Fr.conformsTo=function(e,t){return null==t||cn(e,t,Iu(t))},Fr.deburr=qu,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=bs,Fr.endsWith=function(e,t,r){e=_u(e),t=co(t);var n=e.length,a=r=r===o?n:sn(mu(r),0,n);return(r-=t.length)>=0&&e.slice(r,a)==t},Fr.eq=Ui,Fr.escape=function(e){return(e=_u(e))&&Z.test(e)?e.replace(G,ar):e},Fr.escapeRegExp=function(e){return(e=_u(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},Fr.every=function(e,t,r){var n=Vi(e)?Mt:mn;return r&&Ea(e,t,r)&&(t=o),n(e,ca(t,3))},Fr.find=gi,Fr.findIndex=qa,Fr.findKey=function(e,t){return Ut(e,ca(t,3),En)},Fr.findLast=yi,Fr.findLastIndex=Va,Fr.findLastKey=function(e,t){return Ut(e,ca(t,3),On)},Fr.floor=Es,Fr.forEach=_i,Fr.forEachRight=bi,Fr.forIn=function(e,t){return null==e?e:_n(e,ca(t,3),Ru)},Fr.forInRight=function(e,t){return null==e?e:bn(e,ca(t,3),Ru)},Fr.forOwn=function(e,t){return e&&En(e,ca(t,3))},Fr.forOwnRight=function(e,t){return e&&On(e,ca(t,3))},Fr.get=Su,Fr.gt=Qi,Fr.gte=Bi,Fr.has=function(e,t){return null!=e&&ga(e,t,kn)},Fr.hasIn=ku,Fr.head=Ha,Fr.identity=os,Fr.includes=function(e,t,r,n){e=Hi(e)?e:Uu(e),r=r&&!n?mu(r):0;var o=e.length;return r<0&&(r=yr(o+r,0)),su(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Bt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:mu(r);return o<0&&(o=yr(n+o,0)),Bt(e,t,o)},Fr.inRange=function(e,t,r){return t=pu(t),r===o?(r=t,t=0):r=pu(r),function(e,t,r){return e>=_r(t,r)&&e=-9007199254740991&&e<=p},Fr.isSet=uu,Fr.isString=su,Fr.isSymbol=lu,Fr.isTypedArray=cu,Fr.isUndefined=function(e){return e===o},Fr.isWeakMap=function(e){return ru(e)&&va(e)==R},Fr.isWeakSet=function(e){return ru(e)&&"[object WeakSet]"==Pn(e)},Fr.join=function(e,t){return null==e?"":Ft.call(e,t)},Fr.kebabCase=Vu,Fr.last=Za,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n;return r!==o&&(a=(a=mu(r))<0?yr(n+a,0):_r(a,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,a):Qt(e,Vt,a,!0)},Fr.lowerCase=Ju,Fr.lowerFirst=Hu,Fr.lt=fu,Fr.lte=du,Fr.max=function(e){return e&&e.length?vn(e,os,Sn):o},Fr.maxBy=function(e,t){return e&&e.length?vn(e,ca(t,2),Sn):o},Fr.mean=function(e){return Jt(e,os)},Fr.meanBy=function(e,t){return Jt(e,ca(t,2))},Fr.min=function(e){return e&&e.length?vn(e,os,zn):o},Fr.minBy=function(e,t){return e&&e.length?vn(e,ca(t,2),zn):o},Fr.stubArray=vs,Fr.stubFalse=gs,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=ws,Fr.nth=function(e,t){return e&&e.length?qn(e,mu(t)):o},Fr.noConflict=function(){return mt._===this&&(mt._=Ue),this},Fr.noop=ls,Fr.now=Si,Fr.pad=function(e,t,r){e=_u(e);var n=(t=mu(t))?hr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Jo(vt(o),r)+e+Jo(pt(o),r)},Fr.padEnd=function(e,t,r){e=_u(e);var n=(t=mu(t))?hr(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var a=Or();return _r(e+a*(t-e+ft("1e-"+((a+"").length-1))),t)}return Gn(e,t)},Fr.reduce=function(e,t,r){var n=Vi(e)?Lt:Gt,o=arguments.length<3;return n(e,ca(t,4),r,o,hn)},Fr.reduceRight=function(e,t,r){var n=Vi(e)?$t:Gt,o=arguments.length<3;return n(e,ca(t,4),r,o,pn)},Fr.repeat=function(e,t,r){return t=(r?Ea(e,t,r):t===o)?1:mu(t),Kn(_u(e),t)},Fr.replace=function(){var e=arguments,t=_u(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,a=(t=Eo(t,e)).length;for(a||(a=1,e=o);++np)return[];var r=v,n=_r(e,v);t=ca(t),e-=v;for(var o=Zt(n,t);++r=i)return e;var s=r-hr(n);if(s<1)return n;var l=u?wo(u,0,s).join(""):e.slice(0,s);if(a===o)return l+n;if(u&&(s+=l.length-s),iu(a)){if(e.slice(s).search(a)){var c,f=l;for(a.global||(a=ke(a.source,_u(me.exec(a))+"g")),a.lastIndex=0;c=a.exec(f);)var d=c.index;l=l.slice(0,d===o?s:d)}}else if(e.indexOf(co(a),s)!=s){var h=l.lastIndexOf(a);h>-1&&(l=l.slice(0,h))}return l+n},Fr.unescape=function(e){return(e=_u(e))&&K.test(e)?e.replace(W,vr):e},Fr.uniqueId=function(e){var t=++Le;return _u(e)+t},Fr.upperCase=Ku,Fr.upperFirst=Zu,Fr.each=_i,Fr.eachRight=bi,Fr.first=Ha,ss(Fr,(Os={},En(Fr,(function(e,t){Te.call(Fr.prototype,t)||(Os[t]=e)})),Os),{chain:!1}),Fr.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),Ct(["drop","take"],(function(e,t){qr.prototype[e]=function(r){r=r===o?1:yr(mu(r),0);var n=this.__filtered__&&!t?new qr(this):this.clone();return n.__filtered__?n.__takeCount__=_r(r,n.__takeCount__):n.__views__.push({size:_r(r,v),type:e+(n.__dir__<0?"Right":"")}),n},qr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;qr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ca(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Ct(["head","last"],(function(e,t){var r="take"+(t?"Right":"");qr.prototype[e]=function(){return this[r](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");qr.prototype[e]=function(){return this.__filtered__?new qr(this):this[r](1)}})),qr.prototype.compact=function(){return this.filter(os)},qr.prototype.find=function(e){return this.filter(e).head()},qr.prototype.findLast=function(e){return this.reverse().find(e)},qr.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new qr(this):this.map((function(r){return Mn(r,e,t)}))})),qr.prototype.reject=function(e){return this.filter(Ti(ca(e)))},qr.prototype.slice=function(e,t){e=mu(e);var r=this;return r.__filtered__&&(e>0||t<0)?new qr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=mu(t))<0?r.dropRight(-t):r.take(t-e)),r)},qr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qr.prototype.toArray=function(){return this.take(v)},En(qr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),a=Fr[n?"take"+("last"==t?"Right":""):t],i=n||/^find/.test(t);a&&(Fr.prototype[t]=function(){var t=this.__wrapped__,u=n?[1]:arguments,s=t instanceof qr,l=u[0],c=s||Vi(t),f=function(e){var t=a.apply(Fr,Tt([e],u));return n&&d?t[0]:t};c&&r&&"function"==typeof l&&1!=l.length&&(s=c=!1);var d=this.__chain__,h=!!this.__actions__.length,p=i&&!d,m=s&&!h;if(!i&&c){t=m?t:new qr(this);var v=e.apply(t,u);return v.__actions__.push({func:pi,args:[f],thisArg:o}),new Br(v,d)}return p&&m?e.apply(this,u):(v=this.thru(f),p?n?v.value()[0]:v.value():v)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Vi(o)?o:[],e)}return this[r]((function(r){return t.apply(Vi(r)?r:[],e)}))}})),En(qr.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Te.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}})),Mr[Qo(o,2).name]=[{name:"wrapper",func:o}],qr.prototype.clone=function(){var e=new qr(this.__wrapped__);return e.__actions__=Mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mo(this.__views__),e},qr.prototype.reverse=function(){if(this.__filtered__){var e=new qr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Vi(e),n=t<0,o=r?e.length:0,a=function(e,t,r){var n=-1,o=r.length;for(;++n=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof Qr;){var n=Fa(r);n.__index__=0,n.__values__=o,t?a.__wrapped__=n:t=n;var a=n;r=r.__wrapped__}return a.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qr){var t=e;return this.__actions__.length&&(t=new qr(this)),(t=t.reverse()).__actions__.push({func:pi,args:[ti],thisArg:o}),new Br(t,this.__chain__)}return this.thru(ti)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Ye&&(Fr.prototype[Ye]=function(){return this}),Fr}();mt._=gr,(n=function(){return gr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},14556:(e,t,r)=>{var n=r(90369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},17748:(e,t,r)=>{var n=r(68230);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},53506:(e,t,r)=>{var n=r(36584);e.exports=function(e){return null==e?"":n(e)}},9312:(e,t,r)=>{"use strict";const n=r(74681);e.exports=n,n.default=n},74681:e=>{"use strict";e.exports=function(e,r,n){var o,a="";if(t="",arguments.length>1){if("number"==typeof n)for(o=0;o100)return e.replace(n,a);for(var t="",i=0,u=0;un;)e[r]=e[r-1],r--;e[r]=n}return e}},7258:function(e,t,r){var n,o;!function(a,i){"use strict";e.exports?e.exports=i():void 0===(o="function"==typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,a=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(a=7),t=0;t1);u++)r.splice(0,1);n[i]=r.join("")}var s=-1,l=0,c=0,f=-1,d=!1;for(i=0;il&&(s=f,l=c)):"0"===n[i]&&(d=!0,f=i,c=1);c>l&&(s=f,l=c),l>1&&n.splice(s,l,""),o=n.length;var h="";for(""===n[0]&&(h=":"),i=0;i=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},68949:function(e,t,r){var n,o,a;!function(i,u){"use strict";e.exports?e.exports=u(r(1288),r(7258),r(98028)):(o=[r(1288),r(7258),r(98028)],void 0===(a="function"==typeof(n=u)?n.apply(t,o):n)||(e.exports=a))}(0,(function(e,t,r,n){"use strict";var o=n&&n.URI;function a(e,t){var r=arguments.length>=1;if(!(this instanceof a))return r?arguments.length>=2?new a(e,t):new a(e):new a;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}a.version="1.19.11";var i=a.prototype,u=Object.prototype.hasOwnProperty;function s(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function c(e){return"Array"===l(e)}function f(e,t){var r,n,o={};if("RegExp"===l(t))o=null;else if(c(t))for(r=0,n=t.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return a.domAttributes[t]}},a.encode=v,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=v,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(e,t){var r=a.encode(e+"");return void 0===t&&(t=a.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},a.decodeQuery=function(e,t){e+="",void 0===t&&(t=a.escapeQuerySpace);try{return a.decode(t?e.replace(/\+/g,"%20"):e)}catch(r){return e}};var g,y={encode:"encode",decode:"decode"},_=function(e,t){return function(r){try{return a[t](r+"").replace(a.characters[e][t].expression,(function(r){return a.characters[e][t].map[r]}))}catch(n){return r}}};for(g in y)a[g+"PathSegment"]=_("pathname",y[g]),a[g+"UrnPathSegment"]=_("urnpath",y[g]);var b=function(e,t,r){return function(n){var o;o=r?function(e){return a[t](a[r](e))}:a[t];for(var i=(n+"").split(e),u=0,s=i.length;u-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=a.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(a.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=a.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},a.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var i=e.indexOf(":"),u=e.indexOf("/"),s=e.indexOf(":",i+1);-1!==s&&(-1===u||s-1?o:e.length-1);return i>-1&&(-1===o||i-1?h.slice(0,p)+h.slice(p).replace(i,""):h.replace(i,"")).length<=l[0].length||r.ignore&&r.ignore.test(h))){var g=t(h,c,d=c+h.length,e);void 0!==g?(g=String(g),e=e.slice(0,c)+g+e.slice(d),n.lastIndex=c+g.length):n.lastIndex=d}}return n.lastIndex=0,e},a.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=d(a.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(a.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},a.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},i.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},i.clone=function(){return new a(this)},i.valueOf=i.toString=function(){return this.build(!1)._string},i.protocol=E("protocol"),i.username=E("username"),i.password=E("password"),i.hostname=E("hostname"),i.port=E("port"),i.query=O("query","?"),i.fragment=O("fragment","#"),i.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},i.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},i.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?a.decodeUrnPath:a.decodePath)(r):r}return this._parts.urn?this._parts.path=e?a.recodeUrnPath(e):"":this._parts.path=e?a.recodePath(e):"/",this.build(!t),this},i.path=i.pathname,i.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=a._parts();var n=e instanceof a,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[a.getDomAttribute(e)]||"",o=!1);if(!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=a.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var i=n?e._parts:e;for(r in i)"query"!==r&&u.call(this._parts,r)&&(this._parts[r]=i[r]);i.query&&this.query(i.query,!1)}return this.build(!t),this},i.is=function(e){var t=!1,n=!1,o=!1,i=!1,u=!1,s=!1,l=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,n=a.ip4_expression.test(this._parts.hostname),o=a.ip6_expression.test(this._parts.hostname),u=(i=!(t=n||o))&&r&&r.has(this._parts.hostname),s=i&&a.idn_expression.test(this._parts.hostname),l=i&&a.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return i;case"sld":return u;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return s;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var w=i.protocol,j=i.port,x=i.hostname;i.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(a.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return w.call(this,e,t)},i.scheme=i.protocol,i.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),a.ensureValidPort(e))),j.call(this,e,t))},i.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==a.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(e,this._parts.protocol)}return x.call(this,e,t)},i.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=a(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},i.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildHost(this._parts):"";if("/"!==a.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},i.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildAuthority(this._parts):"";if("/"!==a.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},i.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=a.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),a.parseUserinfo(e,this._parts),this.build(!t),this},i.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=a.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},i.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),i=new RegExp("^"+s(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&a.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(i,e),this.build(!t),this},i.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(s(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},i.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var a;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');a=new RegExp(s(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");a=new RegExp(s(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,e)}return this.build(!t),this},i.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?a.decodePath(n):n}var o=this._parts.path.length-this.filename().length,i=this._parts.path.substring(0,o),u=new RegExp("^"+s(i));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=a.recodePath(e),this._parts.path=this._parts.path.replace(u,e),this.build(!t),this},i.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?a.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var i=new RegExp(s(this.filename())+"$");return e=a.recodePath(e),this._parts.path=this._parts.path.replace(i,e),o?this.normalizePath(t):this.build(!t),this},i.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),i=o.lastIndexOf(".");return-1===i?"":(r=o.substring(i+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?a.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var u,l=this.suffix();if(l)u=e?new RegExp(s(l)+"$"):new RegExp(s("."+l)+"$");else{if(!e)return this;this._parts.path+="."+a.recodePath(e)}return u&&(e=a.recodePath(e),this._parts.path=this._parts.path.replace(u,e)),this.build(!t),this},i.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),a="/"===o.substring(0,1),i=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(a&&i.shift(),e<0&&(e=Math.max(i.length+e,0)),void 0===t)return void 0===e?i:i[e];if(null===e||void 0===i[e])if(c(t)){i=[];for(var u=0,s=t.length;u= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function p(e){throw new RangeError(f[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(c,".")).split("."),t).join(".")}function g(e){for(var t,r,n=[],o=0,a=e.length;o=55296&&t<=56319&&o65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=h(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function b(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=u)e=d(e/35);return d(n+36*e/(e+38))}function E(e){var t,r,n,o,a,s,l,c,f,h,m,v=[],g=e.length,_=0,E=128,O=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&p("not-basic"),v.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=g&&p("invalid-input"),((c=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:u)>=u||c>d((i-_)/s))&&p("overflow"),_+=c*s,!(c<(f=l<=O?1:l>=O+26?26:l-O));l+=u)s>d(i/(h=u-f))&&p("overflow"),s*=h;O=b(_-a,t=v.length+1,0==a),d(_/t)>i-E&&p("overflow"),E+=d(_/t),_%=t,v.splice(_++,0,E)}return y(v)}function O(e){var t,r,n,o,a,s,l,c,f,m,v,y,E,O,w,j=[];for(y=(e=g(e)).length,t=128,r=0,a=72,s=0;s=t&&vd((i-r)/(E=n+1))&&p("overflow"),r+=(l-t)*E,t=l,s=0;si&&p("overflow"),v==t){for(c=r,f=u;!(c<(m=f<=a?1:f>=a+26?26:f-a));f+=u)w=c-m,O=u-m,j.push(h(_(m+w%O,0))),c=d(w/O);j.push(h(_(c,0))),a=b(r,E,n==o),r=0,++n}++r,++t}return j.join("")}a={version:"1.3.2",ucs2:{decode:g,encode:y},decode:E,encode:O,toASCII:function(e){return v(e,(function(e){return l.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return v(e,(function(e){return s.test(e)?E(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},92457:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement(o.default.Fragment,null,o.default.createElement(i.TypeLabel,null),"\xa0:\xa0",o.default.createElement(i.FalseLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.default,{values:{id:"json-schema.labels.false"}},"Always invalid")))};const o=n(r(63696)),a=n(r(21312)),i=r(206)},61776:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{schema:t}=e;const r=(0,u.useJSVOptionsContext)(),n="boolean"!=typeof t,c=n?t.description:void 0;return o.default.createElement(o.default.Fragment,null,o.default.createElement(i.TypeLabel,null),"\xa0:\xa0",o.default.createElement(i.TrueLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.default,{values:{id:"json-schema.labels.true"}},"Always valid")),n&&o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(s.QualifierMessages,{schema:t,options:r})),void 0!==c&&o.default.createElement(l.CreateDescription,{description:c}))};const o=n(r(63696)),a=n(r(21312)),i=r(206),u=r(77109),s=r(23986),l=r(91925)},7949:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,l=(0,i.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.BooleanLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:l,nullable:r})),void 0!==n&&o.default.createElement(s.CreateDescription,{description:n}))};const o=n(r(63696)),a=r(23986),i=r(77109),u=r(206),s=r(91925)},23227:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{description:t}=e,{DescriptionComponent:r}=(0,a.useJSVOptionsContext)();return o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},r?o.default.createElement(r,{description:t}):t)};const o=n(r(63696)),a=r(77109)},90803:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,l=(0,i.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.IntegerLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:l,nullable:r})),void 0!==n&&o.default.createElement(s.CreateDescription,{description:n}))};const o=n(r(63696)),a=r(23986),i=r(77109),u=r(206),s=r(91925)},90568:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,description:r}=e,n=(0,i.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.NullLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:n})),void 0!==r&&o.default.createElement(s.CreateDescription,{description:r}))};const o=n(r(63696)),a=r(23986),i=r(77109),u=r(206),s=r(91925)},26828:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,description:r,nullable:n}=e,l=(0,i.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.NumberLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:l,nullable:n})),void 0!==r&&o.default.createElement(s.CreateDescription,{description:r}))};const o=n(r(63696)),a=r(23986),i=r(77109),u=r(206),s=r(91925)},8248:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,l=(0,i.useJSVOptionsContext)(),c=t.format;return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.StringLabel,{format:c}),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:l,nullable:r})),void 0!==n&&o.default.createElement(s.CreateDescription,{description:n}))};const o=n(r(63696)),a=r(23986),i=r(77109),u=r(206),s=r(91925)},12808:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{value:t,schema:r}=e,{ValueComponent:n}=(0,a.useJSVOptionsContext)();if(n)return o.default.createElement(n,{value:t,schema:r});return(0,i.printSchemaType)(t)};const o=n(r(63696)),a=r(77109),i=r(95793)},90198:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.dependencies,n=Object.entries(r).reduce(((e,t)=>{let[r,n]=t;return Array.isArray(n)?e.dependentRequired[r]=n:e.dependentSchemas[r]=n,e}),{dependentRequired:{},dependentSchemas:{}});return o.default.createElement(o.default.Fragment,null,Object.keys(n.dependentRequired).length>0&&o.default.createElement(a.DependentRequired,{schema:{dependentRequired:n.dependentRequired}}),Object.keys(n.dependentSchemas).length>0&&o.default.createElement(a.DependentSchemas,{schema:{dependentSchemas:n.dependentSchemas}}))};const o=n(r(63696)),a=r(16827)},61497:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.dependentRequired,n={allOf:Object.entries(r).map((e=>{let[t,r]=e;return{if:{type:"object",required:[t]},then:{type:"object",required:r}}}))};return o.default.createElement(a.AllOfSchema,{schema:n})};const o=n(r(63696)),a=r(89789)},88046:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.dependentSchemas,n={allOf:Object.entries(r).map((e=>{let[t,r]=e;return{if:{type:"object",required:[t]},then:r}}))};return o.default.createElement(a.AllOfSchema,{schema:n})};const o=n(r(63696)),a=r(89789)},27166:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=void 0!==t.then,n=void 0!==t.else;let c=[{value:"schema_if",label:o.default.createElement(l.IfLabel,null)},r&&{value:"schema_then",label:o.default.createElement(l.ThenLabel,null)},n&&{value:"schema_else",label:o.default.createElement(l.ElseLabel,null)}].filter((e=>"boolean"!=typeof e));return o.default.createElement(i.default,{defaultValue:"schema_if",values:c},c.map((e=>o.default.createElement(a.default,{value:e.value,key:e.value},function(e,t){switch(e){case"schema_if":return o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:"/if"},o.default.createElement(u.CreateNodes,{schema:t.if}));case"schema_then":return o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:"/then"},o.default.createElement(u.CreateNodes,{schema:t.then}));case"schema_else":return o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:"/else"},o.default.createElement(u.CreateNodes,{schema:t.else}))}}(e.value,t)))))};const o=n(r(63696)),a=n(r(19365)),i=n(r(11470)),u=r(57833),s=r(77109),l=r(206)},16827:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaConditional=t.Dependencies=t.DependentSchemas=t.DependentRequired=t.IfElseThen=void 0;var o=r(27166);Object.defineProperty(t,"IfElseThen",{enumerable:!0,get:function(){return n(o).default}});var a=r(61497);Object.defineProperty(t,"DependentRequired",{enumerable:!0,get:function(){return n(a).default}});var i=r(88046);Object.defineProperty(t,"DependentSchemas",{enumerable:!0,get:function(){return n(i).default}});var u=r(90198);Object.defineProperty(t,"Dependencies",{enumerable:!0,get:function(){return n(u).default}});var s=r(62322);Object.defineProperty(t,"SchemaConditional",{enumerable:!0,get:function(){return n(s).default}})},62322:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=void 0!==t.if,n=void 0!==t.dependentRequired,s=void 0!==t.dependentSchemas,l=void 0!==t.dependencies,c=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.schemaConditional"}},"Conditional subschemas"));return o.default.createElement(u.Collapsible,{summary:c,detailsProps:{open:!1}},r&&o.default.createElement(i.IfElseThen,{schema:t}),n&&o.default.createElement(i.DependentRequired,{schema:t}),s&&o.default.createElement(i.DependentSchemas,{schema:t}),l&&o.default.createElement(i.Dependencies,{schema:t}))};const o=n(r(63696)),a=n(r(21312)),i=r(16827),u=r(57833)},18084:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.additionalItems;if(void 0===r||"boolean"==typeof r)return o.default.createElement(o.default.Fragment,null);const n=Array.isArray(t.items)?t.items.length:1;return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/additionalItems"},o.default.createElement(i.CreateEdge,{key:"array_additionalItems",name:o.default.createElement(s,{count:n}),schema:r,required:void 0!==t.minItems&&n>=t.minItems-1})))};const o=n(r(63696)),a=n(r(21312)),i=r(57833),u=r(77109);function s(e){let{count:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.additionalItemsEntry",count:t}},"items[{count},...]"))}},33554:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.contains;if(void 0===r)return o.default.createElement(o.default.Fragment,null);const n=o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.containsEntry"}},"items[..., x, ...]"));return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/contains"},o.default.createElement(i.CreateEdge,{key:"contains",name:n,schema:r,required:void 0!==t.minContains&&t.minContains>0})))};const o=n(r(63696)),a=n(r(21312)),i=r(57833),u=r(77109)},72610:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,p=(0,f.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(d.TypeLabel,null),"\xa0:\xa0",o.default.createElement(d.ArrayLabel,null),o.default.createElement(u.default,{schema:t}),o.default.createElement(a.default,{schema:t}),o.default.createElement(s.default,{schema:t}),o.default.createElement(l.default,{schema:t}),o.default.createElement(i.default,{schema:t}),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(c.QualifierMessages,{schema:t,options:p,nullable:r})),void 0!==n&&o.default.createElement(h.CreateDescription,{description:n}))};const o=n(r(63696)),a=n(r(97579)),i=n(r(33554)),u=n(r(93215)),s=n(r(18084)),l=n(r(87051)),c=r(23986),f=r(77109),d=r(206),h=r(91925)},97579:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.items;if(void 0===r)return o.default.createElement(o.default.Fragment,null);const n=Array.isArray(t.prefixItems)?t.prefixItems.length:0,a=Array.isArray(r),l=Array.isArray(r)?r:[r],c=l.length;return o.default.createElement("ul",null,l.map(((e,r)=>o.default.createElement(u.SchemaHierarchyComponent,{key:`array_items_${r}`,innerJsonPointer:"/items"+(a?`/${r}`:"")},o.default.createElement(i.CreateEdge,{name:o.default.createElement(s,{index:n+r,isArray:a}),schema:e,required:void 0!==t.minItems&&t.minItems>=c})))))};const o=n(r(63696)),a=n(r(21312)),i=r(57833),u=r(77109);function s(e){let{index:t,isArray:r}=e,n=r?t:"x";return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.itemsEntry",index:n}},"items[{index}]"))}},93215:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.prefixItems;if(void 0===r)return o.default.createElement(o.default.Fragment,null);let n=Array.isArray(r),a=Array.isArray(r)?r.length:1,l=Array.isArray(r)?r:[r];return o.default.createElement("ul",null,l.map(((e,r)=>o.default.createElement(u.SchemaHierarchyComponent,{key:`schema_hierarchy_${r}`,innerJsonPointer:"/prefixItems"+(n?`/${r}`:"")},o.default.createElement(i.CreateEdge,{key:`array_prefixItems_${r}`,name:o.default.createElement(s,{count:r}),schema:e,required:void 0!==t.minItems&&t.minItems>=a})))))};const o=n(r(63696)),a=n(r(21312)),i=r(57833),u=r(77109);function s(e){let{count:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.prefixItemsEntry",count:t}},"items[{count}]"))}},87051:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.unevaluatedItems;if(void 0===r||"boolean"==typeof r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/unevaluatedItems"},o.default.createElement(i.CreateEdge,{key:"array_unevaluatedItems",name:o.default.createElement(s,null),schema:r,required:!1})))};const o=n(r(63696)),a=n(r(21312)),i=r(57833),u=r(77109);function s(){return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.unevaluatedItemsEntry"}},"items[y]"))}},92707:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateArray=void 0;var o=r(72610);Object.defineProperty(t,"CreateArray",{enumerable:!0,get:function(){return n(o).default}})},91925:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateValue=t.CreateDescription=t.CreateAlwaysInvalid=t.CreateAlwaysValid=t.CreateNull=t.CreateInteger=t.CreateNumber=t.CreateBoolean=t.CreateString=t.CreateArray=t.CreateObject=t.SchemaConditional=t.SchemaComposition=void 0;var o=r(89789);Object.defineProperty(t,"SchemaComposition",{enumerable:!0,get:function(){return o.SchemaComposition}});var a=r(16827);Object.defineProperty(t,"SchemaConditional",{enumerable:!0,get:function(){return a.SchemaConditional}});var i=r(8277);Object.defineProperty(t,"CreateObject",{enumerable:!0,get:function(){return i.CreateObject}});var u=r(92707);Object.defineProperty(t,"CreateArray",{enumerable:!0,get:function(){return u.CreateArray}});var s=r(8248);Object.defineProperty(t,"CreateString",{enumerable:!0,get:function(){return n(s).default}});var l=r(7949);Object.defineProperty(t,"CreateBoolean",{enumerable:!0,get:function(){return n(l).default}});var c=r(26828);Object.defineProperty(t,"CreateNumber",{enumerable:!0,get:function(){return n(c).default}});var f=r(90803);Object.defineProperty(t,"CreateInteger",{enumerable:!0,get:function(){return n(f).default}});var d=r(90568);Object.defineProperty(t,"CreateNull",{enumerable:!0,get:function(){return n(d).default}});var h=r(61776);Object.defineProperty(t,"CreateAlwaysValid",{enumerable:!0,get:function(){return n(h).default}});var p=r(92457);Object.defineProperty(t,"CreateAlwaysInvalid",{enumerable:!0,get:function(){return n(p).default}});var m=r(23227);Object.defineProperty(t,"CreateDescription",{enumerable:!0,get:function(){return n(m).default}});var v=r(12808);Object.defineProperty(t,"CreateValue",{enumerable:!0,get:function(){return n(v).default}})},39901:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.additionalProperties;if(void 0===r||"boolean"==typeof r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/additionalProperties"},o.default.createElement(i.CreateEdge,{key:"object_additionalProperties",name:o.default.createElement(s,null),schema:r,required:!1})))};const o=n(r(63696)),a=n(r(21312)),i=r(57833),u=r(77109);function s(){return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.additionalProperties"}},"property name*"))}},25642:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,m=(0,d.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(h.TypeLabel,null),"\xa0:\xa0",o.default.createElement(h.ObjectLabel,null),o.default.createElement(l.default,{schema:t}),o.default.createElement(i.default,{schema:t}),o.default.createElement(u.default,{schema:t}),o.default.createElement(s.default,{schema:t}),o.default.createElement(a.default,{schema:t}),o.default.createElement(c.default,{schema:t}),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(f.QualifierMessages,{schema:t,options:m,nullable:r})),void 0!==n&&o.default.createElement(p.CreateDescription,{description:n}))};const o=n(r(63696)),a=n(r(39901)),i=n(r(48576)),u=n(r(6722)),s=n(r(74122)),l=n(r(77487)),c=n(r(40892)),f=r(23986),d=r(77109),h=r(206),p=r(91925)},6722:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=t.patternProperties;if(void 0===r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,Object.entries(r).map((e=>{let[t,r]=e;return o.default.createElement(i.SchemaHierarchyComponent,{key:`object_patternProperties_${t}`,innerJsonPointer:`/patternProperties/${(0,u.encodeStringForJSONPointer)(t)}`},o.default.createElement(a.CreateEdge,{name:o.default.createElement("code",null,t),schema:r,required:!1}))})))};const o=n(r(63696)),a=r(57833),i=r(77109),u=r(23986)},48576:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=t.properties;if(void 0===r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,Object.entries(r).map((e=>{let[r,n]=e;return o.default.createElement(i.SchemaHierarchyComponent,{key:`object_properties_${r}`,innerJsonPointer:`/properties/${(0,u.encodeStringForJSONPointer)(r)}`},o.default.createElement(a.CreateEdge,{name:o.default.createElement("strong",null,r),schema:n,required:!!Array.isArray(t.required)&&t.required.includes(r)}))})))};const o=n(r(63696)),a=r(57833),i=r(77109),u=r(23986)},74122:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.propertyNames;if(void 0===r||"boolean"==typeof r||void 0===r.pattern)return o.default.createElement(o.default.Fragment,null);let n=r.pattern,u={...r};return delete u.pattern,o.default.createElement("ul",null,o.default.createElement(i.SchemaHierarchyComponent,{innerJsonPointer:"/propertyNames"},o.default.createElement(a.CreateEdge,{key:"propertyNames",name:o.default.createElement("code",null,n),schema:u,required:!1})))};const o=n(r(63696)),a=r(57833),i=r(77109)},40892:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.unevaluatedProperties;if(void 0===r||"boolean"==typeof r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/unevaluatedProperties"},o.default.createElement(i.CreateEdge,{key:"object_unevaluatedProperties",name:o.default.createElement(s,null),schema:r,required:!1})))};const o=n(r(63696)),a=n(r(21312)),i=r(57833),u=r(77109);function s(){return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.unevaluatedProperties"}},"property name*"))}},77487:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=t.required||[],n=Object.keys(t.properties||{}),s=r.filter((e=>!n.includes(e)));if(0===s.length)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,s.map(((e,t)=>o.default.createElement(i.SchemaHierarchyComponent,{key:`object_unlisted_properties_${t}`,innerJsonPointer:`/properties/${(0,u.encodeStringForJSONPointer)(e)}`},o.default.createElement(a.CreateEdge,{name:o.default.createElement("strong",null,e),schema:!0,required:!0})))))};const o=n(r(63696)),a=r(57833),i=r(77109),u=r(23986)},8277:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateObject=void 0;var o=r(25642);Object.defineProperty(t,"CreateObject",{enumerable:!0,get:function(){return n(o).default}})},82272:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.allOf,n="allOf";return o.default.createElement("div",null,o.default.createElement("span",{className:"badge badge--info"},n),o.default.createElement(i.default,null,r.map(((e,t)=>o.default.createElement(a.default,{key:`schema_${n}_${t}`,value:`schema_${n}_${t}`,label:o.default.createElement(l.GenerateFriendlyName,{schema:e})},o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:`/allOf/${t}`},o.default.createElement(u.CreateNodes,{schema:e})))))))};const o=n(r(63696)),a=n(r(19365)),i=n(r(11470)),u=r(57833),s=r(77109),l=r(23986)},58221:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.anyOf,n="anyOf";return o.default.createElement("div",null,o.default.createElement("span",{className:"badge badge--info"},n),o.default.createElement(i.default,null,r.map(((e,t)=>o.default.createElement(a.default,{key:`schema_${n}_${t}`,value:`schema_${n}_${t}`,label:o.default.createElement(l.GenerateFriendlyName,{schema:e})},o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:`/anyOf/${t}`},o.default.createElement(u.CreateNodes,{schema:e})))))))};const o=n(r(63696)),a=n(r(19365)),i=n(r(11470)),u=r(57833),s=r(77109),l=r(23986)},89789:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaComposition=t.NotSchema=t.OneOfSchema=t.AnyOfSchema=t.AllOfSchema=void 0;var o=r(82272);Object.defineProperty(t,"AllOfSchema",{enumerable:!0,get:function(){return n(o).default}});var a=r(58221);Object.defineProperty(t,"AnyOfSchema",{enumerable:!0,get:function(){return n(a).default}});var i=r(88191);Object.defineProperty(t,"OneOfSchema",{enumerable:!0,get:function(){return n(i).default}});var u=r(84139);Object.defineProperty(t,"NotSchema",{enumerable:!0,get:function(){return n(u).default}});var s=r(77462);Object.defineProperty(t,"SchemaComposition",{enumerable:!0,get:function(){return n(s).default}})},84139:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.not;return o.default.createElement("div",null,o.default.createElement("span",{className:"badge badge--danger"},"not"),o.default.createElement("br",null),o.default.createElement(i.SchemaHierarchyComponent,{innerJsonPointer:"/not"},o.default.createElement(a.CreateNodes,{schema:r})))};const o=n(r(63696)),a=r(57833),i=r(77109)},88191:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.oneOf,n="oneOf";return o.default.createElement("div",null,o.default.createElement("span",{className:"badge badge--info"},n),o.default.createElement(i.default,null,r.map(((e,t)=>o.default.createElement(a.default,{key:`schema_${n}_${t}`,value:`schema_${n}_${t}`,label:o.default.createElement(l.GenerateFriendlyName,{schema:e})},o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:`/oneOf/${t}`},o.default.createElement(u.CreateNodes,{schema:e})))))))};const o=n(r(63696)),a=n(r(19365)),i=n(r(11470)),u=r(57833),s=r(77109),l=r(23986)},77462:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;return o.default.createElement(o.default.Fragment,null,void 0!==t.oneOf&&o.default.createElement(a.OneOfSchema,{schema:t}),void 0!==t.anyOf&&o.default.createElement(a.AnyOfSchema,{schema:t}),void 0!==t.allOf&&o.default.createElement(a.AllOfSchema,{schema:t}),void 0!==t.not&&o.default.createElement(a.NotSchema,{schema:t}))};const o=n(r(63696)),a=r(89789)},29329:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{summary:t,children:r,detailsProps:n}=e;return o.default.createElement(a.default,{summary:o.default.createElement("summary",null,t),...n},r)};const o=n(r(63696)),a=n(r(41622))},94188:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{name:t,schema:r,required:n}=e;return o.default.createElement(a.SchemaItem,{name:t,schema:r,required:n})};const o=n(r(63696)),a=r(57833)},24432:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;if("boolean"==typeof t)return o.default.createElement(u.CreateValidOrInvalid,{schema:t});const r=(0,s.isSchemaComposition)(t),n=(0,s.isSchemaConditional)(t);return o.default.createElement(o.default.Fragment,null,o.default.createElement(a.CreateTypes,{schema:t}),r&&o.default.createElement(i.SchemaComposition,{schema:t}),n&&o.default.createElement(i.SchemaConditional,{schema:t}))};const o=n(r(63696)),a=r(57833),i=r(91925),u=r(57833),s=r(23986)},1156:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=(0,s.detectedTypes)(t),n=r.includes("null");if(1===r.length||n&&2===r.length){const e=r.find((e=>"null"!==e))||r[0];return o.default.createElement(l,{schema:t,type:e,nullable:n})}if(r.length>1){const e=r.filter((e=>"null"!==e)).map((e=>({value:e,label:o.default.createElement(u.TypeLabelSwitch,{type:e})})));return o.default.createElement(c,{schema:t,types:e,nullable:n})}if(!(0,s.isSchemaComposition)(t))return o.default.createElement(u.CreateValidOrInvalid,{schema:t});return o.default.createElement(o.default.Fragment,null)};const o=n(r(63696)),a=n(r(19365)),i=n(r(11470)),u=r(57833),s=r(23986);function l(e){const{schema:t,type:r,nullable:n}=e;return o.default.createElement(u.RenderProvidedType,{schema:t,type:r,nullable:n})}function c(e){const{schema:t,types:r,nullable:n}=e;return o.default.createElement(i.default,{defaultValue:r[0].value,values:r,key:"multiple_types"},r.map((e=>o.default.createElement(a.default,{key:e.value,value:e.value},o.default.createElement(u.RenderProvidedType,{type:e.value,schema:t,nullable:n})))))}},42927:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;return o.default.createElement(o.default.Fragment,null,t&&o.default.createElement(a.CreateAlwaysValid,{schema:t}),!t&&o.default.createElement(a.CreateAlwaysInvalid,null))};const o=n(r(63696)),a=r(91925)},54222:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{schema:t,type:r,nullable:n}=e;const i={description:t.description,nullable:n};switch(r){case"array":return o.default.createElement(a.CreateArray,{schema:t,...i});case"object":return o.default.createElement(a.CreateObject,{schema:t,...i});case"string":return o.default.createElement(a.CreateString,{schema:t,...i});case"boolean":return o.default.createElement(a.CreateBoolean,{schema:t,...i});case"number":return o.default.createElement(a.CreateNumber,{schema:t,...i});case"integer":return o.default.createElement(a.CreateInteger,{schema:t,...i});default:return o.default.createElement(a.CreateNull,{schema:t,...i})}};const o=n(r(63696)),a=r(91925)},14808:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{schema:t,name:r,required:n}=e;const{jsonPointer:c,level:f}=(0,i.useSchemaHierarchyContext)();let d=t,h="boolean"!=typeof d&&!0===d.deprecated,p="boolean"!=typeof d&&!0===d.readOnly,m="boolean"!=typeof d&&!0===d.writeOnly,v="boolean"!=typeof d&&(void 0!==d.const||Array.isArray(d.enum)&&1===d.enum.length),g=!h&&n;const y=o.default.createElement(o.default.Fragment,null,r,"\xa0",o.default.createElement(s.GenerateFriendlyName,{schema:t}),g&&o.default.createElement(o.default.Fragment,null,"\xa0"),g&&o.default.createElement(u.RequiredLabel,null),h&&o.default.createElement(o.default.Fragment,null,"\xa0"),h&&o.default.createElement(u.DeprecatedLabel,null),p&&o.default.createElement(o.default.Fragment,null,"\xa0"),p&&o.default.createElement(u.ReadOnlyLabel,null),m&&o.default.createElement(o.default.Fragment,null,"\xa0"),m&&o.default.createElement(u.WriteOnlyLabel,null),v&&o.default.createElement(o.default.Fragment,null,"\xa0"),v&&o.default.createElement(u.ConstantLabel,null));return o.default.createElement("li",{className:l.default.schemaItem,id:c,"data-level":f},o.default.createElement(a.Collapsible,{summary:y,detailsProps:{open:!1}},o.default.createElement(o.default.Fragment,null,o.default.createElement(a.CreateNodes,{schema:t}))))};const o=n(r(63696)),a=r(57833),i=r(77109),u=r(206),s=r(23986),l=n(r(15350))},73043:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{type:t,...r}=e;switch(t){case"string":return o.default.createElement(a.StringLabel,{...r});case"number":return o.default.createElement(a.NumberLabel,{...r});case"boolean":return o.default.createElement(a.BooleanLabel,{...r});case"object":return o.default.createElement(a.ObjectLabel,{...r});case"array":return o.default.createElement(a.ArrayLabel,{...r});case"integer":return o.default.createElement(a.IntegerLabel,{...r});case"null":return o.default.createElement(a.NullLabel,{...r});case!0:return o.default.createElement(a.TrueLabel,{...r});case!1:return o.default.createElement(a.FalseLabel,{...r});default:return o.default.createElement("span",{style:{opacity:"0.6"}},t)}};const o=n(r(63696)),a=r(206)},57833:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaItem=t.RenderProvidedType=t.TypeLabelSwitch=t.CreateTypes=t.CreateValidOrInvalid=t.CreateEdge=t.CreateNodes=t.Collapsible=void 0;var o=r(29329);Object.defineProperty(t,"Collapsible",{enumerable:!0,get:function(){return n(o).default}});var a=r(24432);Object.defineProperty(t,"CreateNodes",{enumerable:!0,get:function(){return n(a).default}});var i=r(94188);Object.defineProperty(t,"CreateEdge",{enumerable:!0,get:function(){return n(i).default}});var u=r(42927);Object.defineProperty(t,"CreateValidOrInvalid",{enumerable:!0,get:function(){return n(u).default}});var s=r(1156);Object.defineProperty(t,"CreateTypes",{enumerable:!0,get:function(){return n(s).default}});var l=r(73043);Object.defineProperty(t,"TypeLabelSwitch",{enumerable:!0,get:function(){return n(l).default}});var c=r(54222);Object.defineProperty(t,"RenderProvidedType",{enumerable:!0,get:function(){return n(c).default}});var f=r(14808);Object.defineProperty(t,"SchemaItem",{enumerable:!0,get:function(){return n(f).default}})},77109:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5066),t),o(r(53395),t)},5066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSVOptionsContextProvider=t.useJSVOptionsContext=t.JSVOptionsContext=void 0;const n=r(63696);t.JSVOptionsContext=(0,n.createContext)({fullSchema:!1,showExamples:!1,qualifierMessagesOrder:void 0,DescriptionComponent:void 0,UnresolvedRefsComponent:void 0});t.useJSVOptionsContext=()=>(0,n.useContext)(t.JSVOptionsContext),t.JSVOptionsContextProvider=t.JSVOptionsContext.Provider},53395:function(e,t,r){"use strict";var n,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),i=0;i(0,u.useContext)(t.SchemaHierarchyContext),t.SchemaHierarchyContextProvider=t.SchemaHierarchyContext.Provider},21344:function(e,t,r){"use strict";var n,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),i=0;i{(new s.Resolver).resolve(t,r).then((e=>{l(e.result)})).catch((e=>{a(e)}))}),[]),void 0!==o?u.default.createElement(d,{error:o}):void 0===i?u.default.createElement(f.LoadingLabel,null):u.default.createElement(h,{schema:i,viewerOptions:n,className:e.className})};const u=i(r(63696)),s=r(22681),l=r(57833),c=r(77109),f=r(206);function d(e){const{error:t}=e;return u.default.createElement("div",null,u.default.createElement(f.ErrorOccurredLabel,{error:t}))}function h(e){const{schema:t,viewerOptions:r}=e,n="boolean"!=typeof t&&void 0!==t.title?t.title:"Schema",o={fullSchema:t,...r};return u.default.createElement(c.SchemaHierarchyContextProvider,{value:{jsonPointer:"",level:0}},u.default.createElement(c.JSVOptionsContextProvider,{value:o},u.default.createElement(l.Collapsible,{summary:u.default.createElement("strong",null,n),detailsProps:{open:!0,className:e.className||"json-schema-viewer"}},u.default.createElement(l.CreateNodes,{schema:t}))))}},37655:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(o.default.Fragment,null,"\xa0");return o.default.createElement(o.default.Fragment,null,e,o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.and"}},"AND")),e)};const o=n(r(63696)),a=n(r(21312))},55267:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.array"}},"array"))};const o=n(r(63696)),a=n(r(21312))},80182:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.boolean"}},"boolean"))};const o=n(r(63696)),a=n(r(21312))},31519:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.constant},o.default.createElement(a.default,{values:{id:"json-schema.keywords.const"}},"constant"))};const o=n(r(63696)),a=n(r(21312)),i=n(r(25301))},13661:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.deprecated},o.default.createElement(a.default,{values:{id:"json-schema.keywords.deprecated"}},"deprecated"))};const o=n(r(63696)),a=n(r(21312)),i=n(r(20326))},18889:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.else"}},"Else"))};const o=n(r(63696)),a=n(r(21312))},45863:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{error:t}=e;return o.default.createElement(a.default,{values:{id:"json-schema.labels.errorOccurred",message:t.message}},"Something bad happens : {message}")};const o=n(r(63696)),a=n(r(21312))},14129:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.false"}},"none"))};const o=n(r(63696)),a=n(r(21312))},67731:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.if"}},"If"))};const o=n(r(63696)),a=n(r(21312))},77572:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.integer"}},"integer"))};const o=n(r(63696)),a=n(r(21312))},11954:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("div",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.loading"}},"Loading ...."))};const o=n(r(63696)),a=n(r(21312))},79383:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.not"}},"NOT"))};const o=n(r(63696)),a=n(r(21312))},54717:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.null"}},"null"))};const o=n(r(63696)),a=n(r(21312))},22113:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.number"}},"number"))};const o=n(r(63696)),a=n(r(21312))},93315:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.object"}},"object"))};const o=n(r(63696)),a=n(r(21312))},94401:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(o.default.Fragment,null,"\xa0");return o.default.createElement(o.default.Fragment,null,e,o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.or"}},"OR")),e)};const o=n(r(63696)),a=n(r(21312))},21839:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.readOnly},o.default.createElement(a.default,{values:{id:"json-schema.keywords.readOnly"}},"readOnly"))};const o=n(r(63696)),a=n(r(21312)),i=n(r(93135))},67237:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.required},o.default.createElement(a.default,{values:{id:"json-schema.keywords.required"}},"required"))};const o=n(r(63696)),a=n(r(21312)),i=n(r(22842))},39789:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{format:t}=e;return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.string"}},"string"),void 0!==t&&o.default.createElement(o.default.Fragment,null,"\xa0",`(${t})`))};const o=n(r(63696)),a=n(r(21312))},70691:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.then"}},"Then"))};const o=n(r(63696)),a=n(r(21312))},30984:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.true"}},"any"))};const o=n(r(63696)),a=n(r(21312))},84908:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.type",count:1}},"type"))};const o=n(r(63696)),a=n(r(21312))},33301:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.writeOnly},o.default.createElement(a.default,{values:{id:"json-schema.keywords.writeOnly"}},"writeOnly"))};const o=n(r(63696)),a=n(r(21312)),i=n(r(19504))},90579:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(o.default.Fragment,null,"\xa0");return o.default.createElement(o.default.Fragment,null,e,o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.xor"}},"XOR")),e)};const o=n(r(63696)),a=n(r(21312))},206:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConstantLabel=t.XorLabel=t.NotLabel=t.OrLabel=t.AndLabel=t.NullLabel=t.IntegerLabel=t.NumberLabel=t.BooleanLabel=t.StringLabel=t.FalseLabel=t.TrueLabel=t.WriteOnlyLabel=t.ReadOnlyLabel=t.DeprecatedLabel=t.RequiredLabel=t.ErrorOccurredLabel=t.LoadingLabel=t.ElseLabel=t.ThenLabel=t.IfLabel=t.TypeLabel=t.ArrayLabel=t.ObjectLabel=void 0;var o=r(93315);Object.defineProperty(t,"ObjectLabel",{enumerable:!0,get:function(){return n(o).default}});var a=r(55267);Object.defineProperty(t,"ArrayLabel",{enumerable:!0,get:function(){return n(a).default}});var i=r(84908);Object.defineProperty(t,"TypeLabel",{enumerable:!0,get:function(){return n(i).default}});var u=r(67731);Object.defineProperty(t,"IfLabel",{enumerable:!0,get:function(){return n(u).default}});var s=r(70691);Object.defineProperty(t,"ThenLabel",{enumerable:!0,get:function(){return n(s).default}});var l=r(18889);Object.defineProperty(t,"ElseLabel",{enumerable:!0,get:function(){return n(l).default}});var c=r(11954);Object.defineProperty(t,"LoadingLabel",{enumerable:!0,get:function(){return n(c).default}});var f=r(45863);Object.defineProperty(t,"ErrorOccurredLabel",{enumerable:!0,get:function(){return n(f).default}});var d=r(67237);Object.defineProperty(t,"RequiredLabel",{enumerable:!0,get:function(){return n(d).default}});var h=r(13661);Object.defineProperty(t,"DeprecatedLabel",{enumerable:!0,get:function(){return n(h).default}});var p=r(21839);Object.defineProperty(t,"ReadOnlyLabel",{enumerable:!0,get:function(){return n(p).default}});var m=r(33301);Object.defineProperty(t,"WriteOnlyLabel",{enumerable:!0,get:function(){return n(m).default}});var v=r(30984);Object.defineProperty(t,"TrueLabel",{enumerable:!0,get:function(){return n(v).default}});var g=r(14129);Object.defineProperty(t,"FalseLabel",{enumerable:!0,get:function(){return n(g).default}});var y=r(39789);Object.defineProperty(t,"StringLabel",{enumerable:!0,get:function(){return n(y).default}});var _=r(80182);Object.defineProperty(t,"BooleanLabel",{enumerable:!0,get:function(){return n(_).default}});var b=r(22113);Object.defineProperty(t,"NumberLabel",{enumerable:!0,get:function(){return n(b).default}});var E=r(77572);Object.defineProperty(t,"IntegerLabel",{enumerable:!0,get:function(){return n(E).default}});var O=r(54717);Object.defineProperty(t,"NullLabel",{enumerable:!0,get:function(){return n(O).default}});var w=r(37655);Object.defineProperty(t,"AndLabel",{enumerable:!0,get:function(){return n(w).default}});var j=r(94401);Object.defineProperty(t,"OrLabel",{enumerable:!0,get:function(){return n(j).default}});var x=r(79383);Object.defineProperty(t,"NotLabel",{enumerable:!0,get:function(){return n(x).default}});var P=r(90579);Object.defineProperty(t,"XorLabel",{enumerable:!0,get:function(){return n(P).default}});var S=r(31519);Object.defineProperty(t,"ConstantLabel",{enumerable:!0,get:function(){return n(S).default}})},81804:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t,n=void 0!==r.minContains&&void 0!==r.maxContains;const l=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.contains"}},"Must contain : "));return o.default.createElement("div",{key:n?"minContainsAndmaxContains":void 0!==r.minContains?"minContains":"maxContains"},l,"\xa0",void 0!==r.minContains&&o.default.createElement(u,{value:r.minContains}),n&&o.default.createElement(i.AndLabel,null),void 0!==r.maxContains&&o.default.createElement(s,{value:r.maxContains}))};const o=n(r(63696)),a=n(r(21312)),i=r(206);function u(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.minContains",count:t}},"at least {count} valid item(s)"))}function s(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.maxContains",count:t}},"at most {count} valid item(s)"))}},6718:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=void 0!==t.minItems&&void 0!==t.maxItems;const n=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.lengthItems"}},"Length :"));return o.default.createElement("div",{key:r?"minItemsAndmaxItems":void 0!==t.minItems?"minItems":"maxItems"},n,"\xa0",void 0!==t.minItems&&o.default.createElement(u,{value:t.minItems}),r&&o.default.createElement(i.AndLabel,null),void 0!==t.maxItems&&o.default.createElement(s,{value:t.maxItems}))};const o=n(r(63696)),a=n(r(21312)),i=r(206);function u(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.minItems",count:t}},">= {count}"))}function s(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.maxItems",count:t}},"<= {count}"))}},85075:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.uniqueItems"}},"Unique items :")),t=o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.uniqueItemsOnly"}},"yes"));return o.default.createElement("div",{key:"uniqueItems"},e,"\xa0",t)};const o=n(r(63696)),a=n(r(21312))},5021:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.const"}},"Constant value :"));return o.default.createElement("div",{key:"const"},r,"\xa0",o.default.createElement(i.CreateValue,{value:t.const,schema:t}))};const o=n(r(63696)),a=n(r(21312)),i=r(91925)},29957:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.contentEncoding"}},"Encoding :"));return o.default.createElement("div",{key:"contentEncoding"},r,"\xa0",(0,i.printSchemaType)(t.contentEncoding))};const o=n(r(63696)),a=n(r(21312)),i=r(95793)},43566:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.contentMediaType"}},"Media type :"));return o.default.createElement("div",{key:"contentMediaType"},r,"\xa0",(0,i.printSchemaType)(t.contentMediaType))};const o=n(r(63696)),a=n(r(21312)),i=r(95793)},18907:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.contentSchema"}},"Decoded content must be validated against this schema :"));return o.default.createElement("div",{key:"contentSchema"},r,"\xa0",o.default.createElement(i.Collapsible,{summary:o.default.createElement("strong",null,"Schema"),detailsProps:{open:!0}},o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/contentSchema"},o.default.createElement(i.CreateNodes,{schema:t.contentSchema}))))};const o=n(r(63696)),a=n(r(21312)),i=r(57833),u=r(77109)},80187:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.default"}},"Default value :"));return o.default.createElement("div",{key:"default"},r,"\xa0",o.default.createElement(i.CreateValue,{value:t.default,schema:t}))};const o=n(r(63696)),a=n(r(21312)),i=r(91925)},86128:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.deprecated"}},"Deprecated");return o.default.createElement("div",{key:"deprecated"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(21312))},45656:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.enum"}},"Possible values :"));return o.default.createElement("div",{key:"enum"},r,"\xa0",o.default.createElement("ul",null,t.enum.map(((e,r)=>o.default.createElement("li",{key:r},o.default.createElement(i.CreateValue,{value:e,schema:t}))))))};const o=n(r(63696)),a=n(r(21312)),i=r(91925)},78574:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.examples"}},"Example values :"));let n=t.examples.map(((e,t)=>({id:t,value:e,label:o.default.createElement(a.default,{values:{id:"json-schema.labels.exampleItem",index:t}},"Example {index}")})));return o.default.createElement("div",{key:"examples"},r,"\xa0",o.default.createElement(u.default,null,n.map((e=>o.default.createElement(i.default,{key:e.id,value:e.id.toString(),label:e.label},o.default.createElement(s.CreateValue,{value:e.value,schema:t}))))))};const o=n(r(63696)),a=n(r(21312)),i=n(r(19365)),u=n(r(11470)),s=r(91925)},5948:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.noExtraItems"}},"No extra item(s) are authorized in this array");return o.default.createElement("div",{key:"no-extra-items"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(21312))},22483:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.noExtraProperties"}},"No extra propertie(s) are authorized in this object");return o.default.createElement("div",{key:"no-extra-properties"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(21312))},32652:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.nullable"}},"Nullable");return o.default.createElement("div",{key:"nullable"},"\u2753\xa0",e)};const o=n(r(63696)),a=n(r(21312))},50173:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.exclusiveMinimum||t.minimum,n=void 0!==t.exclusiveMinimum,l=t.exclusiveMaximum||t.maximum,c=void 0!==t.exclusiveMaximum;const f=void 0!==r&&void 0!==l,d=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.numberMinimumMaximum"}},"Possible values :"));return o.default.createElement("div",{key:"number-range"},d,"\xa0",void 0!==r&&o.default.createElement("code",null,o.default.createElement(u,{exclusive:n,value:r})),f&&o.default.createElement(i.AndLabel,null),void 0!==l&&o.default.createElement("code",null,o.default.createElement(s,{exclusive:c,value:l})))};const o=n(r(63696)),a=n(r(21312)),i=r(206);function u(e){let{value:t,exclusive:r}=e;return r?o.default.createElement(a.default,{values:{id:"json-schema.keywords.minimumExlusive",count:t}},"> {count}"):o.default.createElement(a.default,{values:{id:"json-schema.keywords.minimum",count:t}},">= {count}")}function s(e){let{value:t,exclusive:r}=e;return r?o.default.createElement(a.default,{values:{id:"json-schema.keywords.maximumExlusive",count:t}},"< {count}"):o.default.createElement(a.default,{values:{id:"json-schema.keywords.maximum",count:t}},"<= {count}")}},49657:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;return o.default.createElement("div",{key:"multipleOf"},o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.multipleOf"}},"Possible values :")),"\xa0",o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.multipleOf",count:t.multipleOf}},"multiple of {count}")))};const o=n(r(63696)),a=n(r(21312))},91175:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=void 0!==t.minProperties&&void 0!==t.maxProperties;const n=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.lengthProperties"}},"Length :"));return o.default.createElement("div",{key:r?"minPropertiesAndMaxProperties":void 0!==t.minProperties?"minProperties":"maxProperties"},n,"\xa0",void 0!==t.minProperties&&o.default.createElement(u,{value:t.minProperties}),r&&o.default.createElement(i.AndLabel,null),void 0!==t.maxProperties&&o.default.createElement(s,{value:t.maxProperties}))};const o=n(r(63696)),a=n(r(21312)),i=r(206);function u(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.minProperties",count:t}},">= {count} propertie(s)"))}function s(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.maxProperties",count:t}},"<= {count} propertie(s)"))}},45407:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;return o.default.createElement("div",{key:"pattern"},o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.pattern"}},"Pattern :")),"\xa0",o.default.createElement("code",null,t.pattern))};const o=n(r(63696)),a=n(r(21312))},88167:function(e,t,r){"use strict";var n,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),i=0;i{let{nullable:t}=e;return!0===t},Component:()=>s.default.createElement(l.NullableQM,{key:"nullable"})},deprecated:{match:e=>{let{schema:t}=e;return!0===t.deprecated},Component:()=>s.default.createElement(l.DeprecatedQM,{key:"deprecated"})},readOnly:{match:e=>{let{schema:t}=e;return!0===t.readOnly},Component:()=>s.default.createElement(l.ReadOnlyQM,{key:"readOnly"})},writeOnly:{match:e=>{let{schema:t}=e;return!0===t.writeOnly},Component:()=>s.default.createElement(l.WriteOnlyQM,{key:"writeOnly"})},enum:{match:e=>{let{schema:t}=e;return(0,c.isArrayNotEmpty)(t.enum)},Component:e=>{let{schema:t}=e;return s.default.createElement(l.EnumQM,{key:"enum",schema:t})}},stringLength:{match:e=>{let{schema:t}=e;return void 0!==t.minLength||void 0!==t.maxLength},Component:e=>{let{schema:t}=e;return s.default.createElement(l.StringLengthQM,{key:"stringLength",schema:t})}},objectProperties:{match:e=>{let{schema:t}=e;return void 0!==t.minProperties||void 0!==t.maxProperties},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ObjectPropertiesQM,{key:"objectProperties",schema:t})}},"no-extra-properties":{match:e=>{let{schema:t}=e;return!1===t.additionalProperties||!1===t.unevaluatedProperties},Component:()=>s.default.createElement(l.NoExtraPropertiesQM,{key:"no-extra-properties"})},arrayItems:{match:e=>{let{schema:t}=e;return void 0!==t.minItems||void 0!==t.maxItems},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ArrayNumberOfItemsQM,{key:"arrayItems",schema:t})}},arrayContains:{match:e=>{let{schema:t}=e;return void 0!==t.minContains||void 0!==t.maxContains},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ArrayContainsNumberQM,{key:"arrayContains",schema:t})}},"no-extra-items":{match:e=>{let{schema:t}=e;return!1===t.unevaluatedItems||!1===t.items||!1===t.additionalItems},Component:()=>s.default.createElement(l.NoExtraItemsQM,{key:"no-extra-items"})},"number-range":{match:e=>{let{schema:t}=e;return void 0!==t.minimum||void 0!==t.exclusiveMinimum||void 0!==t.maximum||void 0!==t.exclusiveMaximum},Component:e=>{let{schema:t}=e;return s.default.createElement(l.NumberBoundsQM,{key:"number-range",schema:t})}},pattern:{match:e=>{let{schema:t}=e;return void 0!==t.pattern},Component:e=>{let{schema:t}=e;return s.default.createElement(l.PatternQM,{key:"pattern",schema:t})}},multipleOf:{match:e=>{let{schema:t}=e;return void 0!==t.multipleOf},Component:e=>{let{schema:t}=e;return s.default.createElement(l.MultipleOfQM,{key:"multipleOf",schema:t})}},uniqueItems:{match:e=>{let{schema:t}=e;return void 0!==t.uniqueItems&&!0===t.uniqueItems},Component:()=>s.default.createElement(l.ArrayUniqueItemsQM,{key:"uniqueItems"})},default:{match:e=>{let{schema:t}=e;return void 0!==t.default},Component:e=>{let{schema:t}=e;return s.default.createElement(l.DefaultValueQM,{key:"default",schema:t})}},const:{match:e=>{let{schema:t}=e;return void 0!==t.const},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ConstantQM,{key:"const",schema:t})}},examples:{match:e=>{let{schema:t,options:r}=e;return!0===r.showExamples&&(0,c.isArrayNotEmpty)(t.examples)},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ExamplesQM,{key:"examples",schema:t})}},contentMediaType:{match:e=>{let{schema:t}=e;return void 0!==t.contentMediaType},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ContentMediaTypeQM,{key:"contentMediaType",schema:t})}},contentEncoding:{match:e=>{let{schema:t}=e;return void 0!==t.contentEncoding},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ContentEncodingQM,{key:"contentEncoding",schema:t})}},contentSchema:{match:e=>{let{schema:t}=e;return void 0!==t.contentSchema},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ContentSchemaQM,{key:"contentSchema",schema:t})}},unsolvedRefs:{match:e=>{let{schema:t}=e;return(0,c.hasUnresolvedRefs)(t)},Component:e=>s.default.createElement(l.UnsolvedRefsQM,{key:"unsolvedRefs",...e})}};t.CHECKS_MAP=f;t.DEFAULT_ORDER=["nullable","deprecated","readOnly","writeOnly","enum","stringLength","objectProperties","no-extra-properties","arrayItems","arrayContains","no-extra-items","number-range","pattern","multipleOf","uniqueItems","contentEncoding","contentMediaType","contentSchema","default","const","examples","unsolvedRefs"]},44923:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.readOnly"}},"read only");return o.default.createElement("div",{key:"readOnly"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(21312))},80104:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=void 0!==t.minLength&&void 0!==t.maxLength;const n=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.length"}},"Length :"));return o.default.createElement("div",{key:r?"minLengthAndmaxLength":void 0!==t.minLength?"minLength":"maxLength"},n,"\xa0",void 0!==t.minLength&&o.default.createElement(u,{value:t.minLength}),r&&o.default.createElement(i.AndLabel,null),void 0!==t.maxLength&&o.default.createElement(s,{value:t.maxLength}))};const o=n(r(63696)),a=n(r(21312)),i=r(206);function u(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.minLength",count:t}},">= {count} character(s)"))}function s(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.maxLength",count:t}},"<= {count} character(s)"))}},82485:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,options:{UnresolvedRefsComponent:r}}=e,n=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.unsolvedRefs"}},"Unsolved ref(s) :"));let i=[t.$ref,t.$dynamicRef,t.$recursiveRef].filter((e=>void 0!==e)).join(" ");return o.default.createElement("div",{key:"unsolvedRefs"},r?o.default.createElement(r,{schema:t}):o.default.createElement(o.default.Fragment,null,n,"\xa0",i))};const o=n(r(63696)),a=n(r(21312))},95668:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.writeOnly"}},"write only");return o.default.createElement("div",{key:"writeOnly"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(21312))},95793:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QUALIFIERS_DEFAULT_ORDER=t.QUALIFIERS_MAP=t.UnsolvedRefsQM=t.ContentSchemaQM=t.ContentEncodingQM=t.ContentMediaTypeQM=t.NullableQM=t.WriteOnlyQM=t.ReadOnlyQM=t.DeprecatedQM=t.ExamplesQM=t.ConstantQM=t.DefaultValueQM=t.ArrayUniqueItemsQM=t.MultipleOfQM=t.PatternQM=t.NumberBoundsQM=t.NoExtraItemsQM=t.ArrayContainsNumberQM=t.ArrayNumberOfItemsQM=t.NoExtraPropertiesQM=t.ObjectPropertiesQM=t.StringLengthQM=t.EnumQM=void 0,t.printSchemaType=function(e){if(["string","number","bigint","boolean"].includes(typeof e))return o.default.createElement("code",null,e.toString());return o.default.createElement(a.default,{language:"json"},`${JSON.stringify(e)}`)};const o=n(r(63696)),a=n(r(21432));var i=r(45656);Object.defineProperty(t,"EnumQM",{enumerable:!0,get:function(){return n(i).default}});var u=r(80104);Object.defineProperty(t,"StringLengthQM",{enumerable:!0,get:function(){return n(u).default}});var s=r(91175);Object.defineProperty(t,"ObjectPropertiesQM",{enumerable:!0,get:function(){return n(s).default}});var l=r(22483);Object.defineProperty(t,"NoExtraPropertiesQM",{enumerable:!0,get:function(){return n(l).default}});var c=r(6718);Object.defineProperty(t,"ArrayNumberOfItemsQM",{enumerable:!0,get:function(){return n(c).default}});var f=r(81804);Object.defineProperty(t,"ArrayContainsNumberQM",{enumerable:!0,get:function(){return n(f).default}});var d=r(5948);Object.defineProperty(t,"NoExtraItemsQM",{enumerable:!0,get:function(){return n(d).default}});var h=r(50173);Object.defineProperty(t,"NumberBoundsQM",{enumerable:!0,get:function(){return n(h).default}});var p=r(45407);Object.defineProperty(t,"PatternQM",{enumerable:!0,get:function(){return n(p).default}});var m=r(49657);Object.defineProperty(t,"MultipleOfQM",{enumerable:!0,get:function(){return n(m).default}});var v=r(85075);Object.defineProperty(t,"ArrayUniqueItemsQM",{enumerable:!0,get:function(){return n(v).default}});var g=r(80187);Object.defineProperty(t,"DefaultValueQM",{enumerable:!0,get:function(){return n(g).default}});var y=r(5021);Object.defineProperty(t,"ConstantQM",{enumerable:!0,get:function(){return n(y).default}});var _=r(78574);Object.defineProperty(t,"ExamplesQM",{enumerable:!0,get:function(){return n(_).default}});var b=r(86128);Object.defineProperty(t,"DeprecatedQM",{enumerable:!0,get:function(){return n(b).default}});var E=r(44923);Object.defineProperty(t,"ReadOnlyQM",{enumerable:!0,get:function(){return n(E).default}});var O=r(95668);Object.defineProperty(t,"WriteOnlyQM",{enumerable:!0,get:function(){return n(O).default}});var w=r(32652);Object.defineProperty(t,"NullableQM",{enumerable:!0,get:function(){return n(w).default}});var j=r(43566);Object.defineProperty(t,"ContentMediaTypeQM",{enumerable:!0,get:function(){return n(j).default}});var x=r(29957);Object.defineProperty(t,"ContentEncodingQM",{enumerable:!0,get:function(){return n(x).default}});var P=r(18907);Object.defineProperty(t,"ContentSchemaQM",{enumerable:!0,get:function(){return n(P).default}});var S=r(82485);Object.defineProperty(t,"UnsolvedRefsQM",{enumerable:!0,get:function(){return n(S).default}});var k=r(88167);Object.defineProperty(t,"QUALIFIERS_MAP",{enumerable:!0,get:function(){return k.CHECKS_MAP}}),Object.defineProperty(t,"QUALIFIERS_DEFAULT_ORDER",{enumerable:!0,get:function(){return k.DEFAULT_ORDER}})},92766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayNotEmpty=t.hasUnresolvedRefs=t.isNull=t.isBoolean=t.isSchemaConditional=t.isSchemaComposition=t.isInteger=t.isNumeric=t.isStringType=t.isArrayType=t.isObjectType=void 0,t.detectedTypes=function(e){const t=Array.isArray(e.type)?e.type:void 0!==e.type?[e.type]:[];if(0!==t.length)return[...new Set(t)];return[...r(e)]};t.isObjectType=e=>"boolean"!=typeof e&&("object"===e.type||void 0!==e.properties||void 0!==e.additionalProperties||void 0!==e.patternProperties||void 0!==e.propertyNames||void 0!==e.minProperties||void 0!==e.maxProperties||void 0!==e.required||void 0!==e.unevaluatedProperties);t.isArrayType=e=>{var t;return"boolean"!=typeof e&&("array"===e.type||void 0!==e.items||void 0!==e.minItems||void 0!==e.maxItems||void 0!==e.additionalItems||void 0!==e.contains||void 0!==e.minContains||void 0!==e.maxContains||void 0!==e.prefixItems||void 0!==e.unevaluatedItems||Array.isArray(e.const)||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>Array.isArray(e)))))};t.isStringType=e=>{var t;return"boolean"!=typeof e&&("string"===e.type||void 0!==e.minLength||void 0!==e.maxLength||void 0!==e.pattern||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>"string"==typeof e)))||"string"==typeof e.const)};t.isNumeric=e=>{var t;return"boolean"!=typeof e&&("number"===e.type||void 0!==e.multipleOf||void 0!==e.minimum||void 0!==e.exclusiveMinimum||void 0!==e.maximum||void 0!==e.exclusiveMaximum||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>"number"==typeof e)))||"number"==typeof e.const)};t.isInteger=e=>{var t;return"boolean"!=typeof e&&("integer"===e.type||1===e.multipleOf||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>"bigint"==typeof e)))||"bigint"==typeof e.const)};t.isSchemaComposition=e=>"boolean"!=typeof e&&(void 0!==e.allOf||void 0!==e.anyOf||void 0!==e.oneOf||void 0!==e.not);t.isSchemaConditional=e=>"boolean"!=typeof e&&(void 0!==e.if||void 0!==e.dependencies||void 0!==e.dependentRequired||void 0!==e.dependentSchemas);t.isBoolean=e=>{var t;return"boolean"!=typeof e&&("boolean"===e.type||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>"boolean"==typeof e)))||"boolean"==typeof e.const)};t.isNull=e=>{var t;return"boolean"!=typeof e&&("null"===e.type||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>null===e)))||null===e.const)};function*r(e){(0,t.isNull)(e)&&(yield"null"),(0,t.isObjectType)(e)&&(yield"object"),(0,t.isArrayType)(e)&&(yield"array"),(0,t.isStringType)(e)&&(yield"string"),(0,t.isBoolean)(e)&&(yield"boolean"),(0,t.isInteger)(e)&&(yield"integer"),!(0,t.isInteger)(e)&&(0,t.isNumeric)(e)&&(yield"number")}t.hasUnresolvedRefs=e=>"boolean"!=typeof e&&(void 0!==e.$ref||void 0!==e.$dynamicRef||void 0!==e.$recursiveRef);t.isArrayNotEmpty=e=>void 0!==e&&e.length>0},50028:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeStringForJSONPointer=function(e){return e.replace(/~/g,"~0").replace(/\//g,"~1").replace(/%/g,"%25")}},5303:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;const o=n(r(63696)),a=r(23986),i=r(57833),u=r(206);function s(e,t){return!(t<=1)&&e!==t-1}function l(e){let{schema:t}=e;if("boolean"==typeof t)return o.default.createElement(i.TypeLabelSwitch,{type:t});if(t.title)return o.default.createElement(o.default.Fragment,null,t.title);const r=(0,a.detectedTypes)(t);return 0===r.length?o.default.createElement(c,{schema:t}):o.default.createElement(o.default.Fragment,null,r.map(((e,n)=>o.default.createElement(o.default.Fragment,{key:n},o.default.createElement(f,{schema:t,type:e}),s(n,r.length)&&o.default.createElement(u.OrLabel,null)))))}function c(e){let{schema:t}=e;if(void 0!==t.not)return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.NotLabel,null)," ( ",o.default.createElement(l,{schema:t.not})," ) ");if(t.anyOf||t.oneOf||t.allOf){const e=t.anyOf?o.default.createElement(u.OrLabel,null):t.oneOf?o.default.createElement(u.XorLabel,null):o.default.createElement(u.AndLabel,null),r=t.allOf||t.anyOf||t.oneOf;return o.default.createElement(o.default.Fragment,null,r.map(((t,n)=>o.default.createElement(o.default.Fragment,{key:n},o.default.createElement(l,{schema:t}),s(n,r.length)&&e))))}return o.default.createElement(i.TypeLabelSwitch,{type:!0})}function f(e){let{schema:t,type:r}=e;if("string"===r&&void 0!==t.format)return o.default.createElement(i.TypeLabelSwitch,{type:t.format});if("array"===r)return o.default.createElement(d,{schema:t});if(!["array","object"].includes(r)){if(void 0!==t.const)return o.default.createElement("code",null,`${JSON.stringify(t.const)}`);if(void 0!==t.enum&&1===t.enum.length)return o.default.createElement("code",null,`${JSON.stringify(t.enum[0])}`)}return o.default.createElement(i.TypeLabelSwitch,{type:r})}function d(e){let{schema:t}=e;if([void 0,!1].includes(t.items)&&[void 0,!1].includes(t.prefixItems)&&void 0===t.contains)return o.default.createElement(i.TypeLabelSwitch,{type:"array"});let r=[];if(Array.isArray(t.prefixItems)&&r.push(...t.prefixItems.map(((e,t)=>o.default.createElement(l,{schema:e,key:`prefixItems_${t}`})))),void 0!==t.items&&"boolean"!=typeof t.items){let e=Array.isArray(t.items)?t.items:[t.items];r.push(...e.map(((e,t)=>o.default.createElement(l,{schema:e,key:`items_${t}`}))))}return void 0!==t.additionalItems&&"boolean"!=typeof t.additionalItems&&r.push(o.default.createElement(l,{schema:t.additionalItems,key:"additionalItems"})),void 0!==t.unevaluatedItems&&"boolean"!=typeof t.unevaluatedItems&&r.push(o.default.createElement(l,{schema:t.unevaluatedItems,key:"unevaluatedItems"})),void 0!==t.contains&&r.push(o.default.createElement(o.default.Fragment,{key:"before_contains"},"..."),o.default.createElement(l,{schema:t.contains,key:"contains"})),!1!==t.unevaluatedItems&&!1!==t.items&&!1!==t.additionalItems&&r.push(o.default.createElement(o.default.Fragment,{key:"open_tuple"},"...")),o.default.createElement(o.default.Fragment,null,"(",r.map(((e,t)=>o.default.createElement(o.default.Fragment,{key:t},e,s(t,r.length)&&","))),")[]")}},65924:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{options:t}=e,r=t.qualifierMessagesOrder||a.QUALIFIERS_DEFAULT_ORDER;return o.default.createElement(o.default.Fragment,null,r.filter((t=>a.QUALIFIERS_MAP[t].match(e))).map((t=>a.QUALIFIERS_MAP[t].Component(e))))};const o=n(r(63696)),a=r(95793)},23986:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QualifierMessages=t.GenerateFriendlyName=void 0;var i=r(5303);Object.defineProperty(t,"GenerateFriendlyName",{enumerable:!0,get:function(){return a(i).default}});var u=r(65924);Object.defineProperty(t,"QualifierMessages",{enumerable:!0,get:function(){return a(u).default}}),o(r(92766),t),o(r(50028),t)},21432:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>z});var n=r(63696),o=r(92303),a=r(34164),i=r(95293),u=r(6342);function s(){const{prism:e}=(0,u.p)(),{colorMode:t}=(0,i.G)(),r=e.theme,n=e.darkTheme||r;return"dark"===t?n:r}var l=r(17559),c=r(18426),f=r.n(c);const d=/title=(?["'])(?.*?)\1/,h=/\{(?<range>[\d,-]+)\}/,p={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},m={...p,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},v=Object.keys(p);function g(e,t){const r=e.map((e=>{const{start:r,end:n}=m[e];return`(?:${r}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${n})`})).join("|");return new RegExp(`^\\s*(?:${r})\\s*$`)}function y(e,t){let r=e.replace(/\n$/,"");const{language:n,magicComments:o,metastring:a}=t;if(a&&h.test(a)){const e=a.match(h).groups.range;if(0===o.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${a}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=o[0].className,n=f()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(n),code:r}}if(void 0===n)return{lineClassNames:{},code:r};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return g(["js","jsBlock"],t);case"jsx":case"tsx":return g(["js","jsBlock","jsx"],t);case"html":return g(["js","jsBlock","html"],t);case"python":case"py":case"bash":return g(["bash"],t);case"markdown":case"md":return g(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return g(["tex"],t);case"lua":case"haskell":case"sql":return g(["lua"],t);case"wasm":return g(["wasm"],t);case"vb":case"vba":case"visual-basic":return g(["vb","rem"],t);case"vbnet":return g(["vbnet","rem"],t);case"batch":return g(["rem"],t);case"basic":return g(["rem","f90"],t);case"fsharp":return g(["js","ml"],t);case"ocaml":case"sml":return g(["ml"],t);case"fortran":return g(["f90"],t);case"cobol":return g(["cobol"],t);default:return g(v,t)}}(n,o),u=r.split("\n"),s=Object.fromEntries(o.map((e=>[e.className,{start:0,range:""}]))),l=Object.fromEntries(o.filter((e=>e.line)).map((e=>{let{className:t,line:r}=e;return[r,t]}))),c=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:r}=e;return[r.start,t]}))),d=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:r}=e;return[r.end,t]})));for(let f=0;f<u.length;){const e=u[f].match(i);if(!e){f+=1;continue}const t=e.slice(1).find((e=>void 0!==e));l[t]?s[l[t]].range+=`${f},`:c[t]?s[c[t]].start=f:d[t]&&(s[d[t]].range+=`${s[d[t]].start}-${f-1},`),u.splice(f,1)}r=u.join("\n");const p={};return Object.entries(s).forEach((e=>{let[t,{range:r}]=e;f()(r).forEach((e=>{p[e]??=[],p[e].push(t)}))})),{lineClassNames:p,code:r}}const _={codeBlockContainer:"codeBlockContainer_Ckt0"};var b=r(62540);function E(e){let{as:t,...r}=e;const n=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},r={};return Object.entries(e.plain).forEach((e=>{let[n,o]=e;const a=t[n];a&&"string"==typeof o&&(r[a]=o)})),r}(s());return(0,b.jsx)(t,{...r,style:n,className:(0,a.A)(r.className,_.codeBlockContainer,l.G.common.codeBlock)})}const O={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function w(e){let{children:t,className:r}=e;return(0,b.jsx)(E,{as:"pre",tabIndex:0,className:(0,a.A)(O.codeBlockStandalone,"thin-scrollbar",r),children:(0,b.jsx)("code",{className:O.codeBlockLines,children:t})})}var j=r(89532);const x={attributes:!0,characterData:!0,childList:!0,subtree:!0};function P(e,t){const[r,o]=(0,n.useState)(),a=(0,n.useCallback)((()=>{o(e.current?.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,n.useEffect)((()=>{a()}),[a]),function(e,t,r){void 0===r&&(r=x);const o=(0,j._q)(t),a=(0,j.Be)(r);(0,n.useEffect)((()=>{const t=new MutationObserver(o);return e&&t.observe(e,a),()=>t.disconnect()}),[e,o,a])}(r,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),a())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var S=r(71765);const k={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function C(e){let{line:t,classNames:r,showLineNumbers:n,getLineProps:o,getTokenProps:i}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const u=o({line:t,className:(0,a.A)(r,n&&k.codeLine)}),s=t.map(((e,t)=>(0,b.jsx)("span",{...i({token:e})},t)));return(0,b.jsxs)("span",{...u,children:[n?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:k.codeLineNumber}),(0,b.jsx)("span",{className:k.codeLineContent,children:s})]}):s,(0,b.jsx)("br",{})]})}var A=r(21312);function M(e){return(0,b.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,b.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function I(e){return(0,b.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,b.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const R={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function N(e){let{code:t,className:r}=e;const[o,i]=(0,n.useState)(!1),u=(0,n.useRef)(void 0),s=(0,n.useCallback)((()=>{!function(e,t){let{target:r=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const n=document.createElement("textarea"),o=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const a=document.getSelection(),i=a.rangeCount>0&&a.getRangeAt(0);r.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let u=!1;try{u=document.execCommand("copy")}catch{}n.remove(),i&&(a.removeAllRanges(),a.addRange(i)),o&&o.focus()}(t),i(!0),u.current=window.setTimeout((()=>{i(!1)}),1e3)}),[t]);return(0,n.useEffect)((()=>()=>window.clearTimeout(u.current)),[]),(0,b.jsx)("button",{type:"button","aria-label":o?(0,A.translate)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,A.translate)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,A.translate)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,a.A)("clean-btn",r,R.copyButton,o&&R.copyButtonCopied),onClick:s,children:(0,b.jsxs)("span",{className:R.copyButtonIcons,"aria-hidden":"true",children:[(0,b.jsx)(M,{className:R.copyButtonIcon}),(0,b.jsx)(I,{className:R.copyButtonSuccessIcon})]})})}function D(e){return(0,b.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,b.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const T={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function L(e){let{className:t,onClick:r,isEnabled:n}=e;const o=(0,A.translate)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,b.jsx)("button",{type:"button",onClick:r,className:(0,a.A)("clean-btn",t,n&&T.wordWrapButtonEnabled),"aria-label":o,title:o,children:(0,b.jsx)(D,{className:T.wordWrapButtonIcon,"aria-hidden":"true"})})}function $(e){let{children:t,className:r="",metastring:o,title:i,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:f,magicComments:h}}=(0,u.p)(),p=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(r)??f),m=s(),v=function(){const[e,t]=(0,n.useState)(!1),[r,o]=(0,n.useState)(!1),a=(0,n.useRef)(null),i=(0,n.useCallback)((()=>{const r=a.current.querySelector("code");e?r.removeAttribute("style"):(r.style.whiteSpace="pre-wrap",r.style.overflowWrap="anywhere"),t((e=>!e))}),[a,e]),u=(0,n.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=a.current,r=e>t||a.current.querySelector("code").hasAttribute("style");o(r)}),[a]);return P(a,u),(0,n.useEffect)((()=>{u()}),[e,u]),(0,n.useEffect)((()=>(window.addEventListener("resize",u,{passive:!0}),()=>{window.removeEventListener("resize",u)})),[u]),{codeBlockRef:a,isEnabled:e,isCodeScrollable:r,toggle:i}}(),g=function(e){return e?.match(d)?.groups.title??""}(o)||i,{lineClassNames:_,code:w}=y(t,{metastring:o,language:p,magicComments:h}),j=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(o);return(0,b.jsxs)(E,{as:"div",className:(0,a.A)(r,p&&!r.includes(`language-${p}`)&&`language-${p}`),children:[g&&(0,b.jsx)("div",{className:O.codeBlockTitle,children:g}),(0,b.jsxs)("div",{className:O.codeBlockContent,children:[(0,b.jsx)(S.f4,{theme:m,code:w,language:p??"text",children:e=>{let{className:t,style:r,tokens:n,getLineProps:o,getTokenProps:i}=e;return(0,b.jsx)("pre",{tabIndex:0,ref:v.codeBlockRef,className:(0,a.A)(t,O.codeBlock,"thin-scrollbar"),style:r,children:(0,b.jsx)("code",{className:(0,a.A)(O.codeBlockLines,j&&O.codeBlockLinesWithNumbering),children:n.map(((e,t)=>(0,b.jsx)(C,{line:e,getLineProps:o,getTokenProps:i,classNames:_[t],showLineNumbers:j},t)))})})}}),(0,b.jsxs)("div",{className:O.buttonGroup,children:[(v.isEnabled||v.isCodeScrollable)&&(0,b.jsx)(L,{className:O.codeButton,onClick:()=>v.toggle(),isEnabled:v.isEnabled}),(0,b.jsx)(N,{className:O.codeButton,code:w})]})]})]})}function z(e){let{children:t,...r}=e;const a=(0,o.A)(),i=function(e){return n.Children.toArray(e).some((e=>(0,n.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),u="string"==typeof i?$:w;return(0,b.jsx)(u,{...r,children:i},String(a))}},41622:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(63696),o=r(34164),a=r(63427),i=r(92303),u=r(41422);const s={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};var l=r(62540);function c(e){return!!e&&("SUMMARY"===e.tagName||c(e.parentElement))}function f(e,t){return!!e&&(e===t||f(e.parentElement,t))}function d(e){let{summary:t,children:r,...d}=e;(0,a.A)().collectAnchor(d.id);const h=(0,i.A)(),p=(0,n.useRef)(null),{collapsed:m,setCollapsed:v}=(0,u.u)({initialState:!d.open}),[g,y]=(0,n.useState)(d.open),_=n.isValidElement(t)?t:(0,l.jsx)("summary",{children:t??"Details"});return(0,l.jsxs)("details",{...d,ref:p,open:g,"data-collapsed":m,className:(0,o.A)(s.details,h&&s.isBrowser,d.className),onMouseDown:e=>{c(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;c(t)&&f(t,p.current)&&(e.preventDefault(),m?(v(!1),y(!0)):v(!0))},children:[_,(0,l.jsx)(u.N,{lazy:!1,collapsed:m,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{v(e),y(!e)},children:(0,l.jsx)("div",{className:s.collapsibleContent,children:r})})]})}const h={details:"details_b_Ee"},p="alert alert--info";function m(e){let{...t}=e;return(0,l.jsx)(d,{...t,className:(0,o.A)(p,h.details,t.className)})}},19365:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});r(63696);var n=r(34164);const o={tabItem:"tabItem_Ymn6"};var a=r(62540);function i(e){let{children:t,hidden:r,className:i}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,n.A)(o.tabItem,i),hidden:r,children:t})}},11470:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(63696),o=r(34164),a=r(23104),i=r(56347),u=r(205),s=r(57485),l=r(31682),c=r(70679);function f(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function d(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??function(e){return f(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:o}}=e;return{value:t,label:r,attributes:n,default:o}}))}(r);return function(e){const t=(0,l.XI)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[t,r])}function h(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function p(e){let{queryString:t=!1,groupId:r}=e;const o=(0,i.W6)(),a=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s.aZ)(a),(0,n.useCallback)((e=>{if(!a)return;const t=new URLSearchParams(o.location.search);t.set(a,e),o.replace({...o.location,search:t.toString()})}),[a,o])]}function m(e){const{defaultValue:t,queryString:r=!1,groupId:o}=e,a=d(e),[i,s]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(t){if(!h({value:t,tabValues:r}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:a}))),[l,f]=p({queryString:r,groupId:o}),[m,v]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[o,a]=(0,c.Dv)(r);return[o,(0,n.useCallback)((e=>{r&&a.set(e)}),[r,a])]}({groupId:o}),g=(()=>{const e=l??m;return h({value:e,tabValues:a})?e:null})();(0,u.A)((()=>{g&&s(g)}),[g]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!h({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);s(e),f(e),v(e)}),[f,v,a]),tabValues:a}}var v=r(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var y=r(62540);function _(e){let{className:t,block:r,selectedValue:n,selectValue:i,tabValues:u}=e;const s=[],{blockElementScrollPositionUntilNextRender:l}=(0,a.a_)(),c=e=>{const t=e.currentTarget,r=s.indexOf(t),o=u[r].value;o!==n&&(l(t),i(o))},f=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=s.indexOf(e.currentTarget)+1;t=s[r]??s[0];break}case"ArrowLeft":{const r=s.indexOf(e.currentTarget)-1;t=s[r]??s[s.length-1];break}}t?.focus()};return(0,y.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":r},t),children:u.map((e=>{let{value:t,label:r,attributes:a}=e;return(0,y.jsx)("li",{role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:e=>s.push(e),onKeyDown:f,onClick:c,...a,className:(0,o.A)("tabs__item",g.tabItem,a?.className,{"tabs__item--active":n===t}),children:r??t},t)}))})}function b(e){let{lazy:t,children:r,selectedValue:a}=e;const i=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,y.jsx)("div",{className:"margin-top--md",children:i.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a})))})}function E(e){const t=m(e);return(0,y.jsxs)("div",{className:(0,o.A)("tabs-container",g.tabList),children:[(0,y.jsx)(_,{...t,...e}),(0,y.jsx)(b,{...t,...e})]})}function O(e){const t=(0,v.A)();return(0,y.jsx)(E,{...e,children:f(e.children)},String(t))}},15350:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={schemaItem:"schemaItem_b4BA",schemaName:"schemaName_ofZ6",strikethrough:"strikethrough_CDAM"}},25301:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={constant:"constant_q4qm"}},20326:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={deprecated:"deprecated_A1v7"}},93135:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={readOnly:"readOnly_I05C"}},22842:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={required:"required_bs44"}},19504:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={writeOnly:"writeOnly_wo3F"}},18426:(e,t)=>{function r(e){let t,r=[];for(let n of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(n))r.push(parseInt(n,10));else if(t=n.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,n,o,a]=t;if(n&&a){n=parseInt(n),a=parseInt(a);const e=n<a?1:-1;"-"!==o&&".."!==o&&"\u2025"!==o||(a+=e);for(let t=n;t!==a;t+=e)r.push(t)}}return r}t.default=r,e.exports=r},34629:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__addDisposableResource:()=>D,__assign:()=>a,__asyncDelegator:()=>x,__asyncGenerator:()=>j,__asyncValues:()=>P,__await:()=>w,__awaiter:()=>p,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>N,__classPrivateFieldSet:()=>R,__createBinding:()=>v,__decorate:()=>u,__disposeResources:()=>L,__esDecorate:()=>l,__exportStar:()=>g,__extends:()=>o,__generator:()=>m,__importDefault:()=>M,__importStar:()=>A,__makeTemplateObject:()=>S,__metadata:()=>h,__param:()=>s,__propKey:()=>f,__read:()=>_,__rest:()=>i,__rewriteRelativeImportExtension:()=>$,__runInitializers:()=>c,__setFunctionName:()=>d,__spread:()=>b,__spreadArray:()=>O,__spreadArrays:()=>E,__values:()=>y,default:()=>z});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function u(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function s(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var u,s=n.kind,l="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?n.static?e:e.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),d=!1,h=r.length-1;h>=0;h--){var p={};for(var m in n)p[m]="access"===m?{}:n[m];for(var m in n.access)p.access[m]=n.access[m];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var v=(0,r[h])("accessor"===s?{get:f.get,set:f.set}:f[l],p);if("accessor"===s){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(u=i(v.get))&&(f.get=u),(u=i(v.set))&&(f.set=u),(u=i(v.init))&&o.unshift(u)}else(u=i(v))&&("field"===s?o.unshift(u):f[l]=u)}c&&Object.defineProperty(c,n.name,f),d=!0}function c(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(t){a(t)}}function u(e){try{s(n.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))}function m(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(s){u=[6,s],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function g(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(u){o={error:u}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}function E(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,u=a.length;i<u;i++,o++)n[o]=a[i];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function w(e){return this instanceof w?(this.v=e,this):new w(e)}function j(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),n[Symbol.asyncIterator]=function(){return this},n;function i(e,t){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||u(e,t)}))},t&&(n[e]=t(n[e])))}function u(e,t){try{(r=o[e](t)).value instanceof w?Promise.resolve(r.value.v).then(s,l):c(a[0][2],r)}catch(n){c(a[0][3],n)}var r}function s(e){u("next",e)}function l(e){u("throw",e)}function c(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}}function x(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:w(e[n](t)),done:!1}:o?o(t):t}:o}}function P(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=y(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},C=function(e){return C=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},C(e)};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=C(e),n=0;n<r.length;n++)"default"!==r[n]&&v(t,e,r[n]);return k(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function R(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function D(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var T="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function L(e){function t(t){e.error=e.hasError?new T(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,(function(e){return t(e),o()}))}else n|=1}catch(i){t(i)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function $(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,r,n,o,a){return r?t?".jsx":".js":!n||o&&a?n+o+"."+a.toLowerCase()+"js":e})):e}const z={__extends:o,__assign:a,__rest:i,__decorate:u,__param:s,__esDecorate:l,__runInitializers:c,__propKey:f,__setFunctionName:d,__metadata:h,__awaiter:p,__generator:m,__createBinding:v,__exportStar:g,__values:y,__read:_,__spread:b,__spreadArrays:E,__spreadArray:O,__await:w,__asyncGenerator:j,__asyncDelegator:x,__asyncValues:P,__makeTemplateObject:S,__importStar:A,__importDefault:M,__classPrivateFieldGet:I,__classPrivateFieldSet:R,__classPrivateFieldIn:N,__addDisposableResource:D,__disposeResources:L,__rewriteRelativeImportExtension:$}},28453:(e,t,r)=>{"use strict";r.d(t,{R:()=>i,x:()=>u});var n=r(63696);const o={},a=n.createContext(o);function i(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function u(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file +/*! For license information please see common.128e1352.js.LICENSE.txt */ +(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2076],{69911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;t.Cache=class{constructor(e={}){this._stats={hits:0,misses:0},this._data={},this._stdTTL=e.stdTTL}get stats(){return this._stats}get(e){const t=this._data[e];if(t&&(!this._stdTTL||(new Date).getTime()-t.ts<this._stdTTL))return this._stats.hits+=1,t.val;this._stats.misses+=1}set(e,t){this._data[e]={ts:(new Date).getTime(),val:t}}has(e){return e in this._data}purge(){Object.assign(this._stats,{hits:0,misses:0}),this._data={}}}},70177:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveCrawler=void 0;const n=r(68971),o=r(59559),a=r(62832),i=r(79764);t.ResolveCrawler=class{constructor(e,t,r){this._resolved=r,this.resolvers=[],this.pointerGraph=new o.DepGraph({circular:!0}),this.pointerStemGraph=new o.DepGraph({circular:!0}),this.computeGraph=(e,t=[],r="#",n=[])=>{r||(r="#");let o=this._runner.computeRef({val:e,jsonPointer:r,pointerStack:n});if(void 0!==o)this._resolveRef({ref:o,val:e,parentPath:t,pointerStack:n,parentPointer:r,cacheKey:r,resolvingPointer:this.jsonPointer});else if("object"==typeof e)for(const a in e){if(!e.hasOwnProperty(a))continue;const u=e[a],s=i.addToJSONPointer(r,a);o=this._runner.computeRef({key:a,val:u,jsonPointer:s,pointerStack:n}),t.push(a),void 0!==o?this._resolveRef({ref:o,val:u,parentPath:t,parentPointer:s,pointerStack:n,cacheKey:i.uriToJSONPointer(o),resolvingPointer:this.jsonPointer}):"object"==typeof u&&this.computeGraph(u,t,s,n),t.pop()}},this._resolveRef=e=>{const{pointerStack:t,parentPath:r,parentPointer:o,ref:u}=e;if(i.uriIsJSONPointer(u)){if(this._runner.dereferenceInline){const e=i.uriToJSONPointer(u);let l;try{l=(0,n.pointerToPath)(e)}catch(s){return void this._resolved.errors.push({code:"PARSE_POINTER",message:`'${u}' JSON pointer is invalid`,uri:this._runner.baseUri,uriStack:this._runner.uriStack,pointerStack:[],path:[]})}let c=l.length>0;for(const t in l)if(r[t]!==l[t]){c=!1;break}if(c)return;this.pointerStemGraph.hasNode(e)||this.pointerStemGraph.addNode(e);let f="#",d="";for(let t=0;t<r.length;t++){const n=r[t];if(n===l[t])f+=`/${n}`;else{d+=`/${n}`;const t=`${f}${d}`;t!==o&&t!==e&&(this.pointerStemGraph.hasNode(t)||this.pointerStemGraph.addNode(t),this.pointerStemGraph.addDependency(t,e))}}this.pointerGraph.hasNode(o)||this.pointerGraph.addNode(o),this.pointerGraph.hasNode(e)||this.pointerGraph.addNode(e);const h=`${this._runner.baseUri.toString()}${e}`;this._runner.graph.hasNode(h)||this._runner.graph.addNode(h,{refMap:{}}),this._runner.root!==h&&this._runner.graph.addDependency(this._runner.root,h),this.pointerGraph.addDependency(o,e),this.jsonPointer&&(t.length<2||!t.includes(e))&&(t.push(e),this.computeGraph(a(this._runner.source,l),l,e,t),t.pop())}}else{const t=u.toString();this._runner.graph.hasNode(t)||this._runner.graph.addNode(t,{refMap:{}}),this._runner.root!==t&&this._runner.graph.addDependency(this._runner.root,t),this._runner.dereferenceRemote&&!this._runner.atMaxUriDepth()&&this.resolvers.push(this._runner.lookupAndResolveUri(e))}},this.jsonPointer=t,this._runner=e}}},22681:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultGetRef=t.Cache=void 0;r(34629).__exportStar(r(84351),t);var n=r(69911);Object.defineProperty(t,"Cache",{enumerable:!0,get:function(){return n.Cache}});var o=r(22971);Object.defineProperty(t,"defaultGetRef",{enumerable:!0,get:function(){return o.defaultGetRef}})},84351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resolver=void 0;const n=r(59559),o=r(69911),a=r(22971);t.Resolver=class{constructor(e={}){this.ctx={},this.uriCache=e.uriCache||new o.Cache,this.resolvers=e.resolvers||{},this.getRef=e.getRef,this.transformRef=e.transformRef,this.dereferenceInline=void 0===e.dereferenceInline||e.dereferenceInline,this.dereferenceRemote=void 0===e.dereferenceRemote||e.dereferenceRemote,this.parseResolveResult=e.parseResolveResult,this.transformDereferenceResult=e.transformDereferenceResult,this.ctx=e.ctx}resolve(e,t={}){const r=new n.DepGraph({circular:!0});return new a.ResolveRunner(e,r,Object.assign(Object.assign({uriCache:this.uriCache,resolvers:this.resolvers,getRef:this.getRef,transformRef:this.transformRef,dereferenceInline:this.dereferenceInline,dereferenceRemote:this.dereferenceRemote,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult},t),{ctx:Object.assign({},this.ctx||{},t.ctx||{})})).resolve(t)}}},22971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolveRunner=t.defaultGetRef=void 0;const n=r(34629),o=r(68971),a=r(54727),i=r(59559),u=r(83346),s=r(62832),l=r(17748),c=r(68949),f=r(40467),d=r(69911),h=r(70177),p=r(79764),m=r(75919);let v=0;t.defaultGetRef=(e,t)=>{if(t&&"object"==typeof t&&"string"==typeof t.$ref)return t.$ref};class g{constructor(e,r=new i.DepGraph({circular:!0}),u={}){this.ctx={},this.computeRef=e=>{const t=this.getRef(e.key,e.val);if(void 0===t)return;let r=new f.ExtendedURI(t);if("#"!==t[0]){if(this.isFile(r)){let e=r.toString();r.is("absolute")||(e=this.baseUri.toString()?(0,a.join)((0,a.dirname)(this.baseUri.toString()),(0,a.stripRoot)(e)):""),e&&(r=new c((0,a.toFSPath)(e)).fragment(r.fragment()))}else(r.scheme().includes("http")||""===r.scheme()&&this.baseUri.scheme().includes("http"))&&""!==this.baseUri.authority()&&""===r.authority()&&(r=r.absoluteTo(this.baseUri))}return String(r).length>0&&this.isFile(this.baseUri)&&this.isFile(r)&&this.baseUri.path()===r.path()&&(r=new f.ExtendedURI(`#${r.fragment()}`)),this.transformRef?this.transformRef(Object.assign(Object.assign({},e),{ref:r,uri:this.baseUri}),this.ctx):r},this.atMaxUriDepth=()=>this.uriStack.length>=100,this.lookupUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{ref:t}=e;let r=t.scheme();!this.resolvers[r]&&this.isFile(t)&&(r="file");const n=this.resolvers[r];if(!n)throw new Error(`No resolver defined for scheme '${t.scheme()||"file"}' in ref ${t.toString()}`);let o=yield n.resolve(t,this.ctx);if(this.parseResolveResult)try{o=(yield this.parseResolveResult({uriResult:o,result:o,targetAuthority:t,parentAuthority:this.baseUri,parentPath:e.parentPath,fragment:e.fragment})).result}catch(a){throw new Error(`Could not parse remote reference response for '${t.toString()}' - ${String(a)}`)}return new g(o,this.graph,{depth:this.depth+1,baseUri:t.toString(),root:t,uriStack:this.uriStack,uriCache:this.uriCache,resolvers:this.resolvers,transformRef:this.transformRef,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult,dereferenceRemote:this.dereferenceRemote,dereferenceInline:this.dereferenceInline,ctx:this.ctx})})),this.lookupAndResolveUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{val:t,ref:r,resolvingPointer:n,parentPointer:a,pointerStack:i}=e,u=e.parentPath?e.parentPath.slice():[],s=this.computeUriCacheKey(r),c={uri:r,pointerStack:i,targetPath:n===a?[]:u};if(this.uriStack.includes(s))return c.resolved={result:t,graph:this.graph,refMap:{},errors:[],runner:this},c;{let e;const n=this.baseUri.toString(),a=n&&0!==this.depth?n:null;try{if(this.atMaxUriDepth())throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`);e=yield this.lookupUri({ref:r.clone().fragment(""),fragment:r.fragment(),cacheKey:s,parentPath:u}),a&&(e.uriStack=e.uriStack.concat(a))}catch(f){c.error={code:"RESOLVE_URI",message:String(f),uri:r,uriStack:a?this.uriStack.concat(a):this.uriStack,pointerStack:i,path:u}}if(e&&(c.resolved=yield e.resolve({jsonPointer:p.uriToJSONPointer(r),parentPath:u}),c.resolved.errors.length))for(const i of c.resolved.errors)if("POINTER_MISSING"===i.code&&i.path.join("/")===r.fragment().slice(1)){const e=r.fragment?(0,o.trimStart)(i.path,(0,o.trimStart)(r.fragment(),"/").split("/")):i.path;e&&e.length?l(c.resolved.result,e,t):c.resolved.result&&(c.resolved.result=t)}}return c})),this.id=v+=1,this.depth=u.depth||0,this._source=e,this.resolvers=u.resolvers||{};const s=u.baseUri||"";let h=new c(s||"");this.isFile(h)&&(h=new c((0,a.toFSPath)(s))),this.baseUri=h,this.uriStack=u.uriStack||[],this.uriCache=u.uriCache||new d.Cache,this.root=u.root&&u.root.toString()||this.baseUri.toString()||"root",this.graph=r,this.graph.hasNode(this.root)||this.graph.addNode(this.root,{refMap:{},data:this._source}),this.baseUri&&0===this.depth&&this.uriCache.set(this.computeUriCacheKey(this.baseUri),this),this.getRef=u.getRef||t.defaultGetRef,this.transformRef=u.transformRef,this.depth?this.dereferenceInline=!0:this.dereferenceInline=void 0===u.dereferenceInline||u.dereferenceInline,this.dereferenceRemote=void 0===u.dereferenceRemote||u.dereferenceRemote,this.parseResolveResult=u.parseResolveResult,this.transformDereferenceResult=u.transformDereferenceResult,this.ctx=u.ctx,this.lookupUri=m(this.lookupUri,{serializer:this._cacheKeySerializer,cache:{create:()=>this.uriCache}})}get source(){return this._source}resolve(e){return n.__awaiter(this,void 0,void 0,(function*(){const t={result:this.source,graph:this.graph,refMap:{},errors:[],runner:this};let r;const n=e&&e.jsonPointer&&e.jsonPointer.trim();if(n&&"#"!==n&&"#/"!==n){try{r=(0,o.pointerToPath)(n)}catch(f){return t.errors.push({code:"PARSE_POINTER",message:`'${n}' JSON pointer is invalid`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:[]}),t}t.result=s(t.result,r)}if(void 0===t.result)return t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist @ '${this.baseUri.toString()}'`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:r||[]}),t;const a=new h.ResolveCrawler(this,n,t);a.computeGraph(t.result,r,n||"");let i=[];if(a.resolvers.length&&(i=yield Promise.all(a.resolvers)),i.length)for(const e of i){let n=e.targetPath;n.length||(n=r||[]),t.refMap[String(this.baseUri.clone().fragment((0,o.pathToPointer)(n)))]=String(e.uri),this._setGraphNodeEdge(String(this.root),(0,o.pathToPointer)(n),String(e.uri)),e.error&&t.errors.push(e.error),e.resolved&&(e.resolved.errors&&(t.errors=t.errors.concat(e.resolved.errors)),void 0!==e.resolved.result&&(this._source=(0,u.default)(this._source,(t=>{if(e.resolved){if(!n.length)return e.resolved.result;l(t,n,e.resolved.result),this._setGraphNodeData(String(e.uri),e.resolved.result)}}))))}if("object"==typeof this._source?(this.dereferenceInline&&(this._source=(0,u.default)(this._source,(e=>{let r=[];try{r=a.pointerGraph.overallOrder();for(const n of r){const r=a.pointerGraph.dependantsOf(n);if(!r.length)continue;const i=(0,o.pointerToPath)(n),c=0===i.length?(0,u.original)(e):s(e,i);for(const u of r){let r;const s=(0,o.pointerToPath)(u),f=a.pointerStemGraph.dependenciesOf(n);for(const e of f)if((0,o.startsWith)(s,(0,o.pointerToPath)(e))){r=!0;break}r||(t.refMap[(0,o.pathToPointer)(s)]=(0,o.pathToPointer)(i),this._setGraphNodeEdge(this.root,(0,o.pathToPointer)(s),(0,o.pathToPointer)(i)),void 0!==c?(l(e,s,c),this._setGraphNodeData((0,o.pathToPointer)(i),c)):t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist`,path:s,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[]}))}}}catch(n){}}))),t.result=r?s(this._source,r):this._source):t.result=this._source,this.transformDereferenceResult){const o=new c(n||"");try{const{result:r,error:n}=yield this.transformDereferenceResult({source:this.source,result:t.result,targetAuthority:o,parentAuthority:this.baseUri,parentPath:e&&e.parentPath||[],fragment:o.fragment()});if(t.result=r,n)throw new Error(`Could not transform dereferenced result for '${o.toString()}' - ${String(n)}`)}catch(d){t.errors.push({code:"TRANSFORM_DEREFERENCED",message:`Error: Could not transform dereferenced result for '${this.baseUri.toString()}${""!==o.fragment()?`#${o.fragment()}`:""}' - ${String(d)}`,uri:o,uriStack:this.uriStack,pointerStack:[],path:r})}}return this._setGraphNodeData(this.root,this._source),t}))}_cacheKeySerializer(e){return e&&"object"==typeof e&&e.cacheKey?e.cacheKey:JSON.stringify(arguments)}computeUriCacheKey(e){return e.clone().fragment("").toString()}isFile(e){const t=e.scheme();if("file"===t)return!0;if(t){if(!this.resolvers[t])return!0}else{if("/"===e.toString().charAt(0))return!0;if(this.baseUri){const e=this.baseUri.scheme();return Boolean(!e||"file"===e||!this.resolvers[e])}}return!1}_setGraphNodeData(e,t){if(!this.graph.hasNode(e))return;const r=this.graph.getNodeData(e)||{};r.data=t,this.graph.setNodeData(e,r)}_setGraphNodeEdge(e,t,r){if(!this.graph.hasNode(e))return;const n=this.graph.getNodeData(e)||{};n.refMap=n.refMap||{},n.refMap[t]=r,this.graph.setNodeData(e,n)}}t.ResolveRunner=g},40467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedURI=void 0;const n=r(68949);t.ExtendedURI=class extends n{constructor(e){super(e),this._value=e.trim()}get length(){return this._value.length}}},79764:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uriIsJSONPointer=t.uriToJSONPointer=t.addToJSONPointer=void 0;const r=(e,t,r)=>{const n=e.toString();let o="",a=n,i=0,u=a.indexOf(t);for(;u>-1;)o+=n.substring(i,i+u)+r,a=a.substring(u+t.length,a.length),i+=u+t.length,u=a.indexOf(t);return a.length>0&&(o+=n.substring(n.length-a.length,n.length)),o};t.addToJSONPointer=(e,t)=>{return`${e}/${n=t,r(r(n,"~","~0"),"/","~1")}`;var n};t.uriToJSONPointer=e=>"length"in e&&0===e.length?"":""!==e.fragment()?`#${e.fragment()}`:""===e.href()?"#":"";t.uriIsJSONPointer=e=>(!("length"in e)||e.length>0)&&""===e.path()},68971:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BUNDLE_ROOT:()=>ne,ERRORS_ROOT:()=>oe,KEYS:()=>Re,bundleTarget:()=>ae,decodePointer:()=>V,decodePointerFragment:()=>ue,decodePointerUriFragment:()=>V,decycle:()=>se,encodePointer:()=>le,encodePointerFragment:()=>L,encodePointerUriFragment:()=>F,encodeUriPointer:()=>z,extractPointerFromRef:()=>ce,extractSourceFromRef:()=>Y,getFirstPrimitiveProperty:()=>fe,getJsonPathForPosition:()=>de,getLastPathSegment:()=>he,getLocationForJsonPath:()=>pe,hasRef:()=>N,isExternalRef:()=>Z,isLocalRef:()=>D,isPlainObject:()=>A,parseTree:()=>ve,parseWithPointers:()=>me,pathToPointer:()=>U,pointerToPath:()=>J,remapRefs:()=>K,renameObjectKey:()=>be,reparentBundleTarget:()=>Oe,resolveExternalRef:()=>je,resolveExternalRefWithLocation:()=>xe,resolveInlineRef:()=>te,resolveInlineRefWithLocation:()=>re,safeParse:()=>Pe,safeStringify:()=>ke,startsWith:()=>Ce,stringify:()=>Ae,toPropertyPath:()=>Me,trapAccess:()=>De,traverse:()=>G,trimStart:()=>Te});var n,o=r(17243),a=r(54727);function i(e,t){void 0===t&&(t=!1);var r=e.length,n=0,o="",a=0,i=16,c=0,f=0,d=0,h=0,p=0;function m(t,r){for(var o=0,a=0;o<t||!r;){var i=e.charCodeAt(n);if(i>=48&&i<=57)a=16*a+i-48;else if(i>=65&&i<=70)a=16*a+i-65+10;else{if(!(i>=97&&i<=102))break;a=16*a+i-97+10}n++,o++}return o<t&&(a=-1),a}function v(){if(o="",p=0,a=n,f=c,h=d,n>=r)return a=r,i=17;var t=e.charCodeAt(n);if(u(t)){do{n++,o+=String.fromCharCode(t),t=e.charCodeAt(n)}while(u(t));return i=15}if(s(t))return n++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,o+="\n"),c++,d=n,i=14;switch(t){case 123:return n++,i=1;case 125:return n++,i=2;case 91:return n++,i=3;case 93:return n++,i=4;case 58:return n++,i=6;case 44:return n++,i=5;case 34:return n++,o=function(){for(var t="",o=n;;){if(n>=r){t+=e.substring(o,n),p=2;break}var a=e.charCodeAt(n);if(34===a){t+=e.substring(o,n),n++;break}if(92!==a){if(a>=0&&a<=31){if(s(a)){t+=e.substring(o,n),p=2;break}p=6}n++}else{if(t+=e.substring(o,n),++n>=r){p=2;break}switch(e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var i=m(4,!0);i>=0?t+=String.fromCharCode(i):p=4;break;default:p=5}o=n}}return t}(),i=10;case 47:var v=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n<r&&!s(e.charCodeAt(n));)n++;return o=e.substring(v,n),i=12}if(42===e.charCodeAt(n+1)){n+=2;for(var y=r-1,_=!1;n<y;){var b=e.charCodeAt(n);if(42===b&&47===e.charCodeAt(n+1)){n+=2,_=!0;break}n++,s(b)&&(13===b&&10===e.charCodeAt(n)&&n++,c++,d=n)}return _||(n++,p=1),o=e.substring(v,n),i=13}return o+=String.fromCharCode(t),n++,i=16;case 45:if(o+=String.fromCharCode(t),++n===r||!l(e.charCodeAt(n)))return i=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=function(){var t=n;if(48===e.charCodeAt(n))n++;else for(n++;n<e.length&&l(e.charCodeAt(n));)n++;if(n<e.length&&46===e.charCodeAt(n)){if(!(++n<e.length&&l(e.charCodeAt(n))))return p=3,e.substring(t,n);for(n++;n<e.length&&l(e.charCodeAt(n));)n++}var r=n;if(n<e.length&&(69===e.charCodeAt(n)||101===e.charCodeAt(n)))if((++n<e.length&&43===e.charCodeAt(n)||45===e.charCodeAt(n))&&n++,n<e.length&&l(e.charCodeAt(n))){for(n++;n<e.length&&l(e.charCodeAt(n));)n++;r=n}else p=3;return e.substring(t,r)}(),i=11;default:for(;n<r&&g(t);)n++,t=e.charCodeAt(n);if(a!==n){switch(o=e.substring(a,n)){case"true":return i=8;case"false":return i=9;case"null":return i=7}return i=16}return o+=String.fromCharCode(t),n++,i=16}}function g(e){if(u(e)||s(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){n=e,o="",a=0,i=16,p=0},getPosition:function(){return n},scan:t?function(){var e;do{e=v()}while(e>=12&&e<=15);return e}:v,getToken:function(){return i},getTokenValue:function(){return o},getTokenOffset:function(){return a},getTokenLength:function(){return n-a},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return a-h},getTokenError:function(){return p}}}function u(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function s(e){return 10===e||13===e||8232===e||8233===e}function l(e){return e>=48&&e<=57}function c(e,t,r){void 0===r&&(r=n.DEFAULT);var o=i(e,!1);function a(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function u(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}var s=a(t.onObjectBegin),l=u(t.onObjectProperty),c=a(t.onObjectEnd),f=a(t.onArrayBegin),d=a(t.onArrayEnd),h=u(t.onLiteralValue),p=u(t.onSeparator),m=a(t.onComment),v=u(t.onError),g=r&&r.disallowComments,y=r&&r.allowTrailingComma;function _(){for(;;){var e=o.scan();switch(o.getTokenError()){case 4:b(14);break;case 5:b(15);break;case 3:b(13);break;case 1:g||b(11);break;case 2:b(12);break;case 6:b(16)}switch(e){case 12:case 13:g?b(10):m();break;case 16:b(1);break;case 15:case 14:break;default:return e}}}function b(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=[]),v(e),t.length+r.length>0)for(var n=o.getToken();17!==n;){if(-1!==t.indexOf(n)){_();break}if(-1!==r.indexOf(n))break;n=_()}}function E(e){var t=o.getTokenValue();return e?h(t):l(t),_(),!0}function O(){switch(o.getToken()){case 3:return function(){f(),_();for(var e=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||b(4,[],[]),p(","),_(),4===o.getToken()&&y)break}else e&&b(6,[],[]);O()||b(4,[],[4,5]),e=!0}return d(),4!==o.getToken()?b(8,[4],[]):_(),!0}();case 1:return function(){s(),_();for(var e=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||b(4,[],[]),p(","),_(),2===o.getToken()&&y)break}else e&&b(6,[],[]);(10!==o.getToken()?(b(3,[],[2,5]),0):(E(!1),6===o.getToken()?(p(":"),_(),O()||b(4,[],[2,5])):b(5,[],[2,5]),1))||b(4,[],[2,5]),e=!0}return c(),2!==o.getToken()?b(7,[2],[]):_(),!0}();case 10:return E(!0);default:return function(){switch(o.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(o.getTokenValue()))&&(b(2),e=0)}catch(t){b(2)}h(e);break;case 7:h(null);break;case 8:h(!0);break;case 9:h(!1);break;default:return!1}return _(),!0}()}}return _(),17===o.getToken()?!!r.allowEmptyContent||(b(4,[],[]),!1):O()?(17!==o.getToken()&&b(9,[],[]),!0):(b(4,[],[]),!1)}!function(e){e.DEFAULT={allowTrailingComma:!1}}(n||(n={}));var f=i,d=function e(t,r,n){if(void 0===n&&(n=!1),function(e,t,r){return void 0===r&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}(t,r,n)){var o=t.children;if(Array.isArray(o))for(var a=0;a<o.length&&o[a].offset<=r;a++){var i=e(o[a],r,n);if(i)return i}return t}},h=function e(t){if(!t.parent||!t.parent.children)return[];var r=e(t.parent);if("property"===t.parent.type){var n=t.parent.children[0].value;r.push(n)}else if("array"===t.parent.type){var o=t.parent.children.indexOf(t);-1!==o&&r.push(o)}return r},p=c;function m(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}const v=`__object_order_${Math.floor(Date.now()/36e5)}__`,g=Symbol.for(v),y=(String(g),{defineProperty:(e,t,r)=>(!Object.prototype.hasOwnProperty.call(e,t)&&g in e?e[g].push(t):"value"in r&&t===g&&-1===r.value.lastIndexOf(g)&&r.value.push(g),Reflect.defineProperty(e,t,r)),deleteProperty(e,t){const r=Object.prototype.hasOwnProperty.call(e,t),n=Reflect.deleteProperty(e,t);if(n&&r&&g in e){const r=e[g].indexOf(t);-1!==r&&e[g].splice(r,1)}return n},ownKeys:e=>g in e?e[g]:Reflect.ownKeys(e),set(e,t,r){const n=Object.prototype.hasOwnProperty.call(e,t),o=Reflect.set(e,t,r);return o&&!n&&g in e&&e[g].push(t),o}});function _(e,t=Reflect.ownKeys(e)){O(e);const r=new Proxy(e,y);return function(e,t){g in e?(e[g].length=0,e[g].push(...t)):Reflect.defineProperty(e,g,{configurable:!0,value:t})}(r,t),r}function b(e){return null!==e&&"object"==typeof e}function E(e){if(!b(e))return!1;if(void 0!==e[Symbol.toStringTag]){const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}return"Object"===function(e){const t=e[Symbol.toStringTag];if("string"==typeof t)return t;const r=Reflect.apply(Object.prototype.toString,e,[]);return r.slice(8,r.length-1)}(e)}function O(e,t){if(function(){if("undefined"==typeof process||!b(process)||!b(process.env))return!1;return!1}()&&!E(e))throw new TypeError(t)}var w,j,x,P,S;!function(e){e.None="none",e.Declared="declared",e.InheritedFromService="inheritedFromService"}(w||(w={})),function(e){e.Unspecified="unspecified",e.Simple="simple",e.Matrix="matrix",e.Label="label",e.Form="form",e.CommaDelimited="commaDelimited",e.SpaceDelimited="spaceDelimited",e.PipeDelimited="pipeDelimited",e.DeepObject="deepObject",e.TabDelimited="tabDelimited"}(j||(j={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information",e[e.Hint=3]="Hint"}(x||(x={})),function(e){e.Article="article",e.HttpService="http_service",e.HttpServer="http_server",e.HttpOperation="http_operation",e.HttpCallback="http_callback",e.Model="model",e.Generic="generic",e.Unknown="unknown",e.TableOfContents="table_of_contents",e.SpectralRuleset="spectral_ruleset",e.Styleguide="styleguide",e.Image="image",e.StoplightResolutions="stoplight_resolutions",e.StoplightOverride="stoplight_override"}(P||(P={})),function(e){e.Json="json",e.Markdown="markdown",e.Yaml="yaml",e.Javascript="javascript",e.Apng="apng",e.Avif="avif",e.Bmp="bmp",e.Gif="gif",e.Jpeg="jpeg",e.Png="png",e.Svg="svg",e.Webp="webp"}(S||(S={}));var k=r(9312),C=r.n(k);function A(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype||"function"==typeof e.constructor&&Function.toString.call(Object)===Function.toString.call(e.constructor)}function M(e,t,r){if(!A(e)&&!Array.isArray(e)||!(t in e))throw new ReferenceError(`Could not resolve '${r}'`)}function I(e){if("string"!=typeof e.$ref)throw new TypeError("$ref should be a string")}const R=e=>A(e)&&"$ref"in e,N=e=>R(e)&&"string"==typeof e.$ref,D=e=>e.length>0&&("#"===e||/^#\S*$/.test(e)),T=(e,t,r)=>{const n=e.toString();let o="",a=n,i=0,u=a.indexOf(t);for(;u>-1;)o+=n.substring(i,i+u)+r,a=a.substring(u+t.length,a.length),i+=u+t.length,u=a.indexOf(t);return a.length>0&&(o+=n.substring(n.length-a.length,n.length)),o},L=e=>"number"==typeof e?e:T(T(e,"~","~0"),"/","~1"),$=/[^a-zA\u2013Z0\u20139_.!~*'()\/\-\u{D800}-\u{DFFF}]/gu;function z(e){return e.replace($,encodeURIComponent)}const F=e=>{const t=L(e);return"number"==typeof t?t:z(t)},U=e=>Q(e),Q=e=>{if(e&&"object"!=typeof e)throw new TypeError("Invalid type: path must be an array of segments.");return 0===e.length?"#":`#/${e.map(F).join("/")}`};function B(e){try{return decodeURIComponent(e)}catch(t){return e}}const q=/%[0-9a-f]+/gi,V=e=>{let t;try{t=decodeURIComponent(e)}catch(r){t=e.replace(q,B)}return T(T(t,"~1","/"),"~0","~")},J=e=>H(e),H=e=>{if("string"!=typeof e)throw new TypeError("Invalid type: JSON Pointers are represented as strings.");if(0===e.length||"#"!==e[0])throw new URIError("Invalid JSON Pointer syntax; URI fragment identifiers must begin with a hash.");if(1===e.length)return[];if("/"!==e[1])throw new URIError("Invalid JSON Pointer syntax.");return(e=>{const t=e.length,r=[];let n=-1;for(;++n<t;)r.push(V(e[n]));return r})(e.substring(2).split("/"))},W=(e,t,r)=>{const n={value:e,path:r};t.onEnter&&t.onEnter(n);for(const o of Object.keys(e)){const n=e[o];t.onProperty&&t.onProperty({parent:e,parentPath:r,property:o,propertyValue:n}),"object"==typeof n&&null!==n&&W(n,t,r.concat(o))}t.onLeave&&t.onLeave(n)},G=(e,t)=>{"object"==typeof e&&null!==e&&W(e,"function"==typeof t?{onProperty:t}:t,[])};function K(e,t,r){G(e,{onProperty({property:e,propertyValue:n,parent:o}){"$ref"===e&&"string"==typeof n&&n.startsWith(t)&&(o.$ref=`${r}${n.slice(t.length)}`)}})}const Z=e=>e.length>0&&"#"!==e[0],Y=e=>{if("string"!=typeof e||0===e.length||!Z(e))return null;const t=e.indexOf("#");return-1===t?e:e.slice(0,t)};function X(e,t){return A(t)&&A(e)&&("summary"in e||"description"in e)?Object.assign(Object.assign(Object.assign({},t),"description"in e?{description:e.description}:null),"summary"in e?{summary:e.summary}:null):t}function*ee(e,t,r){R(e.value)&&(I(e.value),yield[-1,e.value]);for(const[n,o]of t.entries())M(e.value,o,r),e.value=e.value[o],R(e.value)&&(I(e.value),yield[n,e.value])}function te(e,t){return re(e,t).value}function re(e,t){return function e(t,r,n,o){if(null!==Y(r))throw new ReferenceError("Cannot resolve external references");const a=J(r);let i=[...a];"#"===r&&R(t)&&(I(t),a.unshift(...J(t.$ref)));const u={value:t};for(const[s,l]of ee(u,a,r)){if(n.includes(l))return{source:null,location:null!=o?o:i,value:n[n.length-1]};n.push(l);const r=e(t,l.$ref,n,i);u.value=r.value,(i=r.location).push(...a.slice(s+1))}return{source:null,location:i,value:n.length>0?X(n[n.length-1],u.value):u.value}}(e,t,[])}const ne="#/__bundled__",oe="#/__errors__",ae=({document:e,path:t,bundleRoot:r="#/__bundled__",errorsRoot:n="#/__errors__",cloneDocument:a=!0,keyProvider:i},u)=>{if(t===r||t===n)throw new Error("Roots do not make any sense");const s=a?(0,o.cloneDeep)(e):e;return ie(s,J(r),J(n),t,i)(t,{[t]:!0},u)},ie=(e,t,r,n,a)=>{const i=new Set,u=(s,l,c,f={},d={},h={})=>{const p=J(s),m=(0,o.get)(e,p);G(c||m,{onEnter:({value:r})=>{if(N(r)&&D(r.$ref)){const c=r.$ref;if(h[c])return;if(c===s&&(f[c]="#"),f[c])return void(r.$ref=f[c]);let p,m,v,g,y;try{let r;p=J(c),a&&(r=a({document:e,path:p})),r||(r=(({document:e,path:t})=>0===t.length?"root":Array.isArray((0,o.get)(e,t.slice(0,-1)))?`${t[t.length-2]}_${t[t.length-1]}`:String(t[t.length-1]))({document:e,path:p})),v=r;let n=1;for(;i.has(v);)if(v=`${r}_${++n}`,n>20)throw new Error(`Keys ${r}_2 through ${r}_20 already taken.`);i.add(v),m=[...t,v],g=U(m)}catch(e){h[c]=e instanceof Error?e.message:String(e)}if(!p||!m||!g)return;if("object"==typeof e&&null!==e&&!(y=(0,o.get)(e,p)))try{y=te(Object(e),c)}catch(e){}void 0!==y&&(f[c]=g,r.$ref=g,(0,o.has)(d,m)||(Array.isArray(y)?(0,o.set)(d,m,new Array(y.length).fill(null)):"object"==typeof y&&(0,o.setWith)(d,m,{},Object),(0,o.set)(d,m,y),"#"===c?function(e,t,r,n){const a=r.map((e=>`[${JSON.stringify(e)}]`)).join(""),i=JSON.parse(JSON.stringify((0,o.omit)(Object(e),a))),u={};(0,o.set)(t,n,i),(0,o.set)(i,r,u),K(i,"#",U(n)),u.$ref="#"}(e,d,J(n),m):l[c]||(l[c]=!0,u(s,l,y,f,d,h),l[c]=!1)))}}});const v=(0,o.get)(d,t);return v&&Object.keys(v).length&&(0,o.set)(m,t,v),(Object.keys(h).length||(0,o.has)(e,r))&&(0,o.set)(m,r,(0,o.has)(e,r)?(0,o.get)(e,r):h),m};return u},ue=e=>T(T(e,"~1","/"),"~0","~"),se=(e,t)=>{const r=new WeakMap;return function e(n,o){let a;if(t&&(n=t(n)),A(n)||Array.isArray(n)){const t=r.get(n);return t?{$ref:t}:(r.set(n,U(o)),Array.isArray(n)?a=n.map(((t,r)=>e(t,[...o,String(r)]))):(a={},Object.keys(n).forEach((t=>{a[t]=e(n[t],[...o,t])}))),r.delete(n),a)}return n}(e,[])},le=e=>T(T(e,"~","~0"),"//","/~1"),ce=e=>{if("string"!=typeof e||0===e.length)return null;const t=e.indexOf("#");return-1===t?null:e.slice(t)},fe=e=>{const t=f(e,!0);if(t.scan(),1!==t.getToken())return;if(t.scan(),2===t.getToken())return;if(10!==t.getToken())throw new SyntaxError("Unexpected character");const r=t.getTokenValue();if(t.scan(),6!==t.getToken())throw new SyntaxError("Colon expected");switch(t.scan(),t.getToken()){case 10:return[r,t.getTokenValue()];case 11:return[r,Number(t.getTokenValue())];case 8:return[r,!0];case 9:return[r,!1];case 7:return[r,null];case 16:throw new SyntaxError("Unexpected character");case 17:throw new SyntaxError("Unexpected end of file");default:return}},de=({lineMap:e,ast:t},r)=>{const n=e[r.line],o=e[r.line+1];if(void 0===n)return;const a=d(t,void 0===o?n+r.character:Math.min(o,n+r.character),!0);if(void 0===a)return;const i=h(a);return 0!==i.length?i:void 0};function he(e){return ue(e.split("/").pop()||"")}const pe=({ast:e},t,r=!1)=>{const n=function(e,t,r){e:for(const n of t){const t=Number.isInteger(Number(n))?Number(n):n;if("string"==typeof t||"number"==typeof t&&"array"!==e.type){if("object"!==e.type||!Array.isArray(e.children))return r?e:void 0;for(const r of e.children)if(Array.isArray(r.children)&&r.children[0].value===String(t)&&2===r.children.length){e=r.children[1];continue e}return r?e:void 0}if("array"!==e.type||t<0||!Array.isArray(e.children)||t>=e.children.length)return r?e:void 0;e=e.children[t]}return e}(e,t,r);if(void 0!==n&&void 0!==n.range)return{range:n.range}},me=(e,t={disallowComments:!0})=>{const r=[],{ast:n,data:o,lineMap:a}=ve(e,r,t);return{data:o,diagnostics:r,ast:n,lineMap:a}};function ve(e,t=[],r){const n=ye(e);let o={type:"array",offset:-1,length:-1,children:[],parent:void 0},a=null,i=[];const u=new WeakMap,s=[];function l(e){"property"===o.type&&(o.length=e-o.offset,o=o.parent)}function c(e,t,r){return{start:{line:e,character:t},end:{line:e,character:t+r}}}function f(e){return o.children.push(e),e}function d(e){Array.isArray(i)?i.push(e):null!==a&&(i[a]=e)}function h(e){d(e),s.push(i),i=e,a=null}function v(){i=s.pop()}p(e,{onObjectBegin:(e,t,n,a)=>{o=f({type:"object",offset:e,length:-1,parent:o,children:[],range:c(n,a,t)}),!1===r.ignoreDuplicateKeys&&u.set(o,[]),h(function(e){return e?_({}):{}}(!0===r.preserveKeyOrder))},onObjectProperty:(e,n,s,l,d)=>{if((o=f({type:"property",offset:n,length:-1,parent:o,children:[]})).children.push({type:"string",value:e,offset:n,length:s,parent:o}),!1===r.ignoreDuplicateKeys){const r=u.get(o.parent);r&&(0!==r.length&&r.includes(e)?t.push({range:c(l,d,s),message:"DuplicateKey",severity:x.Error,path:_e(o),code:20}):r.push(e))}!0===r.preserveKeyOrder&&function(e,t){if(!(t in e))return;const r=e[g],n=r.indexOf(t);-1!==n&&(r.splice(n,1),r.push(t))}(i,e),a=e},onObjectEnd:(e,t,n,a)=>{!1===r.ignoreDuplicateKeys&&u.delete(o),o.length=e+t-o.offset,o.range&&(o.range.end.line=n,o.range.end.character=a+t),o=o.parent,l(e+t),v()},onArrayBegin:(e,t,r,n)=>{o=f({type:"array",offset:e,length:-1,parent:o,children:[],range:c(r,n,t)}),h([])},onArrayEnd:(e,t,r,n)=>{o.length=e+t-o.offset,o.range&&(o.range.end.line=r,o.range.end.character=n+t),o=o.parent,l(e+t),v()},onLiteralValue:(e,t,r,n,a)=>{f({type:ge(e),offset:t,length:r,parent:o,value:e,range:c(n,a,r)}),l(t+r),d(e)},onSeparator:(e,t)=>{"property"===o.type&&(":"===e?o.colonOffset=t:","===e&&l(t))},onError:(e,r,n,o,a)=>{t.push({range:c(o,a,n),message:m(e),severity:x.Error,code:e})}},r);const y=o.children[0];return y&&delete y.parent,{ast:y,data:i[0],lineMap:n}}function ge(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}const ye=e=>{const t=[0];let r=0;for(;r<e.length;r++)"\n"===e[r]&&t.push(r+1);return t.push(r+1),t};function _e(e,t=[]){return"property"===e.type&&t.unshift(e.children[0].value),void 0!==e.parent?("array"===e.parent.type&&void 0!==e.parent.parent&&t.unshift(e.parent.children.indexOf(e)),_e(e.parent,t)):t}const be=(e,t,r)=>{if(!e||!Object.hasOwnProperty.call(e,t)||t===r)return e;const n={};for(const[o,a]of Object.entries(e))o===t?n[r]=a:o in n||(n[o]=a);return n};function Ee(e){return A(e)||Array.isArray(e)}function Oe(e,t,r){if(r.length<=1||t.length<=1)throw Error("Source/target path must not be empty and point at root");if(0===t.indexOf(r))throw Error("Target path cannot be contained within source");const n=J(t);let o=e;for(const u of n){if(!Ee(o))return;o=o[u]}if(!Ee(o))return;const a=J(r);let i=e;for(const[u,s]of a.entries()){if(!Ee(i)||s in i)return;const e=u===a.length-1?o:{};i[s]=e,i=e}delete e[n[0]],function e(t,r,n){for(const o of Object.keys(t)){const a=t[o];if("$ref"!==o)Ee(a)&&e(a,r,n);else{if("string"!=typeof a||!D(a))continue;0===a.indexOf(r)&&(t[o]=a.replace(r,n))}}}(e,t,r)}async function we(e,t,r,n,o){let i=function(e,t){const r=Y(t);return null===r?e:(0,a.isAbsolute)(r)?r:(0,a.join)((0,a.dirname)(e),r)}(t,r);const u=ce(r)||"#",s=await e[i],l=J(u);let c=[...l];const f={value:s};for(const[a,d]of ee(f,l,u)){if(n.includes(d))return{source:t,location:null!=o?o:c,value:n[n.length-1]};n.push(d);const r=await we(e,i,d.$ref,n,c);({source:i,location:c}=r),f.value=r.value,c.push(...l.slice(a+1))}return{source:i,location:c,value:n.length>0?X(n[n.length-1],f.value):f.value}}async function je(e,t,r){return(await xe(e,t,r)).value}function xe(e,t,r){return we(e,t,r,[])}const Pe=(e,t)=>{if("string"!=typeof e)return e;try{const r=Se(e);return"string"==typeof r?r:JSON.parse(e,t)}catch(e){return}},Se=e=>{const t=Number(e);return Number.isFinite(t)?String(t)===e?t:e:NaN},ke=(e,t,r)=>{if("string"==typeof e)return e;try{return JSON.stringify(e,t,r)}catch(n){return C()(e,t,r)}},Ce=(e,t)=>{if(e instanceof Array){if(t instanceof Array){if(t.length>e.length)return!1;for(const r in t){if(!t.hasOwnProperty(r))continue;const n=parseInt(e[r]),o=parseInt(t[r]);if(isNaN(n)&&isNaN(o)){if(e[r]!==t[r])return!1}else if(n!==o)return!1}}}else{if("string"!=typeof e)return!1;if("string"==typeof t)return e.startsWith(t)}return!0},Ae=(e,t,r)=>{const n=ke(e,t,r);if(void 0===n)throw new Error("The value could not be stringified");return n};function Me(e){return e.replace(/^(\/|#\/)/,"").split("/").map(ue).map(Ie).join(".")}function Ie(e){return e.includes(".")?`["${e.replace(/"/g,'\\"')}"]`:e}const Re=Symbol.for(v),Ne={ownKeys:e=>Re in e?e[Re]:Reflect.ownKeys(e)},De=e=>new Proxy(e,Ne);function Te(e,t){if("string"==typeof e&&"string"==typeof t)return(0,o.trimStart)(e,t);if(!(e&&Array.isArray(e)&&e.length&&t&&Array.isArray(t)&&t.length))return e;let r=0;for(const n in e)if(e.hasOwnProperty(n)){if(e[n]!==t[n])break;r++}return e.slice(r)}},54727:(e,t,r)=>{"use strict";function n(e){let t="";return e.absolute&&("file"===e.protocol?(e.drive&&(t+=e.drive),t+="/"):(t+=e.protocol+"://",e.origin&&(t+=e.origin+"/"))),""===(t+=e.path.join("/"))&&(t="."),t}function o(e,t,r,n){this.message=e,this.expected=t,this.found=r,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,o)}r.r(t),r.d(t,{basename:()=>c,deserializeSrn:()=>E,dirname:()=>f,extname:()=>d,format:()=>n,isAbsolute:()=>h,isURL:()=>p,join:()=>m,normalize:()=>u,parse:()=>i,relative:()=>v,resolve:()=>g,sep:()=>y,serializeSrn:()=>O,startsWithWindowsDrive:()=>_,stripRoot:()=>b,toFSPath:()=>u}),function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(o,Error),o.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t<e.parts.length;t++)r+=e.parts[t]instanceof Array?a(e.parts[t][0])+"-"+a(e.parts[t][1]):a(e.parts[t]);return"["+(e.inverted?"^":"")+r+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function a(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}return"Expected "+function(e){var t,n,o,a=new Array(e.length);for(t=0;t<e.length;t++)a[t]=(o=e[t],r[o.type](o));if(a.sort(),a.length>0){for(t=1,n=1;t<a.length;t++)a[t-1]!==a[t]&&(a[n]=a[t],n++);a.length=n}switch(a.length){case 1:return a[0];case 2:return a[0]+" or "+a[1];default:return a.slice(0,-1).join(", ")+", or "+a[a.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};var a=function(e,t){t=void 0!==t?t:{};var r,n,a,i,u={},s={Path:te},l=te,c=function(e,t,r,n){return{protocol:e,origin:t,absolute:!0,...r,...n}},f=function(e,t,r){return{protocol:e,origin:t,absolute:!0,...r,path:[]}},d="http://",h=K("http://",!0),p=function(e){return"http"},m="https://",v=K("https://",!0),g=function(e){return"https"},y="",_=function(){return null},b=function(e,t,r){return{protocol:e,origin:null,absolute:!0,...t,...r}},E="file://",O=K("file://",!0),w="file:",j=K("file:",!0),x=function(e){return"file"},P=function(e,t){return{protocol:"file",origin:null,absolute:!0,...e,...t}},S=/^[A-Za-z]/,k=Z([["A","Z"],["a","z"]],!1,!1),C=":",A=K(":",!1),M=function(e){return{drive:e.toLowerCase()+":"}},I=function(){return{drive:null}},R=function(){return{drive:null}},N=function(e){return{protocol:null,origin:null,absolute:!1,drive:null,...e}},D=function(e){return{path:e}},T=function(e,t){return[e,...t]},L=function(e){return[e]},$=".",z=K(".",!1),F="/",U=K("/",!1),Q="\\",B=K("\\",!1),q=/^[^\/\\]/,V=Z(["/","\\"],!0,!1),J=0,H=[{line:1,column:1}],W=0,G=[];if("startRule"in t){if(!(t.startRule in s))throw new Error("Can't start parsing from rule \""+t.startRule+'".');l=s[t.startRule]}function K(e,t){return{type:"literal",text:e,ignoreCase:t}}function Z(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Y(t){var r,n=H[t];if(n)return n;for(r=t-1;!H[r];)r--;for(n={line:(n=H[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return H[t]=n,n}function X(e,t){var r=Y(e),n=Y(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function ee(e){J<W||(J>W&&(W=J,G=[]),G.push(e))}function te(){var t;return(t=function(){var e,t,r,n,o;return e=J,(t=re())!==u&&(r=ne())!==u&&(n=ae())!==u&&(o=ie())!==u?e=t=c(t,r,n,o):(J=e,e=u),e===u&&(e=J,(t=re())!==u&&(r=ne())!==u&&(n=function(){var e;return(e=y)!==u&&(e=R()),e}())!==u?e=t=f(t,r,n):(J=e,e=u)),e}())===u&&(t=function(){var t,r,n,o;return t=J,(r=function(){var t;return e.substr(J,7).toLowerCase()===E?(t=e.substr(J,7),J+=7):(t=u,ee(O)),t===u&&(e.substr(J,5).toLowerCase()===w?(t=e.substr(J,5),J+=5):(t=u,ee(j))),t!==u&&(t=x()),t}())!==u&&(n=oe())!==u&&(o=ie())!==u?t=r=b(r,n,o):(J=t,t=u),t}())===u&&(t=function(){var e,t,r;return e=J,(t=oe())!==u&&(r=ie())!==u?e=t=P(t,r):(J=e,e=u),e}())===u&&(t=function(){var t,r;return t=J,function(){var t;return(t=function(){var t,r,n;return t=J,46===e.charCodeAt(J)?(r=$,J++):(r=u,ee(z)),r!==u&&(n=se())!==u?t=r=[r,n]:(J=t,t=u),t}())===u&&(t=y),t}()!==u&&(r=ie())!==u?t=N(r):(J=t,t=u),t}()),t}function re(){var t,r;return e.substr(J,7).toLowerCase()===d?(r=e.substr(J,7),J+=7):(r=u,ee(h)),r!==u&&(r=p()),(t=r)===u&&(t=function(){var t;return e.substr(J,8).toLowerCase()===m?(t=e.substr(J,8),J+=8):(t=u,ee(v)),t!==u&&(t=g()),t}()),t}function ne(){var t,r,n;if(t=J,r=[],(n=le())!==u)for(;n!==u;)r.push(n),n=le();else r=u;return(t=r!==u?e.substring(t,J):r)===u&&(t=J,(r=y)!==u&&(r=_()),t=r),t}function oe(){var t;return(t=function(){var t,r,n,o;return t=J,(r=se())===u&&(r=null),r!==u?(S.test(e.charAt(J))?(n=e.charAt(J),J++):(n=u,ee(k)),n!==u?(58===e.charCodeAt(J)?(o=C,J++):(o=u,ee(A)),o!==u&&se()!==u?t=r=M(n):(J=t,t=u)):(J=t,t=u)):(J=t,t=u),t}())===u&&(t=ae()),t}function ae(){var e;return(e=se())!==u&&(e=I()),e}function ie(){var e;return(e=function e(){var t,r,n;return t=J,(r=ue())!==u&&se()!==u&&(n=e())!==u?t=r=T(r,n):(J=t,t=u),t===u&&(t=J,(r=ue())!==u&&(r=L(r)),t=r),t}())!==u&&(e=D(e)),e}function ue(){var t,r,n;if(t=J,r=[],(n=le())!==u)for(;n!==u;)r.push(n),n=le();else r=u;return(t=r!==u?e.substring(t,J):r)===u&&(t=y),t}function se(){var t;return 47===e.charCodeAt(J)?(t=F,J++):(t=u,ee(U)),t===u&&(92===e.charCodeAt(J)?(t=Q,J++):(t=u,ee(B))),t}function le(){var t;return q.test(e.charAt(J))?(t=e.charAt(J),J++):(t=u,ee(V)),t}if((r=l())!==u&&J===e.length)return r;throw r!==u&&J<e.length&&ee({type:"end"}),n=G,a=W<e.length?e.charAt(W):null,i=W<e.length?X(W,W+1):X(W,W),new o(o.buildMessage(n,a),n,a,i)};function i(e){if("string"!=typeof e)throw new Error(`@stoplight/path: Cannot parse ${e} because it is not a string`);return a(e,{})}function u(e){return n(s(i(e)))}function s(e){let t=e.path;t=t.filter((e=>""!==e&&"."!==e));const r=[];for(const n of t)".."===n&&r.length&&".."!==r[r.length-1]?r.pop():".."===n&&e.absolute||r.push(n);return e.path=r,e}function l(e){let t=e.lastIndexOf(".");".."===e&&(t=-1),"."===e&&(t=-1);let r=e,n="";return t>0&&(r=e.slice(0,t),n=e.slice(t)),{name:r,ext:n}}const c=(e,t)=>{const r=s(i(e)).path.pop();if(!r)return"";const{name:n,ext:o}=l(r);return!0===t||t===o?n:`${n}${o}`},f=e=>{const t=s(i(e));return t.path.pop(),n(s(t))},d=e=>{const t=s(i(e)).path.pop();if(!t)return"";const{ext:r}=l(t);return r};function h(e){return i(e).absolute}function p(e){const t=i(e);return"http"===t.protocol||"https"===t.protocol}const m=(...e)=>{if(0===e.length)return".";const t=e.map(i),r=Object.assign({},t[0]);for(let n=1;n<t.length;n++){const o=t[n];if(o.absolute)throw new Error('Cannot join an absolute path "'+e[n]+'" in the middle of other paths.');for(const e of o.path)r.path.push(e)}return n(s(r))};function v(e,t){const r=s(i(t));if(!r.absolute)return n(r);const o=s(i(e));if(r.origin!==o.origin)return n(r);if(!o.absolute)return n(r);if(o.drive!==r.drive)return n(r);const a=Math.min(o.path.length,r.path.length);for(let n=0;n<a&&o.path[0]===r.path[0];n++)o.path.shift(),r.path.shift();return r.path.unshift(...o.path.fill("..")),n({origin:null,drive:null,absolute:!1,protocol:null,path:r.path})}function g(...e){if(0===e.length)return".";const t=s(i(e[e.length-1]));return t.absolute?n(t):m(...e)}const y="/",_=e=>null!==i(e).drive,b=e=>i(e).path.filter(Boolean).join("/");function E(e){const[t,r,n,...o]=e.split("/"),a=o.length?`/${o.join("/")}`:void 0;let i,u;return a&&(i=o.find((e=>e.includes("."))))&&(u=l(i).ext),{shortcode:t,orgSlug:r,projectSlug:n,uri:a,file:i,ext:u}}function O({shortcode:e,orgSlug:t,projectSlug:r,uri:n=""}){return[e,t,r,n.replace(/^\//,"")].filter(Boolean).join("/")}},59559:(e,t)=>{function r(e,t,r,n){var a={};return function(i){if(!a[i]){var u={},s=[],l=[];for(l.push({node:i,processed:!1});l.length>0;){var c=l[l.length-1],f=c.processed,d=c.node;if(f)l.pop(),s.pop(),u[d]=!1,a[d]=!0,t&&0!==e[d].length||r.push(d);else{if(a[d]){l.pop();continue}if(u[d]){if(n){l.pop();continue}throw s.push(d),new o(s)}u[d]=!0,s.push(d);for(var h=e[d],p=h.length-1;p>=0;p--)l.push({node:h[p],processed:!1});c.processed=!0}}}}}var n=t.DepGraph=function(e){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=e&&!!e.circular};n.prototype={size:function(){return Object.keys(this.nodes).length},addNode:function(e,t){this.hasNode(e)||(this.nodes[e]=2===arguments.length?t:e,this.outgoingEdges[e]=[],this.incomingEdges[e]=[])},removeNode:function(e){this.hasNode(e)&&(delete this.nodes[e],delete this.outgoingEdges[e],delete this.incomingEdges[e],[this.incomingEdges,this.outgoingEdges].forEach((function(t){Object.keys(t).forEach((function(r){var n=t[r].indexOf(e);n>=0&&t[r].splice(n,1)}),this)})))},hasNode:function(e){return this.nodes.hasOwnProperty(e)},getNodeData:function(e){if(this.hasNode(e))return this.nodes[e];throw new Error("Node does not exist: "+e)},setNodeData:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);this.nodes[e]=t},addDependency:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);if(!this.hasNode(t))throw new Error("Node does not exist: "+t);return-1===this.outgoingEdges[e].indexOf(t)&&this.outgoingEdges[e].push(t),-1===this.incomingEdges[t].indexOf(e)&&this.incomingEdges[t].push(e),!0},removeDependency:function(e,t){var r;this.hasNode(e)&&(r=this.outgoingEdges[e].indexOf(t))>=0&&this.outgoingEdges[e].splice(r,1),this.hasNode(t)&&(r=this.incomingEdges[t].indexOf(e))>=0&&this.incomingEdges[t].splice(r,1)},clone:function(){var e=this,t=new n;return Object.keys(e.nodes).forEach((function(r){t.nodes[r]=e.nodes[r],t.outgoingEdges[r]=e.outgoingEdges[r].slice(0),t.incomingEdges[r]=e.incomingEdges[r].slice(0)})),t},directDependenciesOf:function(e){if(this.hasNode(e))return this.outgoingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},directDependantsOf:function(e){if(this.hasNode(e))return this.incomingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},dependenciesOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.outgoingEdges,t,n,this.circular)(e);var o=n.indexOf(e);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+e)},dependantsOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.incomingEdges,t,n,this.circular)(e);var o=n.indexOf(e);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+e)},overallOrder:function(e){var t=this,n=[],o=Object.keys(this.nodes);if(0===o.length)return n;if(!this.circular){var a=r(this.outgoingEdges,!1,[],this.circular);o.forEach((function(e){a(e)}))}var i=r(this.outgoingEdges,e,n,this.circular);return o.filter((function(e){return 0===t.incomingEdges[e].length})).forEach((function(e){i(e)})),this.circular&&o.filter((function(e){return-1===n.indexOf(e)})).forEach((function(e){i(e)})),n},entryNodes:function(){var e=this;return Object.keys(this.nodes).filter((function(t){return 0===e.incomingEdges[t].length}))}},n.prototype.directDependentsOf=n.prototype.directDependantsOf,n.prototype.dependentsOf=n.prototype.dependantsOf;var o=t.DepGraphCycleError=function(e){var t="Dependency Cycle Found: "+e.join(" -> "),r=new Error(t);return r.cyclePath=e,Object.setPrototypeOf(r,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(r,o),r};o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error)},75919:e=>{function t(e,t,r,n){var o,a=null==(o=n)||"number"==typeof o||"boolean"==typeof o?n:r(n),i=t.get(a);return void 0===i&&(i=e.call(this,n),t.set(a,i)),i}function r(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),a=t.get(o);return void 0===a&&(a=e.apply(this,n),t.set(o,a)),a}function n(e,t,r,n,o){return r.bind(t,e,n,o)}function o(e,o){return n(e,this,1===e.length?t:r,o.cache.create(),o.serializer)}function a(){return JSON.stringify(arguments)}function i(){this.cache=Object.create(null)}i.prototype.has=function(e){return e in this.cache},i.prototype.get=function(e){return this.cache[e]},i.prototype.set=function(e,t){this.cache[e]=t};var u={create:function(){return new i}};e.exports=function(e,t){var r=t&&t.cache?t.cache:u,n=t&&t.serializer?t.serializer:a;return(t&&t.strategy?t.strategy:o)(e,{cache:r,serializer:n})},e.exports.strategies={variadic:function(e,t){return n(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,r){return n(e,this,t,r.cache.create(),r.serializer)}}},64617:(e,t)=>{function r(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function n(e){return!!e&&!!e[W]}function o(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===K}(e)||Array.isArray(e)||!!e[H]||!!(null===(t=e.constructor)||void 0===t?void 0:t[H])||f(e)||d(e))}function a(e,t,r){void 0===r&&(r=!1),0===i(e)?(r?Object.keys:Z)(e).forEach((function(n){r&&"symbol"==typeof n||t(n,e[n],e)})):e.forEach((function(r,n){return t(n,r,e)}))}function i(e){var t=e[W];return t?t.t>3?t.t-4:t.t:Array.isArray(e)?1:f(e)?2:d(e)?3:0}function u(e,t){return 2===i(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function s(e,t){return 2===i(e)?e.get(t):e[t]}function l(e,t,r){var n=i(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function c(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return B&&e instanceof Map}function d(e){return q&&e instanceof Set}function h(e){return e.i||e.u}function p(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Y(e);delete t[W];for(var r=Z(t),n=0;n<r.length;n++){var o=r[n],a=t[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function m(e,t){return void 0===t&&(t=!1),g(e)||n(e)||!o(e)||(i(e)>1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&a(e,(function(e,t){return m(t,!0)}),!0)),e}function v(){r(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function y(e){var t=X[e];return t||r(18,e),t}function _(e,t){X[e]||(X[e]=t)}function b(){return U}function E(e,t){t&&(y("Patches"),e.o=[],e.v=[],e.s=t)}function O(e){w(e),e.p.forEach(x),e.p=null}function w(e){e===U&&(U=e.l)}function j(e){return U={p:[],l:U,h:e,_:!0,m:0}}function x(e){var t=e[W];0===t.t||1===t.t?t.j():t.O=!0}function P(e,t){t.m=t.p.length;var n=t.p[0],a=void 0!==e&&e!==n;return t.h.S||y("ES5").P(t,e,a),a?(n[W].g&&(O(t),r(4)),o(e)&&(e=S(t,e),t.l||C(t,e)),t.o&&y("Patches").M(n[W].u,e,t.o,t.v)):e=S(t,n,[]),O(t),t.o&&t.s(t.o,t.v),e!==J?e:void 0}function S(e,t,r){if(g(t))return t;var n=t[W];if(!n)return a(t,(function(o,a){return k(e,n,t,o,a,r)}),!0),t;if(n.A!==e)return t;if(!n.g)return C(e,n.u,!0),n.u;if(!n.R){n.R=!0,n.A.m--;var o=4===n.t||5===n.t?n.i=p(n.k):n.i,i=o,u=!1;3===n.t&&(i=new Set(o),o.clear(),u=!0),a(i,(function(t,a){return k(e,n,o,t,a,r,u)})),C(e,o,!1),r&&e.o&&y("Patches").F(n,r,e.o,e.v)}return n.i}function k(e,t,r,a,i,s,c){if(n(i)){var f=S(e,i,s&&t&&3!==t.t&&!u(t.N,a)?s.concat(a):void 0);if(l(r,a,f),!n(f))return;e._=!1}else c&&r.add(i);if(o(i)&&!g(i)){if(!e.h.D&&e.m<1)return;S(e,i),t&&t.A.l||C(e,i)}}function C(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e._&&m(t,r)}function A(e,t){var r=e[W];return(r?h(r):e)[t]}function M(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function I(e){e.g||(e.g=!0,e.l&&I(e.l))}function R(e){e.i||(e.i=p(e.u))}function N(e,t,r){var n=f(t)?y("MapSet").K(t,r):d(t)?y("MapSet").$(t,r):e.S?function(e,t){var r=Array.isArray(e),n={t:r?1:0,A:t?t.A:b(),g:!1,R:!1,N:{},l:t,u:e,k:null,i:null,j:null,C:!1},o=n,a=ee;r&&(o=[n],a=te);var i=Proxy.revocable(o,a),u=i.revoke,s=i.proxy;return n.k=s,n.j=u,s}(t,r):y("ES5").I(t,r);return(r?r.A:b()).p.push(n),n}function D(e){return n(e)||r(22,e),function e(t){if(!o(t))return t;var r,n=t[W],u=i(t);if(n){if(!n.g&&(n.t<4||!y("ES5").J(n)))return n.u;n.R=!0,r=T(t,u),n.R=!1}else r=T(t,u);return a(r,(function(t,o){n&&s(n.u,t)===o||l(r,t,e(o))})),3===u?new Set(r):r}(e)}function T(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return p(e)}function L(){function e(e,t){var r=i[e];return r?r.enumerable=t:i[e]=r={configurable:!0,enumerable:t,get:function(){return ee.get(this[W],e)},set:function(t){ee.set(this[W],e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var n=e[t][W];if(!n.g)switch(n.t){case 5:o(n)&&I(n);break;case 4:r(n)&&I(n)}}}function r(e){for(var t=e.u,r=e.k,n=Z(r),o=n.length-1;o>=0;o--){var a=n[o];if(a!==W){var i=t[a];if(void 0===i&&!u(t,a))return!0;var s=r[a],l=s&&s[W];if(l?l.u!==i:!c(s,i))return!0}}var f=!!t[W];return n.length!==Z(t).length+(f?0:1)}function o(e){var t=e.k;if(t.length!==e.u.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;n<t.length;n++)if(!t.hasOwnProperty(n))return!0;return!1}var i={};_("ES5",{I:function(t,r){var n=Array.isArray(t),o=function(t,r){if(t){for(var n=Array(r.length),o=0;o<r.length;o++)Object.defineProperty(n,""+o,e(o,!0));return n}var a=Y(r);delete a[W];for(var i=Z(a),u=0;u<i.length;u++){var s=i[u];a[s]=e(s,t||!!a[s].enumerable)}return Object.create(Object.getPrototypeOf(r),a)}(n,t),a={t:n?5:4,A:r?r.A:b(),g:!1,R:!1,N:{},l:r,u:t,k:o,i:null,O:!1,C:!1};return Object.defineProperty(o,W,{value:a,writable:!0}),o},P:function(e,r,i){i?n(r)&&r[W].A===e&&t(e.p):(e.o&&function e(t){if(t&&"object"==typeof t){var r=t[W];if(r){var n=r.u,i=r.k,s=r.N,l=r.t;if(4===l)a(i,(function(t){t!==W&&(void 0!==n[t]||u(n,t)?s[t]||e(i[t]):(s[t]=!0,I(r)))})),a(n,(function(e){void 0!==i[e]||u(i,e)||(s[e]=!1,I(r))}));else if(5===l){if(o(r)&&(I(r),s.length=!0),i.length<n.length)for(var c=i.length;c<n.length;c++)s[c]=!1;else for(var f=n.length;f<i.length;f++)s[f]=!0;for(var d=Math.min(i.length,n.length),h=0;h<d;h++)i.hasOwnProperty(h)||(s[h]=!0),void 0===s[h]&&e(i[h])}}}}(e.p[0]),t(e.p))},J:function(e){return 4===e.t?r(e):o(e)}})}function $(){function e(t){if(!o(t))return t;if(Array.isArray(t))return t.map(e);if(f(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(d(t))return new Set(Array.from(t).map(e));var r=Object.create(Object.getPrototypeOf(t));for(var n in t)r[n]=e(t[n]);return u(t,H)&&(r[H]=t[H]),r}function t(t){return n(t)?e(t):t}var l="add";_("Patches",{W:function(t,n){return n.forEach((function(n){for(var o=n.path,a=n.op,u=t,c=0;c<o.length-1;c++){var f=i(u),d=o[c];"string"!=typeof d&&"number"!=typeof d&&(d=""+d),0!==f&&1!==f||"__proto__"!==d&&"constructor"!==d||r(24),"function"==typeof u&&"prototype"===d&&r(24),"object"!=typeof(u=s(u,d))&&r(15,o.join("/"))}var h=i(u),p=e(n.value),m=o[o.length-1];switch(a){case"replace":switch(h){case 2:return u.set(m,p);case 3:r(16);default:return u[m]=p}case l:switch(h){case 1:return"-"===m?u.push(p):u.splice(m,0,p);case 2:return u.set(m,p);case 3:return u.add(p);default:return u[m]=p}case"remove":switch(h){case 1:return u.splice(m,1);case 2:return u.delete(m);case 3:return u.delete(n.value);default:return delete u[m]}default:r(17,a)}})),t},F:function(e,r,n,o){switch(e.t){case 0:case 4:case 2:return function(e,r,n,o){var i=e.u,c=e.i;a(e.N,(function(e,a){var f=s(i,e),d=s(c,e),h=a?u(i,e)?"replace":l:"remove";if(f!==d||"replace"!==h){var p=r.concat(e);n.push("remove"===h?{op:h,path:p}:{op:h,path:p,value:d}),o.push(h===l?{op:"remove",path:p}:"remove"===h?{op:l,path:p,value:t(f)}:{op:"replace",path:p,value:t(f)})}}))}(e,r,n,o);case 5:case 1:return function(e,r,n,o){var a=e.u,i=e.N,u=e.i;if(u.length<a.length){var s=[u,a];a=s[0],u=s[1];var c=[o,n];n=c[0],o=c[1]}for(var f=0;f<a.length;f++)if(i[f]&&u[f]!==a[f]){var d=r.concat([f]);n.push({op:"replace",path:d,value:t(u[f])}),o.push({op:"replace",path:d,value:t(a[f])})}for(var h=a.length;h<u.length;h++){var p=r.concat([h]);n.push({op:l,path:p,value:t(u[h])})}a.length<u.length&&o.push({op:"replace",path:r.concat(["length"]),value:a.length})}(e,r,n,o);case 3:return function(e,t,r,n){var o=e.u,a=e.i,i=0;o.forEach((function(e){if(!a.has(e)){var o=t.concat([i]);r.push({op:"remove",path:o,value:e}),n.unshift({op:l,path:o,value:e})}i++})),i=0,a.forEach((function(e){if(!o.has(e)){var a=t.concat([i]);r.push({op:l,path:a,value:e}),n.unshift({op:"remove",path:a,value:e})}i++}))}(e,r,n,o)}},M:function(e,t,r,n){r.push({op:"replace",path:[],value:t===J?void 0:t}),n.push({op:"replace",path:[],value:e})}})}function z(){function e(e,t){function r(){this.constructor=e}u(e,t),e.prototype=(r.prototype=t.prototype,new r)}function t(e){e.i||(e.N=new Map,e.i=new Map(e.u))}function n(e){e.i||(e.i=new Set,e.u.forEach((function(t){if(o(t)){var r=N(e.A.h,t,e);e.p.set(t,r),e.i.add(r)}else e.i.add(t)})))}function i(e){e.O&&r(3,JSON.stringify(h(e)))}var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},s=function(){function r(e,t){return this[W]={t:2,l:t,A:t?t.A:b(),g:!1,R:!1,i:void 0,N:void 0,u:e,k:this,C:!1,O:!1},this}e(r,Map);var n=r.prototype;return Object.defineProperty(n,"size",{get:function(){return h(this[W]).size}}),n.has=function(e){return h(this[W]).has(e)},n.set=function(e,r){var n=this[W];return i(n),h(n).has(e)&&h(n).get(e)===r||(t(n),I(n),n.N.set(e,!0),n.i.set(e,r),n.N.set(e,!0)),this},n.delete=function(e){if(!this.has(e))return!1;var r=this[W];return i(r),t(r),I(r),r.u.has(e)?r.N.set(e,!1):r.N.delete(e),r.i.delete(e),!0},n.clear=function(){var e=this[W];i(e),h(e).size&&(t(e),I(e),e.N=new Map,a(e.u,(function(t){e.N.set(t,!1)})),e.i.clear())},n.forEach=function(e,t){var r=this;h(this[W]).forEach((function(n,o){e.call(t,r.get(o),o,r)}))},n.get=function(e){var r=this[W];i(r);var n=h(r).get(e);if(r.R||!o(n))return n;if(n!==r.u.get(e))return n;var a=N(r.A.h,n,r);return t(r),r.i.set(e,a),a},n.keys=function(){return h(this[W]).keys()},n.values=function(){var e,t=this,r=this.keys();return(e={})[G]=function(){return t.values()},e.next=function(){var e=r.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},n.entries=function(){var e,t=this,r=this.keys();return(e={})[G]=function(){return t.entries()},e.next=function(){var e=r.next();if(e.done)return e;var n=t.get(e.value);return{done:!1,value:[e.value,n]}},e},n[G]=function(){return this.entries()},r}(),l=function(){function t(e,t){return this[W]={t:3,l:t,A:t?t.A:b(),g:!1,R:!1,i:void 0,u:e,k:this,p:new Map,O:!1,C:!1},this}e(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return h(this[W]).size}}),r.has=function(e){var t=this[W];return i(t),t.i?!!t.i.has(e)||!(!t.p.has(e)||!t.i.has(t.p.get(e))):t.u.has(e)},r.add=function(e){var t=this[W];return i(t),this.has(e)||(n(t),I(t),t.i.add(e)),this},r.delete=function(e){if(!this.has(e))return!1;var t=this[W];return i(t),n(t),I(t),t.i.delete(e)||!!t.p.has(e)&&t.i.delete(t.p.get(e))},r.clear=function(){var e=this[W];i(e),h(e).size&&(n(e),I(e),e.i.clear())},r.values=function(){var e=this[W];return i(e),n(e),e.i.values()},r.entries=function(){var e=this[W];return i(e),n(e),e.i.entries()},r.keys=function(){return this.values()},r[G]=function(){return this.values()},r.forEach=function(e,t){for(var r=this.values(),n=r.next();!n.done;)e.call(t,n.value,n.value,this),n=r.next()},t}();_("MapSet",{K:function(e,t){return new s(e,t)},$:function(e,t){return new l(e,t)}})}var F;Object.defineProperty(t,"__esModule",{value:!0});var U,Q="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),B="undefined"!=typeof Map,q="undefined"!=typeof Set,V="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,J=Q?Symbol.for("immer-nothing"):((F={})["immer-nothing"]=!0,F),H=Q?Symbol.for("immer-draftable"):"__$immer_draftable",W=Q?Symbol.for("immer-state"):"__$immer_state",G="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",K=""+Object.prototype.constructor,Z="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Y=Object.getOwnPropertyDescriptors||function(e){var t={};return Z(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},X={},ee={get:function(e,t){if(t===W)return e;var r=h(e);if(!u(r,t))return function(e,t,r){var n,o=M(t,r);return o?"value"in o?o.value:null===(n=o.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.R||!o(n)?n:n===A(e.u,t)?(R(e),e.i[t]=N(e.A.h,n,e)):n},has:function(e,t){return t in h(e)},ownKeys:function(e){return Reflect.ownKeys(h(e))},set:function(e,t,r){var n=M(h(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.g){var o=A(h(e),t),a=null==o?void 0:o[W];if(a&&a.u===r)return e.i[t]=r,e.N[t]=!1,!0;if(c(r,o)&&(void 0!==r||u(e.u,t)))return!0;R(e),I(e)}return e.i[t]===r&&(void 0!==r||t in e.i)||Number.isNaN(r)&&Number.isNaN(e.i[t])||(e.i[t]=r,e.N[t]=!0),!0},deleteProperty:function(e,t){return void 0!==A(e.u,t)||t in e.u?(e.N[t]=!1,R(e),I(e)):delete e.N[t],e.i&&delete e.i[t],!0},getOwnPropertyDescriptor:function(e,t){var r=h(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.t||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.u)},setPrototypeOf:function(){r(12)}},te={};a(ee,(function(e,t){te[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),te.deleteProperty=function(e,t){return te.set.call(this,e,t,void 0)},te.set=function(e,t,r){return ee.set.call(this,e[0],t,r,e[0])};var re=function(){function e(e){var t=this;this.S=V,this.D=!0,this.produce=function(e,n,a){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var u=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return u.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(o))}))}}var s;if("function"!=typeof n&&r(6),void 0!==a&&"function"!=typeof a&&r(7),o(e)){var l=j(t),c=N(t,e,void 0),f=!0;try{s=n(c),f=!1}finally{f?O(l):w(l)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(e){return E(l,a),P(e,l)}),(function(e){throw O(l),e})):(E(l,a),P(s,l))}if(!e||"object"!=typeof e){if(void 0===(s=n(e))&&(s=e),s===J&&(s=void 0),t.D&&m(s,!0),a){var d=[],h=[];y("Patches").M(e,s,d,h),a(d,h)}return s}r(21,e)},this.produceWithPatches=function(e,r){if("function"==typeof e)return function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return t.produceWithPatches(r,(function(t){return e.apply(void 0,[t].concat(o))}))};var n,o,a=t.produce(e,r,(function(e,t){n=e,o=t}));return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return[e,n,o]})):[a,n,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){o(e)||r(8),n(e)&&(e=D(e));var t=j(this),a=N(this,e,void 0);return a[W].C=!0,w(t),a},t.finishDraft=function(e,t){var r=(e&&e[W]).A;return E(r,t),P(void 0,r)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!V&&r(20),this.S=e},t.applyPatches=function(e,t){var r;for(r=t.length-1;r>=0;r--){var o=t[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(t=t.slice(r+1));var a=y("Patches").W;return n(e)?a(e,t):this.produce(e,(function(e){return a(e,t)}))},e}(),ne=new re,oe=ne.produce,ae=ne.produceWithPatches.bind(ne),ie=ne.setAutoFreeze.bind(ne),ue=ne.setUseProxies.bind(ne),se=ne.applyPatches.bind(ne),le=ne.createDraft.bind(ne),ce=ne.finishDraft.bind(ne);t.Immer=re,t.applyPatches=se,t.castDraft=function(e){return e},t.castImmutable=function(e){return e},t.createDraft=le,t.current=D,t.default=oe,t.enableAllPlugins=function(){L(),z(),$()},t.enableES5=L,t.enableMapSet=z,t.enablePatches=$,t.finishDraft=ce,t.freeze=m,t.immerable=H,t.isDraft=n,t.isDraftable=o,t.nothing=J,t.original=function(e){return n(e)||r(23,e),e[W].u},t.produce=oe,t.produceWithPatches=ae,t.setAutoFreeze=ie,t.setUseProxies=ue},83346:(e,t,r)=>{"use strict";e.exports=r(64617)},9073:(e,t,r)=>{var n=r(82316),o=r(76458),a=r(2149),i=r(44297),u=r(33121);function s(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=u,e.exports=s},72707:(e,t,r)=>{var n=r(39714),o=r(33812),a=r(14727),i=r(8379),u=r(8291);function s(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=u,e.exports=s},91955:(e,t,r)=>{var n=r(99138)(r(41433),"Map");e.exports=n},90369:(e,t,r)=>{var n=r(72092),o=r(49626),a=r(79925),i=r(26809),u=r(94385);function s(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=u,e.exports=s},32781:(e,t,r)=>{var n=r(41433).Symbol;e.exports=n},44272:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},82863:(e,t,r)=>{var n=r(14772),o=r(39316),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var i=e[t];a.call(e,t)&&o(i,r)&&(void 0!==r||t in e)||n(e,t,r)}},58301:(e,t,r)=>{var n=r(39316);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},14772:(e,t,r)=>{var n=r(18559);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},17722:(e,t,r)=>{var n=r(87181),o=r(86729);e.exports=function(e,t){for(var r=0,a=(t=n(t,e)).length;null!=e&&r<a;)e=e[o(t[r++])];return r&&r==a?e:void 0}},87148:(e,t,r)=>{var n=r(32781),o=r(17903),a=r(71738),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},16567:(e,t,r)=>{var n=r(18446),o=r(18092),a=r(58953),i=r(81485),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,f=l.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(n(e)?d:u).test(i(e))}},68230:(e,t,r)=>{var n=r(82863),o=r(87181),a=r(42845),i=r(58953),u=r(86729);e.exports=function(e,t,r,s){if(!i(e))return e;for(var l=-1,c=(t=o(t,e)).length,f=c-1,d=e;null!=d&&++l<c;){var h=u(t[l]),p=r;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(l!=f){var m=d[h];void 0===(p=s?s(m,h,d):void 0)&&(p=i(m)?m:a(t[l+1])?[]:{})}n(d,h,p),d=d[h]}return e}},36584:(e,t,r)=>{var n=r(32781),o=r(44272),a=r(6397),i=r(75414),u=n?n.prototype:void 0,s=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return s?s.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},87181:(e,t,r)=>{var n=r(6397),o=r(13726),a=r(43614),i=r(53506);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:a(i(e))}},38109:(e,t,r)=>{var n=r(41433)["__core-js_shared__"];e.exports=n},18559:(e,t,r)=>{var n=r(99138),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},75380:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},15535:(e,t,r)=>{var n=r(95662);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},99138:(e,t,r)=>{var n=r(16567),o=r(6772);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},17903:(e,t,r)=>{var n=r(32781),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(s){}var o=i.call(e);return n&&(t?e[u]=r:delete e[u]),o}},6772:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},82316:(e,t,r)=>{var n=r(4558);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},76458:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},2149:(e,t,r)=>{var n=r(4558),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},44297:(e,t,r)=>{var n=r(4558),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},33121:(e,t,r)=>{var n=r(4558);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},42845:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},13726:(e,t,r)=>{var n=r(6397),o=r(75414),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(i.test(e)||!a.test(e)||null!=t&&e in Object(t))}},95662:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},18092:(e,t,r)=>{var n,o=r(38109),a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!a&&a in e}},39714:e=>{e.exports=function(){this.__data__=[],this.size=0}},33812:(e,t,r)=>{var n=r(58301),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},14727:(e,t,r)=>{var n=r(58301);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},8379:(e,t,r)=>{var n=r(58301);e.exports=function(e){return n(this.__data__,e)>-1}},8291:(e,t,r)=>{var n=r(58301);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},72092:(e,t,r)=>{var n=r(9073),o=r(72707),a=r(91955);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},49626:(e,t,r)=>{var n=r(15535);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},79925:(e,t,r)=>{var n=r(15535);e.exports=function(e){return n(this,e).get(e)}},26809:(e,t,r)=>{var n=r(15535);e.exports=function(e){return n(this,e).has(e)}},94385:(e,t,r)=>{var n=r(15535);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},79268:(e,t,r)=>{var n=r(14556);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},4558:(e,t,r)=>{var n=r(99138)(Object,"create");e.exports=n},71738:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},41433:(e,t,r)=>{var n=r(75380),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},43614:(e,t,r)=>{var n=r(79268),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(a,"$1"):r||e)})),t}));e.exports=i},86729:(e,t,r)=>{var n=r(75414);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},81485:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},39316:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},62832:(e,t,r)=>{var n=r(17722);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},6397:e=>{var t=Array.isArray;e.exports=t},18446:(e,t,r)=>{var n=r(87148),o=r(58953);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},58953:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},22934:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},75414:(e,t,r)=>{var n=r(87148),o=r(22934);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},17243:function(e,t,r){var n;e=r.nmd(e),function(){var o,a="Expected a function",i="__lodash_hash_undefined__",u="__lodash_placeholder__",s=16,l=32,c=64,f=128,d=256,h=1/0,p=9007199254740991,m=NaN,v=4294967295,g=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",c],["rearg",d]],y="[object Arguments]",_="[object Array]",b="[object Boolean]",E="[object Date]",O="[object Error]",w="[object Function]",j="[object GeneratorFunction]",x="[object Map]",P="[object Number]",S="[object Object]",k="[object Promise]",C="[object RegExp]",A="[object Set]",M="[object String]",I="[object Symbol]",R="[object WeakMap]",N="[object ArrayBuffer]",D="[object DataView]",T="[object Float32Array]",L="[object Float64Array]",$="[object Int8Array]",z="[object Int16Array]",F="[object Int32Array]",U="[object Uint8Array]",Q="[object Uint8ClampedArray]",B="[object Uint16Array]",q="[object Uint32Array]",V=/\b__p \+= '';/g,J=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,K=RegExp(W.source),Z=RegExp(G.source),Y=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),ie=/^\s+/,ue=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,_e=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,Ee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Oe=/($^)/,we=/['\n\r\u2028\u2029\\]/g,je="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Pe="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",ke="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="['\u2019]",Ie="["+je+"]",Re="["+Ae+"]",Ne="["+xe+"]",De="\\d+",Te="["+Pe+"]",Le="["+Se+"]",$e="[^"+je+Ae+De+Pe+Se+ke+"]",ze="\\ud83c[\\udffb-\\udfff]",Fe="[^"+je+"]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",Qe="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+ke+"]",qe="\\u200d",Ve="(?:"+Le+"|"+$e+")",Je="(?:"+Be+"|"+$e+")",He="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",We="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Ne+"|"+ze+")"+"?",Ke="["+Ce+"]?",Ze=Ke+Ge+("(?:"+qe+"(?:"+[Fe,Ue,Qe].join("|")+")"+Ke+Ge+")*"),Ye="(?:"+[Te,Ue,Qe].join("|")+")"+Ze,Xe="(?:"+[Fe+Ne+"?",Ne,Ue,Qe,Ie].join("|")+")",et=RegExp(Me,"g"),tt=RegExp(Ne,"g"),rt=RegExp(ze+"(?="+ze+")|"+Xe+Ze,"g"),nt=RegExp([Be+"?"+Le+"+"+He+"(?="+[Re,Be,"$"].join("|")+")",Je+"+"+We+"(?="+[Re,Be+Ve,"$"].join("|")+")",Be+"?"+Ve+"+"+He,Be+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",De,Ye].join("|"),"g"),ot=RegExp("["+qe+je+xe+Ce+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ut=-1,st={};st[T]=st[L]=st[$]=st[z]=st[F]=st[U]=st[Q]=st[B]=st[q]=!0,st[y]=st[_]=st[N]=st[b]=st[D]=st[E]=st[O]=st[w]=st[x]=st[P]=st[S]=st[C]=st[A]=st[M]=st[R]=!1;var lt={};lt[y]=lt[_]=lt[N]=lt[D]=lt[b]=lt[E]=lt[T]=lt[L]=lt[$]=lt[z]=lt[F]=lt[x]=lt[P]=lt[S]=lt[C]=lt[A]=lt[M]=lt[I]=lt[U]=lt[Q]=lt[B]=lt[q]=!0,lt[O]=lt[w]=lt[R]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,dt=parseInt,ht="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,pt="object"==typeof self&&self&&self.Object===Object&&self,mt=ht||pt||Function("return this")(),vt=t&&!t.nodeType&&t,gt=vt&&e&&!e.nodeType&&e,yt=gt&>.exports===vt,_t=yt&&ht.process,bt=function(){try{var e=gt&>.require&>.require("util").types;return e||_t&&_t.binding&&_t.binding("util")}catch(t){}}(),Et=bt&&bt.isArrayBuffer,Ot=bt&&bt.isDate,wt=bt&&bt.isMap,jt=bt&&bt.isRegExp,xt=bt&&bt.isSet,Pt=bt&&bt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function kt(e,t,r,n){for(var o=-1,a=null==e?0:e.length;++o<a;){var i=e[o];t(n,i,r(i),e)}return n}function Ct(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function At(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Mt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function It(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}function Rt(e,t){return!!(null==e?0:e.length)&&Bt(e,t,0)>-1}function Nt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function Dt(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function Tt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Lt(e,t,r,n){var o=-1,a=null==e?0:e.length;for(n&&a&&(r=e[++o]);++o<a;)r=t(r,e[o],o,e);return r}function $t(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function zt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ft=Ht("length");function Ut(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}function Qt(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function Bt(e,t,r){return t==t?function(e,t,r){var n=r-1,o=e.length;for(;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):Qt(e,Vt,r)}function qt(e,t,r,n){for(var o=r-1,a=e.length;++o<a;)if(n(e[o],t))return o;return-1}function Vt(e){return e!=e}function Jt(e,t){var r=null==e?0:e.length;return r?Kt(e,t)/r:m}function Ht(e){return function(t){return null==t?o:t[e]}}function Wt(e){return function(t){return null==e?o:e[t]}}function Gt(e,t,r,n,o){return o(e,(function(e,o,a){r=n?(n=!1,e):t(r,e,o,a)})),r}function Kt(e,t){for(var r,n=-1,a=e.length;++n<a;){var i=t(e[n]);i!==o&&(r=r===o?i:r+i)}return r}function Zt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Yt(e){return e?e.slice(0,mr(e)+1).replace(ie,""):e}function Xt(e){return function(t){return e(t)}}function er(e,t){return Dt(t,(function(t){return e[t]}))}function tr(e,t){return e.has(t)}function rr(e,t){for(var r=-1,n=e.length;++r<n&&Bt(t,e[r],0)>-1;);return r}function nr(e,t){for(var r=e.length;r--&&Bt(t,e[r],0)>-1;);return r}var or=Wt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),ar=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+ct[e]}function ur(e){return ot.test(e)}function sr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function lr(e,t){return function(r){return e(t(r))}}function cr(e,t){for(var r=-1,n=e.length,o=0,a=[];++r<n;){var i=e[r];i!==t&&i!==u||(e[r]=u,a[o++]=r)}return a}function fr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function dr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function hr(e){return ur(e)?function(e){var t=rt.lastIndex=0;for(;rt.test(e);)++t;return t}(e):Ft(e)}function pr(e){return ur(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.split("")}(e)}function mr(e){for(var t=e.length;t--&&ue.test(e.charAt(t)););return t}var vr=Wt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var gr=function e(t){var r,n=(t=null==t?mt:gr.defaults(mt.Object(),t,gr.pick(mt,it))).Array,ue=t.Date,je=t.Error,xe=t.Function,Pe=t.Math,Se=t.Object,ke=t.RegExp,Ce=t.String,Ae=t.TypeError,Me=n.prototype,Ie=xe.prototype,Re=Se.prototype,Ne=t["__core-js_shared__"],De=Ie.toString,Te=Re.hasOwnProperty,Le=0,$e=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",ze=Re.toString,Fe=De.call(Se),Ue=mt._,Qe=ke("^"+De.call(Te).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=yt?t.Buffer:o,qe=t.Symbol,Ve=t.Uint8Array,Je=Be?Be.allocUnsafe:o,He=lr(Se.getPrototypeOf,Se),We=Se.create,Ge=Re.propertyIsEnumerable,Ke=Me.splice,Ze=qe?qe.isConcatSpreadable:o,Ye=qe?qe.iterator:o,Xe=qe?qe.toStringTag:o,rt=function(){try{var e=ha(Se,"defineProperty");return e({},"",{}),e}catch(t){}}(),ot=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,ct=ue&&ue.now!==mt.Date.now&&ue.now,ht=t.setTimeout!==mt.setTimeout&&t.setTimeout,pt=Pe.ceil,vt=Pe.floor,gt=Se.getOwnPropertySymbols,_t=Be?Be.isBuffer:o,bt=t.isFinite,Ft=Me.join,Wt=lr(Se.keys,Se),yr=Pe.max,_r=Pe.min,br=ue.now,Er=t.parseInt,Or=Pe.random,wr=Me.reverse,jr=ha(t,"DataView"),xr=ha(t,"Map"),Pr=ha(t,"Promise"),Sr=ha(t,"Set"),kr=ha(t,"WeakMap"),Cr=ha(Se,"create"),Ar=kr&&new kr,Mr={},Ir=za(jr),Rr=za(xr),Nr=za(Pr),Dr=za(Sr),Tr=za(kr),Lr=qe?qe.prototype:o,$r=Lr?Lr.valueOf:o,zr=Lr?Lr.toString:o;function Fr(e){if(ru(e)&&!Vi(e)&&!(e instanceof qr)){if(e instanceof Br)return e;if(Te.call(e,"__wrapped__"))return Fa(e)}return new Br(e)}var Ur=function(){function e(){}return function(t){if(!tu(t))return{};if(We)return We(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function Qr(){}function Br(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function qr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Jr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Hr;++t<r;)this.add(e[t])}function Gr(e){var t=this.__data__=new Jr(e);this.size=t.size}function Kr(e,t){var r=Vi(e),n=!r&&qi(e),o=!r&&!n&&Gi(e),a=!r&&!n&&!o&&cu(e),i=r||n||o||a,u=i?Zt(e.length,Ce):[],s=u.length;for(var l in e)!t&&!Te.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ba(l,s))||u.push(l);return u}function Zr(e){var t=e.length;return t?e[Gn(0,t-1)]:o}function Yr(e,t){return Ta(Mo(e),sn(t,0,e.length))}function Xr(e){return Ta(Mo(e))}function en(e,t,r){(r!==o&&!Ui(e[t],r)||r===o&&!(t in e))&&an(e,t,r)}function tn(e,t,r){var n=e[t];Te.call(e,t)&&Ui(n,r)&&(r!==o||t in e)||an(e,t,r)}function rn(e,t){for(var r=e.length;r--;)if(Ui(e[r][0],t))return r;return-1}function nn(e,t,r,n){return hn(e,(function(e,o,a){t(n,e,r(e),a)})),n}function on(e,t){return e&&Io(t,Iu(t),e)}function an(e,t,r){"__proto__"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function un(e,t){for(var r=-1,a=t.length,i=n(a),u=null==e;++r<a;)i[r]=u?o:Su(e,t[r]);return i}function sn(e,t,r){return e==e&&(r!==o&&(e=e<=r?e:r),t!==o&&(e=e>=t?e:t)),e}function ln(e,t,r,n,a,i){var u,s=1&t,l=2&t,c=4&t;if(r&&(u=a?r(e,n,a,i):r(e)),u!==o)return u;if(!tu(e))return e;var f=Vi(e);if(f){if(u=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!s)return Mo(e,u)}else{var d=va(e),h=d==w||d==j;if(Gi(e))return xo(e,s);if(d==S||d==y||h&&!a){if(u=l||h?{}:ya(e),!s)return l?function(e,t){return Io(e,ma(e),t)}(e,function(e,t){return e&&Io(t,Ru(t),e)}(u,e)):function(e,t){return Io(e,pa(e),t)}(e,on(u,e))}else{if(!lt[d])return a?e:{};u=function(e,t,r){var n=e.constructor;switch(t){case N:return Po(e);case b:case E:return new n(+e);case D:return function(e,t){var r=t?Po(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case T:case L:case $:case z:case F:case U:case Q:case B:case q:return So(e,r);case x:return new n;case P:case M:return new n(e);case C:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new n;case I:return o=e,$r?Se($r.call(o)):{}}var o}(e,d,s)}}i||(i=new Gr);var p=i.get(e);if(p)return p;i.set(e,u),uu(e)?e.forEach((function(n){u.add(ln(n,t,r,n,e,i))})):nu(e)&&e.forEach((function(n,o){u.set(o,ln(n,t,r,o,e,i))}));var m=f?o:(c?l?ia:aa:l?Ru:Iu)(e);return Ct(m||e,(function(n,o){m&&(n=e[o=n]),tn(u,o,ln(n,t,r,o,e,i))})),u}function cn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Se(e);n--;){var a=r[n],i=t[a],u=e[a];if(u===o&&!(a in e)||!i(u))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new Ae(a);return Ia((function(){e.apply(o,r)}),t)}function dn(e,t,r,n){var o=-1,a=Rt,i=!0,u=e.length,s=[],l=t.length;if(!u)return s;r&&(t=Dt(t,Xt(r))),n?(a=Nt,i=!1):t.length>=200&&(a=tr,i=!1,t=new Wr(t));e:for(;++o<u;){var c=e[o],f=null==r?c:r(c);if(c=n||0!==c?c:0,i&&f==f){for(var d=l;d--;)if(t[d]===f)continue e;s.push(c)}else a(t,f,n)||s.push(c)}return s}Fr.templateSettings={escape:Y,evaluate:X,interpolate:ee,variable:"",imports:{_:Fr}},Fr.prototype=Qr.prototype,Fr.prototype.constructor=Fr,Br.prototype=Ur(Qr.prototype),Br.prototype.constructor=Br,qr.prototype=Ur(Qr.prototype),qr.prototype.constructor=qr,Vr.prototype.clear=function(){this.__data__=Cr?Cr(null):{},this.size=0},Vr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vr.prototype.get=function(e){var t=this.__data__;if(Cr){var r=t[e];return r===i?o:r}return Te.call(t,e)?t[e]:o},Vr.prototype.has=function(e){var t=this.__data__;return Cr?t[e]!==o:Te.call(t,e)},Vr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Cr&&t===o?i:t,this},Jr.prototype.clear=function(){this.__data__=[],this.size=0},Jr.prototype.delete=function(e){var t=this.__data__,r=rn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Ke.call(t,r,1),--this.size,!0)},Jr.prototype.get=function(e){var t=this.__data__,r=rn(t,e);return r<0?o:t[r][1]},Jr.prototype.has=function(e){return rn(this.__data__,e)>-1},Jr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new Vr,map:new(xr||Jr),string:new Vr}},Hr.prototype.delete=function(e){var t=fa(this,e).delete(e);return this.size-=t?1:0,t},Hr.prototype.get=function(e){return fa(this,e).get(e)},Hr.prototype.has=function(e){return fa(this,e).has(e)},Hr.prototype.set=function(e,t){var r=fa(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Wr.prototype.add=Wr.prototype.push=function(e){return this.__data__.set(e,i),this},Wr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.clear=function(){this.__data__=new Jr,this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Gr.prototype.get=function(e){return this.__data__.get(e)},Gr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Jr){var n=r.__data__;if(!xr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(e,t),this.size=r.size,this};var hn=Do(En),pn=Do(On,!0);function mn(e,t){var r=!0;return hn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function vn(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],u=t(i);if(null!=u&&(s===o?u==u&&!lu(u):r(u,s)))var s=u,l=i}return l}function gn(e,t){var r=[];return hn(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}function yn(e,t,r,n,o){var a=-1,i=e.length;for(r||(r=_a),o||(o=[]);++a<i;){var u=e[a];t>0&&r(u)?t>1?yn(u,t-1,r,n,o):Tt(o,u):n||(o[o.length]=u)}return o}var _n=To(),bn=To(!0);function En(e,t){return e&&_n(e,t,Iu)}function On(e,t){return e&&bn(e,t,Iu)}function wn(e,t){return It(t,(function(t){return Yi(e[t])}))}function jn(e,t){for(var r=0,n=(t=Eo(t,e)).length;null!=e&&r<n;)e=e[$a(t[r++])];return r&&r==n?e:o}function xn(e,t,r){var n=t(e);return Vi(e)?n:Tt(n,r(e))}function Pn(e){return null==e?e===o?"[object Undefined]":"[object Null]":Xe&&Xe in Se(e)?function(e){var t=Te.call(e,Xe),r=e[Xe];try{e[Xe]=o;var n=!0}catch(i){}var a=ze.call(e);n&&(t?e[Xe]=r:delete e[Xe]);return a}(e):function(e){return ze.call(e)}(e)}function Sn(e,t){return e>t}function kn(e,t){return null!=e&&Te.call(e,t)}function Cn(e,t){return null!=e&&t in Se(e)}function An(e,t,r){for(var a=r?Nt:Rt,i=e[0].length,u=e.length,s=u,l=n(u),c=1/0,f=[];s--;){var d=e[s];s&&t&&(d=Dt(d,Xt(t))),c=_r(d.length,c),l[s]=!r&&(t||i>=120&&d.length>=120)?new Wr(s&&d):o}d=e[0];var h=-1,p=l[0];e:for(;++h<i&&f.length<c;){var m=d[h],v=t?t(m):m;if(m=r||0!==m?m:0,!(p?tr(p,v):a(f,v,r))){for(s=u;--s;){var g=l[s];if(!(g?tr(g,v):a(e[s],v,r)))continue e}p&&p.push(v),f.push(m)}}return f}function Mn(e,t,r){var n=null==(e=Ca(e,t=Eo(t,e)))?e:e[$a(Za(t))];return null==n?o:St(n,e,r)}function In(e){return ru(e)&&Pn(e)==y}function Rn(e,t,r,n,a){return e===t||(null==e||null==t||!ru(e)&&!ru(t)?e!=e&&t!=t:function(e,t,r,n,a,i){var u=Vi(e),s=Vi(t),l=u?_:va(e),c=s?_:va(t),f=(l=l==y?S:l)==S,d=(c=c==y?S:c)==S,h=l==c;if(h&&Gi(e)){if(!Gi(t))return!1;u=!0,f=!1}if(h&&!f)return i||(i=new Gr),u||cu(e)?na(e,t,r,n,a,i):function(e,t,r,n,o,a,i){switch(r){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!a(new Ve(e),new Ve(t)));case b:case E:case P:return Ui(+e,+t);case O:return e.name==t.name&&e.message==t.message;case C:case M:return e==t+"";case x:var u=sr;case A:var s=1&n;if(u||(u=fr),e.size!=t.size&&!s)return!1;var l=i.get(e);if(l)return l==t;n|=2,i.set(e,t);var c=na(u(e),u(t),n,o,a,i);return i.delete(e),c;case I:if($r)return $r.call(e)==$r.call(t)}return!1}(e,t,l,r,n,a,i);if(!(1&r)){var p=f&&Te.call(e,"__wrapped__"),m=d&&Te.call(t,"__wrapped__");if(p||m){var v=p?e.value():e,g=m?t.value():t;return i||(i=new Gr),a(v,g,r,n,i)}}if(!h)return!1;return i||(i=new Gr),function(e,t,r,n,a,i){var u=1&r,s=aa(e),l=s.length,c=aa(t),f=c.length;if(l!=f&&!u)return!1;var d=l;for(;d--;){var h=s[d];if(!(u?h in t:Te.call(t,h)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var v=!0;i.set(e,t),i.set(t,e);var g=u;for(;++d<l;){var y=e[h=s[d]],_=t[h];if(n)var b=u?n(_,y,h,t,e,i):n(y,_,h,e,t,i);if(!(b===o?y===_||a(y,_,r,n,i):b)){v=!1;break}g||(g="constructor"==h)}if(v&&!g){var E=e.constructor,O=t.constructor;E==O||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof O&&O instanceof O||(v=!1)}return i.delete(e),i.delete(t),v}(e,t,r,n,a,i)}(e,t,r,n,Rn,a))}function Nn(e,t,r,n){var a=r.length,i=a,u=!n;if(null==e)return!i;for(e=Se(e);a--;){var s=r[a];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){var l=(s=r[a])[0],c=e[l],f=s[1];if(u&&s[2]){if(c===o&&!(l in e))return!1}else{var d=new Gr;if(n)var h=n(c,f,l,e,t,d);if(!(h===o?Rn(f,c,3,n,d):h))return!1}}return!0}function Dn(e){return!(!tu(e)||(t=e,$e&&$e in t))&&(Yi(e)?Qe:ye).test(za(e));var t}function Tn(e){return"function"==typeof e?e:null==e?os:"object"==typeof e?Vi(e)?Qn(e[0],e[1]):Un(e):hs(e)}function Ln(e){if(!xa(e))return Wt(e);var t=[];for(var r in Se(e))Te.call(e,r)&&"constructor"!=r&&t.push(r);return t}function $n(e){if(!tu(e))return function(e){var t=[];if(null!=e)for(var r in Se(e))t.push(r);return t}(e);var t=xa(e),r=[];for(var n in e)("constructor"!=n||!t&&Te.call(e,n))&&r.push(n);return r}function zn(e,t){return e<t}function Fn(e,t){var r=-1,o=Hi(e)?n(e.length):[];return hn(e,(function(e,n,a){o[++r]=t(e,n,a)})),o}function Un(e){var t=da(e);return 1==t.length&&t[0][2]?Sa(t[0][0],t[0][1]):function(r){return r===e||Nn(r,e,t)}}function Qn(e,t){return Oa(e)&&Pa(t)?Sa($a(e),t):function(r){var n=Su(r,e);return n===o&&n===t?ku(r,e):Rn(t,n,3)}}function Bn(e,t,r,n,a){e!==t&&_n(t,(function(i,u){if(a||(a=new Gr),tu(i))!function(e,t,r,n,a,i,u){var s=Aa(e,r),l=Aa(t,r),c=u.get(l);if(c)return void en(e,r,c);var f=i?i(s,l,r+"",e,t,u):o,d=f===o;if(d){var h=Vi(l),p=!h&&Gi(l),m=!h&&!p&&cu(l);f=l,h||p||m?Vi(s)?f=s:Wi(s)?f=Mo(s):p?(d=!1,f=xo(l,!0)):m?(d=!1,f=So(l,!0)):f=[]:au(l)||qi(l)?(f=s,qi(s)?f=yu(s):tu(s)&&!Yi(s)||(f=ya(l))):d=!1}d&&(u.set(l,f),a(f,l,n,i,u),u.delete(l));en(e,r,f)}(e,t,u,r,Bn,n,a);else{var s=n?n(Aa(e,u),i,u+"",e,t,a):o;s===o&&(s=i),en(e,u,s)}}),Ru)}function qn(e,t){var r=e.length;if(r)return ba(t+=t<0?r:0,r)?e[t]:o}function Vn(e,t,r){t=t.length?Dt(t,(function(e){return Vi(e)?function(t){return jn(t,1===e.length?e[0]:e)}:e})):[os];var n=-1;t=Dt(t,Xt(ca()));var o=Fn(e,(function(e,r,o){var a=Dt(t,(function(t){return t(e)}));return{criteria:a,index:++n,value:e}}));return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(o,(function(e,t){return function(e,t,r){var n=-1,o=e.criteria,a=t.criteria,i=o.length,u=r.length;for(;++n<i;){var s=ko(o[n],a[n]);if(s)return n>=u?s:s*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Jn(e,t,r){for(var n=-1,o=t.length,a={};++n<o;){var i=t[n],u=jn(e,i);r(u,i)&&eo(a,Eo(i,e),u)}return a}function Hn(e,t,r,n){var o=n?qt:Bt,a=-1,i=t.length,u=e;for(e===t&&(t=Mo(t)),r&&(u=Dt(e,Xt(r)));++a<i;)for(var s=0,l=t[a],c=r?r(l):l;(s=o(u,c,s,n))>-1;)u!==e&&Ke.call(u,s,1),Ke.call(e,s,1);return e}function Wn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==a){var a=o;ba(o)?Ke.call(e,o,1):ho(e,o)}}return e}function Gn(e,t){return e+vt(Or()*(t-e+1))}function Kn(e,t){var r="";if(!e||t<1||t>p)return r;do{t%2&&(r+=e),(t=vt(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Ra(ka(e,t,os),e+"")}function Yn(e){return Zr(Uu(e))}function Xn(e,t){var r=Uu(e);return Ta(r,sn(t,0,r.length))}function eo(e,t,r,n){if(!tu(e))return e;for(var a=-1,i=(t=Eo(t,e)).length,u=i-1,s=e;null!=s&&++a<i;){var l=$a(t[a]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(a!=u){var f=s[l];(c=n?n(f,l,s):o)===o&&(c=tu(f)?f:ba(t[a+1])?[]:{})}tn(s,l,c),s=s[l]}return e}var to=Ar?function(e,t){return Ar.set(e,t),e}:os,ro=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:ts(t),writable:!0})}:os;function no(e){return Ta(Uu(e))}function oo(e,t,r){var o=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=n(a);++o<a;)i[o]=e[o+t];return i}function ao(e,t){var r;return hn(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}function io(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var a=n+o>>>1,i=e[a];null!==i&&!lu(i)&&(r?i<=t:i<t)?n=a+1:o=a}return o}return uo(e,t,os,r)}function uo(e,t,r,n){var a=0,i=null==e?0:e.length;if(0===i)return 0;for(var u=(t=r(t))!=t,s=null===t,l=lu(t),c=t===o;a<i;){var f=vt((a+i)/2),d=r(e[f]),h=d!==o,p=null===d,m=d==d,v=lu(d);if(u)var g=n||m;else g=c?m&&(n||h):s?m&&h&&(n||!p):l?m&&h&&!p&&(n||!v):!p&&!v&&(n?d<=t:d<t);g?a=f+1:i=f}return _r(i,4294967294)}function so(e,t){for(var r=-1,n=e.length,o=0,a=[];++r<n;){var i=e[r],u=t?t(i):i;if(!r||!Ui(u,s)){var s=u;a[o++]=0===i?0:i}}return a}function lo(e){return"number"==typeof e?e:lu(e)?m:+e}function co(e){if("string"==typeof e)return e;if(Vi(e))return Dt(e,co)+"";if(lu(e))return zr?zr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fo(e,t,r){var n=-1,o=Rt,a=e.length,i=!0,u=[],s=u;if(r)i=!1,o=Nt;else if(a>=200){var l=t?null:Zo(e);if(l)return fr(l);i=!1,o=tr,s=new Wr}else s=t?[]:u;e:for(;++n<a;){var c=e[n],f=t?t(c):c;if(c=r||0!==c?c:0,i&&f==f){for(var d=s.length;d--;)if(s[d]===f)continue e;t&&s.push(f),u.push(c)}else o(s,f,r)||(s!==u&&s.push(f),u.push(c))}return u}function ho(e,t){return null==(e=Ca(e,t=Eo(t,e)))||delete e[$a(Za(t))]}function po(e,t,r,n){return eo(e,t,r(jn(e,t)),n)}function mo(e,t,r,n){for(var o=e.length,a=n?o:-1;(n?a--:++a<o)&&t(e[a],a,e););return r?oo(e,n?0:a,n?a+1:o):oo(e,n?a+1:0,n?o:a)}function vo(e,t){var r=e;return r instanceof qr&&(r=r.value()),Lt(t,(function(e,t){return t.func.apply(t.thisArg,Tt([e],t.args))}),r)}function go(e,t,r){var o=e.length;if(o<2)return o?fo(e[0]):[];for(var a=-1,i=n(o);++a<o;)for(var u=e[a],s=-1;++s<o;)s!=a&&(i[a]=dn(i[a]||u,e[s],t,r));return fo(yn(i,1),t,r)}function yo(e,t,r){for(var n=-1,a=e.length,i=t.length,u={};++n<a;){var s=n<i?t[n]:o;r(u,e[n],s)}return u}function _o(e){return Wi(e)?e:[]}function bo(e){return"function"==typeof e?e:os}function Eo(e,t){return Vi(e)?e:Oa(e,t)?[e]:La(_u(e))}var Oo=Zn;function wo(e,t,r){var n=e.length;return r=r===o?n:r,!t&&r>=n?e:oo(e,t,r)}var jo=ot||function(e){return mt.clearTimeout(e)};function xo(e,t){if(t)return e.slice();var r=e.length,n=Je?Je(r):new e.constructor(r);return e.copy(n),n}function Po(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function So(e,t){var r=t?Po(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function ko(e,t){if(e!==t){var r=e!==o,n=null===e,a=e==e,i=lu(e),u=t!==o,s=null===t,l=t==t,c=lu(t);if(!s&&!c&&!i&&e>t||i&&u&&l&&!s&&!c||n&&u&&l||!r&&l||!a)return 1;if(!n&&!i&&!c&&e<t||c&&r&&a&&!n&&!i||s&&r&&a||!u&&a||!l)return-1}return 0}function Co(e,t,r,o){for(var a=-1,i=e.length,u=r.length,s=-1,l=t.length,c=yr(i-u,0),f=n(l+c),d=!o;++s<l;)f[s]=t[s];for(;++a<u;)(d||a<i)&&(f[r[a]]=e[a]);for(;c--;)f[s++]=e[a++];return f}function Ao(e,t,r,o){for(var a=-1,i=e.length,u=-1,s=r.length,l=-1,c=t.length,f=yr(i-s,0),d=n(f+c),h=!o;++a<f;)d[a]=e[a];for(var p=a;++l<c;)d[p+l]=t[l];for(;++u<s;)(h||a<i)&&(d[p+r[u]]=e[a++]);return d}function Mo(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function Io(e,t,r,n){var a=!r;r||(r={});for(var i=-1,u=t.length;++i<u;){var s=t[i],l=n?n(r[s],e[s],s,r,e):o;l===o&&(l=e[s]),a?an(r,s,l):tn(r,s,l)}return r}function Ro(e,t){return function(r,n){var o=Vi(r)?kt:nn,a=t?t():{};return o(r,e,ca(n,2),a)}}function No(e){return Zn((function(t,r){var n=-1,a=r.length,i=a>1?r[a-1]:o,u=a>2?r[2]:o;for(i=e.length>3&&"function"==typeof i?(a--,i):o,u&&Ea(r[0],r[1],u)&&(i=a<3?o:i,a=1),t=Se(t);++n<a;){var s=r[n];s&&e(t,s,n,i)}return t}))}function Do(e,t){return function(r,n){if(null==r)return r;if(!Hi(r))return e(r,n);for(var o=r.length,a=t?o:-1,i=Se(r);(t?a--:++a<o)&&!1!==n(i[a],a,i););return r}}function To(e){return function(t,r,n){for(var o=-1,a=Se(t),i=n(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===r(a[s],s,a))break}return t}}function Lo(e){return function(t){var r=ur(t=_u(t))?pr(t):o,n=r?r[0]:t.charAt(0),a=r?wo(r,1).join(""):t.slice(1);return n[e]()+a}}function $o(e){return function(t){return Lt(Yu(qu(t).replace(et,"")),e,"")}}function zo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Ur(e.prototype),n=e.apply(r,t);return tu(n)?n:r}}function Fo(e){return function(t,r,n){var a=Se(t);if(!Hi(t)){var i=ca(r,3);t=Iu(t),r=function(e){return i(a[e],e,a)}}var u=e(t,r,n);return u>-1?a[i?t[u]:u]:o}}function Uo(e){return oa((function(t){var r=t.length,n=r,i=Br.prototype.thru;for(e&&t.reverse();n--;){var u=t[n];if("function"!=typeof u)throw new Ae(a);if(i&&!s&&"wrapper"==sa(u))var s=new Br([],!0)}for(n=s?n:r;++n<r;){var l=sa(u=t[n]),c="wrapper"==l?ua(u):o;s=c&&wa(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[sa(c[0])].apply(s,c[3]):1==u.length&&wa(u)?s[l]():s.thru(u)}return function(){var e=arguments,n=e[0];if(s&&1==e.length&&Vi(n))return s.plant(n).value();for(var o=0,a=r?t[o].apply(this,e):n;++o<r;)a=t[o].call(this,a);return a}}))}function Qo(e,t,r,a,i,u,s,l,c,d){var h=t&f,p=1&t,m=2&t,v=24&t,g=512&t,y=m?o:zo(e);return function f(){for(var _=arguments.length,b=n(_),E=_;E--;)b[E]=arguments[E];if(v)var O=la(f),w=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(b,O);if(a&&(b=Co(b,a,i,v)),u&&(b=Ao(b,u,s,v)),_-=w,v&&_<d){var j=cr(b,O);return Go(e,t,Qo,f.placeholder,r,b,j,l,c,d-_)}var x=p?r:this,P=m?x[e]:e;return _=b.length,l?b=function(e,t){var r=e.length,n=_r(t.length,r),a=Mo(e);for(;n--;){var i=t[n];e[n]=ba(i,r)?a[i]:o}return e}(b,l):g&&_>1&&b.reverse(),h&&c<_&&(b.length=c),this&&this!==mt&&this instanceof f&&(P=y||zo(P)),P.apply(x,b)}}function Bo(e,t){return function(r,n){return function(e,t,r,n){return En(e,(function(e,o,a){t(n,r(e),o,a)})),n}(r,e,t(n),{})}}function qo(e,t){return function(r,n){var a;if(r===o&&n===o)return t;if(r!==o&&(a=r),n!==o){if(a===o)return n;"string"==typeof r||"string"==typeof n?(r=co(r),n=co(n)):(r=lo(r),n=lo(n)),a=e(r,n)}return a}}function Vo(e){return oa((function(t){return t=Dt(t,Xt(ca())),Zn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Jo(e,t){var r=(t=t===o?" ":co(t)).length;if(r<2)return r?Kn(t,e):t;var n=Kn(t,pt(e/hr(t)));return ur(t)?wo(pr(n),0,e).join(""):n.slice(0,e)}function Ho(e){return function(t,r,a){return a&&"number"!=typeof a&&Ea(t,r,a)&&(r=a=o),t=pu(t),r===o?(r=t,t=0):r=pu(r),function(e,t,r,o){for(var a=-1,i=yr(pt((t-e)/(r||1)),0),u=n(i);i--;)u[o?i:++a]=e,e+=r;return u}(t,r,a=a===o?t<r?1:-1:pu(a),e)}}function Wo(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=gu(t),r=gu(r)),e(t,r)}}function Go(e,t,r,n,a,i,u,s,f,d){var h=8&t;t|=h?l:c,4&(t&=~(h?c:l))||(t&=-4);var p=[e,t,a,h?i:o,h?u:o,h?o:i,h?o:u,s,f,d],m=r.apply(o,p);return wa(e)&&Ma(m,p),m.placeholder=n,Na(m,e,t)}function Ko(e){var t=Pe[e];return function(e,r){if(e=gu(e),(r=null==r?0:_r(mu(r),292))&&bt(e)){var n=(_u(e)+"e").split("e");return+((n=(_u(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Zo=Sr&&1/fr(new Sr([,-0]))[1]==h?function(e){return new Sr(e)}:ls;function Yo(e){return function(t){var r=va(t);return r==x?sr(t):r==A?dr(t):function(e,t){return Dt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xo(e,t,r,i,h,p,m,v){var g=2&t;if(!g&&"function"!=typeof e)throw new Ae(a);var y=i?i.length:0;if(y||(t&=-97,i=h=o),m=m===o?m:yr(mu(m),0),v=v===o?v:mu(v),y-=h?h.length:0,t&c){var _=i,b=h;i=h=o}var E=g?o:ua(e),O=[e,t,r,i,h,_,b,p,m,v];if(E&&function(e,t){var r=e[1],n=t[1],o=r|n,a=o<131,i=n==f&&8==r||n==f&&r==d&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!a&&!i)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?Co(l,s,t[4]):s,e[4]=l?cr(e[3],u):t[4]}(s=t[5])&&(l=e[5],e[5]=l?Ao(l,s,t[6]):s,e[6]=l?cr(e[5],u):t[6]);(s=t[7])&&(e[7]=s);n&f&&(e[8]=null==e[8]?t[8]:_r(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(O,E),e=O[0],t=O[1],r=O[2],i=O[3],h=O[4],!(v=O[9]=O[9]===o?g?0:e.length:yr(O[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||t==s?function(e,t,r){var a=zo(e);return function i(){for(var u=arguments.length,s=n(u),l=u,c=la(i);l--;)s[l]=arguments[l];var f=u<3&&s[0]!==c&&s[u-1]!==c?[]:cr(s,c);return(u-=f.length)<r?Go(e,t,Qo,i.placeholder,o,s,f,o,o,r-u):St(this&&this!==mt&&this instanceof i?a:e,this,s)}}(e,t,v):t!=l&&33!=t||h.length?Qo.apply(o,O):function(e,t,r,o){var a=1&t,i=zo(e);return function t(){for(var u=-1,s=arguments.length,l=-1,c=o.length,f=n(c+s),d=this&&this!==mt&&this instanceof t?i:e;++l<c;)f[l]=o[l];for(;s--;)f[l++]=arguments[++u];return St(d,a?r:this,f)}}(e,t,r,i);else var w=function(e,t,r){var n=1&t,o=zo(e);return function t(){return(this&&this!==mt&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return Na((E?to:Ma)(w,O),e,t)}function ea(e,t,r,n){return e===o||Ui(e,Re[r])&&!Te.call(n,r)?t:e}function ta(e,t,r,n,a,i){return tu(e)&&tu(t)&&(i.set(t,e),Bn(e,t,o,ta,i),i.delete(t)),e}function ra(e){return au(e)?o:e}function na(e,t,r,n,a,i){var u=1&r,s=e.length,l=t.length;if(s!=l&&!(u&&l>s))return!1;var c=i.get(e),f=i.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=2&r?new Wr:o;for(i.set(e,t),i.set(t,e);++d<s;){var m=e[d],v=t[d];if(n)var g=u?n(v,m,d,t,e,i):n(m,v,d,e,t,i);if(g!==o){if(g)continue;h=!1;break}if(p){if(!zt(t,(function(e,t){if(!tr(p,t)&&(m===e||a(m,e,r,n,i)))return p.push(t)}))){h=!1;break}}else if(m!==v&&!a(m,v,r,n,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function oa(e){return Ra(ka(e,o,Ja),e+"")}function aa(e){return xn(e,Iu,pa)}function ia(e){return xn(e,Ru,ma)}var ua=Ar?function(e){return Ar.get(e)}:ls;function sa(e){for(var t=e.name+"",r=Mr[t],n=Te.call(Mr,t)?r.length:0;n--;){var o=r[n],a=o.func;if(null==a||a==e)return o.name}return t}function la(e){return(Te.call(Fr,"placeholder")?Fr:e).placeholder}function ca(){var e=Fr.iteratee||as;return e=e===as?Tn:e,arguments.length?e(arguments[0],arguments[1]):e}function fa(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function da(e){for(var t=Iu(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Pa(o)]}return t}function ha(e,t){var r=function(e,t){return null==e?o:e[t]}(e,t);return Dn(r)?r:o}var pa=gt?function(e){return null==e?[]:(e=Se(e),It(gt(e),(function(t){return Ge.call(e,t)})))}:vs,ma=gt?function(e){for(var t=[];e;)Tt(t,pa(e)),e=He(e);return t}:vs,va=Pn;function ga(e,t,r){for(var n=-1,o=(t=Eo(t,e)).length,a=!1;++n<o;){var i=$a(t[n]);if(!(a=null!=e&&r(e,i)))break;e=e[i]}return a||++n!=o?a:!!(o=null==e?0:e.length)&&eu(o)&&ba(i,o)&&(Vi(e)||qi(e))}function ya(e){return"function"!=typeof e.constructor||xa(e)?{}:Ur(He(e))}function _a(e){return Vi(e)||qi(e)||!!(Ze&&e&&e[Ze])}function ba(e,t){var r=typeof e;return!!(t=null==t?p:t)&&("number"==r||"symbol"!=r&&be.test(e))&&e>-1&&e%1==0&&e<t}function Ea(e,t,r){if(!tu(r))return!1;var n=typeof t;return!!("number"==n?Hi(r)&&ba(t,r.length):"string"==n&&t in r)&&Ui(r[t],e)}function Oa(e,t){if(Vi(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!lu(e))||(re.test(e)||!te.test(e)||null!=t&&e in Se(t))}function wa(e){var t=sa(e),r=Fr[t];if("function"!=typeof r||!(t in qr.prototype))return!1;if(e===r)return!0;var n=ua(r);return!!n&&e===n[0]}(jr&&va(new jr(new ArrayBuffer(1)))!=D||xr&&va(new xr)!=x||Pr&&va(Pr.resolve())!=k||Sr&&va(new Sr)!=A||kr&&va(new kr)!=R)&&(va=function(e){var t=Pn(e),r=t==S?e.constructor:o,n=r?za(r):"";if(n)switch(n){case Ir:return D;case Rr:return x;case Nr:return k;case Dr:return A;case Tr:return R}return t});var ja=Ne?Yi:gs;function xa(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Pa(e){return e==e&&!tu(e)}function Sa(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==o||e in Se(r)))}}function ka(e,t,r){return t=yr(t===o?e.length-1:t,0),function(){for(var o=arguments,a=-1,i=yr(o.length-t,0),u=n(i);++a<i;)u[a]=o[t+a];a=-1;for(var s=n(t+1);++a<t;)s[a]=o[a];return s[t]=r(u),St(e,this,s)}}function Ca(e,t){return t.length<2?e:jn(e,oo(t,0,-1))}function Aa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ma=Da(to),Ia=ht||function(e,t){return mt.setTimeout(e,t)},Ra=Da(ro);function Na(e,t,r){var n=t+"";return Ra(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Ct(g,(function(r){var n="_."+r[0];t&r[1]&&!Rt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ce):[]}(n),r)))}function Da(e){var t=0,r=0;return function(){var n=br(),a=16-(n-r);if(r=n,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ta(e,t){var r=-1,n=e.length,a=n-1;for(t=t===o?n:t;++r<t;){var i=Gn(r,a),u=e[i];e[i]=e[r],e[r]=u}return e.length=t,e}var La=function(e){var t=Di(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,r,n,o){t.push(n?o.replace(he,"$1"):r||e)})),t}));function $a(e){if("string"==typeof e||lu(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function za(e){if(null!=e){try{return De.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Fa(e){if(e instanceof qr)return e.clone();var t=new Br(e.__wrapped__,e.__chain__);return t.__actions__=Mo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ua=Zn((function(e,t){return Wi(e)?dn(e,yn(t,1,Wi,!0)):[]})),Qa=Zn((function(e,t){var r=Za(t);return Wi(r)&&(r=o),Wi(e)?dn(e,yn(t,1,Wi,!0),ca(r,2)):[]})),Ba=Zn((function(e,t){var r=Za(t);return Wi(r)&&(r=o),Wi(e)?dn(e,yn(t,1,Wi,!0),o,r):[]}));function qa(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:mu(r);return o<0&&(o=yr(n+o,0)),Qt(e,ca(t,3),o)}function Va(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n-1;return r!==o&&(a=mu(r),a=r<0?yr(n+a,0):_r(a,n-1)),Qt(e,ca(t,3),a,!0)}function Ja(e){return(null==e?0:e.length)?yn(e,1):[]}function Ha(e){return e&&e.length?e[0]:o}var Wa=Zn((function(e){var t=Dt(e,_o);return t.length&&t[0]===e[0]?An(t):[]})),Ga=Zn((function(e){var t=Za(e),r=Dt(e,_o);return t===Za(r)?t=o:r.pop(),r.length&&r[0]===e[0]?An(r,ca(t,2)):[]})),Ka=Zn((function(e){var t=Za(e),r=Dt(e,_o);return(t="function"==typeof t?t:o)&&r.pop(),r.length&&r[0]===e[0]?An(r,o,t):[]}));function Za(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ya=Zn(Xa);function Xa(e,t){return e&&e.length&&t&&t.length?Hn(e,t):e}var ei=oa((function(e,t){var r=null==e?0:e.length,n=un(e,t);return Wn(e,Dt(t,(function(e){return ba(e,r)?+e:e})).sort(ko)),n}));function ti(e){return null==e?e:wr.call(e)}var ri=Zn((function(e){return fo(yn(e,1,Wi,!0))})),ni=Zn((function(e){var t=Za(e);return Wi(t)&&(t=o),fo(yn(e,1,Wi,!0),ca(t,2))})),oi=Zn((function(e){var t=Za(e);return t="function"==typeof t?t:o,fo(yn(e,1,Wi,!0),o,t)}));function ai(e){if(!e||!e.length)return[];var t=0;return e=It(e,(function(e){if(Wi(e))return t=yr(e.length,t),!0})),Zt(t,(function(t){return Dt(e,Ht(t))}))}function ii(e,t){if(!e||!e.length)return[];var r=ai(e);return null==t?r:Dt(r,(function(e){return St(t,o,e)}))}var ui=Zn((function(e,t){return Wi(e)?dn(e,t):[]})),si=Zn((function(e){return go(It(e,Wi))})),li=Zn((function(e){var t=Za(e);return Wi(t)&&(t=o),go(It(e,Wi),ca(t,2))})),ci=Zn((function(e){var t=Za(e);return t="function"==typeof t?t:o,go(It(e,Wi),o,t)})),fi=Zn(ai);var di=Zn((function(e){var t=e.length,r=t>1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,ii(e,r)}));function hi(e){var t=Fr(e);return t.__chain__=!0,t}function pi(e,t){return t(e)}var mi=oa((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,a=function(t){return un(t,e)};return!(t>1||this.__actions__.length)&&n instanceof qr&&ba(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:pi,args:[a],thisArg:o}),new Br(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(a)}));var vi=Ro((function(e,t,r){Te.call(e,r)?++e[r]:an(e,r,1)}));var gi=Fo(qa),yi=Fo(Va);function _i(e,t){return(Vi(e)?Ct:hn)(e,ca(t,3))}function bi(e,t){return(Vi(e)?At:pn)(e,ca(t,3))}var Ei=Ro((function(e,t,r){Te.call(e,r)?e[r].push(t):an(e,r,[t])}));var Oi=Zn((function(e,t,r){var o=-1,a="function"==typeof t,i=Hi(e)?n(e.length):[];return hn(e,(function(e){i[++o]=a?St(t,e,r):Mn(e,t,r)})),i})),wi=Ro((function(e,t,r){an(e,r,t)}));function ji(e,t){return(Vi(e)?Dt:Fn)(e,ca(t,3))}var xi=Ro((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Pi=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Ea(e,t[0],t[1])?t=[]:r>2&&Ea(t[0],t[1],t[2])&&(t=[t[0]]),Vn(e,yn(t,1),[])})),Si=ct||function(){return mt.Date.now()};function ki(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Xo(e,f,o,o,o,o,t)}function Ci(e,t){var r;if("function"!=typeof t)throw new Ae(a);return e=mu(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var Ai=Zn((function(e,t,r){var n=1;if(r.length){var o=cr(r,la(Ai));n|=l}return Xo(e,n,t,r,o)})),Mi=Zn((function(e,t,r){var n=3;if(r.length){var o=cr(r,la(Mi));n|=l}return Xo(t,n,e,r,o)}));function Ii(e,t,r){var n,i,u,s,l,c,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ae(a);function m(t){var r=n,a=i;return n=i=o,f=t,s=e.apply(a,r)}function v(e){var r=e-c;return c===o||r>=t||r<0||h&&e-f>=u}function g(){var e=Si();if(v(e))return y(e);l=Ia(g,function(e){var r=t-(e-c);return h?_r(r,u-(e-f)):r}(e))}function y(e){return l=o,p&&n?m(e):(n=i=o,s)}function _(){var e=Si(),r=v(e);if(n=arguments,i=this,c=e,r){if(l===o)return function(e){return f=e,l=Ia(g,t),d?m(e):s}(c);if(h)return jo(l),l=Ia(g,t),m(c)}return l===o&&(l=Ia(g,t)),s}return t=gu(t)||0,tu(r)&&(d=!!r.leading,u=(h="maxWait"in r)?yr(gu(r.maxWait)||0,t):u,p="trailing"in r?!!r.trailing:p),_.cancel=function(){l!==o&&jo(l),f=0,n=c=i=l=o},_.flush=function(){return l===o?s:y(Si())},_}var Ri=Zn((function(e,t){return fn(e,1,t)})),Ni=Zn((function(e,t,r){return fn(e,gu(t)||0,r)}));function Di(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(a);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Di.Cache||Hr),r}function Ti(e){if("function"!=typeof e)throw new Ae(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Di.Cache=Hr;var Li=Oo((function(e,t){var r=(t=1==t.length&&Vi(t[0])?Dt(t[0],Xt(ca())):Dt(yn(t,1),Xt(ca()))).length;return Zn((function(n){for(var o=-1,a=_r(n.length,r);++o<a;)n[o]=t[o].call(this,n[o]);return St(e,this,n)}))})),$i=Zn((function(e,t){var r=cr(t,la($i));return Xo(e,l,o,t,r)})),zi=Zn((function(e,t){var r=cr(t,la(zi));return Xo(e,c,o,t,r)})),Fi=oa((function(e,t){return Xo(e,d,o,o,o,t)}));function Ui(e,t){return e===t||e!=e&&t!=t}var Qi=Wo(Sn),Bi=Wo((function(e,t){return e>=t})),qi=In(function(){return arguments}())?In:function(e){return ru(e)&&Te.call(e,"callee")&&!Ge.call(e,"callee")},Vi=n.isArray,Ji=Et?Xt(Et):function(e){return ru(e)&&Pn(e)==N};function Hi(e){return null!=e&&eu(e.length)&&!Yi(e)}function Wi(e){return ru(e)&&Hi(e)}var Gi=_t||gs,Ki=Ot?Xt(Ot):function(e){return ru(e)&&Pn(e)==E};function Zi(e){if(!ru(e))return!1;var t=Pn(e);return t==O||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!au(e)}function Yi(e){if(!tu(e))return!1;var t=Pn(e);return t==w||t==j||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xi(e){return"number"==typeof e&&e==mu(e)}function eu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function tu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ru(e){return null!=e&&"object"==typeof e}var nu=wt?Xt(wt):function(e){return ru(e)&&va(e)==x};function ou(e){return"number"==typeof e||ru(e)&&Pn(e)==P}function au(e){if(!ru(e)||Pn(e)!=S)return!1;var t=He(e);if(null===t)return!0;var r=Te.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&De.call(r)==Fe}var iu=jt?Xt(jt):function(e){return ru(e)&&Pn(e)==C};var uu=xt?Xt(xt):function(e){return ru(e)&&va(e)==A};function su(e){return"string"==typeof e||!Vi(e)&&ru(e)&&Pn(e)==M}function lu(e){return"symbol"==typeof e||ru(e)&&Pn(e)==I}var cu=Pt?Xt(Pt):function(e){return ru(e)&&eu(e.length)&&!!st[Pn(e)]};var fu=Wo(zn),du=Wo((function(e,t){return e<=t}));function hu(e){if(!e)return[];if(Hi(e))return su(e)?pr(e):Mo(e);if(Ye&&e[Ye])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ye]());var t=va(e);return(t==x?sr:t==A?fr:Uu)(e)}function pu(e){return e?(e=gu(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function mu(e){var t=pu(e),r=t%1;return t==t?r?t-r:t:0}function vu(e){return e?sn(mu(e),0,v):0}function gu(e){if("number"==typeof e)return e;if(lu(e))return m;if(tu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var r=ge.test(e);return r||_e.test(e)?dt(e.slice(2),r?2:8):ve.test(e)?m:+e}function yu(e){return Io(e,Ru(e))}function _u(e){return null==e?"":co(e)}var bu=No((function(e,t){if(xa(t)||Hi(t))Io(t,Iu(t),e);else for(var r in t)Te.call(t,r)&&tn(e,r,t[r])})),Eu=No((function(e,t){Io(t,Ru(t),e)})),Ou=No((function(e,t,r,n){Io(t,Ru(t),e,n)})),wu=No((function(e,t,r,n){Io(t,Iu(t),e,n)})),ju=oa(un);var xu=Zn((function(e,t){e=Se(e);var r=-1,n=t.length,a=n>2?t[2]:o;for(a&&Ea(t[0],t[1],a)&&(n=1);++r<n;)for(var i=t[r],u=Ru(i),s=-1,l=u.length;++s<l;){var c=u[s],f=e[c];(f===o||Ui(f,Re[c])&&!Te.call(e,c))&&(e[c]=i[c])}return e})),Pu=Zn((function(e){return e.push(o,ta),St(Du,o,e)}));function Su(e,t,r){var n=null==e?o:jn(e,t);return n===o?r:n}function ku(e,t){return null!=e&&ga(e,t,Cn)}var Cu=Bo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=ze.call(t)),e[t]=r}),ts(os)),Au=Bo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=ze.call(t)),Te.call(e,t)?e[t].push(r):e[t]=[r]}),ca),Mu=Zn(Mn);function Iu(e){return Hi(e)?Kr(e):Ln(e)}function Ru(e){return Hi(e)?Kr(e,!0):$n(e)}var Nu=No((function(e,t,r){Bn(e,t,r)})),Du=No((function(e,t,r,n){Bn(e,t,r,n)})),Tu=oa((function(e,t){var r={};if(null==e)return r;var n=!1;t=Dt(t,(function(t){return t=Eo(t,e),n||(n=t.length>1),t})),Io(e,ia(e),r),n&&(r=ln(r,7,ra));for(var o=t.length;o--;)ho(r,t[o]);return r}));var Lu=oa((function(e,t){return null==e?{}:function(e,t){return Jn(e,t,(function(t,r){return ku(e,r)}))}(e,t)}));function $u(e,t){if(null==e)return{};var r=Dt(ia(e),(function(e){return[e]}));return t=ca(t),Jn(e,r,(function(e,r){return t(e,r[0])}))}var zu=Yo(Iu),Fu=Yo(Ru);function Uu(e){return null==e?[]:er(e,Iu(e))}var Qu=$o((function(e,t,r){return t=t.toLowerCase(),e+(r?Bu(t):t)}));function Bu(e){return Zu(_u(e).toLowerCase())}function qu(e){return(e=_u(e))&&e.replace(Ee,or).replace(tt,"")}var Vu=$o((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ju=$o((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Hu=Lo("toLowerCase");var Wu=$o((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Gu=$o((function(e,t,r){return e+(r?" ":"")+Zu(t)}));var Ku=$o((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Zu=Lo("toUpperCase");function Yu(e,t,r){return e=_u(e),(t=r?o:t)===o?function(e){return at.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var Xu=Zn((function(e,t){try{return St(e,o,t)}catch(r){return Zi(r)?r:new je(r)}})),es=oa((function(e,t){return Ct(t,(function(t){t=$a(t),an(e,t,Ai(e[t],e))})),e}));function ts(e){return function(){return e}}var rs=Uo(),ns=Uo(!0);function os(e){return e}function as(e){return Tn("function"==typeof e?e:ln(e,1))}var is=Zn((function(e,t){return function(r){return Mn(r,e,t)}})),us=Zn((function(e,t){return function(r){return Mn(e,r,t)}}));function ss(e,t,r){var n=Iu(t),o=wn(t,n);null!=r||tu(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=wn(t,Iu(t)));var a=!(tu(r)&&"chain"in r&&!r.chain),i=Yi(e);return Ct(o,(function(r){var n=t[r];e[r]=n,i&&(e.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=e(this.__wrapped__);return(r.__actions__=Mo(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Tt([this.value()],arguments))})})),e}function ls(){}var cs=Vo(Dt),fs=Vo(Mt),ds=Vo(zt);function hs(e){return Oa(e)?Ht($a(e)):function(e){return function(t){return jn(t,e)}}(e)}var ps=Ho(),ms=Ho(!0);function vs(){return[]}function gs(){return!1}var ys=qo((function(e,t){return e+t}),0),_s=Ko("ceil"),bs=qo((function(e,t){return e/t}),1),Es=Ko("floor");var Os,ws=qo((function(e,t){return e*t}),1),js=Ko("round"),xs=qo((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Ae(a);return e=mu(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=ki,Fr.assign=bu,Fr.assignIn=Eu,Fr.assignInWith=Ou,Fr.assignWith=wu,Fr.at=ju,Fr.before=Ci,Fr.bind=Ai,Fr.bindAll=es,Fr.bindKey=Mi,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vi(e)?e:[e]},Fr.chain=hi,Fr.chunk=function(e,t,r){t=(r?Ea(e,t,r):t===o)?1:yr(mu(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var i=0,u=0,s=n(pt(a/t));i<a;)s[u++]=oo(e,i,i+=t);return s},Fr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var a=e[t];a&&(o[n++]=a)}return o},Fr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Tt(Vi(r)?Mo(r):[r],yn(t,1))},Fr.cond=function(e){var t=null==e?0:e.length,r=ca();return e=t?Dt(e,(function(e){if("function"!=typeof e[1])throw new Ae(a);return[r(e[0]),e[1]]})):[],Zn((function(r){for(var n=-1;++n<t;){var o=e[n];if(St(o[0],this,r))return St(o[1],this,r)}}))},Fr.conforms=function(e){return function(e){var t=Iu(e);return function(r){return cn(r,e,t)}}(ln(e,1))},Fr.constant=ts,Fr.countBy=vi,Fr.create=function(e,t){var r=Ur(e);return null==t?r:on(r,t)},Fr.curry=function e(t,r,n){var a=Xo(t,8,o,o,o,o,o,r=n?o:r);return a.placeholder=e.placeholder,a},Fr.curryRight=function e(t,r,n){var a=Xo(t,s,o,o,o,o,o,r=n?o:r);return a.placeholder=e.placeholder,a},Fr.debounce=Ii,Fr.defaults=xu,Fr.defaultsDeep=Pu,Fr.defer=Ri,Fr.delay=Ni,Fr.difference=Ua,Fr.differenceBy=Qa,Fr.differenceWith=Ba,Fr.drop=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=r||t===o?1:mu(t))<0?0:t,n):[]},Fr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,0,(t=n-(t=r||t===o?1:mu(t)))<0?0:t):[]},Fr.dropRightWhile=function(e,t){return e&&e.length?mo(e,ca(t,3),!0,!0):[]},Fr.dropWhile=function(e,t){return e&&e.length?mo(e,ca(t,3),!0):[]},Fr.fill=function(e,t,r,n){var a=null==e?0:e.length;return a?(r&&"number"!=typeof r&&Ea(e,t,r)&&(r=0,n=a),function(e,t,r,n){var a=e.length;for((r=mu(r))<0&&(r=-r>a?0:a+r),(n=n===o||n>a?a:mu(n))<0&&(n+=a),n=r>n?0:vu(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Fr.filter=function(e,t){return(Vi(e)?It:gn)(e,ca(t,3))},Fr.flatMap=function(e,t){return yn(ji(e,t),1)},Fr.flatMapDeep=function(e,t){return yn(ji(e,t),h)},Fr.flatMapDepth=function(e,t,r){return r=r===o?1:mu(r),yn(ji(e,t),r)},Fr.flatten=Ja,Fr.flattenDeep=function(e){return(null==e?0:e.length)?yn(e,h):[]},Fr.flattenDepth=function(e,t){return(null==e?0:e.length)?yn(e,t=t===o?1:mu(t)):[]},Fr.flip=function(e){return Xo(e,512)},Fr.flow=rs,Fr.flowRight=ns,Fr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},Fr.functions=function(e){return null==e?[]:wn(e,Iu(e))},Fr.functionsIn=function(e){return null==e?[]:wn(e,Ru(e))},Fr.groupBy=Ei,Fr.initial=function(e){return(null==e?0:e.length)?oo(e,0,-1):[]},Fr.intersection=Wa,Fr.intersectionBy=Ga,Fr.intersectionWith=Ka,Fr.invert=Cu,Fr.invertBy=Au,Fr.invokeMap=Oi,Fr.iteratee=as,Fr.keyBy=wi,Fr.keys=Iu,Fr.keysIn=Ru,Fr.map=ji,Fr.mapKeys=function(e,t){var r={};return t=ca(t,3),En(e,(function(e,n,o){an(r,t(e,n,o),e)})),r},Fr.mapValues=function(e,t){var r={};return t=ca(t,3),En(e,(function(e,n,o){an(r,n,t(e,n,o))})),r},Fr.matches=function(e){return Un(ln(e,1))},Fr.matchesProperty=function(e,t){return Qn(e,ln(t,1))},Fr.memoize=Di,Fr.merge=Nu,Fr.mergeWith=Du,Fr.method=is,Fr.methodOf=us,Fr.mixin=ss,Fr.negate=Ti,Fr.nthArg=function(e){return e=mu(e),Zn((function(t){return qn(t,e)}))},Fr.omit=Tu,Fr.omitBy=function(e,t){return $u(e,Ti(ca(t)))},Fr.once=function(e){return Ci(2,e)},Fr.orderBy=function(e,t,r,n){return null==e?[]:(Vi(t)||(t=null==t?[]:[t]),Vi(r=n?o:r)||(r=null==r?[]:[r]),Vn(e,t,r))},Fr.over=cs,Fr.overArgs=Li,Fr.overEvery=fs,Fr.overSome=ds,Fr.partial=$i,Fr.partialRight=zi,Fr.partition=xi,Fr.pick=Lu,Fr.pickBy=$u,Fr.property=hs,Fr.propertyOf=function(e){return function(t){return null==e?o:jn(e,t)}},Fr.pull=Ya,Fr.pullAll=Xa,Fr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Hn(e,t,ca(r,2)):e},Fr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Hn(e,t,o,r):e},Fr.pullAt=ei,Fr.range=ps,Fr.rangeRight=ms,Fr.rearg=Fi,Fr.reject=function(e,t){return(Vi(e)?It:gn)(e,Ti(ca(t,3)))},Fr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],a=e.length;for(t=ca(t,3);++n<a;){var i=e[n];t(i,n,e)&&(r.push(i),o.push(n))}return Wn(e,o),r},Fr.rest=function(e,t){if("function"!=typeof e)throw new Ae(a);return Zn(e,t=t===o?t:mu(t))},Fr.reverse=ti,Fr.sampleSize=function(e,t,r){return t=(r?Ea(e,t,r):t===o)?1:mu(t),(Vi(e)?Yr:Xn)(e,t)},Fr.set=function(e,t,r){return null==e?e:eo(e,t,r)},Fr.setWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:eo(e,t,r,n)},Fr.shuffle=function(e){return(Vi(e)?Xr:no)(e)},Fr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&Ea(e,t,r)?(t=0,r=n):(t=null==t?0:mu(t),r=r===o?n:mu(r)),oo(e,t,r)):[]},Fr.sortBy=Pi,Fr.sortedUniq=function(e){return e&&e.length?so(e):[]},Fr.sortedUniqBy=function(e,t){return e&&e.length?so(e,ca(t,2)):[]},Fr.split=function(e,t,r){return r&&"number"!=typeof r&&Ea(e,t,r)&&(t=r=o),(r=r===o?v:r>>>0)?(e=_u(e))&&("string"==typeof t||null!=t&&!iu(t))&&!(t=co(t))&&ur(e)?wo(pr(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new Ae(a);return t=null==t?0:yr(mu(t),0),Zn((function(r){var n=r[t],o=wo(r,0,t);return n&&Tt(o,n),St(e,this,o)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===o?1:mu(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=n-(t=r||t===o?1:mu(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?mo(e,ca(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?mo(e,ca(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new Ae(a);return tu(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ii(e,t,{leading:n,maxWait:t,trailing:o})},Fr.thru=pi,Fr.toArray=hu,Fr.toPairs=zu,Fr.toPairsIn=Fu,Fr.toPath=function(e){return Vi(e)?Dt(e,$a):lu(e)?[e]:Mo(La(_u(e)))},Fr.toPlainObject=yu,Fr.transform=function(e,t,r){var n=Vi(e),o=n||Gi(e)||cu(e);if(t=ca(t,4),null==r){var a=e&&e.constructor;r=o?n?new a:[]:tu(e)&&Yi(a)?Ur(He(e)):{}}return(o?Ct:En)(e,(function(e,n,o){return t(r,e,n,o)})),r},Fr.unary=function(e){return ki(e,1)},Fr.union=ri,Fr.unionBy=ni,Fr.unionWith=oi,Fr.uniq=function(e){return e&&e.length?fo(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?fo(e,ca(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?fo(e,o,t):[]},Fr.unset=function(e,t){return null==e||ho(e,t)},Fr.unzip=ai,Fr.unzipWith=ii,Fr.update=function(e,t,r){return null==e?e:po(e,t,bo(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:po(e,t,bo(r),n)},Fr.values=Uu,Fr.valuesIn=function(e){return null==e?[]:er(e,Ru(e))},Fr.without=ui,Fr.words=Yu,Fr.wrap=function(e,t){return $i(bo(t),e)},Fr.xor=si,Fr.xorBy=li,Fr.xorWith=ci,Fr.zip=fi,Fr.zipObject=function(e,t){return yo(e||[],t||[],tn)},Fr.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Fr.zipWith=di,Fr.entries=zu,Fr.entriesIn=Fu,Fr.extend=Eu,Fr.extendWith=Ou,ss(Fr,Fr),Fr.add=ys,Fr.attempt=Xu,Fr.camelCase=Qu,Fr.capitalize=Bu,Fr.ceil=_s,Fr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=gu(r))==r?r:0),t!==o&&(t=(t=gu(t))==t?t:0),sn(gu(e),t,r)},Fr.clone=function(e){return ln(e,4)},Fr.cloneDeep=function(e){return ln(e,5)},Fr.cloneDeepWith=function(e,t){return ln(e,5,t="function"==typeof t?t:o)},Fr.cloneWith=function(e,t){return ln(e,4,t="function"==typeof t?t:o)},Fr.conformsTo=function(e,t){return null==t||cn(e,t,Iu(t))},Fr.deburr=qu,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=bs,Fr.endsWith=function(e,t,r){e=_u(e),t=co(t);var n=e.length,a=r=r===o?n:sn(mu(r),0,n);return(r-=t.length)>=0&&e.slice(r,a)==t},Fr.eq=Ui,Fr.escape=function(e){return(e=_u(e))&&Z.test(e)?e.replace(G,ar):e},Fr.escapeRegExp=function(e){return(e=_u(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},Fr.every=function(e,t,r){var n=Vi(e)?Mt:mn;return r&&Ea(e,t,r)&&(t=o),n(e,ca(t,3))},Fr.find=gi,Fr.findIndex=qa,Fr.findKey=function(e,t){return Ut(e,ca(t,3),En)},Fr.findLast=yi,Fr.findLastIndex=Va,Fr.findLastKey=function(e,t){return Ut(e,ca(t,3),On)},Fr.floor=Es,Fr.forEach=_i,Fr.forEachRight=bi,Fr.forIn=function(e,t){return null==e?e:_n(e,ca(t,3),Ru)},Fr.forInRight=function(e,t){return null==e?e:bn(e,ca(t,3),Ru)},Fr.forOwn=function(e,t){return e&&En(e,ca(t,3))},Fr.forOwnRight=function(e,t){return e&&On(e,ca(t,3))},Fr.get=Su,Fr.gt=Qi,Fr.gte=Bi,Fr.has=function(e,t){return null!=e&&ga(e,t,kn)},Fr.hasIn=ku,Fr.head=Ha,Fr.identity=os,Fr.includes=function(e,t,r,n){e=Hi(e)?e:Uu(e),r=r&&!n?mu(r):0;var o=e.length;return r<0&&(r=yr(o+r,0)),su(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Bt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:mu(r);return o<0&&(o=yr(n+o,0)),Bt(e,t,o)},Fr.inRange=function(e,t,r){return t=pu(t),r===o?(r=t,t=0):r=pu(r),function(e,t,r){return e>=_r(t,r)&&e<yr(t,r)}(e=gu(e),t,r)},Fr.invoke=Mu,Fr.isArguments=qi,Fr.isArray=Vi,Fr.isArrayBuffer=Ji,Fr.isArrayLike=Hi,Fr.isArrayLikeObject=Wi,Fr.isBoolean=function(e){return!0===e||!1===e||ru(e)&&Pn(e)==b},Fr.isBuffer=Gi,Fr.isDate=Ki,Fr.isElement=function(e){return ru(e)&&1===e.nodeType&&!au(e)},Fr.isEmpty=function(e){if(null==e)return!0;if(Hi(e)&&(Vi(e)||"string"==typeof e||"function"==typeof e.splice||Gi(e)||cu(e)||qi(e)))return!e.length;var t=va(e);if(t==x||t==A)return!e.size;if(xa(e))return!Ln(e).length;for(var r in e)if(Te.call(e,r))return!1;return!0},Fr.isEqual=function(e,t){return Rn(e,t)},Fr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:o)?r(e,t):o;return n===o?Rn(e,t,o,r):!!n},Fr.isError=Zi,Fr.isFinite=function(e){return"number"==typeof e&&bt(e)},Fr.isFunction=Yi,Fr.isInteger=Xi,Fr.isLength=eu,Fr.isMap=nu,Fr.isMatch=function(e,t){return e===t||Nn(e,t,da(t))},Fr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:o,Nn(e,t,da(t),r)},Fr.isNaN=function(e){return ou(e)&&e!=+e},Fr.isNative=function(e){if(ja(e))throw new je("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dn(e)},Fr.isNil=function(e){return null==e},Fr.isNull=function(e){return null===e},Fr.isNumber=ou,Fr.isObject=tu,Fr.isObjectLike=ru,Fr.isPlainObject=au,Fr.isRegExp=iu,Fr.isSafeInteger=function(e){return Xi(e)&&e>=-9007199254740991&&e<=p},Fr.isSet=uu,Fr.isString=su,Fr.isSymbol=lu,Fr.isTypedArray=cu,Fr.isUndefined=function(e){return e===o},Fr.isWeakMap=function(e){return ru(e)&&va(e)==R},Fr.isWeakSet=function(e){return ru(e)&&"[object WeakSet]"==Pn(e)},Fr.join=function(e,t){return null==e?"":Ft.call(e,t)},Fr.kebabCase=Vu,Fr.last=Za,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n;return r!==o&&(a=(a=mu(r))<0?yr(n+a,0):_r(a,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,a):Qt(e,Vt,a,!0)},Fr.lowerCase=Ju,Fr.lowerFirst=Hu,Fr.lt=fu,Fr.lte=du,Fr.max=function(e){return e&&e.length?vn(e,os,Sn):o},Fr.maxBy=function(e,t){return e&&e.length?vn(e,ca(t,2),Sn):o},Fr.mean=function(e){return Jt(e,os)},Fr.meanBy=function(e,t){return Jt(e,ca(t,2))},Fr.min=function(e){return e&&e.length?vn(e,os,zn):o},Fr.minBy=function(e,t){return e&&e.length?vn(e,ca(t,2),zn):o},Fr.stubArray=vs,Fr.stubFalse=gs,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=ws,Fr.nth=function(e,t){return e&&e.length?qn(e,mu(t)):o},Fr.noConflict=function(){return mt._===this&&(mt._=Ue),this},Fr.noop=ls,Fr.now=Si,Fr.pad=function(e,t,r){e=_u(e);var n=(t=mu(t))?hr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Jo(vt(o),r)+e+Jo(pt(o),r)},Fr.padEnd=function(e,t,r){e=_u(e);var n=(t=mu(t))?hr(e):0;return t&&n<t?e+Jo(t-n,r):e},Fr.padStart=function(e,t,r){e=_u(e);var n=(t=mu(t))?hr(e):0;return t&&n<t?Jo(t-n,r)+e:e},Fr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),Er(_u(e).replace(ie,""),t||0)},Fr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Ea(e,t,r)&&(t=r=o),r===o&&("boolean"==typeof t?(r=t,t=o):"boolean"==typeof e&&(r=e,e=o)),e===o&&t===o?(e=0,t=1):(e=pu(e),t===o?(t=e,e=0):t=pu(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var a=Or();return _r(e+a*(t-e+ft("1e-"+((a+"").length-1))),t)}return Gn(e,t)},Fr.reduce=function(e,t,r){var n=Vi(e)?Lt:Gt,o=arguments.length<3;return n(e,ca(t,4),r,o,hn)},Fr.reduceRight=function(e,t,r){var n=Vi(e)?$t:Gt,o=arguments.length<3;return n(e,ca(t,4),r,o,pn)},Fr.repeat=function(e,t,r){return t=(r?Ea(e,t,r):t===o)?1:mu(t),Kn(_u(e),t)},Fr.replace=function(){var e=arguments,t=_u(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,a=(t=Eo(t,e)).length;for(a||(a=1,e=o);++n<a;){var i=null==e?o:e[$a(t[n])];i===o&&(n=a,i=r),e=Yi(i)?i.call(e):i}return e},Fr.round=js,Fr.runInContext=e,Fr.sample=function(e){return(Vi(e)?Zr:Yn)(e)},Fr.size=function(e){if(null==e)return 0;if(Hi(e))return su(e)?hr(e):e.length;var t=va(e);return t==x||t==A?e.size:Ln(e).length},Fr.snakeCase=Wu,Fr.some=function(e,t,r){var n=Vi(e)?zt:ao;return r&&Ea(e,t,r)&&(t=o),n(e,ca(t,3))},Fr.sortedIndex=function(e,t){return io(e,t)},Fr.sortedIndexBy=function(e,t,r){return uo(e,t,ca(r,2))},Fr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=io(e,t);if(n<r&&Ui(e[n],t))return n}return-1},Fr.sortedLastIndex=function(e,t){return io(e,t,!0)},Fr.sortedLastIndexBy=function(e,t,r){return uo(e,t,ca(r,2),!0)},Fr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=io(e,t,!0)-1;if(Ui(e[r],t))return r}return-1},Fr.startCase=Gu,Fr.startsWith=function(e,t,r){return e=_u(e),r=null==r?0:sn(mu(r),0,e.length),t=co(t),e.slice(r,r+t.length)==t},Fr.subtract=xs,Fr.sum=function(e){return e&&e.length?Kt(e,os):0},Fr.sumBy=function(e,t){return e&&e.length?Kt(e,ca(t,2)):0},Fr.template=function(e,t,r){var n=Fr.templateSettings;r&&Ea(e,t,r)&&(t=o),e=_u(e),t=Ou({},t,n,ea);var a,i,u=Ou({},t.imports,n.imports,ea),s=Iu(u),l=er(u,s),c=0,f=t.interpolate||Oe,d="__p += '",h=ke((t.escape||Oe).source+"|"+f.source+"|"+(f===ee?pe:Oe).source+"|"+(t.evaluate||Oe).source+"|$","g"),p="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ut+"]")+"\n";e.replace(h,(function(t,r,n,o,u,s){return n||(n=o),d+=e.slice(c,s).replace(we,ir),r&&(a=!0,d+="' +\n__e("+r+") +\n'"),u&&(i=!0,d+="';\n"+u+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=s+t.length,t})),d+="';\n";var m=Te.call(t,"variable")&&t.variable;if(m){if(de.test(m))throw new je("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(V,""):d).replace(J,"$1").replace(H,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Xu((function(){return xe(s,p+"return "+d).apply(o,l)}));if(v.source=d,Zi(v))throw v;return v},Fr.times=function(e,t){if((e=mu(e))<1||e>p)return[];var r=v,n=_r(e,v);t=ca(t),e-=v;for(var o=Zt(n,t);++r<e;)t(r);return o},Fr.toFinite=pu,Fr.toInteger=mu,Fr.toLength=vu,Fr.toLower=function(e){return _u(e).toLowerCase()},Fr.toNumber=gu,Fr.toSafeInteger=function(e){return e?sn(mu(e),-9007199254740991,p):0===e?e:0},Fr.toString=_u,Fr.toUpper=function(e){return _u(e).toUpperCase()},Fr.trim=function(e,t,r){if((e=_u(e))&&(r||t===o))return Yt(e);if(!e||!(t=co(t)))return e;var n=pr(e),a=pr(t);return wo(n,rr(n,a),nr(n,a)+1).join("")},Fr.trimEnd=function(e,t,r){if((e=_u(e))&&(r||t===o))return e.slice(0,mr(e)+1);if(!e||!(t=co(t)))return e;var n=pr(e);return wo(n,0,nr(n,pr(t))+1).join("")},Fr.trimStart=function(e,t,r){if((e=_u(e))&&(r||t===o))return e.replace(ie,"");if(!e||!(t=co(t)))return e;var n=pr(e);return wo(n,rr(n,pr(t))).join("")},Fr.truncate=function(e,t){var r=30,n="...";if(tu(t)){var a="separator"in t?t.separator:a;r="length"in t?mu(t.length):r,n="omission"in t?co(t.omission):n}var i=(e=_u(e)).length;if(ur(e)){var u=pr(e);i=u.length}if(r>=i)return e;var s=r-hr(n);if(s<1)return n;var l=u?wo(u,0,s).join(""):e.slice(0,s);if(a===o)return l+n;if(u&&(s+=l.length-s),iu(a)){if(e.slice(s).search(a)){var c,f=l;for(a.global||(a=ke(a.source,_u(me.exec(a))+"g")),a.lastIndex=0;c=a.exec(f);)var d=c.index;l=l.slice(0,d===o?s:d)}}else if(e.indexOf(co(a),s)!=s){var h=l.lastIndexOf(a);h>-1&&(l=l.slice(0,h))}return l+n},Fr.unescape=function(e){return(e=_u(e))&&K.test(e)?e.replace(W,vr):e},Fr.uniqueId=function(e){var t=++Le;return _u(e)+t},Fr.upperCase=Ku,Fr.upperFirst=Zu,Fr.each=_i,Fr.eachRight=bi,Fr.first=Ha,ss(Fr,(Os={},En(Fr,(function(e,t){Te.call(Fr.prototype,t)||(Os[t]=e)})),Os),{chain:!1}),Fr.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),Ct(["drop","take"],(function(e,t){qr.prototype[e]=function(r){r=r===o?1:yr(mu(r),0);var n=this.__filtered__&&!t?new qr(this):this.clone();return n.__filtered__?n.__takeCount__=_r(r,n.__takeCount__):n.__views__.push({size:_r(r,v),type:e+(n.__dir__<0?"Right":"")}),n},qr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;qr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ca(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Ct(["head","last"],(function(e,t){var r="take"+(t?"Right":"");qr.prototype[e]=function(){return this[r](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");qr.prototype[e]=function(){return this.__filtered__?new qr(this):this[r](1)}})),qr.prototype.compact=function(){return this.filter(os)},qr.prototype.find=function(e){return this.filter(e).head()},qr.prototype.findLast=function(e){return this.reverse().find(e)},qr.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new qr(this):this.map((function(r){return Mn(r,e,t)}))})),qr.prototype.reject=function(e){return this.filter(Ti(ca(e)))},qr.prototype.slice=function(e,t){e=mu(e);var r=this;return r.__filtered__&&(e>0||t<0)?new qr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=mu(t))<0?r.dropRight(-t):r.take(t-e)),r)},qr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qr.prototype.toArray=function(){return this.take(v)},En(qr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),a=Fr[n?"take"+("last"==t?"Right":""):t],i=n||/^find/.test(t);a&&(Fr.prototype[t]=function(){var t=this.__wrapped__,u=n?[1]:arguments,s=t instanceof qr,l=u[0],c=s||Vi(t),f=function(e){var t=a.apply(Fr,Tt([e],u));return n&&d?t[0]:t};c&&r&&"function"==typeof l&&1!=l.length&&(s=c=!1);var d=this.__chain__,h=!!this.__actions__.length,p=i&&!d,m=s&&!h;if(!i&&c){t=m?t:new qr(this);var v=e.apply(t,u);return v.__actions__.push({func:pi,args:[f],thisArg:o}),new Br(v,d)}return p&&m?e.apply(this,u):(v=this.thru(f),p?n?v.value()[0]:v.value():v)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Vi(o)?o:[],e)}return this[r]((function(r){return t.apply(Vi(r)?r:[],e)}))}})),En(qr.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Te.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}})),Mr[Qo(o,2).name]=[{name:"wrapper",func:o}],qr.prototype.clone=function(){var e=new qr(this.__wrapped__);return e.__actions__=Mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mo(this.__views__),e},qr.prototype.reverse=function(){if(this.__filtered__){var e=new qr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Vi(e),n=t<0,o=r?e.length:0,a=function(e,t,r){var n=-1,o=r.length;for(;++n<o;){var a=r[n],i=a.size;switch(a.type){case"drop":e+=i;break;case"dropRight":t-=i;break;case"take":t=_r(t,e+i);break;case"takeRight":e=yr(e,t-i)}}return{start:e,end:t}}(0,o,this.__views__),i=a.start,u=a.end,s=u-i,l=n?u:i-1,c=this.__iteratees__,f=c.length,d=0,h=_r(s,this.__takeCount__);if(!r||!n&&o==s&&h==s)return vo(e,this.__actions__);var p=[];e:for(;s--&&d<h;){for(var m=-1,v=e[l+=t];++m<f;){var g=c[m],y=g.iteratee,_=g.type,b=y(v);if(2==_)v=b;else if(!b){if(1==_)continue e;break e}}p[d++]=v}return p},Fr.prototype.at=mi,Fr.prototype.chain=function(){return hi(this)},Fr.prototype.commit=function(){return new Br(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===o&&(this.__values__=hu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof Qr;){var n=Fa(r);n.__index__=0,n.__values__=o,t?a.__wrapped__=n:t=n;var a=n;r=r.__wrapped__}return a.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qr){var t=e;return this.__actions__.length&&(t=new qr(this)),(t=t.reverse()).__actions__.push({func:pi,args:[ti],thisArg:o}),new Br(t,this.__chain__)}return this.thru(ti)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Ye&&(Fr.prototype[Ye]=function(){return this}),Fr}();mt._=gr,(n=function(){return gr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},14556:(e,t,r)=>{var n=r(90369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},17748:(e,t,r)=>{var n=r(68230);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},53506:(e,t,r)=>{var n=r(36584);e.exports=function(e){return null==e?"":n(e)}},9312:(e,t,r)=>{"use strict";const n=r(74681);e.exports=n,n.default=n},74681:e=>{"use strict";e.exports=function(e,r,n){var o,a="";if(t="",arguments.length>1){if("number"==typeof n)for(o=0;o<n;o+=1)a+=" ";else"string"==typeof n&&(a=n);if(""!==a){if(null!=r){if("function"==typeof r)return u("",{"":e},[],r,a);if(Array.isArray(r))return s("",e,[],r,a)}return l("",e,[],a)}if("function"==typeof r)return f("",{"":e},[],r);if(Array.isArray(r))return c("",e,[],r)}return d("",e,[])};var t="";const r=/[\x00-\x1f\x22\x5c]/,n=/[\x00-\x1f\x22\x5c]/g,o=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000b","\\f","\\r","\\u000e","\\u000f","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001a","\\u001b","\\u001c","\\u001d","\\u001e","\\u001f","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\"];function a(e){return o[e.charCodeAt(0)]}function i(e){if(e.length<5e3&&!r.test(e))return e;if(e.length>100)return e.replace(n,a);for(var t="",i=0,u=0;u<e.length;u++){const r=e.charCodeAt(u);(34===r||92===r||r<32)&&(t+=i===u?o[r]:`${e.slice(i,u)}${o[r]}`,i=u+1)}return 0===i?t=e:i!==u&&(t+=e.slice(i)),t}function u(e,r,n,o,a){var s,l,c;const f=t;var d=r[e];switch("object"==typeof d&&null!==d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),typeof(d=o.call(r,e,d))){case"object":if(null===d)return"null";for(s=0;s<n.length;s++)if(n[s]===d)return'"[Circular]"';if(Array.isArray(d)){if(0===d.length)return"[]";for(n.push(d),l="[",l+=`\n${t+=a}`,c=`,\n${t}`,s=0;s<d.length-1;s++){const e=u(s,d,n,o,a);l+=void 0!==e?e:"null",l+=c}const e=u(s,d,n,o,a);return l+=void 0!==e?e:"null",""!==t&&(l+=`\n${f}`),l+="]",n.pop(),t=f,l}var p=h(Object.keys(d));if(0===p.length)return"{}";n.push(d),l="{",l+=`\n${t+=a}`,c=`,\n${t}`;var m="";for(s=0;s<p.length;s++){const t=u(e=p[s],d,n,o,a);void 0!==t&&(l+=`${m}"${i(e)}": ${t}`,m=c)}return""!==m?l+=`\n${f}`:l="{",l+="}",n.pop(),t=f,l;case"string":return`"${i(d)}"`;case"number":return isFinite(d)?String(d):"null";case"boolean":return!0===d?"true":"false"}}function s(e,r,n,o,a){var u,l,c;const f=t;switch("object"==typeof r&&null!==r&&"function"==typeof r.toJSON&&(r=r.toJSON(e)),typeof r){case"object":if(null===r)return"null";for(u=0;u<n.length;u++)if(n[u]===r)return'"[Circular]"';if(Array.isArray(r)){if(0===r.length)return"[]";for(n.push(r),l="[",l+=`\n${t+=a}`,c=`,\n${t}`,u=0;u<r.length-1;u++){const e=s(u,r[u],n,o,a);l+=void 0!==e?e:"null",l+=c}const e=s(u,r[u],n,o,a);return l+=void 0!==e?e:"null",""!==t&&(l+=`\n${f}`),l+="]",n.pop(),t=f,l}if(0===o.length)return"{}";n.push(r),l="{",l+=`\n${t+=a}`,c=`,\n${t}`;var d="";for(u=0;u<o.length;u++)if("string"==typeof o[u]||"number"==typeof o[u]){const t=s(e=o[u],r[e],n,o,a);void 0!==t&&(l+=`${d}"${i(e)}": ${t}`,d=c)}return""!==d?l+=`\n${f}`:l="{",l+="}",n.pop(),t=f,l;case"string":return`"${i(r)}"`;case"number":return isFinite(r)?String(r):"null";case"boolean":return!0===r?"true":"false"}}function l(e,r,n,o){var a,u,s;const c=t;switch(typeof r){case"object":if(null===r)return"null";if("function"==typeof r.toJSON){if("object"!=typeof(r=r.toJSON(e)))return l(e,r,n,o);if(null===r)return"null"}for(a=0;a<n.length;a++)if(n[a]===r)return'"[Circular]"';if(Array.isArray(r)){if(0===r.length)return"[]";for(n.push(r),u="[",u+=`\n${t+=o}`,s=`,\n${t}`,a=0;a<r.length-1;a++){const e=l(a,r[a],n,o);u+=void 0!==e?e:"null",u+=s}const e=l(a,r[a],n,o);return u+=void 0!==e?e:"null",""!==t&&(u+=`\n${c}`),u+="]",n.pop(),t=c,u}var f=h(Object.keys(r));if(0===f.length)return"{}";n.push(r),u="{",u+=`\n${t+=o}`,s=`,\n${t}`;var d="";for(a=0;a<f.length;a++){const t=l(e=f[a],r[e],n,o);void 0!==t&&(u+=`${d}"${i(e)}": ${t}`,d=s)}return""!==d?u+=`\n${c}`:u="{",u+="}",n.pop(),t=c,u;case"string":return`"${i(r)}"`;case"number":return isFinite(r)?String(r):"null";case"boolean":return!0===r?"true":"false"}}function c(e,t,r,n){var o,a;switch("object"==typeof t&&null!==t&&"function"==typeof t.toJSON&&(t=t.toJSON(e)),typeof t){case"object":if(null===t)return"null";for(o=0;o<r.length;o++)if(r[o]===t)return'"[Circular]"';if(Array.isArray(t)){if(0===t.length)return"[]";for(r.push(t),a="[",o=0;o<t.length-1;o++){const e=c(o,t[o],r,n);a+=void 0!==e?e:"null",a+=","}const e=c(o,t[o],r,n);return a+=void 0!==e?e:"null",a+="]",r.pop(),a}if(0===n.length)return"{}";r.push(t),a="{";var u="";for(o=0;o<n.length;o++)if("string"==typeof n[o]||"number"==typeof n[o]){const s=c(e=n[o],t[e],r,n);void 0!==s&&(a+=`${u}"${i(e)}":${s}`,u=",")}return a+="}",r.pop(),a;case"string":return`"${i(t)}"`;case"number":return isFinite(t)?String(t):"null";case"boolean":return!0===t?"true":"false"}}function f(e,t,r,n){var o,a,u=t[e];switch("object"==typeof u&&null!==u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),typeof(u=n.call(t,e,u))){case"object":if(null===u)return"null";for(o=0;o<r.length;o++)if(r[o]===u)return'"[Circular]"';if(Array.isArray(u)){if(0===u.length)return"[]";for(r.push(u),a="[",o=0;o<u.length-1;o++){const e=f(o,u,r,n);a+=void 0!==e?e:"null",a+=","}const e=f(o,u,r,n);return a+=void 0!==e?e:"null",a+="]",r.pop(),a}var s=h(Object.keys(u));if(0===s.length)return"{}";r.push(u),a="{";var l="";for(o=0;o<s.length;o++){const t=f(e=s[o],u,r,n);void 0!==t&&(a+=`${l}"${i(e)}":${t}`,l=",")}return a+="}",r.pop(),a;case"string":return`"${i(u)}"`;case"number":return isFinite(u)?String(u):"null";case"boolean":return!0===u?"true":"false"}}function d(e,t,r){var n,o;switch(typeof t){case"object":if(null===t)return"null";if("function"==typeof t.toJSON){if("object"!=typeof(t=t.toJSON(e)))return d(e,t,r);if(null===t)return"null"}for(n=0;n<r.length;n++)if(r[n]===t)return'"[Circular]"';if(Array.isArray(t)){if(0===t.length)return"[]";for(r.push(t),o="[",n=0;n<t.length-1;n++){const e=d(n,t[n],r);o+=void 0!==e?e:"null",o+=","}const e=d(n,t[n],r);return o+=void 0!==e?e:"null",o+="]",r.pop(),o}var a=h(Object.keys(t));if(0===a.length)return"{}";r.push(t);var u="";for(o="{",n=0;n<a.length;n++){const s=d(e=a[n],t[e],r);void 0!==s&&(o+=`${u}"${i(e)}":${s}`,u=",")}return o+="}",r.pop(),o;case"string":return`"${i(t)}"`;case"number":return isFinite(t)?String(t):"null";case"boolean":return!0===t?"true":"false"}}function h(e){for(var t=1;t<e.length;t++){const n=e[t];for(var r=t;0!==r&&e[r-1]>n;)e[r]=e[r-1],r--;e[r]=n}return e}},7258:function(e,t,r){var n,o;!function(a,i){"use strict";e.exports?e.exports=i():void 0===(o="function"==typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,a=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(a=7),t=0;t<o&&""!==n[t];t++);if(t<a)for(n.splice(t,1,"0000");n.length<a;)n.splice(t,0,"0000");for(var i=0;i<a;i++){r=n[i].split("");for(var u=0;u<3&&("0"===r[0]&&r.length>1);u++)r.splice(0,1);n[i]=r.join("")}var s=-1,l=0,c=0,f=-1,d=!1;for(i=0;i<a;i++)d?"0"===n[i]?c+=1:(d=!1,c>l&&(s=f,l=c)):"0"===n[i]&&(d=!0,f=i,c=1);c>l&&(s=f,l=c),l>1&&n.splice(s,l,""),o=n.length;var h="";for(""===n[0]&&(h=":"),i=0;i<o&&(h+=n[i],i!==o-1);i++)h+=":";return""===n[o-1]&&(h+=":"),h},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}}))},98028:function(e,t,r){var n,o;!function(a,i){"use strict";e.exports?e.exports=i():void 0===(o="function"==typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},68949:function(e,t,r){var n,o,a;!function(i,u){"use strict";e.exports?e.exports=u(r(1288),r(7258),r(98028)):(o=[r(1288),r(7258),r(98028)],void 0===(a="function"==typeof(n=u)?n.apply(t,o):n)||(e.exports=a))}(0,(function(e,t,r,n){"use strict";var o=n&&n.URI;function a(e,t){var r=arguments.length>=1;if(!(this instanceof a))return r?arguments.length>=2?new a(e,t):new a(e):new a;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}a.version="1.19.11";var i=a.prototype,u=Object.prototype.hasOwnProperty;function s(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function c(e){return"Array"===l(e)}function f(e,t){var r,n,o={};if("RegExp"===l(t))o=null;else if(c(t))for(r=0,n=t.length;r<n;r++)o[t[r]]=!0;else o[t]=!0;for(r=0,n=e.length;r<n;r++){(o&&void 0!==o[e[r]]||!o&&t.test(e[r]))&&(e.splice(r,1),n--,r--)}return e}function d(e,t){var r,n;if(c(t)){for(r=0,n=t.length;r<n;r++)if(!d(e,t[r]))return!1;return!0}var o=l(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===o){if("string"==typeof e[r]&&e[r].match(t))return!0}else if(e[r]===t)return!0;return!1}function h(e,t){if(!c(e)||!c(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function p(e){return e.replace(/^\/+|\/+$/g,"")}function m(e){return escape(e)}function v(e){return encodeURIComponent(e).replace(/[!'()*]/g,m).replace(/\*/g,"%2A")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,a.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return a.domAttributes[t]}},a.encode=v,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=v,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(e,t){var r=a.encode(e+"");return void 0===t&&(t=a.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},a.decodeQuery=function(e,t){e+="",void 0===t&&(t=a.escapeQuerySpace);try{return a.decode(t?e.replace(/\+/g,"%20"):e)}catch(r){return e}};var g,y={encode:"encode",decode:"decode"},_=function(e,t){return function(r){try{return a[t](r+"").replace(a.characters[e][t].expression,(function(r){return a.characters[e][t].map[r]}))}catch(n){return r}}};for(g in y)a[g+"PathSegment"]=_("pathname",y[g]),a[g+"UrnPathSegment"]=_("urnpath",y[g]);var b=function(e,t,r){return function(n){var o;o=r?function(e){return a[t](a[r](e))}:a[t];for(var i=(n+"").split(e),u=0,s=i.length;u<s;u++)i[u]=o(i[u]);return i.join(e)}};function E(e){return function(t,r){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!r),this)}}function O(e,t){return function(r,n){return void 0===r?this._parts[e]||"":(null!==r&&(r+="").charAt(0)===t&&(r=r.substring(1)),this._parts[e]=r,this.build(!n),this)}}a.decodePath=b("/","decodePathSegment"),a.decodeUrnPath=b(":","decodeUrnPathSegment"),a.recodePath=b("/","encodePathSegment","decode"),a.recodeUrnPath=b(":","encodeUrnPathSegment","decode"),a.encodeReserved=_("reserved","encode"),a.parse=function(e,t){var r;return t||(t={preventInvalidHostname:a.preventInvalidHostname}),(r=(e=(e=e.replace(a.leading_whitespace_expression,"")).replace(a.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=a.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(a.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=a.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},a.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var i=e.indexOf(":"),u=e.indexOf("/"),s=e.indexOf(":",i+1);-1!==s&&(-1===u||s<u)?(t.hostname=e.substring(0,o)||null,t.port=null):(n=e.substring(0,o).split(":"),t.hostname=n[0]||null,t.port=n[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&a.ensureValidHostname(t.hostname,t.protocol),t.port&&a.ensureValidPort(t.port),e.substring(o)||"/"},a.parseAuthority=function(e,t){return e=a.parseUserinfo(e,t),a.parseHost(e,t)},a.parseUserinfo=function(e,t){var r=e;-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/"));var n,o=e.indexOf("/"),i=e.lastIndexOf("@",o>-1?o:e.length-1);return i>-1&&(-1===o||i<o)?(n=e.substring(0,i).split(":"),t.username=n[0]?a.decode(n[0]):null,n.shift(),t.password=n[0]?a.decode(n.join(":")):null,e=r.substring(i+1)):(t.username=null,t.password=null),e},a.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,i={},s=e.split("&"),l=s.length,c=0;c<l;c++)r=s[c].split("="),n=a.decodeQuery(r.shift(),t),o=r.length?a.decodeQuery(r.join("="),t):null,"__proto__"!==n&&(u.call(i,n)?("string"!=typeof i[n]&&null!==i[n]||(i[n]=[i[n]]),i[n].push(o)):i[n]=o);return i},a.build=function(e){var t="",r=!1;return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",r=!0),t+=a.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},a.buildHost=function(e){var t="";return e.hostname?(a.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},a.buildAuthority=function(e){return a.buildUserinfo(e)+a.buildHost(e)},a.buildUserinfo=function(e){var t="";return e.username&&(t+=a.encode(e.username)),e.password&&(t+=":"+a.encode(e.password)),t&&(t+="@"),t},a.buildQuery=function(e,t,r){var n,o,i,s,l="";for(o in e)if("__proto__"!==o&&u.call(e,o))if(c(e[o]))for(n={},i=0,s=e[o].length;i<s;i++)void 0!==e[o][i]&&void 0===n[e[o][i]+""]&&(l+="&"+a.buildQueryParameter(o,e[o][i],r),!0!==t&&(n[e[o][i]+""]=!0));else void 0!==e[o]&&(l+="&"+a.buildQueryParameter(o,e[o],r));return l.substring(1)},a.buildQueryParameter=function(e,t,r){return a.encodeQuery(e,r)+(null!==t?"="+a.encodeQuery(t,r):"")},a.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)u.call(t,n)&&a.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=r);"string"==typeof e[t]&&(e[t]=[e[t]]),c(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},a.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)u.call(t,n)&&a.setQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},a.removeQuery=function(e,t,r){var n,o,i;if(c(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===l(t))for(i in e)t.test(i)&&(e[i]=void 0);else if("object"==typeof t)for(i in t)u.call(t,i)&&a.removeQuery(e,i,t[i]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===l(r)?!c(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=f(e[t],r):e[t]!==String(r)||c(r)&&1!==r.length?c(e[t])&&(e[t]=f(e[t],r)):e[t]=void 0:e[t]=void 0}},a.hasQuery=function(e,t,r,n){switch(l(t)){case"String":break;case"RegExp":for(var o in e)if(u.call(e,o)&&t.test(o)&&(void 0===r||a.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var i in t)if(u.call(t,i)&&!a.hasQuery(e,i,t[i]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(r)){case"Undefined":return t in e;case"Boolean":return r===Boolean(c(e[t])?e[t].length:e[t]);case"Function":return!!r(e[t],t,e);case"Array":return!!c(e[t])&&(n?d:h)(e[t],r);case"RegExp":return c(e[t])?!!n&&d(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return c(e[t])?!!n&&d(e[t],r):e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var o=new a(arguments[n]);e.push(o);for(var i=o.segment(),u=0;u<i.length;u++)"string"==typeof i[u]&&t.push(i[u]),i[u]&&r++}if(!t.length||!r)return new a("");var s=new a("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||s.path("/"+s.path()),s.normalize()},a.commonPath=function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}return r<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(r)&&"/"===t.charAt(r)||(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},a.withinString=function(e,t,r){r||(r={});var n=r.start||a.findUri.start,o=r.end||a.findUri.end,i=r.trim||a.findUri.trim,u=r.parens||a.findUri.parens,s=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var l=n.exec(e);if(!l)break;var c=l.index;if(r.ignoreHtml){var f=e.slice(Math.max(c-3,0),c);if(f&&s.test(f))continue}for(var d=c+e.slice(c).search(o),h=e.slice(c,d),p=-1;;){var m=u.exec(h);if(!m)break;var v=m.index+m[0].length;p=Math.max(p,v)}if(!((h=p>-1?h.slice(0,p)+h.slice(p).replace(i,""):h.replace(i,"")).length<=l[0].length||r.ignore&&r.ignore.test(h))){var g=t(h,c,d=c+h.length,e);void 0!==g?(g=String(g),e=e.slice(0,c)+g+e.slice(d),n.lastIndex=c+g.length):n.lastIndex=d}}return n.lastIndex=0,e},a.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=d(a.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(a.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},a.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},i.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},i.clone=function(){return new a(this)},i.valueOf=i.toString=function(){return this.build(!1)._string},i.protocol=E("protocol"),i.username=E("username"),i.password=E("password"),i.hostname=E("hostname"),i.port=E("port"),i.query=O("query","?"),i.fragment=O("fragment","#"),i.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},i.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},i.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?a.decodeUrnPath:a.decodePath)(r):r}return this._parts.urn?this._parts.path=e?a.recodeUrnPath(e):"":this._parts.path=e?a.recodePath(e):"/",this.build(!t),this},i.path=i.pathname,i.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=a._parts();var n=e instanceof a,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[a.getDomAttribute(e)]||"",o=!1);if(!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=a.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var i=n?e._parts:e;for(r in i)"query"!==r&&u.call(this._parts,r)&&(this._parts[r]=i[r]);i.query&&this.query(i.query,!1)}return this.build(!t),this},i.is=function(e){var t=!1,n=!1,o=!1,i=!1,u=!1,s=!1,l=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,n=a.ip4_expression.test(this._parts.hostname),o=a.ip6_expression.test(this._parts.hostname),u=(i=!(t=n||o))&&r&&r.has(this._parts.hostname),s=i&&a.idn_expression.test(this._parts.hostname),l=i&&a.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return i;case"sld":return u;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return s;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var w=i.protocol,j=i.port,x=i.hostname;i.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(a.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return w.call(this,e,t)},i.scheme=i.protocol,i.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),a.ensureValidPort(e))),j.call(this,e,t))},i.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==a.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(e,this._parts.protocol)}return x.call(this,e,t)},i.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=a(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},i.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildHost(this._parts):"";if("/"!==a.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},i.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildAuthority(this._parts):"";if("/"!==a.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},i.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=a.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),a.parseUserinfo(e,this._parts),this.build(!t),this},i.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=a.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},i.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),i=new RegExp("^"+s(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&a.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(i,e),this.build(!t),this},i.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(s(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},i.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var a;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');a=new RegExp(s(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");a=new RegExp(s(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,e)}return this.build(!t),this},i.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?a.decodePath(n):n}var o=this._parts.path.length-this.filename().length,i=this._parts.path.substring(0,o),u=new RegExp("^"+s(i));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=a.recodePath(e),this._parts.path=this._parts.path.replace(u,e),this.build(!t),this},i.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?a.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var i=new RegExp(s(this.filename())+"$");return e=a.recodePath(e),this._parts.path=this._parts.path.replace(i,e),o?this.normalizePath(t):this.build(!t),this},i.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),i=o.lastIndexOf(".");return-1===i?"":(r=o.substring(i+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?a.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var u,l=this.suffix();if(l)u=e?new RegExp(s(l)+"$"):new RegExp(s("."+l)+"$");else{if(!e)return this;this._parts.path+="."+a.recodePath(e)}return u&&(e=a.recodePath(e),this._parts.path=this._parts.path.replace(u,e)),this.build(!t),this},i.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),a="/"===o.substring(0,1),i=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(a&&i.shift(),e<0&&(e=Math.max(i.length+e,0)),void 0===t)return void 0===e?i:i[e];if(null===e||void 0===i[e])if(c(t)){i=[];for(var u=0,s=t.length;u<s;u++)(t[u].length||i.length&&i[i.length-1].length)&&(i.length&&!i[i.length-1].length&&i.pop(),i.push(p(t[u])))}else(t||"string"==typeof t)&&(t=p(t),""===i[i.length-1]?i[i.length-1]=t:i.push(t));else t?i[e]=p(t):i.splice(e,1);return a&&i.unshift(""),this.path(i.join(n),r)},i.segmentCoded=function(e,t,r){var n,o,i;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(c(n=this.segment(e,t,r)))for(o=0,i=n.length;o<i;o++)n[o]=a.decode(n[o]);else n=void 0!==n?a.decode(n):void 0;return n}if(c(t))for(o=0,i=t.length;o<i;o++)t[o]=a.encode(t[o]);else t="string"==typeof t||t instanceof String?a.encode(t):t;return this.segment(e,t,r)};var P=i.query;return i.query=function(e,t){if(!0===e)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var r=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);return this._parts.query=a.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=a.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):P.call(this,e,t)},i.setQuery=function(e,t,r){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)u.call(e,o)&&(n[o]=e[o])}return this._parts.query=a.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},i.addQuery=function(e,t,r){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(n,e,void 0===t?null:t),this._parts.query=a.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},i.removeQuery=function(e,t,r){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(n,e,t),this._parts.query=a.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},i.hasQuery=function(e,t,r){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(n,e,t,r)},i.setSearch=i.setQuery,i.addSearch=i.addQuery,i.removeSearch=i.removeQuery,i.hasSearch=i.hasQuery,i.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},i.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},i.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},i.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},i.normalizePath=function(e){var t,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var n,o,i="";for("/"!==(r=a.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(i=r.substring(1).match(/^(\.\.\/)+/)||"")&&(i=i[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r=r.substring(0,o)+r.substring(n+3)):r=r.substring(3);return t&&this.is("relative")&&(r=i+r.substring(1)),this._parts.path=r,this.build(!e),this},i.normalizePathname=i.normalizePath,i.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},i.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},i.normalizeSearch=i.normalizeQuery,i.normalizeHash=i.normalizeFragment,i.iso8859=function(){var e=a.encode,t=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=e,a.decode=t}return this},i.unicode=function(){var e=a.encode,t=a.decode;a.encode=v,a.decode=unescape;try{this.normalize()}finally{a.encode=e,a.decode=t}return this},i.readable=function(){var t=this.clone();t.username("").password("").normalize();var r="";if(t._parts.protocol&&(r+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(r+=e.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(r+="/"),r+=t.path(!0),t._parts.query){for(var n="",o=0,i=t._parts.query.split("&"),u=i.length;o<u;o++){var s=(i[o]||"").split("=");n+="&"+a.decodeQuery(s[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==s[1]&&(n+="="+a.decodeQuery(s[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=a.decodeQuery(t.hash(),!0)},i.absoluteTo=function(e){var t,r,n,o=this.clone(),i=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof a||(e=new a(e)),o._parts.protocol)return o;if(o._parts.protocol=e._parts.protocol,this._parts.hostname)return o;for(r=0;n=i[r];r++)o._parts[n]=e._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},i.relativeTo=function(e){var t,r,n,o,i,u=this.clone().normalize();if(u._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new a(e).normalize(),t=u._parts,r=e._parts,o=u.path(),i=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==i.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password)return u.build();if(null!==t.protocol||null!==t.username||null!==t.password)return u.build();if(t.hostname!==r.hostname||t.port!==r.port)return u.build();if(t.hostname=null,t.port=null,o===i)return t.path="",u.build();if(!(n=a.commonPath(o,i)))return u.build();var s=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=s+t.path.substring(n.length)||"./",u.build()},i.equals=function(e){var t,r,n,o,i,s=this.clone(),l=new a(e),f={};if(s.normalize(),l.normalize(),s.toString()===l.toString())return!0;if(n=s.query(),o=l.query(),s.query(""),l.query(""),s.toString()!==l.toString())return!1;if(n.length!==o.length)return!1;for(i in t=a.parseQuery(n,this._parts.escapeQuerySpace),r=a.parseQuery(o,this._parts.escapeQuerySpace),t)if(u.call(t,i)){if(c(t[i])){if(!h(t[i],r[i]))return!1}else if(t[i]!==r[i])return!1;f[i]=!0}for(i in r)if(u.call(r,i)&&!f[i])return!1;return!0},i.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},i.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},i.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},a}))},1288:function(e,t,r){var n;e=r.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var a,i=2147483647,u=36,s=/^xn--/,l=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function p(e){throw new RangeError(f[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(c,".")).split("."),t).join(".")}function g(e){for(var t,r,n=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function y(e){return m(e,(function(e){var t="";return e>65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=h(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function b(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=u)e=d(e/35);return d(n+36*e/(e+38))}function E(e){var t,r,n,o,a,s,l,c,f,h,m,v=[],g=e.length,_=0,E=128,O=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&p("not-basic"),v.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<g;){for(a=_,s=1,l=u;o>=g&&p("invalid-input"),((c=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:u)>=u||c>d((i-_)/s))&&p("overflow"),_+=c*s,!(c<(f=l<=O?1:l>=O+26?26:l-O));l+=u)s>d(i/(h=u-f))&&p("overflow"),s*=h;O=b(_-a,t=v.length+1,0==a),d(_/t)>i-E&&p("overflow"),E+=d(_/t),_%=t,v.splice(_++,0,E)}return y(v)}function O(e){var t,r,n,o,a,s,l,c,f,m,v,y,E,O,w,j=[];for(y=(e=g(e)).length,t=128,r=0,a=72,s=0;s<y;++s)(v=e[s])<128&&j.push(h(v));for(n=o=j.length,o&&j.push("-");n<y;){for(l=i,s=0;s<y;++s)(v=e[s])>=t&&v<l&&(l=v);for(l-t>d((i-r)/(E=n+1))&&p("overflow"),r+=(l-t)*E,t=l,s=0;s<y;++s)if((v=e[s])<t&&++r>i&&p("overflow"),v==t){for(c=r,f=u;!(c<(m=f<=a?1:f>=a+26?26:f-a));f+=u)w=c-m,O=u-m,j.push(h(_(m+w%O,0))),c=d(w/O);j.push(h(_(c,0))),a=b(r,E,n==o),r=0,++n}++r,++t}return j.join("")}a={version:"1.3.2",ucs2:{decode:g,encode:y},decode:E,encode:O,toASCII:function(e){return v(e,(function(e){return l.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return v(e,(function(e){return s.test(e)?E(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},95240:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement(o.default.Fragment,null,o.default.createElement(i.TypeLabel,null),"\xa0:\xa0",o.default.createElement(i.FalseLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.default,{values:{id:"json-schema.labels.false"}},"Always invalid")))};const o=n(r(63696)),a=n(r(50539)),i=r(76563)},28709:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{schema:t}=e;const r=(0,u.useJSVOptionsContext)(),n="boolean"!=typeof t,c=n?t.description:void 0;return o.default.createElement(o.default.Fragment,null,o.default.createElement(i.TypeLabel,null),"\xa0:\xa0",o.default.createElement(i.TrueLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.default,{values:{id:"json-schema.labels.true"}},"Always valid")),n&&o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(s.QualifierMessages,{schema:t,options:r})),void 0!==c&&o.default.createElement(l.CreateDescription,{description:c}))};const o=n(r(63696)),a=n(r(50539)),i=r(76563),u=r(56688),s=r(24413),l=r(39260)},16928:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,l=(0,i.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.BooleanLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:l,nullable:r})),void 0!==n&&o.default.createElement(s.CreateDescription,{description:n}))};const o=n(r(63696)),a=r(24413),i=r(56688),u=r(76563),s=r(39260)},73350:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{description:t}=e,{DescriptionComponent:r}=(0,a.useJSVOptionsContext)();return o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},r?o.default.createElement(r,{description:t}):t)};const o=n(r(63696)),a=r(56688)},22794:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,l=(0,i.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.IntegerLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:l,nullable:r})),void 0!==n&&o.default.createElement(s.CreateDescription,{description:n}))};const o=n(r(63696)),a=r(24413),i=r(56688),u=r(76563),s=r(39260)},64527:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,description:r}=e,n=(0,i.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.NullLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:n})),void 0!==r&&o.default.createElement(s.CreateDescription,{description:r}))};const o=n(r(63696)),a=r(24413),i=r(56688),u=r(76563),s=r(39260)},12771:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,description:r,nullable:n}=e,l=(0,i.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.NumberLabel,null),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:l,nullable:n})),void 0!==r&&o.default.createElement(s.CreateDescription,{description:r}))};const o=n(r(63696)),a=r(24413),i=r(56688),u=r(76563),s=r(39260)},44763:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,l=(0,i.useJSVOptionsContext)(),c=t.format;return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.TypeLabel,null),"\xa0:\xa0",o.default.createElement(u.StringLabel,{format:c}),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(a.QualifierMessages,{schema:t,options:l,nullable:r})),void 0!==n&&o.default.createElement(s.CreateDescription,{description:n}))};const o=n(r(63696)),a=r(24413),i=r(56688),u=r(76563),s=r(39260)},61345:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{value:t,schema:r}=e,{ValueComponent:n}=(0,a.useJSVOptionsContext)();if(n)return o.default.createElement(n,{value:t,schema:r});return(0,i.printSchemaType)(t)};const o=n(r(63696)),a=r(56688),i=r(918)},99781:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.dependencies,n=Object.entries(r).reduce(((e,t)=>{let[r,n]=t;return Array.isArray(n)?e.dependentRequired[r]=n:e.dependentSchemas[r]=n,e}),{dependentRequired:{},dependentSchemas:{}});return o.default.createElement(o.default.Fragment,null,Object.keys(n.dependentRequired).length>0&&o.default.createElement(a.DependentRequired,{schema:{dependentRequired:n.dependentRequired}}),Object.keys(n.dependentSchemas).length>0&&o.default.createElement(a.DependentSchemas,{schema:{dependentSchemas:n.dependentSchemas}}))};const o=n(r(63696)),a=r(72126)},7444:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.dependentRequired,n={allOf:Object.entries(r).map((e=>{let[t,r]=e;return{if:{type:"object",required:[t]},then:{type:"object",required:r}}}))};return o.default.createElement(a.AllOfSchema,{schema:n})};const o=n(r(63696)),a=r(96672)},10817:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.dependentSchemas,n={allOf:Object.entries(r).map((e=>{let[t,r]=e;return{if:{type:"object",required:[t]},then:r}}))};return o.default.createElement(a.AllOfSchema,{schema:n})};const o=n(r(63696)),a=r(96672)},11969:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=void 0!==t.then,n=void 0!==t.else;let c=[{value:"schema_if",label:o.default.createElement(l.IfLabel,null)},r&&{value:"schema_then",label:o.default.createElement(l.ThenLabel,null)},n&&{value:"schema_else",label:o.default.createElement(l.ElseLabel,null)}].filter((e=>"boolean"!=typeof e));return o.default.createElement(i.default,{defaultValue:"schema_if",values:c},c.map((e=>o.default.createElement(a.default,{value:e.value,key:e.value},function(e,t){switch(e){case"schema_if":return o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:"/if"},o.default.createElement(u.CreateNodes,{schema:t.if}));case"schema_then":return o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:"/then"},o.default.createElement(u.CreateNodes,{schema:t.then}));case"schema_else":return o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:"/else"},o.default.createElement(u.CreateNodes,{schema:t.else}))}}(e.value,t)))))};const o=n(r(63696)),a=n(r(79329)),i=n(r(65537)),u=r(64028),s=r(56688),l=r(76563)},72126:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaConditional=t.Dependencies=t.DependentSchemas=t.DependentRequired=t.IfElseThen=void 0;var o=r(11969);Object.defineProperty(t,"IfElseThen",{enumerable:!0,get:function(){return n(o).default}});var a=r(7444);Object.defineProperty(t,"DependentRequired",{enumerable:!0,get:function(){return n(a).default}});var i=r(10817);Object.defineProperty(t,"DependentSchemas",{enumerable:!0,get:function(){return n(i).default}});var u=r(99781);Object.defineProperty(t,"Dependencies",{enumerable:!0,get:function(){return n(u).default}});var s=r(18183);Object.defineProperty(t,"SchemaConditional",{enumerable:!0,get:function(){return n(s).default}})},18183:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=void 0!==t.if,n=void 0!==t.dependentRequired,s=void 0!==t.dependentSchemas,l=void 0!==t.dependencies,c=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.schemaConditional"}},"Conditional subschemas"));return o.default.createElement(u.Collapsible,{summary:c,detailsProps:{open:!1}},r&&o.default.createElement(i.IfElseThen,{schema:t}),n&&o.default.createElement(i.DependentRequired,{schema:t}),s&&o.default.createElement(i.DependentSchemas,{schema:t}),l&&o.default.createElement(i.Dependencies,{schema:t}))};const o=n(r(63696)),a=n(r(50539)),i=r(72126),u=r(64028)},60045:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.additionalItems;if(void 0===r||"boolean"==typeof r)return o.default.createElement(o.default.Fragment,null);const n=Array.isArray(t.items)?t.items.length:1;return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/additionalItems"},o.default.createElement(i.CreateEdge,{key:"array_additionalItems",name:o.default.createElement(s,{count:n}),schema:r,required:void 0!==t.minItems&&n>=t.minItems-1})))};const o=n(r(63696)),a=n(r(50539)),i=r(64028),u=r(56688);function s(e){let{count:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.additionalItemsEntry",count:t}},"items[{count},...]"))}},77457:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.contains;if(void 0===r)return o.default.createElement(o.default.Fragment,null);const n=o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.containsEntry"}},"items[..., x, ...]"));return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/contains"},o.default.createElement(i.CreateEdge,{key:"contains",name:n,schema:r,required:void 0!==t.minContains&&t.minContains>0})))};const o=n(r(63696)),a=n(r(50539)),i=r(64028),u=r(56688)},24411:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,p=(0,f.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(d.TypeLabel,null),"\xa0:\xa0",o.default.createElement(d.ArrayLabel,null),o.default.createElement(u.default,{schema:t}),o.default.createElement(a.default,{schema:t}),o.default.createElement(s.default,{schema:t}),o.default.createElement(l.default,{schema:t}),o.default.createElement(i.default,{schema:t}),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(c.QualifierMessages,{schema:t,options:p,nullable:r})),void 0!==n&&o.default.createElement(h.CreateDescription,{description:n}))};const o=n(r(63696)),a=n(r(8042)),i=n(r(77457)),u=n(r(2246)),s=n(r(60045)),l=n(r(5260)),c=r(24413),f=r(56688),d=r(76563),h=r(39260)},8042:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.items;if(void 0===r)return o.default.createElement(o.default.Fragment,null);const n=Array.isArray(t.prefixItems)?t.prefixItems.length:0,a=Array.isArray(r),l=Array.isArray(r)?r:[r],c=l.length;return o.default.createElement("ul",null,l.map(((e,r)=>o.default.createElement(u.SchemaHierarchyComponent,{key:`array_items_${r}`,innerJsonPointer:"/items"+(a?`/${r}`:"")},o.default.createElement(i.CreateEdge,{name:o.default.createElement(s,{index:n+r,isArray:a}),schema:e,required:void 0!==t.minItems&&t.minItems>=c})))))};const o=n(r(63696)),a=n(r(50539)),i=r(64028),u=r(56688);function s(e){let{index:t,isArray:r}=e,n=r?t:"x";return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.itemsEntry",index:n}},"items[{index}]"))}},2246:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.prefixItems;if(void 0===r)return o.default.createElement(o.default.Fragment,null);let n=Array.isArray(r),a=Array.isArray(r)?r.length:1,l=Array.isArray(r)?r:[r];return o.default.createElement("ul",null,l.map(((e,r)=>o.default.createElement(u.SchemaHierarchyComponent,{key:`schema_hierarchy_${r}`,innerJsonPointer:"/prefixItems"+(n?`/${r}`:"")},o.default.createElement(i.CreateEdge,{key:`array_prefixItems_${r}`,name:o.default.createElement(s,{count:r}),schema:e,required:void 0!==t.minItems&&t.minItems>=a})))))};const o=n(r(63696)),a=n(r(50539)),i=r(64028),u=r(56688);function s(e){let{count:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.prefixItemsEntry",count:t}},"items[{count}]"))}},5260:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.unevaluatedItems;if(void 0===r||"boolean"==typeof r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/unevaluatedItems"},o.default.createElement(i.CreateEdge,{key:"array_unevaluatedItems",name:o.default.createElement(s,null),schema:r,required:!1})))};const o=n(r(63696)),a=n(r(50539)),i=r(64028),u=r(56688);function s(){return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.unevaluatedItemsEntry"}},"items[y]"))}},42550:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateArray=void 0;var o=r(24411);Object.defineProperty(t,"CreateArray",{enumerable:!0,get:function(){return n(o).default}})},39260:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateValue=t.CreateDescription=t.CreateAlwaysInvalid=t.CreateAlwaysValid=t.CreateNull=t.CreateInteger=t.CreateNumber=t.CreateBoolean=t.CreateString=t.CreateArray=t.CreateObject=t.SchemaConditional=t.SchemaComposition=void 0;var o=r(96672);Object.defineProperty(t,"SchemaComposition",{enumerable:!0,get:function(){return o.SchemaComposition}});var a=r(72126);Object.defineProperty(t,"SchemaConditional",{enumerable:!0,get:function(){return a.SchemaConditional}});var i=r(3506);Object.defineProperty(t,"CreateObject",{enumerable:!0,get:function(){return i.CreateObject}});var u=r(42550);Object.defineProperty(t,"CreateArray",{enumerable:!0,get:function(){return u.CreateArray}});var s=r(44763);Object.defineProperty(t,"CreateString",{enumerable:!0,get:function(){return n(s).default}});var l=r(16928);Object.defineProperty(t,"CreateBoolean",{enumerable:!0,get:function(){return n(l).default}});var c=r(12771);Object.defineProperty(t,"CreateNumber",{enumerable:!0,get:function(){return n(c).default}});var f=r(22794);Object.defineProperty(t,"CreateInteger",{enumerable:!0,get:function(){return n(f).default}});var d=r(64527);Object.defineProperty(t,"CreateNull",{enumerable:!0,get:function(){return n(d).default}});var h=r(28709);Object.defineProperty(t,"CreateAlwaysValid",{enumerable:!0,get:function(){return n(h).default}});var p=r(95240);Object.defineProperty(t,"CreateAlwaysInvalid",{enumerable:!0,get:function(){return n(p).default}});var m=r(73350);Object.defineProperty(t,"CreateDescription",{enumerable:!0,get:function(){return n(m).default}});var v=r(61345);Object.defineProperty(t,"CreateValue",{enumerable:!0,get:function(){return n(v).default}})},20332:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.additionalProperties;if(void 0===r||"boolean"==typeof r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/additionalProperties"},o.default.createElement(i.CreateEdge,{key:"object_additionalProperties",name:o.default.createElement(s,null),schema:r,required:!1})))};const o=n(r(63696)),a=n(r(50539)),i=r(64028),u=r(56688);function s(){return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.additionalProperties"}},"property name*"))}},85047:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,nullable:r,description:n}=e,m=(0,d.useJSVOptionsContext)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(h.TypeLabel,null),"\xa0:\xa0",o.default.createElement(h.ObjectLabel,null),o.default.createElement(l.default,{schema:t}),o.default.createElement(i.default,{schema:t}),o.default.createElement(u.default,{schema:t}),o.default.createElement(s.default,{schema:t}),o.default.createElement(a.default,{schema:t}),o.default.createElement(c.default,{schema:t}),o.default.createElement("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}},o.default.createElement(f.QualifierMessages,{schema:t,options:m,nullable:r})),void 0!==n&&o.default.createElement(p.CreateDescription,{description:n}))};const o=n(r(63696)),a=n(r(20332)),i=n(r(61389)),u=n(r(82413)),s=n(r(93353)),l=n(r(83502)),c=n(r(54783)),f=r(24413),d=r(56688),h=r(76563),p=r(39260)},82413:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=t.patternProperties;if(void 0===r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,Object.entries(r).map((e=>{let[t,r]=e;return o.default.createElement(i.SchemaHierarchyComponent,{key:`object_patternProperties_${t}`,innerJsonPointer:`/patternProperties/${(0,u.encodeStringForJSONPointer)(t)}`},o.default.createElement(a.CreateEdge,{name:o.default.createElement("code",null,t),schema:r,required:!1}))})))};const o=n(r(63696)),a=r(64028),i=r(56688),u=r(24413)},61389:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=t.properties;if(void 0===r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,Object.entries(r).map((e=>{let[r,n]=e;return o.default.createElement(i.SchemaHierarchyComponent,{key:`object_properties_${r}`,innerJsonPointer:`/properties/${(0,u.encodeStringForJSONPointer)(r)}`},o.default.createElement(a.CreateEdge,{name:o.default.createElement("strong",null,r),schema:n,required:!!Array.isArray(t.required)&&t.required.includes(r)}))})))};const o=n(r(63696)),a=r(64028),i=r(56688),u=r(24413)},93353:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.propertyNames;if(void 0===r||"boolean"==typeof r||void 0===r.pattern)return o.default.createElement(o.default.Fragment,null);let n=r.pattern,u={...r};return delete u.pattern,o.default.createElement("ul",null,o.default.createElement(i.SchemaHierarchyComponent,{innerJsonPointer:"/propertyNames"},o.default.createElement(a.CreateEdge,{key:"propertyNames",name:o.default.createElement("code",null,n),schema:u,required:!1})))};const o=n(r(63696)),a=r(64028),i=r(56688)},54783:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.unevaluatedProperties;if(void 0===r||"boolean"==typeof r)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/unevaluatedProperties"},o.default.createElement(i.CreateEdge,{key:"object_unevaluatedProperties",name:o.default.createElement(s,null),schema:r,required:!1})))};const o=n(r(63696)),a=n(r(50539)),i=r(64028),u=r(56688);function s(){return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.unevaluatedProperties"}},"property name*"))}},83502:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=t.required||[],n=Object.keys(t.properties||{}),s=r.filter((e=>!n.includes(e)));if(0===s.length)return o.default.createElement(o.default.Fragment,null);return o.default.createElement("ul",null,s.map(((e,t)=>o.default.createElement(i.SchemaHierarchyComponent,{key:`object_unlisted_properties_${t}`,innerJsonPointer:`/properties/${(0,u.encodeStringForJSONPointer)(e)}`},o.default.createElement(a.CreateEdge,{name:o.default.createElement("strong",null,e),schema:!0,required:!0})))))};const o=n(r(63696)),a=r(64028),i=r(56688),u=r(24413)},3506:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateObject=void 0;var o=r(85047);Object.defineProperty(t,"CreateObject",{enumerable:!0,get:function(){return n(o).default}})},8473:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.allOf,n="allOf";return o.default.createElement("div",null,o.default.createElement("span",{className:"badge badge--info"},n),o.default.createElement(i.default,null,r.map(((e,t)=>o.default.createElement(a.default,{key:`schema_${n}_${t}`,value:`schema_${n}_${t}`,label:o.default.createElement(l.GenerateFriendlyName,{schema:e})},o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:`/allOf/${t}`},o.default.createElement(u.CreateNodes,{schema:e})))))))};const o=n(r(63696)),a=n(r(79329)),i=n(r(65537)),u=r(64028),s=r(56688),l=r(24413)},89568:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.anyOf,n="anyOf";return o.default.createElement("div",null,o.default.createElement("span",{className:"badge badge--info"},n),o.default.createElement(i.default,null,r.map(((e,t)=>o.default.createElement(a.default,{key:`schema_${n}_${t}`,value:`schema_${n}_${t}`,label:o.default.createElement(l.GenerateFriendlyName,{schema:e})},o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:`/anyOf/${t}`},o.default.createElement(u.CreateNodes,{schema:e})))))))};const o=n(r(63696)),a=n(r(79329)),i=n(r(65537)),u=r(64028),s=r(56688),l=r(24413)},96672:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaComposition=t.NotSchema=t.OneOfSchema=t.AnyOfSchema=t.AllOfSchema=void 0;var o=r(8473);Object.defineProperty(t,"AllOfSchema",{enumerable:!0,get:function(){return n(o).default}});var a=r(89568);Object.defineProperty(t,"AnyOfSchema",{enumerable:!0,get:function(){return n(a).default}});var i=r(67582);Object.defineProperty(t,"OneOfSchema",{enumerable:!0,get:function(){return n(i).default}});var u=r(31462);Object.defineProperty(t,"NotSchema",{enumerable:!0,get:function(){return n(u).default}});var s=r(34355);Object.defineProperty(t,"SchemaComposition",{enumerable:!0,get:function(){return n(s).default}})},31462:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.not;return o.default.createElement("div",null,o.default.createElement("span",{className:"badge badge--danger"},"not"),o.default.createElement("br",null),o.default.createElement(i.SchemaHierarchyComponent,{innerJsonPointer:"/not"},o.default.createElement(a.CreateNodes,{schema:r})))};const o=n(r(63696)),a=r(64028),i=r(56688)},67582:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.oneOf,n="oneOf";return o.default.createElement("div",null,o.default.createElement("span",{className:"badge badge--info"},n),o.default.createElement(i.default,null,r.map(((e,t)=>o.default.createElement(a.default,{key:`schema_${n}_${t}`,value:`schema_${n}_${t}`,label:o.default.createElement(l.GenerateFriendlyName,{schema:e})},o.default.createElement(s.SchemaHierarchyComponent,{innerJsonPointer:`/oneOf/${t}`},o.default.createElement(u.CreateNodes,{schema:e})))))))};const o=n(r(63696)),a=n(r(79329)),i=n(r(65537)),u=r(64028),s=r(56688),l=r(24413)},34355:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;return o.default.createElement(o.default.Fragment,null,void 0!==t.oneOf&&o.default.createElement(a.OneOfSchema,{schema:t}),void 0!==t.anyOf&&o.default.createElement(a.AnyOfSchema,{schema:t}),void 0!==t.allOf&&o.default.createElement(a.AllOfSchema,{schema:t}),void 0!==t.not&&o.default.createElement(a.NotSchema,{schema:t}))};const o=n(r(63696)),a=r(96672)},10836:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{summary:t,children:r,detailsProps:n}=e;return o.default.createElement(a.default,{summary:o.default.createElement("summary",null,t),...n},r)};const o=n(r(63696)),a=n(r(56701))},32279:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{name:t,schema:r,required:n}=e;return o.default.createElement(a.SchemaItem,{name:t,schema:r,required:n})};const o=n(r(63696)),a=r(64028)},6017:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;if("boolean"==typeof t)return o.default.createElement(u.CreateValidOrInvalid,{schema:t});const r=(0,s.isSchemaComposition)(t),n=(0,s.isSchemaConditional)(t);return o.default.createElement(o.default.Fragment,null,o.default.createElement(a.CreateTypes,{schema:t}),r&&o.default.createElement(i.SchemaComposition,{schema:t}),n&&o.default.createElement(i.SchemaConditional,{schema:t}))};const o=n(r(63696)),a=r(64028),i=r(39260),u=r(64028),s=r(24413)},55377:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=(0,s.detectedTypes)(t),n=r.includes("null");if(1===r.length||n&&2===r.length){const e=r.find((e=>"null"!==e))||r[0];return o.default.createElement(l,{schema:t,type:e,nullable:n})}if(r.length>1){const e=r.filter((e=>"null"!==e)).map((e=>({value:e,label:o.default.createElement(u.TypeLabelSwitch,{type:e})})));return o.default.createElement(c,{schema:t,types:e,nullable:n})}if(!(0,s.isSchemaComposition)(t))return o.default.createElement(u.CreateValidOrInvalid,{schema:t});return o.default.createElement(o.default.Fragment,null)};const o=n(r(63696)),a=n(r(79329)),i=n(r(65537)),u=r(64028),s=r(24413);function l(e){const{schema:t,type:r,nullable:n}=e;return o.default.createElement(u.RenderProvidedType,{schema:t,type:r,nullable:n})}function c(e){const{schema:t,types:r,nullable:n}=e;return o.default.createElement(i.default,{defaultValue:r[0].value,values:r,key:"multiple_types"},r.map((e=>o.default.createElement(a.default,{key:e.value,value:e.value},o.default.createElement(u.RenderProvidedType,{type:e.value,schema:t,nullable:n})))))}},86764:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;return o.default.createElement(o.default.Fragment,null,t&&o.default.createElement(a.CreateAlwaysValid,{schema:t}),!t&&o.default.createElement(a.CreateAlwaysInvalid,null))};const o=n(r(63696)),a=r(39260)},12789:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{schema:t,type:r,nullable:n}=e;const i={description:t.description,nullable:n};switch(r){case"array":return o.default.createElement(a.CreateArray,{schema:t,...i});case"object":return o.default.createElement(a.CreateObject,{schema:t,...i});case"string":return o.default.createElement(a.CreateString,{schema:t,...i});case"boolean":return o.default.createElement(a.CreateBoolean,{schema:t,...i});case"number":return o.default.createElement(a.CreateNumber,{schema:t,...i});case"integer":return o.default.createElement(a.CreateInteger,{schema:t,...i});default:return o.default.createElement(a.CreateNull,{schema:t,...i})}};const o=n(r(63696)),a=r(39260)},45345:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{schema:t,name:r,required:n}=e;const{jsonPointer:c,level:f}=(0,i.useSchemaHierarchyContext)();let d=t,h="boolean"!=typeof d&&!0===d.deprecated,p="boolean"!=typeof d&&!0===d.readOnly,m="boolean"!=typeof d&&!0===d.writeOnly,v="boolean"!=typeof d&&(void 0!==d.const||Array.isArray(d.enum)&&1===d.enum.length),g=!h&&n;const y=o.default.createElement(o.default.Fragment,null,r,"\xa0",o.default.createElement(s.GenerateFriendlyName,{schema:t}),g&&o.default.createElement(o.default.Fragment,null,"\xa0"),g&&o.default.createElement(u.RequiredLabel,null),h&&o.default.createElement(o.default.Fragment,null,"\xa0"),h&&o.default.createElement(u.DeprecatedLabel,null),p&&o.default.createElement(o.default.Fragment,null,"\xa0"),p&&o.default.createElement(u.ReadOnlyLabel,null),m&&o.default.createElement(o.default.Fragment,null,"\xa0"),m&&o.default.createElement(u.WriteOnlyLabel,null),v&&o.default.createElement(o.default.Fragment,null,"\xa0"),v&&o.default.createElement(u.ConstantLabel,null));return o.default.createElement("li",{className:l.default.schemaItem,id:c,"data-level":f},o.default.createElement(a.Collapsible,{summary:y,detailsProps:{open:!1}},o.default.createElement(o.default.Fragment,null,o.default.createElement(a.CreateNodes,{schema:t}))))};const o=n(r(63696)),a=r(64028),i=r(56688),u=r(76563),s=r(24413),l=n(r(303))},55670:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{type:t,...r}=e;switch(t){case"string":return o.default.createElement(a.StringLabel,{...r});case"number":return o.default.createElement(a.NumberLabel,{...r});case"boolean":return o.default.createElement(a.BooleanLabel,{...r});case"object":return o.default.createElement(a.ObjectLabel,{...r});case"array":return o.default.createElement(a.ArrayLabel,{...r});case"integer":return o.default.createElement(a.IntegerLabel,{...r});case"null":return o.default.createElement(a.NullLabel,{...r});case!0:return o.default.createElement(a.TrueLabel,{...r});case!1:return o.default.createElement(a.FalseLabel,{...r});default:return o.default.createElement("span",{style:{opacity:"0.6"}},t)}};const o=n(r(63696)),a=r(76563)},64028:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaItem=t.RenderProvidedType=t.TypeLabelSwitch=t.CreateTypes=t.CreateValidOrInvalid=t.CreateEdge=t.CreateNodes=t.Collapsible=void 0;var o=r(10836);Object.defineProperty(t,"Collapsible",{enumerable:!0,get:function(){return n(o).default}});var a=r(6017);Object.defineProperty(t,"CreateNodes",{enumerable:!0,get:function(){return n(a).default}});var i=r(32279);Object.defineProperty(t,"CreateEdge",{enumerable:!0,get:function(){return n(i).default}});var u=r(86764);Object.defineProperty(t,"CreateValidOrInvalid",{enumerable:!0,get:function(){return n(u).default}});var s=r(55377);Object.defineProperty(t,"CreateTypes",{enumerable:!0,get:function(){return n(s).default}});var l=r(55670);Object.defineProperty(t,"TypeLabelSwitch",{enumerable:!0,get:function(){return n(l).default}});var c=r(12789);Object.defineProperty(t,"RenderProvidedType",{enumerable:!0,get:function(){return n(c).default}});var f=r(45345);Object.defineProperty(t,"SchemaItem",{enumerable:!0,get:function(){return n(f).default}})},56688:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(98005),t),o(r(62594),t)},98005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSVOptionsContextProvider=t.useJSVOptionsContext=t.JSVOptionsContext=void 0;const n=r(63696);t.JSVOptionsContext=(0,n.createContext)({fullSchema:!1,showExamples:!1,qualifierMessagesOrder:void 0,DescriptionComponent:void 0,UnresolvedRefsComponent:void 0});t.useJSVOptionsContext=()=>(0,n.useContext)(t.JSVOptionsContext),t.JSVOptionsContextProvider=t.JSVOptionsContext.Provider},62594:function(e,t,r){"use strict";var n,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),i=0;i<r.length;i++)"default"!==r[i]&&o(t,e,r[i]);return a(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaHierarchyContextProvider=t.useSchemaHierarchyContext=t.SchemaHierarchyContext=void 0,t.SchemaHierarchyComponent=function(e){let{innerJsonPointer:r,children:n}=e;const{jsonPointer:o,level:a}=(0,t.useSchemaHierarchyContext)();return u.default.createElement(t.SchemaHierarchyContextProvider,{value:{jsonPointer:`${o}${r}`,level:a+1}},n)};const u=i(r(63696));t.SchemaHierarchyContext=(0,u.createContext)({jsonPointer:"",level:0});t.useSchemaHierarchyContext=()=>(0,u.useContext)(t.SchemaHierarchyContext),t.SchemaHierarchyContextProvider=t.SchemaHierarchyContext.Provider},88307:function(e,t,r){"use strict";var n,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),i=0;i<r.length;i++)"default"!==r[i]&&o(t,e,r[i]);return a(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,resolverOptions:r,viewerOptions:n}=e,[o,a]=(0,u.useState)(void 0),[i,l]=(0,u.useState)(void 0);return(0,u.useEffect)((()=>{(new s.Resolver).resolve(t,r).then((e=>{l(e.result)})).catch((e=>{a(e)}))}),[]),void 0!==o?u.default.createElement(d,{error:o}):void 0===i?u.default.createElement(f.LoadingLabel,null):u.default.createElement(h,{schema:i,viewerOptions:n,className:e.className})};const u=i(r(63696)),s=r(22681),l=r(64028),c=r(56688),f=r(76563);function d(e){const{error:t}=e;return u.default.createElement("div",null,u.default.createElement(f.ErrorOccurredLabel,{error:t}))}function h(e){const{schema:t,viewerOptions:r}=e,n="boolean"!=typeof t&&void 0!==t.title?t.title:"Schema",o={fullSchema:t,...r};return u.default.createElement(c.SchemaHierarchyContextProvider,{value:{jsonPointer:"",level:0}},u.default.createElement(c.JSVOptionsContextProvider,{value:o},u.default.createElement(l.Collapsible,{summary:u.default.createElement("strong",null,n),detailsProps:{open:!0,className:e.className||"json-schema-viewer"}},u.default.createElement(l.CreateNodes,{schema:t}))))}},9578:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(o.default.Fragment,null,"\xa0");return o.default.createElement(o.default.Fragment,null,e,o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.and"}},"AND")),e)};const o=n(r(63696)),a=n(r(50539))},98198:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.array"}},"array"))};const o=n(r(63696)),a=n(r(50539))},40195:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.boolean"}},"boolean"))};const o=n(r(63696)),a=n(r(50539))},64258:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.constant},o.default.createElement(a.default,{values:{id:"json-schema.keywords.const"}},"constant"))};const o=n(r(63696)),a=n(r(50539)),i=n(r(57640))},96480:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.deprecated},o.default.createElement(a.default,{values:{id:"json-schema.keywords.deprecated"}},"deprecated"))};const o=n(r(63696)),a=n(r(50539)),i=n(r(66023))},14274:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.else"}},"Else"))};const o=n(r(63696)),a=n(r(50539))},71818:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{error:t}=e;return o.default.createElement(a.default,{values:{id:"json-schema.labels.errorOccurred",message:t.message}},"Something bad happens : {message}")};const o=n(r(63696)),a=n(r(50539))},41624:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.false"}},"none"))};const o=n(r(63696)),a=n(r(50539))},65548:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.if"}},"If"))};const o=n(r(63696)),a=n(r(50539))},97645:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.integer"}},"integer"))};const o=n(r(63696)),a=n(r(50539))},33859:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("div",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.loading"}},"Loading ...."))};const o=n(r(63696)),a=n(r(50539))},67498:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.not"}},"NOT"))};const o=n(r(63696)),a=n(r(50539))},9150:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.null"}},"null"))};const o=n(r(63696)),a=n(r(50539))},48122:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.number"}},"number"))};const o=n(r(63696)),a=n(r(50539))},45068:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.object"}},"object"))};const o=n(r(63696)),a=n(r(50539))},65830:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(o.default.Fragment,null,"\xa0");return o.default.createElement(o.default.Fragment,null,e,o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.or"}},"OR")),e)};const o=n(r(63696)),a=n(r(50539))},13122:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.readOnly},o.default.createElement(a.default,{values:{id:"json-schema.keywords.readOnly"}},"readOnly"))};const o=n(r(63696)),a=n(r(50539)),i=n(r(34962))},17616:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.required},o.default.createElement(a.default,{values:{id:"json-schema.keywords.required"}},"required"))};const o=n(r(63696)),a=n(r(50539)),i=n(r(72279))},95274:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{format:t}=e;return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.string"}},"string"),void 0!==t&&o.default.createElement(o.default.Fragment,null,"\xa0",`(${t})`))};const o=n(r(63696)),a=n(r(50539))},69652:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.then"}},"Then"))};const o=n(r(63696)),a=n(r(50539))},10575:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("span",{style:{opacity:"0.6"}},o.default.createElement(a.default,{values:{id:"json-schema.keywords.true"}},"any"))};const o=n(r(63696)),a=n(r(50539))},22311:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.type",count:1}},"type"))};const o=n(r(63696)),a=n(r(50539))},54132:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return o.default.createElement("strong",{className:i.default.writeOnly},o.default.createElement(a.default,{values:{id:"json-schema.keywords.writeOnly"}},"writeOnly"))};const o=n(r(63696)),a=n(r(50539)),i=n(r(25083))},98454:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(o.default.Fragment,null,"\xa0");return o.default.createElement(o.default.Fragment,null,e,o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.xor"}},"XOR")),e)};const o=n(r(63696)),a=n(r(50539))},76563:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConstantLabel=t.XorLabel=t.NotLabel=t.OrLabel=t.AndLabel=t.NullLabel=t.IntegerLabel=t.NumberLabel=t.BooleanLabel=t.StringLabel=t.FalseLabel=t.TrueLabel=t.WriteOnlyLabel=t.ReadOnlyLabel=t.DeprecatedLabel=t.RequiredLabel=t.ErrorOccurredLabel=t.LoadingLabel=t.ElseLabel=t.ThenLabel=t.IfLabel=t.TypeLabel=t.ArrayLabel=t.ObjectLabel=void 0;var o=r(45068);Object.defineProperty(t,"ObjectLabel",{enumerable:!0,get:function(){return n(o).default}});var a=r(98198);Object.defineProperty(t,"ArrayLabel",{enumerable:!0,get:function(){return n(a).default}});var i=r(22311);Object.defineProperty(t,"TypeLabel",{enumerable:!0,get:function(){return n(i).default}});var u=r(65548);Object.defineProperty(t,"IfLabel",{enumerable:!0,get:function(){return n(u).default}});var s=r(69652);Object.defineProperty(t,"ThenLabel",{enumerable:!0,get:function(){return n(s).default}});var l=r(14274);Object.defineProperty(t,"ElseLabel",{enumerable:!0,get:function(){return n(l).default}});var c=r(33859);Object.defineProperty(t,"LoadingLabel",{enumerable:!0,get:function(){return n(c).default}});var f=r(71818);Object.defineProperty(t,"ErrorOccurredLabel",{enumerable:!0,get:function(){return n(f).default}});var d=r(17616);Object.defineProperty(t,"RequiredLabel",{enumerable:!0,get:function(){return n(d).default}});var h=r(96480);Object.defineProperty(t,"DeprecatedLabel",{enumerable:!0,get:function(){return n(h).default}});var p=r(13122);Object.defineProperty(t,"ReadOnlyLabel",{enumerable:!0,get:function(){return n(p).default}});var m=r(54132);Object.defineProperty(t,"WriteOnlyLabel",{enumerable:!0,get:function(){return n(m).default}});var v=r(10575);Object.defineProperty(t,"TrueLabel",{enumerable:!0,get:function(){return n(v).default}});var g=r(41624);Object.defineProperty(t,"FalseLabel",{enumerable:!0,get:function(){return n(g).default}});var y=r(95274);Object.defineProperty(t,"StringLabel",{enumerable:!0,get:function(){return n(y).default}});var _=r(40195);Object.defineProperty(t,"BooleanLabel",{enumerable:!0,get:function(){return n(_).default}});var b=r(48122);Object.defineProperty(t,"NumberLabel",{enumerable:!0,get:function(){return n(b).default}});var E=r(97645);Object.defineProperty(t,"IntegerLabel",{enumerable:!0,get:function(){return n(E).default}});var O=r(9150);Object.defineProperty(t,"NullLabel",{enumerable:!0,get:function(){return n(O).default}});var w=r(9578);Object.defineProperty(t,"AndLabel",{enumerable:!0,get:function(){return n(w).default}});var j=r(65830);Object.defineProperty(t,"OrLabel",{enumerable:!0,get:function(){return n(j).default}});var x=r(67498);Object.defineProperty(t,"NotLabel",{enumerable:!0,get:function(){return n(x).default}});var P=r(98454);Object.defineProperty(t,"XorLabel",{enumerable:!0,get:function(){return n(P).default}});var S=r(64258);Object.defineProperty(t,"ConstantLabel",{enumerable:!0,get:function(){return n(S).default}})},96999:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t,n=void 0!==r.minContains&&void 0!==r.maxContains;const l=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.contains"}},"Must contain : "));return o.default.createElement("div",{key:n?"minContainsAndmaxContains":void 0!==r.minContains?"minContains":"maxContains"},l,"\xa0",void 0!==r.minContains&&o.default.createElement(u,{value:r.minContains}),n&&o.default.createElement(i.AndLabel,null),void 0!==r.maxContains&&o.default.createElement(s,{value:r.maxContains}))};const o=n(r(63696)),a=n(r(50539)),i=r(76563);function u(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.minContains",count:t}},"at least {count} valid item(s)"))}function s(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.maxContains",count:t}},"at most {count} valid item(s)"))}},71059:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=void 0!==t.minItems&&void 0!==t.maxItems;const n=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.lengthItems"}},"Length :"));return o.default.createElement("div",{key:r?"minItemsAndmaxItems":void 0!==t.minItems?"minItems":"maxItems"},n,"\xa0",void 0!==t.minItems&&o.default.createElement(u,{value:t.minItems}),r&&o.default.createElement(i.AndLabel,null),void 0!==t.maxItems&&o.default.createElement(s,{value:t.maxItems}))};const o=n(r(63696)),a=n(r(50539)),i=r(76563);function u(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.minItems",count:t}},">= {count}"))}function s(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.maxItems",count:t}},"<= {count}"))}},16558:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.uniqueItems"}},"Unique items :")),t=o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.uniqueItemsOnly"}},"yes"));return o.default.createElement("div",{key:"uniqueItems"},e,"\xa0",t)};const o=n(r(63696)),a=n(r(50539))},13240:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.const"}},"Constant value :"));return o.default.createElement("div",{key:"const"},r,"\xa0",o.default.createElement(i.CreateValue,{value:t.const,schema:t}))};const o=n(r(63696)),a=n(r(50539)),i=r(39260)},38350:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.contentEncoding"}},"Encoding :"));return o.default.createElement("div",{key:"contentEncoding"},r,"\xa0",(0,i.printSchemaType)(t.contentEncoding))};const o=n(r(63696)),a=n(r(50539)),i=r(918)},27155:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.contentMediaType"}},"Media type :"));return o.default.createElement("div",{key:"contentMediaType"},r,"\xa0",(0,i.printSchemaType)(t.contentMediaType))};const o=n(r(63696)),a=n(r(50539)),i=r(918)},34176:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.contentSchema"}},"Decoded content must be validated against this schema :"));return o.default.createElement("div",{key:"contentSchema"},r,"\xa0",o.default.createElement(i.Collapsible,{summary:o.default.createElement("strong",null,"Schema"),detailsProps:{open:!0}},o.default.createElement(u.SchemaHierarchyComponent,{innerJsonPointer:"/contentSchema"},o.default.createElement(i.CreateNodes,{schema:t.contentSchema}))))};const o=n(r(63696)),a=n(r(50539)),i=r(64028),u=r(56688)},85234:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.default"}},"Default value :"));return o.default.createElement("div",{key:"default"},r,"\xa0",o.default.createElement(i.CreateValue,{value:t.default,schema:t}))};const o=n(r(63696)),a=n(r(50539)),i=r(39260)},74545:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.deprecated"}},"Deprecated");return o.default.createElement("div",{key:"deprecated"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(50539))},12641:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.enum"}},"Possible values :"));return o.default.createElement("div",{key:"enum"},r,"\xa0",o.default.createElement("ul",null,t.enum.map(((e,r)=>o.default.createElement("li",{key:r},o.default.createElement(i.CreateValue,{value:e,schema:t}))))))};const o=n(r(63696)),a=n(r(50539)),i=r(39260)},25075:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e,r=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.examples"}},"Example values :"));let n=t.examples.map(((e,t)=>({id:t,value:e,label:o.default.createElement(a.default,{values:{id:"json-schema.labels.exampleItem",index:t}},"Example {index}")})));return o.default.createElement("div",{key:"examples"},r,"\xa0",o.default.createElement(u.default,null,n.map((e=>o.default.createElement(i.default,{key:e.id,value:e.id.toString(),label:e.label},o.default.createElement(s.CreateValue,{value:e.value,schema:t}))))))};const o=n(r(63696)),a=n(r(50539)),i=n(r(79329)),u=n(r(65537)),s=r(39260)},90513:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.noExtraItems"}},"No extra item(s) are authorized in this array");return o.default.createElement("div",{key:"no-extra-items"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(50539))},21748:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.noExtraProperties"}},"No extra propertie(s) are authorized in this object");return o.default.createElement("div",{key:"no-extra-properties"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(50539))},54241:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.nullable"}},"Nullable");return o.default.createElement("div",{key:"nullable"},"\u2753\xa0",e)};const o=n(r(63696)),a=n(r(50539))},29772:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=t.exclusiveMinimum||t.minimum,n=void 0!==t.exclusiveMinimum,l=t.exclusiveMaximum||t.maximum,c=void 0!==t.exclusiveMaximum;const f=void 0!==r&&void 0!==l,d=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.numberMinimumMaximum"}},"Possible values :"));return o.default.createElement("div",{key:"number-range"},d,"\xa0",void 0!==r&&o.default.createElement("code",null,o.default.createElement(u,{exclusive:n,value:r})),f&&o.default.createElement(i.AndLabel,null),void 0!==l&&o.default.createElement("code",null,o.default.createElement(s,{exclusive:c,value:l})))};const o=n(r(63696)),a=n(r(50539)),i=r(76563);function u(e){let{value:t,exclusive:r}=e;return r?o.default.createElement(a.default,{values:{id:"json-schema.keywords.minimumExlusive",count:t}},"> {count}"):o.default.createElement(a.default,{values:{id:"json-schema.keywords.minimum",count:t}},">= {count}")}function s(e){let{value:t,exclusive:r}=e;return r?o.default.createElement(a.default,{values:{id:"json-schema.keywords.maximumExlusive",count:t}},"< {count}"):o.default.createElement(a.default,{values:{id:"json-schema.keywords.maximum",count:t}},"<= {count}")}},48864:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;return o.default.createElement("div",{key:"multipleOf"},o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.multipleOf"}},"Possible values :")),"\xa0",o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.multipleOf",count:t.multipleOf}},"multiple of {count}")))};const o=n(r(63696)),a=n(r(50539))},44514:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=void 0!==t.minProperties&&void 0!==t.maxProperties;const n=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.lengthProperties"}},"Length :"));return o.default.createElement("div",{key:r?"minPropertiesAndMaxProperties":void 0!==t.minProperties?"minProperties":"maxProperties"},n,"\xa0",void 0!==t.minProperties&&o.default.createElement(u,{value:t.minProperties}),r&&o.default.createElement(i.AndLabel,null),void 0!==t.maxProperties&&o.default.createElement(s,{value:t.maxProperties}))};const o=n(r(63696)),a=n(r(50539)),i=r(76563);function u(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.minProperties",count:t}},">= {count} propertie(s)"))}function s(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.maxProperties",count:t}},"<= {count} propertie(s)"))}},52388:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;return o.default.createElement("div",{key:"pattern"},o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.pattern"}},"Pattern :")),"\xa0",o.default.createElement("code",null,t.pattern))};const o=n(r(63696)),a=n(r(50539))},23202:function(e,t,r){"use strict";var n,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),i=0;i<r.length;i++)"default"!==r[i]&&o(t,e,r[i]);return a(t,e),t}),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_ORDER=t.CHECKS_MAP=void 0;const s=u(r(63696)),l=i(r(918)),c=r(30105),f={nullable:{match:e=>{let{nullable:t}=e;return!0===t},Component:()=>s.default.createElement(l.NullableQM,{key:"nullable"})},deprecated:{match:e=>{let{schema:t}=e;return!0===t.deprecated},Component:()=>s.default.createElement(l.DeprecatedQM,{key:"deprecated"})},readOnly:{match:e=>{let{schema:t}=e;return!0===t.readOnly},Component:()=>s.default.createElement(l.ReadOnlyQM,{key:"readOnly"})},writeOnly:{match:e=>{let{schema:t}=e;return!0===t.writeOnly},Component:()=>s.default.createElement(l.WriteOnlyQM,{key:"writeOnly"})},enum:{match:e=>{let{schema:t}=e;return(0,c.isArrayNotEmpty)(t.enum)},Component:e=>{let{schema:t}=e;return s.default.createElement(l.EnumQM,{key:"enum",schema:t})}},stringLength:{match:e=>{let{schema:t}=e;return void 0!==t.minLength||void 0!==t.maxLength},Component:e=>{let{schema:t}=e;return s.default.createElement(l.StringLengthQM,{key:"stringLength",schema:t})}},objectProperties:{match:e=>{let{schema:t}=e;return void 0!==t.minProperties||void 0!==t.maxProperties},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ObjectPropertiesQM,{key:"objectProperties",schema:t})}},"no-extra-properties":{match:e=>{let{schema:t}=e;return!1===t.additionalProperties||!1===t.unevaluatedProperties},Component:()=>s.default.createElement(l.NoExtraPropertiesQM,{key:"no-extra-properties"})},arrayItems:{match:e=>{let{schema:t}=e;return void 0!==t.minItems||void 0!==t.maxItems},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ArrayNumberOfItemsQM,{key:"arrayItems",schema:t})}},arrayContains:{match:e=>{let{schema:t}=e;return void 0!==t.minContains||void 0!==t.maxContains},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ArrayContainsNumberQM,{key:"arrayContains",schema:t})}},"no-extra-items":{match:e=>{let{schema:t}=e;return!1===t.unevaluatedItems||!1===t.items||!1===t.additionalItems},Component:()=>s.default.createElement(l.NoExtraItemsQM,{key:"no-extra-items"})},"number-range":{match:e=>{let{schema:t}=e;return void 0!==t.minimum||void 0!==t.exclusiveMinimum||void 0!==t.maximum||void 0!==t.exclusiveMaximum},Component:e=>{let{schema:t}=e;return s.default.createElement(l.NumberBoundsQM,{key:"number-range",schema:t})}},pattern:{match:e=>{let{schema:t}=e;return void 0!==t.pattern},Component:e=>{let{schema:t}=e;return s.default.createElement(l.PatternQM,{key:"pattern",schema:t})}},multipleOf:{match:e=>{let{schema:t}=e;return void 0!==t.multipleOf},Component:e=>{let{schema:t}=e;return s.default.createElement(l.MultipleOfQM,{key:"multipleOf",schema:t})}},uniqueItems:{match:e=>{let{schema:t}=e;return void 0!==t.uniqueItems&&!0===t.uniqueItems},Component:()=>s.default.createElement(l.ArrayUniqueItemsQM,{key:"uniqueItems"})},default:{match:e=>{let{schema:t}=e;return void 0!==t.default},Component:e=>{let{schema:t}=e;return s.default.createElement(l.DefaultValueQM,{key:"default",schema:t})}},const:{match:e=>{let{schema:t}=e;return void 0!==t.const},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ConstantQM,{key:"const",schema:t})}},examples:{match:e=>{let{schema:t,options:r}=e;return!0===r.showExamples&&(0,c.isArrayNotEmpty)(t.examples)},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ExamplesQM,{key:"examples",schema:t})}},contentMediaType:{match:e=>{let{schema:t}=e;return void 0!==t.contentMediaType},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ContentMediaTypeQM,{key:"contentMediaType",schema:t})}},contentEncoding:{match:e=>{let{schema:t}=e;return void 0!==t.contentEncoding},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ContentEncodingQM,{key:"contentEncoding",schema:t})}},contentSchema:{match:e=>{let{schema:t}=e;return void 0!==t.contentSchema},Component:e=>{let{schema:t}=e;return s.default.createElement(l.ContentSchemaQM,{key:"contentSchema",schema:t})}},unsolvedRefs:{match:e=>{let{schema:t}=e;return(0,c.hasUnresolvedRefs)(t)},Component:e=>s.default.createElement(l.UnsolvedRefsQM,{key:"unsolvedRefs",...e})}};t.CHECKS_MAP=f;t.DEFAULT_ORDER=["nullable","deprecated","readOnly","writeOnly","enum","stringLength","objectProperties","no-extra-properties","arrayItems","arrayContains","no-extra-items","number-range","pattern","multipleOf","uniqueItems","contentEncoding","contentMediaType","contentSchema","default","const","examples","unsolvedRefs"]},86006:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.readOnly"}},"read only");return o.default.createElement("div",{key:"readOnly"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(50539))},39945:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t}=e;let r=void 0!==t.minLength&&void 0!==t.maxLength;const n=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.length"}},"Length :"));return o.default.createElement("div",{key:r?"minLengthAndmaxLength":void 0!==t.minLength?"minLength":"maxLength"},n,"\xa0",void 0!==t.minLength&&o.default.createElement(u,{value:t.minLength}),r&&o.default.createElement(i.AndLabel,null),void 0!==t.maxLength&&o.default.createElement(s,{value:t.maxLength}))};const o=n(r(63696)),a=n(r(50539)),i=r(76563);function u(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.minLength",count:t}},">= {count} character(s)"))}function s(e){let{value:t}=e;return o.default.createElement("code",null,o.default.createElement(a.default,{values:{id:"json-schema.keywords.maxLength",count:t}},"<= {count} character(s)"))}},61168:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{schema:t,options:{UnresolvedRefsComponent:r}}=e,n=o.default.createElement("strong",null,o.default.createElement(a.default,{values:{id:"json-schema.labels.unsolvedRefs"}},"Unsolved ref(s) :"));let i=[t.$ref,t.$dynamicRef,t.$recursiveRef].filter((e=>void 0!==e)).join(" ");return o.default.createElement("div",{key:"unsolvedRefs"},r?o.default.createElement(r,{schema:t}):o.default.createElement(o.default.Fragment,null,n,"\xa0",i))};const o=n(r(63696)),a=n(r(50539))},11891:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.default.createElement(a.default,{values:{id:"json-schema.labels.writeOnly"}},"write only");return o.default.createElement("div",{key:"writeOnly"},"\ud83d\udea8\xa0",e)};const o=n(r(63696)),a=n(r(50539))},918:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QUALIFIERS_DEFAULT_ORDER=t.QUALIFIERS_MAP=t.UnsolvedRefsQM=t.ContentSchemaQM=t.ContentEncodingQM=t.ContentMediaTypeQM=t.NullableQM=t.WriteOnlyQM=t.ReadOnlyQM=t.DeprecatedQM=t.ExamplesQM=t.ConstantQM=t.DefaultValueQM=t.ArrayUniqueItemsQM=t.MultipleOfQM=t.PatternQM=t.NumberBoundsQM=t.NoExtraItemsQM=t.ArrayContainsNumberQM=t.ArrayNumberOfItemsQM=t.NoExtraPropertiesQM=t.ObjectPropertiesQM=t.StringLengthQM=t.EnumQM=void 0,t.printSchemaType=function(e){if(["string","number","bigint","boolean"].includes(typeof e))return o.default.createElement("code",null,e.toString());return o.default.createElement(a.default,{language:"json"},`${JSON.stringify(e)}`)};const o=n(r(63696)),a=n(r(58069));var i=r(12641);Object.defineProperty(t,"EnumQM",{enumerable:!0,get:function(){return n(i).default}});var u=r(39945);Object.defineProperty(t,"StringLengthQM",{enumerable:!0,get:function(){return n(u).default}});var s=r(44514);Object.defineProperty(t,"ObjectPropertiesQM",{enumerable:!0,get:function(){return n(s).default}});var l=r(21748);Object.defineProperty(t,"NoExtraPropertiesQM",{enumerable:!0,get:function(){return n(l).default}});var c=r(71059);Object.defineProperty(t,"ArrayNumberOfItemsQM",{enumerable:!0,get:function(){return n(c).default}});var f=r(96999);Object.defineProperty(t,"ArrayContainsNumberQM",{enumerable:!0,get:function(){return n(f).default}});var d=r(90513);Object.defineProperty(t,"NoExtraItemsQM",{enumerable:!0,get:function(){return n(d).default}});var h=r(29772);Object.defineProperty(t,"NumberBoundsQM",{enumerable:!0,get:function(){return n(h).default}});var p=r(52388);Object.defineProperty(t,"PatternQM",{enumerable:!0,get:function(){return n(p).default}});var m=r(48864);Object.defineProperty(t,"MultipleOfQM",{enumerable:!0,get:function(){return n(m).default}});var v=r(16558);Object.defineProperty(t,"ArrayUniqueItemsQM",{enumerable:!0,get:function(){return n(v).default}});var g=r(85234);Object.defineProperty(t,"DefaultValueQM",{enumerable:!0,get:function(){return n(g).default}});var y=r(13240);Object.defineProperty(t,"ConstantQM",{enumerable:!0,get:function(){return n(y).default}});var _=r(25075);Object.defineProperty(t,"ExamplesQM",{enumerable:!0,get:function(){return n(_).default}});var b=r(74545);Object.defineProperty(t,"DeprecatedQM",{enumerable:!0,get:function(){return n(b).default}});var E=r(86006);Object.defineProperty(t,"ReadOnlyQM",{enumerable:!0,get:function(){return n(E).default}});var O=r(11891);Object.defineProperty(t,"WriteOnlyQM",{enumerable:!0,get:function(){return n(O).default}});var w=r(54241);Object.defineProperty(t,"NullableQM",{enumerable:!0,get:function(){return n(w).default}});var j=r(27155);Object.defineProperty(t,"ContentMediaTypeQM",{enumerable:!0,get:function(){return n(j).default}});var x=r(38350);Object.defineProperty(t,"ContentEncodingQM",{enumerable:!0,get:function(){return n(x).default}});var P=r(34176);Object.defineProperty(t,"ContentSchemaQM",{enumerable:!0,get:function(){return n(P).default}});var S=r(61168);Object.defineProperty(t,"UnsolvedRefsQM",{enumerable:!0,get:function(){return n(S).default}});var k=r(23202);Object.defineProperty(t,"QUALIFIERS_MAP",{enumerable:!0,get:function(){return k.CHECKS_MAP}}),Object.defineProperty(t,"QUALIFIERS_DEFAULT_ORDER",{enumerable:!0,get:function(){return k.DEFAULT_ORDER}})},30105:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayNotEmpty=t.hasUnresolvedRefs=t.isNull=t.isBoolean=t.isSchemaConditional=t.isSchemaComposition=t.isInteger=t.isNumeric=t.isStringType=t.isArrayType=t.isObjectType=void 0,t.detectedTypes=function(e){const t=Array.isArray(e.type)?e.type:void 0!==e.type?[e.type]:[];if(0!==t.length)return[...new Set(t)];return[...r(e)]};t.isObjectType=e=>"boolean"!=typeof e&&("object"===e.type||void 0!==e.properties||void 0!==e.additionalProperties||void 0!==e.patternProperties||void 0!==e.propertyNames||void 0!==e.minProperties||void 0!==e.maxProperties||void 0!==e.required||void 0!==e.unevaluatedProperties);t.isArrayType=e=>{var t;return"boolean"!=typeof e&&("array"===e.type||void 0!==e.items||void 0!==e.minItems||void 0!==e.maxItems||void 0!==e.additionalItems||void 0!==e.contains||void 0!==e.minContains||void 0!==e.maxContains||void 0!==e.prefixItems||void 0!==e.unevaluatedItems||Array.isArray(e.const)||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>Array.isArray(e)))))};t.isStringType=e=>{var t;return"boolean"!=typeof e&&("string"===e.type||void 0!==e.minLength||void 0!==e.maxLength||void 0!==e.pattern||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>"string"==typeof e)))||"string"==typeof e.const)};t.isNumeric=e=>{var t;return"boolean"!=typeof e&&("number"===e.type||void 0!==e.multipleOf||void 0!==e.minimum||void 0!==e.exclusiveMinimum||void 0!==e.maximum||void 0!==e.exclusiveMaximum||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>"number"==typeof e)))||"number"==typeof e.const)};t.isInteger=e=>{var t;return"boolean"!=typeof e&&("integer"===e.type||1===e.multipleOf||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>"bigint"==typeof e)))||"bigint"==typeof e.const)};t.isSchemaComposition=e=>"boolean"!=typeof e&&(void 0!==e.allOf||void 0!==e.anyOf||void 0!==e.oneOf||void 0!==e.not);t.isSchemaConditional=e=>"boolean"!=typeof e&&(void 0!==e.if||void 0!==e.dependencies||void 0!==e.dependentRequired||void 0!==e.dependentSchemas);t.isBoolean=e=>{var t;return"boolean"!=typeof e&&("boolean"===e.type||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>"boolean"==typeof e)))||"boolean"==typeof e.const)};t.isNull=e=>{var t;return"boolean"!=typeof e&&("null"===e.type||(null===(t=e.enum)||void 0===t?void 0:t.some((e=>null===e)))||null===e.const)};function*r(e){(0,t.isNull)(e)&&(yield"null"),(0,t.isObjectType)(e)&&(yield"object"),(0,t.isArrayType)(e)&&(yield"array"),(0,t.isStringType)(e)&&(yield"string"),(0,t.isBoolean)(e)&&(yield"boolean"),(0,t.isInteger)(e)&&(yield"integer"),!(0,t.isInteger)(e)&&(0,t.isNumeric)(e)&&(yield"number")}t.hasUnresolvedRefs=e=>"boolean"!=typeof e&&(void 0!==e.$ref||void 0!==e.$dynamicRef||void 0!==e.$recursiveRef);t.isArrayNotEmpty=e=>void 0!==e&&e.length>0},27887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeStringForJSONPointer=function(e){return e.replace(/~/g,"~0").replace(/\//g,"~1").replace(/%/g,"%25")}},26234:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;const o=n(r(63696)),a=r(24413),i=r(64028),u=r(76563);function s(e,t){return!(t<=1)&&e!==t-1}function l(e){let{schema:t}=e;if("boolean"==typeof t)return o.default.createElement(i.TypeLabelSwitch,{type:t});if(t.title)return o.default.createElement(o.default.Fragment,null,t.title);const r=(0,a.detectedTypes)(t);return 0===r.length?o.default.createElement(c,{schema:t}):o.default.createElement(o.default.Fragment,null,r.map(((e,n)=>o.default.createElement(o.default.Fragment,{key:n},o.default.createElement(f,{schema:t,type:e}),s(n,r.length)&&o.default.createElement(u.OrLabel,null)))))}function c(e){let{schema:t}=e;if(void 0!==t.not)return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.NotLabel,null)," ( ",o.default.createElement(l,{schema:t.not})," ) ");if(t.anyOf||t.oneOf||t.allOf){const e=t.anyOf?o.default.createElement(u.OrLabel,null):t.oneOf?o.default.createElement(u.XorLabel,null):o.default.createElement(u.AndLabel,null),r=t.allOf||t.anyOf||t.oneOf;return o.default.createElement(o.default.Fragment,null,r.map(((t,n)=>o.default.createElement(o.default.Fragment,{key:n},o.default.createElement(l,{schema:t}),s(n,r.length)&&e))))}return o.default.createElement(i.TypeLabelSwitch,{type:!0})}function f(e){let{schema:t,type:r}=e;if("string"===r&&void 0!==t.format)return o.default.createElement(i.TypeLabelSwitch,{type:t.format});if("array"===r)return o.default.createElement(d,{schema:t});if(!["array","object"].includes(r)){if(void 0!==t.const)return o.default.createElement("code",null,`${JSON.stringify(t.const)}`);if(void 0!==t.enum&&1===t.enum.length)return o.default.createElement("code",null,`${JSON.stringify(t.enum[0])}`)}return o.default.createElement(i.TypeLabelSwitch,{type:r})}function d(e){let{schema:t}=e;if([void 0,!1].includes(t.items)&&[void 0,!1].includes(t.prefixItems)&&void 0===t.contains)return o.default.createElement(i.TypeLabelSwitch,{type:"array"});let r=[];if(Array.isArray(t.prefixItems)&&r.push(...t.prefixItems.map(((e,t)=>o.default.createElement(l,{schema:e,key:`prefixItems_${t}`})))),void 0!==t.items&&"boolean"!=typeof t.items){let e=Array.isArray(t.items)?t.items:[t.items];r.push(...e.map(((e,t)=>o.default.createElement(l,{schema:e,key:`items_${t}`}))))}return void 0!==t.additionalItems&&"boolean"!=typeof t.additionalItems&&r.push(o.default.createElement(l,{schema:t.additionalItems,key:"additionalItems"})),void 0!==t.unevaluatedItems&&"boolean"!=typeof t.unevaluatedItems&&r.push(o.default.createElement(l,{schema:t.unevaluatedItems,key:"unevaluatedItems"})),void 0!==t.contains&&r.push(o.default.createElement(o.default.Fragment,{key:"before_contains"},"..."),o.default.createElement(l,{schema:t.contains,key:"contains"})),!1!==t.unevaluatedItems&&!1!==t.items&&!1!==t.additionalItems&&r.push(o.default.createElement(o.default.Fragment,{key:"open_tuple"},"...")),o.default.createElement(o.default.Fragment,null,"(",r.map(((e,t)=>o.default.createElement(o.default.Fragment,{key:t},e,s(t,r.length)&&","))),")[]")}},72089:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{options:t}=e,r=t.qualifierMessagesOrder||a.QUALIFIERS_DEFAULT_ORDER;return o.default.createElement(o.default.Fragment,null,r.filter((t=>a.QUALIFIERS_MAP[t].match(e))).map((t=>a.QUALIFIERS_MAP[t].Component(e))))};const o=n(r(63696)),a=r(918)},24413:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QualifierMessages=t.GenerateFriendlyName=void 0;var i=r(26234);Object.defineProperty(t,"GenerateFriendlyName",{enumerable:!0,get:function(){return a(i).default}});var u=r(72089);Object.defineProperty(t,"QualifierMessages",{enumerable:!0,get:function(){return a(u).default}}),o(r(30105),t),o(r(27887),t)},58069:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>z});var n=r(63696),o=r(9136),a=r(34164),i=r(8532),u=r(53115);function s(){const{prism:e}=(0,u.p)(),{colorMode:t}=(0,i.G)(),r=e.theme,n=e.darkTheme||r;return"dark"===t?n:r}var l=r(204),c=r(18426),f=r.n(c);const d=/title=(?<quote>["'])(?<title>.*?)\1/,h=/\{(?<range>[\d,-]+)\}/,p={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},m={...p,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},v=Object.keys(p);function g(e,t){const r=e.map((e=>{const{start:r,end:n}=m[e];return`(?:${r}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${n})`})).join("|");return new RegExp(`^\\s*(?:${r})\\s*$`)}function y(e,t){let r=e.replace(/\n$/,"");const{language:n,magicComments:o,metastring:a}=t;if(a&&h.test(a)){const e=a.match(h).groups.range;if(0===o.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${a}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=o[0].className,n=f()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(n),code:r}}if(void 0===n)return{lineClassNames:{},code:r};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return g(["js","jsBlock"],t);case"jsx":case"tsx":return g(["js","jsBlock","jsx"],t);case"html":return g(["js","jsBlock","html"],t);case"python":case"py":case"bash":return g(["bash"],t);case"markdown":case"md":return g(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return g(["tex"],t);case"lua":case"haskell":return g(["lua"],t);case"sql":return g(["lua","jsBlock"],t);case"wasm":return g(["wasm"],t);case"vb":case"vba":case"visual-basic":return g(["vb","rem"],t);case"vbnet":return g(["vbnet","rem"],t);case"batch":return g(["rem"],t);case"basic":return g(["rem","f90"],t);case"fsharp":return g(["js","ml"],t);case"ocaml":case"sml":return g(["ml"],t);case"fortran":return g(["f90"],t);case"cobol":return g(["cobol"],t);default:return g(v,t)}}(n,o),u=r.split("\n"),s=Object.fromEntries(o.map((e=>[e.className,{start:0,range:""}]))),l=Object.fromEntries(o.filter((e=>e.line)).map((e=>{let{className:t,line:r}=e;return[r,t]}))),c=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:r}=e;return[r.start,t]}))),d=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:r}=e;return[r.end,t]})));for(let f=0;f<u.length;){const e=u[f].match(i);if(!e){f+=1;continue}const t=e.slice(1).find((e=>void 0!==e));l[t]?s[l[t]].range+=`${f},`:c[t]?s[c[t]].start=f:d[t]&&(s[d[t]].range+=`${s[d[t]].start}-${f-1},`),u.splice(f,1)}r=u.join("\n");const p={};return Object.entries(s).forEach((e=>{let[t,{range:r}]=e;f()(r).forEach((e=>{p[e]??=[],p[e].push(t)}))})),{lineClassNames:p,code:r}}const _={codeBlockContainer:"codeBlockContainer_Ckt0"};var b=r(62540);function E(e){let{as:t,...r}=e;const n=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},r={};return Object.entries(e.plain).forEach((e=>{let[n,o]=e;const a=t[n];a&&"string"==typeof o&&(r[a]=o)})),r}(s());return(0,b.jsx)(t,{...r,style:n,className:(0,a.A)(r.className,_.codeBlockContainer,l.G.common.codeBlock)})}const O={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function w(e){let{children:t,className:r}=e;return(0,b.jsx)(E,{as:"pre",tabIndex:0,className:(0,a.A)(O.codeBlockStandalone,"thin-scrollbar",r),children:(0,b.jsx)("code",{className:O.codeBlockLines,children:t})})}var j=r(26849);const x={attributes:!0,characterData:!0,childList:!0,subtree:!0};function P(e,t){const[r,o]=(0,n.useState)(),a=(0,n.useCallback)((()=>{o(e.current?.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,n.useEffect)((()=>{a()}),[a]),function(e,t,r){void 0===r&&(r=x);const o=(0,j._q)(t),a=(0,j.Be)(r);(0,n.useEffect)((()=>{const t=new MutationObserver(o);return e&&t.observe(e,a),()=>t.disconnect()}),[e,o,a])}(r,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),a())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var S=r(71765);const k={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function C(e){let{line:t,classNames:r,showLineNumbers:n,getLineProps:o,getTokenProps:i}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const u=o({line:t,className:(0,a.A)(r,n&&k.codeLine)}),s=t.map(((e,t)=>(0,b.jsx)("span",{...i({token:e})},t)));return(0,b.jsxs)("span",{...u,children:[n?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:k.codeLineNumber}),(0,b.jsx)("span",{className:k.codeLineContent,children:s})]}):s,(0,b.jsx)("br",{})]})}var A=r(50539);function M(e){return(0,b.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,b.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function I(e){return(0,b.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,b.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const R={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function N(e){let{code:t,className:r}=e;const[o,i]=(0,n.useState)(!1),u=(0,n.useRef)(void 0),s=(0,n.useCallback)((()=>{!function(e,t){let{target:r=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const n=document.createElement("textarea"),o=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const a=document.getSelection(),i=a.rangeCount>0&&a.getRangeAt(0);r.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let u=!1;try{u=document.execCommand("copy")}catch{}n.remove(),i&&(a.removeAllRanges(),a.addRange(i)),o&&o.focus()}(t),i(!0),u.current=window.setTimeout((()=>{i(!1)}),1e3)}),[t]);return(0,n.useEffect)((()=>()=>window.clearTimeout(u.current)),[]),(0,b.jsx)("button",{type:"button","aria-label":o?(0,A.translate)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,A.translate)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,A.translate)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,a.A)("clean-btn",r,R.copyButton,o&&R.copyButtonCopied),onClick:s,children:(0,b.jsxs)("span",{className:R.copyButtonIcons,"aria-hidden":"true",children:[(0,b.jsx)(M,{className:R.copyButtonIcon}),(0,b.jsx)(I,{className:R.copyButtonSuccessIcon})]})})}function D(e){return(0,b.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,b.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const T={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function L(e){let{className:t,onClick:r,isEnabled:n}=e;const o=(0,A.translate)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,b.jsx)("button",{type:"button",onClick:r,className:(0,a.A)("clean-btn",t,n&&T.wordWrapButtonEnabled),"aria-label":o,title:o,children:(0,b.jsx)(D,{className:T.wordWrapButtonIcon,"aria-hidden":"true"})})}function $(e){let{children:t,className:r="",metastring:o,title:i,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:f,magicComments:h}}=(0,u.p)(),p=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(r)??f),m=s(),v=function(){const[e,t]=(0,n.useState)(!1),[r,o]=(0,n.useState)(!1),a=(0,n.useRef)(null),i=(0,n.useCallback)((()=>{const r=a.current.querySelector("code");e?r.removeAttribute("style"):(r.style.whiteSpace="pre-wrap",r.style.overflowWrap="anywhere"),t((e=>!e))}),[a,e]),u=(0,n.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=a.current,r=e>t||a.current.querySelector("code").hasAttribute("style");o(r)}),[a]);return P(a,u),(0,n.useEffect)((()=>{u()}),[e,u]),(0,n.useEffect)((()=>(window.addEventListener("resize",u,{passive:!0}),()=>{window.removeEventListener("resize",u)})),[u]),{codeBlockRef:a,isEnabled:e,isCodeScrollable:r,toggle:i}}(),g=function(e){return e?.match(d)?.groups.title??""}(o)||i,{lineClassNames:_,code:w}=y(t,{metastring:o,language:p,magicComments:h}),j=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(o);return(0,b.jsxs)(E,{as:"div",className:(0,a.A)(r,p&&!r.includes(`language-${p}`)&&`language-${p}`),children:[g&&(0,b.jsx)("div",{className:O.codeBlockTitle,children:g}),(0,b.jsxs)("div",{className:O.codeBlockContent,children:[(0,b.jsx)(S.f4,{theme:m,code:w,language:p??"text",children:e=>{let{className:t,style:r,tokens:n,getLineProps:o,getTokenProps:i}=e;return(0,b.jsx)("pre",{tabIndex:0,ref:v.codeBlockRef,className:(0,a.A)(t,O.codeBlock,"thin-scrollbar"),style:r,children:(0,b.jsx)("code",{className:(0,a.A)(O.codeBlockLines,j&&O.codeBlockLinesWithNumbering),children:n.map(((e,t)=>(0,b.jsx)(C,{line:e,getLineProps:o,getTokenProps:i,classNames:_[t],showLineNumbers:j},t)))})})}}),(0,b.jsxs)("div",{className:O.buttonGroup,children:[(v.isEnabled||v.isCodeScrollable)&&(0,b.jsx)(L,{className:O.codeButton,onClick:()=>v.toggle(),isEnabled:v.isEnabled}),(0,b.jsx)(N,{className:O.codeButton,code:w})]})]})]})}function z(e){let{children:t,...r}=e;const a=(0,o.A)(),i=function(e){return n.Children.toArray(e).some((e=>(0,n.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),u="string"==typeof i?$:w;return(0,b.jsx)(u,{...r,children:i},String(a))}},56701:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(63696),o=r(34164),a=r(25246),i=r(9136),u=r(33535);const s={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};var l=r(62540);function c(e){return!!e&&("SUMMARY"===e.tagName||c(e.parentElement))}function f(e,t){return!!e&&(e===t||f(e.parentElement,t))}function d(e){let{summary:t,children:r,...d}=e;(0,a.A)().collectAnchor(d.id);const h=(0,i.A)(),p=(0,n.useRef)(null),{collapsed:m,setCollapsed:v}=(0,u.u)({initialState:!d.open}),[g,y]=(0,n.useState)(d.open),_=n.isValidElement(t)?t:(0,l.jsx)("summary",{children:t??"Details"});return(0,l.jsxs)("details",{...d,ref:p,open:g,"data-collapsed":m,className:(0,o.A)(s.details,h&&s.isBrowser,d.className),onMouseDown:e=>{c(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;c(t)&&f(t,p.current)&&(e.preventDefault(),m?(v(!1),y(!0)):v(!0))},children:[_,(0,l.jsx)(u.N,{lazy:!1,collapsed:m,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{v(e),y(!e)},children:(0,l.jsx)("div",{className:s.collapsibleContent,children:r})})]})}const h={details:"details_b_Ee"},p="alert alert--info";function m(e){let{...t}=e;return(0,l.jsx)(d,{...t,className:(0,o.A)(p,h.details,t.className)})}},79329:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});r(63696);var n=r(34164);const o={tabItem:"tabItem_Ymn6"};var a=r(62540);function i(e){let{children:t,hidden:r,className:i}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,n.A)(o.tabItem,i),hidden:r,children:t})}},65537:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(63696),o=r(34164),a=r(65627),i=r(56347),u=r(50372),s=r(30604),l=r(11861),c=r(78749);function f(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function d(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??function(e){return f(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:o}}=e;return{value:t,label:r,attributes:n,default:o}}))}(r);return function(e){const t=(0,l.XI)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[t,r])}function h(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function p(e){let{queryString:t=!1,groupId:r}=e;const o=(0,i.W6)(),a=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s.aZ)(a),(0,n.useCallback)((e=>{if(!a)return;const t=new URLSearchParams(o.location.search);t.set(a,e),o.replace({...o.location,search:t.toString()})}),[a,o])]}function m(e){const{defaultValue:t,queryString:r=!1,groupId:o}=e,a=d(e),[i,s]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(t){if(!h({value:t,tabValues:r}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:a}))),[l,f]=p({queryString:r,groupId:o}),[m,v]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[o,a]=(0,c.Dv)(r);return[o,(0,n.useCallback)((e=>{r&&a.set(e)}),[r,a])]}({groupId:o}),g=(()=>{const e=l??m;return h({value:e,tabValues:a})?e:null})();(0,u.A)((()=>{g&&s(g)}),[g]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!h({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);s(e),f(e),v(e)}),[f,v,a]),tabValues:a}}var v=r(9136);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var y=r(62540);function _(e){let{className:t,block:r,selectedValue:n,selectValue:i,tabValues:u}=e;const s=[],{blockElementScrollPositionUntilNextRender:l}=(0,a.a_)(),c=e=>{const t=e.currentTarget,r=s.indexOf(t),o=u[r].value;o!==n&&(l(t),i(o))},f=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=s.indexOf(e.currentTarget)+1;t=s[r]??s[0];break}case"ArrowLeft":{const r=s.indexOf(e.currentTarget)-1;t=s[r]??s[s.length-1];break}}t?.focus()};return(0,y.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":r},t),children:u.map((e=>{let{value:t,label:r,attributes:a}=e;return(0,y.jsx)("li",{role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:e=>{s.push(e)},onKeyDown:f,onClick:c,...a,className:(0,o.A)("tabs__item",g.tabItem,a?.className,{"tabs__item--active":n===t}),children:r??t},t)}))})}function b(e){let{lazy:t,children:r,selectedValue:a}=e;const i=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,y.jsx)("div",{className:"margin-top--md",children:i.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a})))})}function E(e){const t=m(e);return(0,y.jsxs)("div",{className:(0,o.A)("tabs-container",g.tabList),children:[(0,y.jsx)(_,{...t,...e}),(0,y.jsx)(b,{...t,...e})]})}function O(e){const t=(0,v.A)();return(0,y.jsx)(E,{...e,children:f(e.children)},String(t))}},303:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={schemaItem:"schemaItem_b4BA",schemaName:"schemaName_ofZ6",strikethrough:"strikethrough_CDAM"}},57640:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={constant:"constant_q4qm"}},66023:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={deprecated:"deprecated_A1v7"}},34962:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={readOnly:"readOnly_I05C"}},72279:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={required:"required_bs44"}},25083:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={writeOnly:"writeOnly_wo3F"}},18426:(e,t)=>{function r(e){let t,r=[];for(let n of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(n))r.push(parseInt(n,10));else if(t=n.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,n,o,a]=t;if(n&&a){n=parseInt(n),a=parseInt(a);const e=n<a?1:-1;"-"!==o&&".."!==o&&"\u2025"!==o||(a+=e);for(let t=n;t!==a;t+=e)r.push(t)}}return r}t.default=r,e.exports=r},34629:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__addDisposableResource:()=>D,__assign:()=>a,__asyncDelegator:()=>x,__asyncGenerator:()=>j,__asyncValues:()=>P,__await:()=>w,__awaiter:()=>p,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>N,__classPrivateFieldSet:()=>R,__createBinding:()=>v,__decorate:()=>u,__disposeResources:()=>L,__esDecorate:()=>l,__exportStar:()=>g,__extends:()=>o,__generator:()=>m,__importDefault:()=>M,__importStar:()=>A,__makeTemplateObject:()=>S,__metadata:()=>h,__param:()=>s,__propKey:()=>f,__read:()=>_,__rest:()=>i,__rewriteRelativeImportExtension:()=>$,__runInitializers:()=>c,__setFunctionName:()=>d,__spread:()=>b,__spreadArray:()=>O,__spreadArrays:()=>E,__values:()=>y,default:()=>z});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function u(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function s(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var u,s=n.kind,l="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?n.static?e:e.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),d=!1,h=r.length-1;h>=0;h--){var p={};for(var m in n)p[m]="access"===m?{}:n[m];for(var m in n.access)p.access[m]=n.access[m];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var v=(0,r[h])("accessor"===s?{get:f.get,set:f.set}:f[l],p);if("accessor"===s){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(u=i(v.get))&&(f.get=u),(u=i(v.set))&&(f.set=u),(u=i(v.init))&&o.unshift(u)}else(u=i(v))&&("field"===s?o.unshift(u):f[l]=u)}c&&Object.defineProperty(c,n.name,f),d=!0}function c(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(t){a(t)}}function u(e){try{s(n.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))}function m(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(s){u=[6,s],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function g(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(u){o={error:u}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}function E(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,u=a.length;i<u;i++,o++)n[o]=a[i];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function w(e){return this instanceof w?(this.v=e,this):new w(e)}function j(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),n[Symbol.asyncIterator]=function(){return this},n;function i(e,t){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||u(e,t)}))},t&&(n[e]=t(n[e])))}function u(e,t){try{(r=o[e](t)).value instanceof w?Promise.resolve(r.value.v).then(s,l):c(a[0][2],r)}catch(n){c(a[0][3],n)}var r}function s(e){u("next",e)}function l(e){u("throw",e)}function c(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}}function x(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:w(e[n](t)),done:!1}:o?o(t):t}:o}}function P(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=y(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},C=function(e){return C=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},C(e)};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=C(e),n=0;n<r.length;n++)"default"!==r[n]&&v(t,e,r[n]);return k(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function R(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function D(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var T="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function L(e){function t(t){e.error=e.hasError?new T(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,(function(e){return t(e),o()}))}else n|=1}catch(i){t(i)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function $(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,r,n,o,a){return r?t?".jsx":".js":!n||o&&a?n+o+"."+a.toLowerCase()+"js":e})):e}const z={__extends:o,__assign:a,__rest:i,__decorate:u,__param:s,__esDecorate:l,__runInitializers:c,__propKey:f,__setFunctionName:d,__metadata:h,__awaiter:p,__generator:m,__createBinding:v,__exportStar:g,__values:y,__read:_,__spread:b,__spreadArrays:E,__spreadArray:O,__await:w,__asyncGenerator:j,__asyncDelegator:x,__asyncValues:P,__makeTemplateObject:S,__importStar:A,__importDefault:M,__classPrivateFieldGet:I,__classPrivateFieldSet:R,__classPrivateFieldIn:N,__addDisposableResource:D,__disposeResources:L,__rewriteRelativeImportExtension:$}},28453:(e,t,r)=>{"use strict";r.d(t,{R:()=>i,x:()=>u});var n=r(63696);const o={},a=n.createContext(o);function i(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function u(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/common.51e9c859.js.LICENSE.txt b/assets/js/common.128e1352.js.LICENSE.txt similarity index 100% rename from assets/js/common.51e9c859.js.LICENSE.txt rename to assets/js/common.128e1352.js.LICENSE.txt diff --git a/assets/js/d4ff3b58.4cef20b0.js b/assets/js/d4ff3b58.13a1f635.js similarity index 97% rename from assets/js/d4ff3b58.4cef20b0.js rename to assets/js/d4ff3b58.13a1f635.js index 73adc202..a1ff42d1 100644 --- a/assets/js/d4ff3b58.4cef20b0.js +++ b/assets/js/d4ff3b58.13a1f635.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5271],{63411:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>h,contentTitle:()=>d,default:()=>u,frontMatter:()=>c,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"api/JSONSchemaEditor","title":"\u270f\ufe0f @theme/JSONSchemaEditor","description":"@theme/JSONSchemaEditor API","source":"@site/docs/api/JSONSchemaEditor.mdx","sourceDirName":"api","slug":"/api/JSONSchemaEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/api/JSONSchemaEditor.mdx","tags":[],"version":"current","frontMatter":{"title":"\u270f\ufe0f @theme/JSONSchemaEditor","description":"@theme/JSONSchemaEditor API"},"sidebar":"tutorialSidebar","previous":{"title":"\u2699\ufe0f Theme Configuration","permalink":"/docusaurus-json-schema-plugin/docs/api/config"},"next":{"title":"\ud83d\udd0e @theme/JSONSchemaViewer","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer"}}');var n=o(62540),i=o(28453),s=o(11470),a=o(19365);const c={title:"\u270f\ufe0f @theme/JSONSchemaEditor",description:"@theme/JSONSchemaEditor API"},d=void 0,h={},l=[{value:"Configuration",id:"configuration",level:2},{value:"Examples",id:"examples",level:2}];function m(e){const t={a:"a",code:"code",h2:"h2",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"configuration",children:"Configuration"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Property"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Required ?"}),(0,n.jsx)(t.th,{children:"Note"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"schema"}),(0,n.jsx)(t.td,{children:"JSONSchema | JSONSchema[]"}),(0,n.jsx)(t.td,{children:"Mandatory"}),(0,n.jsxs)(t.td,{children:["JSON Schema(s) supported by ",(0,n.jsx)(t.a,{href:"https://github.com/microsoft/monaco-editor",children:"monaco-editor"}),", which powers ",(0,n.jsx)(t.a,{href:"https://code.visualstudio.com/Docs/languages/json#_json-schemas-and-settings",children:"VS Code"})," - Currently, it supports all draft versions from Draft 4 to JSON Schema Draft 2020-12"]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"diagnosticsOptions"}),(0,n.jsx)(t.td,{children:"MonacoEditorProps"}),(0,n.jsx)(t.td,{children:"Optional"}),(0,n.jsx)(t.td,{children:"Options for Monaco Editor diagnostic (useful for instance to enable enableSchemaRequest)"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"...."}),(0,n.jsx)(t.td,{children:"MonacoEditorProps"}),(0,n.jsx)(t.td,{children:"Optional"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"https://github.com/react-monaco-editor/react-monaco-editor#properties",children:"Properties"})," of ",(0,n.jsx)(t.a,{href:"https://github.com/react-monaco-editor/react-monaco-editor",children:"react-monaco-editor"})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"examples",children:"Examples"}),"\n",(0,n.jsx)(s.default,{children:(0,n.jsx)(a.default,{value:"JSX",label:"JSX",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-tsx",children:'import React from "react"\nimport Layout from "@theme/Layout"\nimport JSONSchemaEditor from "@theme/JSONSchemaEditor"\n// import { useColorMode } from "@docusaurus/theme-common"\n\nexport default function ExamplePage(): JSX.Element {\n\n // You are free to fetch your schema in your own way (load local file, fetch, ...) :)\n const mySchema = {\n "type": "object",\n "properties": {\n "builtin": {\n "type": "number"\n }\n },\n "patternProperties": {\n "^S_": {\n "type": "string"\n },\n "^I_": {\n "type": "integer"\n }\n },\n "additionalProperties": {\n "type": "string"\n }\n }\n\n // https://docusaurus.io/docs/api/themes/configuration#use-color-mode\n return (\n <Layout\n title={`My super JSON Schema`}\n description="Description will go into a meta tag in <head />"\n >\n {/* You can "useColorMode" if you want to take into account current Docusaurus color */}\n <JSONSchemaEditor schema={mySchema} theme={"vs-dark"} />\n </Layout>\n )\n}\n'})})})})]})}function u(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[5271],{27288:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>h,contentTitle:()=>d,default:()=>u,frontMatter:()=>c,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"api/JSONSchemaEditor","title":"\u270f\ufe0f @theme/JSONSchemaEditor","description":"@theme/JSONSchemaEditor API","source":"@site/docs/api/JSONSchemaEditor.mdx","sourceDirName":"api","slug":"/api/JSONSchemaEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/api/JSONSchemaEditor.mdx","tags":[],"version":"current","frontMatter":{"title":"\u270f\ufe0f @theme/JSONSchemaEditor","description":"@theme/JSONSchemaEditor API"},"sidebar":"tutorialSidebar","previous":{"title":"\u2699\ufe0f Theme Configuration","permalink":"/docusaurus-json-schema-plugin/docs/api/config"},"next":{"title":"\ud83d\udd0e @theme/JSONSchemaViewer","permalink":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer"}}');var n=o(62540),i=o(28453),s=o(65537),a=o(79329);const c={title:"\u270f\ufe0f @theme/JSONSchemaEditor",description:"@theme/JSONSchemaEditor API"},d=void 0,h={},l=[{value:"Configuration",id:"configuration",level:2},{value:"Examples",id:"examples",level:2}];function m(e){const t={a:"a",code:"code",h2:"h2",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"configuration",children:"Configuration"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Property"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Required ?"}),(0,n.jsx)(t.th,{children:"Note"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"schema"}),(0,n.jsx)(t.td,{children:"JSONSchema | JSONSchema[]"}),(0,n.jsx)(t.td,{children:"Mandatory"}),(0,n.jsxs)(t.td,{children:["JSON Schema(s) supported by ",(0,n.jsx)(t.a,{href:"https://github.com/microsoft/monaco-editor",children:"monaco-editor"}),", which powers ",(0,n.jsx)(t.a,{href:"https://code.visualstudio.com/Docs/languages/json#_json-schemas-and-settings",children:"VS Code"})," - Currently, it supports all draft versions from Draft 4 to JSON Schema Draft 2020-12"]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"diagnosticsOptions"}),(0,n.jsx)(t.td,{children:"MonacoEditorProps"}),(0,n.jsx)(t.td,{children:"Optional"}),(0,n.jsx)(t.td,{children:"Options for Monaco Editor diagnostic (useful for instance to enable enableSchemaRequest)"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"...."}),(0,n.jsx)(t.td,{children:"MonacoEditorProps"}),(0,n.jsx)(t.td,{children:"Optional"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"https://github.com/react-monaco-editor/react-monaco-editor#properties",children:"Properties"})," of ",(0,n.jsx)(t.a,{href:"https://github.com/react-monaco-editor/react-monaco-editor",children:"react-monaco-editor"})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"examples",children:"Examples"}),"\n",(0,n.jsx)(s.default,{children:(0,n.jsx)(a.default,{value:"JSX",label:"JSX",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-tsx",children:'import React from "react"\nimport Layout from "@theme/Layout"\nimport JSONSchemaEditor from "@theme/JSONSchemaEditor"\n// import { useColorMode } from "@docusaurus/theme-common"\n\nexport default function ExamplePage(): JSX.Element {\n\n // You are free to fetch your schema in your own way (load local file, fetch, ...) :)\n const mySchema = {\n "type": "object",\n "properties": {\n "builtin": {\n "type": "number"\n }\n },\n "patternProperties": {\n "^S_": {\n "type": "string"\n },\n "^I_": {\n "type": "integer"\n }\n },\n "additionalProperties": {\n "type": "string"\n }\n }\n\n // https://docusaurus.io/docs/api/themes/configuration#use-color-mode\n return (\n <Layout\n title={`My super JSON Schema`}\n description="Description will go into a meta tag in <head />"\n >\n {/* You can "useColorMode" if you want to take into account current Docusaurus color */}\n <JSONSchemaEditor schema={mySchema} theme={"vs-dark"} />\n </Layout>\n )\n}\n'})})})})]})}function u(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}}}]); \ No newline at end of file diff --git a/assets/js/d672ff73.071a2f87.js b/assets/js/d672ff73.071a2f87.js new file mode 100644 index 00000000..19f08c85 --- /dev/null +++ b/assets/js/d672ff73.071a2f87.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[36,7434],{5276:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>P,frontMatter:()=>u,metadata:()=>r,toc:()=>j});const r=JSON.parse('{"id":"demo-viewer/object/additionalProperties2","title":"\ud83d\udee0\ufe0f AdditionalProperties (2)","description":"object with properties / additionalProperties showcase","source":"@site/docs/demo-viewer/object/additionalProperties2.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/additionalProperties2","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/additionalProperties2.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / additionalProperties showcase","title":"\ud83d\udee0\ufe0f AdditionalProperties (2)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udddd\ufe0f AdditionalProperties (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties"},"next":{"title":"\ud83c\udf08 AdditionalProperties with patternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties"}}');var s=i(62540),o=i(28453),a=i(58069),d=i(47434),n=i(88307),l=i.n(n),c=i(65537),p=i(79329);const u={description:"object with properties / additionalProperties showcase",title:"\ud83d\udee0\ufe0f AdditionalProperties (2)"},h="AdditionalProperties (2)",m={},j=[];function b(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"additionalproperties-2",children:"AdditionalProperties (2)"})}),"\n",(0,s.jsxs)(c.default,{children:[(0,s.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(l(),{schema:d})}),(0,s.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(a.default,{language:"json-schema",children:JSON.stringify(d,null,2)})})]})]})}function P(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(b,{...e})}):b(e)}},47434:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"additionalProperties":{"type":"string"}}')}}]); \ No newline at end of file diff --git a/assets/js/d672ff73.7937f7cf.js b/assets/js/d672ff73.7937f7cf.js deleted file mode 100644 index 72689f84..00000000 --- a/assets/js/d672ff73.7937f7cf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[36,7434],{48192:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>P,frontMatter:()=>u,metadata:()=>r,toc:()=>j});const r=JSON.parse('{"id":"demo-viewer/object/additionalProperties2","title":"\ud83d\udee0\ufe0f AdditionalProperties (2)","description":"object with properties / additionalProperties showcase","source":"@site/docs/demo-viewer/object/additionalProperties2.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/additionalProperties2","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/additionalProperties2.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / additionalProperties showcase","title":"\ud83d\udee0\ufe0f AdditionalProperties (2)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udddd\ufe0f AdditionalProperties (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties"},"next":{"title":"\ud83c\udf08 AdditionalProperties with patternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties"}}');var s=i(62540),o=i(28453),a=i(21432),d=i(47434),n=i(21344),l=i.n(n),c=i(11470),p=i(19365);const u={description:"object with properties / additionalProperties showcase",title:"\ud83d\udee0\ufe0f AdditionalProperties (2)"},h="AdditionalProperties (2)",m={},j=[];function b(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"additionalproperties-2",children:"AdditionalProperties (2)"})}),"\n",(0,s.jsxs)(c.default,{children:[(0,s.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(l(),{schema:d})}),(0,s.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(a.default,{language:"json-schema",children:JSON.stringify(d,null,2)})})]})]})}function P(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(b,{...e})}):b(e)}},47434:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"additionalProperties":{"type":"string"}}')}}]); \ No newline at end of file diff --git a/assets/js/dba41c5f.b1669135.js b/assets/js/dba41c5f.3559606f.js similarity index 90% rename from assets/js/dba41c5f.b1669135.js rename to assets/js/dba41c5f.3559606f.js index 0042462b..42feb747 100644 --- a/assets/js/dba41c5f.b1669135.js +++ b/assets/js/dba41c5f.3559606f.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2539,5113],{13655:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>h,contentTitle:()=>p,default:()=>w,frontMatter:()=>m,metadata:()=>i,toc:()=>j});const i=JSON.parse('{"id":"demo-viewer/object/size","title":"\ud83d\udccf Size","description":"object with minProperties / maxProperties showcase","source":"@site/docs/demo-viewer/object/size.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/size","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/size.mdx","tags":[],"version":"current","frontMatter":{"description":"object with minProperties / maxProperties showcase","title":"\ud83d\udccf Size"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udfe6 Simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject"},"next":{"title":"\ud83e\uddd0 UnevaluatedProperties (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1"}}');var r=t(62540),o=t(28453),a=t(21432),c=t(75113),n=t(21344),d=t.n(n),l=t(11470),u=t(19365);const m={description:"object with minProperties / maxProperties showcase",title:"\ud83d\udccf Size"},p="Size",h={},j=[];function b(e){const s={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"size",children:"Size"})}),"\n",(0,r.jsxs)(l.default,{children:[(0,r.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:c})}),(0,r.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(b,{...e})}):b(e)}},75113:e=>{e.exports=JSON.parse('{"type":"object","minProperties":2,"maxProperties":3}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2539,5113],{16098:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>h,contentTitle:()=>p,default:()=>w,frontMatter:()=>m,metadata:()=>i,toc:()=>j});const i=JSON.parse('{"id":"demo-viewer/object/size","title":"\ud83d\udccf Size","description":"object with minProperties / maxProperties showcase","source":"@site/docs/demo-viewer/object/size.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/size","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/size.mdx","tags":[],"version":"current","frontMatter":{"description":"object with minProperties / maxProperties showcase","title":"\ud83d\udccf Size"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udfe6 Simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject"},"next":{"title":"\ud83e\uddd0 UnevaluatedProperties (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1"}}');var r=t(62540),o=t(28453),a=t(58069),c=t(75113),n=t(88307),d=t.n(n),l=t(65537),u=t(79329);const m={description:"object with minProperties / maxProperties showcase",title:"\ud83d\udccf Size"},p="Size",h={},j=[];function b(e){const s={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"size",children:"Size"})}),"\n",(0,r.jsxs)(l.default,{children:[(0,r.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(d(),{schema:c})}),(0,r.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function w(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(b,{...e})}):b(e)}},75113:e=>{e.exports=JSON.parse('{"type":"object","minProperties":2,"maxProperties":3}')}}]); \ No newline at end of file diff --git a/assets/js/dc7a627d.c3bc40f4.js b/assets/js/dc7a627d.20001b91.js similarity index 92% rename from assets/js/dc7a627d.c3bc40f4.js rename to assets/js/dc7a627d.20001b91.js index cc60cc6a..c962e9f9 100644 --- a/assets/js/dc7a627d.c3bc40f4.js +++ b/assets/js/dc7a627d.20001b91.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3829,5951],{33839:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>P,contentTitle:()=>u,default:()=>w,frontMatter:()=>h,metadata:()=>i,toc:()=>m});const i=JSON.parse('{"id":"demo-viewer/object/additionalPropertiesWithPatternProperties","title":"\ud83c\udf08 AdditionalProperties with patternProperties","description":"object with properties / patternProperties / additionalProperties showcase","source":"@site/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/additionalPropertiesWithPatternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / patternProperties / additionalProperties showcase","title":"\ud83c\udf08 AdditionalProperties with patternProperties"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udee0\ufe0f AdditionalProperties (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2"},"next":{"title":"\ud83c\udfa8 PatternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties"}}');var s=r(62540),o=r(28453),a=r(21432),n=r(55951),d=r(21344),p=r.n(d),l=r(11470),c=r(19365);const h={description:"object with properties / patternProperties / additionalProperties showcase",title:"\ud83c\udf08 AdditionalProperties with patternProperties"},u="AdditionalProperties with patternProperties",P={},m=[];function j(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"additionalproperties-with-patternproperties",children:"AdditionalProperties with patternProperties"})}),"\n",(0,s.jsxs)(l.default,{children:[(0,s.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(p(),{schema:n})}),(0,s.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(a.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(j,{...e})}):j(e)}},55951:e=>{e.exports=JSON.parse('{"type":"object","properties":{"builtin":{"type":"number"}},"patternProperties":{"^S_":{"type":"string"},"^I_":{"type":"integer"}},"additionalProperties":{"type":"string"}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3829,5951],{24434:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>P,contentTitle:()=>u,default:()=>w,frontMatter:()=>h,metadata:()=>i,toc:()=>m});const i=JSON.parse('{"id":"demo-viewer/object/additionalPropertiesWithPatternProperties","title":"\ud83c\udf08 AdditionalProperties with patternProperties","description":"object with properties / patternProperties / additionalProperties showcase","source":"@site/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/additionalPropertiesWithPatternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / patternProperties / additionalProperties showcase","title":"\ud83c\udf08 AdditionalProperties with patternProperties"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udee0\ufe0f AdditionalProperties (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2"},"next":{"title":"\ud83c\udfa8 PatternProperties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties"}}');var s=r(62540),o=r(28453),a=r(58069),n=r(55951),d=r(88307),p=r.n(d),l=r(65537),c=r(79329);const h={description:"object with properties / patternProperties / additionalProperties showcase",title:"\ud83c\udf08 AdditionalProperties with patternProperties"},u="AdditionalProperties with patternProperties",P={},m=[];function j(e){const t={h1:"h1",header:"header",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"additionalproperties-with-patternproperties",children:"AdditionalProperties with patternProperties"})}),"\n",(0,s.jsxs)(l.default,{children:[(0,s.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,s.jsx)(p(),{schema:n})}),(0,s.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,s.jsx)(a.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function w(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(j,{...e})}):j(e)}},55951:e=>{e.exports=JSON.parse('{"type":"object","properties":{"builtin":{"type":"number"}},"patternProperties":{"^S_":{"type":"string"},"^I_":{"type":"integer"}},"additionalProperties":{"type":"string"}}')}}]); \ No newline at end of file diff --git a/assets/js/e5bfc516.1ca9ee44.js b/assets/js/e5bfc516.8e52b552.js similarity index 89% rename from assets/js/e5bfc516.1ca9ee44.js rename to assets/js/e5bfc516.8e52b552.js index c4e673fd..effa5de0 100644 --- a/assets/js/e5bfc516.1ca9ee44.js +++ b/assets/js/e5bfc516.8e52b552.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1116,4820],{87059:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>i,toc:()=>g});const i=JSON.parse('{"id":"demo-viewer/string/simple","title":"\ud83d\udfe6 Basic","description":"basic string showcase","source":"@site/docs/demo-viewer/string/simple.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/simple.mdx","tags":[],"version":"current","frontMatter":{"description":"basic string showcase","title":"\ud83d\udfe6 Basic"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd2e Pattern","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern"},"next":{"title":"\ud83c\udfad Type","permalink":"/docusaurus-json-schema-plugin/docs/category/-type"}}');var r=t(62540),n=t(28453),a=t(21432),c=t(94820),l=t(21344),o=t.n(l),d=t(11470),u=t(19365);const m={description:"basic string showcase",title:"\ud83d\udfe6 Basic"},h="Basic",p={},g=[];function f(e){const s={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"basic",children:"Basic"})}),"\n",(0,r.jsxs)(d.default,{children:[(0,r.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(o(),{schema:c})}),(0,r.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(f,{...e})}):f(e)}},94820:e=>{e.exports={type:"string"}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1116,4820],{41212:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>m,metadata:()=>i,toc:()=>g});const i=JSON.parse('{"id":"demo-viewer/string/simple","title":"\ud83d\udfe6 Basic","description":"basic string showcase","source":"@site/docs/demo-viewer/string/simple.mdx","sourceDirName":"demo-viewer/string","slug":"/demo-viewer/string/simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/string/simple.mdx","tags":[],"version":"current","frontMatter":{"description":"basic string showcase","title":"\ud83d\udfe6 Basic"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd2e Pattern","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern"},"next":{"title":"\ud83c\udfad Type","permalink":"/docusaurus-json-schema-plugin/docs/category/-type"}}');var r=t(62540),n=t(28453),a=t(58069),c=t(94820),l=t(88307),o=t.n(l),d=t(65537),u=t(79329);const m={description:"basic string showcase",title:"\ud83d\udfe6 Basic"},h="Basic",p={},g=[];function f(e){const s={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"basic",children:"Basic"})}),"\n",(0,r.jsxs)(d.default,{children:[(0,r.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(o(),{schema:c})}),(0,r.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(a.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(f,{...e})}):f(e)}},94820:e=>{e.exports={type:"string"}}}]); \ No newline at end of file diff --git a/assets/js/e6818ad2.d2eaf1f7.js b/assets/js/e6818ad2.ace066b0.js similarity index 90% rename from assets/js/e6818ad2.d2eaf1f7.js rename to assets/js/e6818ad2.ace066b0.js index b130b869..d3b67cf2 100644 --- a/assets/js/e6818ad2.d2eaf1f7.js +++ b/assets/js/e6818ad2.ace066b0.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4648,9567],{94530:(e,s,a)=>{a.r(s),a.d(s,{assets:()=>p,contentTitle:()=>m,default:()=>j,frontMatter:()=>h,metadata:()=>t,toc:()=>w});const t=JSON.parse('{"id":"demo-viewer/array/contains","title":"\ud83c\udf71 Contains","description":"array with contains showcase","source":"@site/docs/demo-viewer/array/contains.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/contains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/contains.mdx","tags":[],"version":"current","frontMatter":{"description":"array with contains showcase","title":"\ud83c\udf71 Contains"},"sidebar":"tutorialSidebar","previous":{"title":"\u2795 AdditionalItems (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2"},"next":{"title":"\ud83d\udecd\ufe0f Items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items"}}');var n=a(62540),r=a(28453),i=a(21432),o=a(49567),c=a(21344),d=a.n(c),l=a(11470),u=a(19365);const h={description:"array with contains showcase",title:"\ud83c\udf71 Contains"},m="Contains",p={},w=[];function f(e){const s={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"contains",children:"Contains"})}),"\n",(0,n.jsxs)(l.default,{children:[(0,n.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(d(),{schema:o})}),(0,n.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(i.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(f,{...e})}):f(e)}},49567:e=>{e.exports=JSON.parse('{"type":"array","contains":{"type":"number"}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4648,9567],{38442:(e,s,a)=>{a.r(s),a.d(s,{assets:()=>p,contentTitle:()=>m,default:()=>j,frontMatter:()=>h,metadata:()=>t,toc:()=>w});const t=JSON.parse('{"id":"demo-viewer/array/contains","title":"\ud83c\udf71 Contains","description":"array with contains showcase","source":"@site/docs/demo-viewer/array/contains.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/contains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/contains.mdx","tags":[],"version":"current","frontMatter":{"description":"array with contains showcase","title":"\ud83c\udf71 Contains"},"sidebar":"tutorialSidebar","previous":{"title":"\u2795 AdditionalItems (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2"},"next":{"title":"\ud83d\udecd\ufe0f Items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items"}}');var n=a(62540),r=a(28453),i=a(58069),o=a(49567),c=a(88307),d=a.n(c),l=a(65537),u=a(79329);const h={description:"array with contains showcase",title:"\ud83c\udf71 Contains"},m="Contains",p={},w=[];function f(e){const s={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"contains",children:"Contains"})}),"\n",(0,n.jsxs)(l.default,{children:[(0,n.jsx)(u.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,n.jsx)(d(),{schema:o})}),(0,n.jsx)(u.default,{value:"JSON Schema",label:"JSON Schema",children:(0,n.jsx)(i.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function j(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(f,{...e})}):f(e)}},49567:e=>{e.exports=JSON.parse('{"type":"array","contains":{"type":"number"}}')}}]); \ No newline at end of file diff --git a/assets/js/ea313555.2e1048f5.js b/assets/js/ea313555.f7c4dfe8.js similarity index 98% rename from assets/js/ea313555.2e1048f5.js rename to assets/js/ea313555.f7c4dfe8.js index 7f447d49..00b9aee1 100644 --- a/assets/js/ea313555.2e1048f5.js +++ b/assets/js/ea313555.f7c4dfe8.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1011],{86280:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>c,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"faq","title":"\u2753 FAQ","description":"Frequently Asked Questions","source":"@site/docs/faq.mdx","sourceDirName":".","slug":"/faq","permalink":"/docusaurus-json-schema-plugin/docs/faq","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/faq.mdx","tags":[],"version":"current","frontMatter":{"title":"\u2753 FAQ","description":"Frequently Asked Questions"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd27 @theme/MonacoEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/MonacoEditor"},"next":{"title":"\ud83d\udea7 Roadmap","permalink":"/docusaurus-json-schema-plugin/docs/next-steps"}}');var r=n(62540),t=n(28453),o=n(11470),a=n(19365);const c={title:"\u2753 FAQ",description:"Frequently Asked Questions"},l=void 0,d={},h=[];function u(e){const s={a:"a",admonition:"admonition",blockquote:"blockquote",br:"br",code:"code",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components},{Details:n}=s;return n||function(e,s){throw new Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.blockquote,{children:["\n",(0,r.jsx)(s.p,{children:"Frequently asked questions"}),"\n"]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"How can I contribute ?"}),(0,r.jsxs)(s.p,{children:["Any contribution is welcome! Read more ",(0,r.jsx)(s.a,{href:"contributing",children:"here"}),"."]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"How to swizzling components ?"}),(0,r.jsxs)(o.default,{groupId:"npm2yarn",children:[(0,r.jsx)(a.default,{value:"npm",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"npm run swizzle docusaurus-json-schema-plugin [component name] -- --typescript\n"})})}),(0,r.jsx)(a.default,{value:"yarn",label:"Yarn",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"yarn swizzle docusaurus-json-schema-plugin [component name] --typescript\n"})})}),(0,r.jsx)(a.default,{value:"pnpm",label:"pnpm",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"pnpm run swizzle docusaurus-json-schema-plugin [component name] --typescript\n"})})})]}),(0,r.jsxs)(s.p,{children:["For extra information, please consult ",(0,r.jsx)(s.a,{href:"https://docusaurus.io/docs/swizzling",children:"Docusaurus Swizzling documentation"})]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsxs)("summary",{children:["Why do I get ",(0,r.jsx)(s.code,{children:"Loading ..."})," using ",(0,r.jsx)(s.code,{children:"JSONSchemaViewer"})," ?"]}),(0,r.jsx)(s.p,{children:"Several reasons, most likely :"}),(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsxs)(s.li,{children:["You have an error not related to ",(0,r.jsx)(s.code,{children:"docusaurus-json-schema-plugin"})," in your codebase like ",(0,r.jsx)(s.a,{href:"https://github.com/jy95/docusaurus-json-schema-plugin/issues/17",children:"this one"})," : missing language(s) in prism config / ..."]}),"\n",(0,r.jsxs)(s.li,{children:["You broke the ",(0,r.jsx)(s.a,{href:"https://reactjs.org/docs/hooks-rules.html",children:"rules of hooks"})," or one of your dependancies did"]}),"\n",(0,r.jsxs)(s.li,{children:["You have more than ",(0,r.jsx)(s.a,{href:"https://reactjs.org/warnings/invalid-hook-call-warning.html",children:"one copy of React in the same app"})," or mismatching versions of React and React DOM"]}),"\n"]}),(0,r.jsxs)(s.p,{children:["If none of these helped you, consider to have a reproducible example before asking help to ",(0,r.jsx)(s.a,{href:"https://docusaurus.io/community/support",children:"Docusaurus"})," / ",(0,r.jsx)(s.a,{href:"https://github.com/facebook/react/issues/13991",children:"React"})]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsxs)("summary",{children:["I have multiple definitions in my JSON Schema file. How can I select only one for ",(0,r.jsx)(s.code,{children:"JSONSchemaViewer"})," ?"]}),(0,r.jsxs)(s.p,{children:["Specify ",(0,r.jsx)(s.code,{children:"jsonPointer"})," option with a ",(0,r.jsx)("u",{children:"valid JSON Pointer"})," (e.g. ",(0,r.jsx)(s.code,{children:"#/definitions/user"}),").",(0,r.jsx)(s.br,{}),"\n",(0,r.jsx)(s.a,{href:"demo-viewer/refs/ref",children:"An example is available in the documentation"}),".",(0,r.jsx)(s.br,{}),"\n","The mechanism is domain agnostic and will work regardless of your cases (OpenAPI, ...)"]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"How to translate labels into my own language ?"}),(0,r.jsx)(s.p,{children:"Please refer for extra information to :"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"https://docusaurus.io/docs/cli#docusaurus-write-translations-sitedir",children:"docusaurus write-translations"})," CLI command"]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://docusaurus.io/docs/i18n/introduction",children:"Internationalization"})}),"\n"]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Which features of JSON Schema are not supported yet ?"}),(0,r.jsxs)(s.p,{children:["It is explained on the ",(0,r.jsx)(s.a,{href:"next-steps",children:"Roadmap page"})]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Why the minimal JSON Schema version is Draft-07 ?"}),(0,r.jsx)(s.p,{children:"Several reasons :"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Many actors (like ",(0,r.jsx)(s.a,{href:"https://ajv.js.org/guide/schema-language.html#draft-07-and-draft-06",children:"ajv"})," ) acknowledge that it is most widely used version of JSON Schema specification"]}),"\n",(0,r.jsx)(s.li,{children:"Many tools don't care anymore for older versions such as Draft-04"}),"\n",(0,r.jsx)(s.li,{children:"It fits my needs when I designed this project"}),"\n"]}),(0,r.jsx)(s.admonition,{type:"tip",children:(0,r.jsxs)(s.p,{children:["You can migrate schemas from draft-04 to draft-07 using ",(0,r.jsx)(s.a,{href:"https://github.com/ajv-validator/ajv-cli#migrate-schemas",children:"ajv-cli"})]})})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"How to support specifications that extends the one of JSON Schema (such as OpenAPI, MongoDB, ... )"}),(0,r.jsx)(s.p,{children:"That is a good question as many extensions exist in the wild :"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://spec.openapis.org/oas/latest.html",children:"OpenAPI"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://www.mongodb.com/docs/manual/reference/operator/query/jsonSchema/",children:"MongoDB"})}),"\n",(0,r.jsx)(s.li,{children:"..."}),"\n"]}),(0,r.jsxs)(s.p,{children:["In the case of OpenAPI, since ",(0,r.jsx)(s.a,{href:"https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0",children:"OpenAPI 3.1"}),"+ , they are now valid ",(0,r.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html",children:"Draft 2020-12"})," JSON Schema so compatible with this lib."]}),(0,r.jsx)(s.p,{children:"For the time being, it is low priority as several aspects needs to be considered that might lead to issues , breaking changes, ..."}),(0,r.jsxs)(s.p,{children:["In the meantime, feel free to share your feedback on ",(0,r.jsx)(s.a,{href:"https://github.com/jy95/docusaurus-json-schema-plugin/discussions",children:"Github discussions"})]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Compatibility Matrix"}),(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Docusaurus JSON Schema Plugin"}),(0,r.jsx)(s.th,{children:"Docusaurus"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.code,{children:">= 1.7.0"})," (current)"]}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"3.x.y"})})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.code,{children:"<= 1.6.1"})," (legacy)"]}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"2.x.y"})})]})]})]})]})]})}function p(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1011],{77103:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>c,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"faq","title":"\u2753 FAQ","description":"Frequently Asked Questions","source":"@site/docs/faq.mdx","sourceDirName":".","slug":"/faq","permalink":"/docusaurus-json-schema-plugin/docs/faq","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/faq.mdx","tags":[],"version":"current","frontMatter":{"title":"\u2753 FAQ","description":"Frequently Asked Questions"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udd27 @theme/MonacoEditor","permalink":"/docusaurus-json-schema-plugin/docs/api/MonacoEditor"},"next":{"title":"\ud83d\udea7 Roadmap","permalink":"/docusaurus-json-schema-plugin/docs/next-steps"}}');var r=n(62540),t=n(28453),o=n(65537),a=n(79329);const c={title:"\u2753 FAQ",description:"Frequently Asked Questions"},l=void 0,d={},h=[];function u(e){const s={a:"a",admonition:"admonition",blockquote:"blockquote",br:"br",code:"code",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components},{Details:n}=s;return n||function(e,s){throw new Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.blockquote,{children:["\n",(0,r.jsx)(s.p,{children:"Frequently asked questions"}),"\n"]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"How can I contribute ?"}),(0,r.jsxs)(s.p,{children:["Any contribution is welcome! Read more ",(0,r.jsx)(s.a,{href:"contributing",children:"here"}),"."]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"How to swizzling components ?"}),(0,r.jsxs)(o.default,{groupId:"npm2yarn",children:[(0,r.jsx)(a.default,{value:"npm",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"npm run swizzle docusaurus-json-schema-plugin [component name] -- --typescript\n"})})}),(0,r.jsx)(a.default,{value:"yarn",label:"Yarn",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"yarn swizzle docusaurus-json-schema-plugin [component name] --typescript\n"})})}),(0,r.jsx)(a.default,{value:"pnpm",label:"pnpm",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"pnpm run swizzle docusaurus-json-schema-plugin [component name] --typescript\n"})})})]}),(0,r.jsxs)(s.p,{children:["For extra information, please consult ",(0,r.jsx)(s.a,{href:"https://docusaurus.io/docs/swizzling",children:"Docusaurus Swizzling documentation"})]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsxs)("summary",{children:["Why do I get ",(0,r.jsx)(s.code,{children:"Loading ..."})," using ",(0,r.jsx)(s.code,{children:"JSONSchemaViewer"})," ?"]}),(0,r.jsx)(s.p,{children:"Several reasons, most likely :"}),(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsxs)(s.li,{children:["You have an error not related to ",(0,r.jsx)(s.code,{children:"docusaurus-json-schema-plugin"})," in your codebase like ",(0,r.jsx)(s.a,{href:"https://github.com/jy95/docusaurus-json-schema-plugin/issues/17",children:"this one"})," : missing language(s) in prism config / ..."]}),"\n",(0,r.jsxs)(s.li,{children:["You broke the ",(0,r.jsx)(s.a,{href:"https://reactjs.org/docs/hooks-rules.html",children:"rules of hooks"})," or one of your dependancies did"]}),"\n",(0,r.jsxs)(s.li,{children:["You have more than ",(0,r.jsx)(s.a,{href:"https://reactjs.org/warnings/invalid-hook-call-warning.html",children:"one copy of React in the same app"})," or mismatching versions of React and React DOM"]}),"\n"]}),(0,r.jsxs)(s.p,{children:["If none of these helped you, consider to have a reproducible example before asking help to ",(0,r.jsx)(s.a,{href:"https://docusaurus.io/community/support",children:"Docusaurus"})," / ",(0,r.jsx)(s.a,{href:"https://github.com/facebook/react/issues/13991",children:"React"})]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsxs)("summary",{children:["I have multiple definitions in my JSON Schema file. How can I select only one for ",(0,r.jsx)(s.code,{children:"JSONSchemaViewer"})," ?"]}),(0,r.jsxs)(s.p,{children:["Specify ",(0,r.jsx)(s.code,{children:"jsonPointer"})," option with a ",(0,r.jsx)("u",{children:"valid JSON Pointer"})," (e.g. ",(0,r.jsx)(s.code,{children:"#/definitions/user"}),").",(0,r.jsx)(s.br,{}),"\n",(0,r.jsx)(s.a,{href:"demo-viewer/refs/ref",children:"An example is available in the documentation"}),".",(0,r.jsx)(s.br,{}),"\n","The mechanism is domain agnostic and will work regardless of your cases (OpenAPI, ...)"]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"How to translate labels into my own language ?"}),(0,r.jsx)(s.p,{children:"Please refer for extra information to :"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"https://docusaurus.io/docs/cli#docusaurus-write-translations-sitedir",children:"docusaurus write-translations"})," CLI command"]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://docusaurus.io/docs/i18n/introduction",children:"Internationalization"})}),"\n"]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Which features of JSON Schema are not supported yet ?"}),(0,r.jsxs)(s.p,{children:["It is explained on the ",(0,r.jsx)(s.a,{href:"next-steps",children:"Roadmap page"})]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Why the minimal JSON Schema version is Draft-07 ?"}),(0,r.jsx)(s.p,{children:"Several reasons :"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Many actors (like ",(0,r.jsx)(s.a,{href:"https://ajv.js.org/guide/schema-language.html#draft-07-and-draft-06",children:"ajv"})," ) acknowledge that it is most widely used version of JSON Schema specification"]}),"\n",(0,r.jsx)(s.li,{children:"Many tools don't care anymore for older versions such as Draft-04"}),"\n",(0,r.jsx)(s.li,{children:"It fits my needs when I designed this project"}),"\n"]}),(0,r.jsx)(s.admonition,{type:"tip",children:(0,r.jsxs)(s.p,{children:["You can migrate schemas from draft-04 to draft-07 using ",(0,r.jsx)(s.a,{href:"https://github.com/ajv-validator/ajv-cli#migrate-schemas",children:"ajv-cli"})]})})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"How to support specifications that extends the one of JSON Schema (such as OpenAPI, MongoDB, ... )"}),(0,r.jsx)(s.p,{children:"That is a good question as many extensions exist in the wild :"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://spec.openapis.org/oas/latest.html",children:"OpenAPI"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://www.mongodb.com/docs/manual/reference/operator/query/jsonSchema/",children:"MongoDB"})}),"\n",(0,r.jsx)(s.li,{children:"..."}),"\n"]}),(0,r.jsxs)(s.p,{children:["In the case of OpenAPI, since ",(0,r.jsx)(s.a,{href:"https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0",children:"OpenAPI 3.1"}),"+ , they are now valid ",(0,r.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html",children:"Draft 2020-12"})," JSON Schema so compatible with this lib."]}),(0,r.jsx)(s.p,{children:"For the time being, it is low priority as several aspects needs to be considered that might lead to issues , breaking changes, ..."}),(0,r.jsxs)(s.p,{children:["In the meantime, feel free to share your feedback on ",(0,r.jsx)(s.a,{href:"https://github.com/jy95/docusaurus-json-schema-plugin/discussions",children:"Github discussions"})]})]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Compatibility Matrix"}),(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Docusaurus JSON Schema Plugin"}),(0,r.jsx)(s.th,{children:"Docusaurus"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.code,{children:">= 1.7.0"})," (current)"]}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"3.x.y"})})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.code,{children:"<= 1.6.1"})," (legacy)"]}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"2.x.y"})})]})]})]})]})]})}function p(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}}}]); \ No newline at end of file diff --git a/assets/js/ec99730f.620ad730.js b/assets/js/ec99730f.6a42a16d.js similarity index 98% rename from assets/js/ec99730f.620ad730.js rename to assets/js/ec99730f.6a42a16d.js index 979a4684..f3fe0401 100644 --- a/assets/js/ec99730f.620ad730.js +++ b/assets/js/ec99730f.6a42a16d.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2209],{52373:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>i,contentTitle:()=>h,default:()=>l,frontMatter:()=>c,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"next-steps","title":"\ud83d\udea7 Roadmap","description":"What\'is next in docusaurus-json-schema-plugin ?","source":"@site/docs/next-steps.mdx","sourceDirName":".","slug":"/next-steps","permalink":"/docusaurus-json-schema-plugin/docs/next-steps","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/next-steps.mdx","tags":[],"version":"current","frontMatter":{"title":"\ud83d\udea7 Roadmap","description":"What\'is next in docusaurus-json-schema-plugin ?"},"sidebar":"tutorialSidebar","previous":{"title":"\u2753 FAQ","permalink":"/docusaurus-json-schema-plugin/docs/faq"}}');var n=t(62540),a=t(28453);const c={title:"\ud83d\udea7 Roadmap",description:"What'is next in docusaurus-json-schema-plugin ?"},h=void 0,i={},d=[{value:"Unsupported JSON Schema features in JSONSchemaViewer",id:"unsupported-json-schema-features-in-jsonschemaviewer",level:2}];function o(e){const s={a:"a",br:"br",h2:"h2",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h2,{id:"unsupported-json-schema-features-in-jsonschemaviewer",children:"Unsupported JSON Schema features in JSONSchemaViewer"}),"\n",(0,n.jsxs)(s.p,{children:["As you might have guessed, supporting several versions is a challenging topic.",(0,n.jsx)(s.br,{}),"\n","A few selected keywords are unsupported for the time being :"]}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Specification"}),(0,n.jsx)(s.th,{children:"keyword"}),(0,n.jsx)(s.th,{children:"Main Reason"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2019-09/release-notes.html",children:"2019-09"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2019-09/json-schema-core.html#recursive-ref",children:"$recursiveRef"})}),(0,n.jsx)(s.td,{children:"Recursive schemas are not on the roadmap yet"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2019-09/release-notes.html",children:"2019-09"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2019-09/json-schema-core.html#recursive-ref",children:"$recursiveAnchor"})}),(0,n.jsx)(s.td,{children:"Recursive schemas are not on the roadmap yet"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html",children:"2020-12"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html#dynamicref-and-dynamicanchor",children:"$dynamicRef"})}),(0,n.jsx)(s.td,{children:"Recursive schemas are not on the roadmap yet"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html",children:"2020-12"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html#dynamicref-and-dynamicanchor",children:"$dynamicAnchor"})}),(0,n.jsx)(s.td,{children:"Recursive schemas are not on the roadmap yet"})]})]})]}),"\n",(0,n.jsx)(s.p,{children:"If you wish to see them covered, consider to contribute to the project \ud83d\ude09"})]})}function l(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2209],{58482:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>i,contentTitle:()=>h,default:()=>l,frontMatter:()=>c,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"next-steps","title":"\ud83d\udea7 Roadmap","description":"What\'is next in docusaurus-json-schema-plugin ?","source":"@site/docs/next-steps.mdx","sourceDirName":".","slug":"/next-steps","permalink":"/docusaurus-json-schema-plugin/docs/next-steps","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/next-steps.mdx","tags":[],"version":"current","frontMatter":{"title":"\ud83d\udea7 Roadmap","description":"What\'is next in docusaurus-json-schema-plugin ?"},"sidebar":"tutorialSidebar","previous":{"title":"\u2753 FAQ","permalink":"/docusaurus-json-schema-plugin/docs/faq"}}');var n=t(62540),a=t(28453);const c={title:"\ud83d\udea7 Roadmap",description:"What'is next in docusaurus-json-schema-plugin ?"},h=void 0,i={},d=[{value:"Unsupported JSON Schema features in JSONSchemaViewer",id:"unsupported-json-schema-features-in-jsonschemaviewer",level:2}];function o(e){const s={a:"a",br:"br",h2:"h2",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h2,{id:"unsupported-json-schema-features-in-jsonschemaviewer",children:"Unsupported JSON Schema features in JSONSchemaViewer"}),"\n",(0,n.jsxs)(s.p,{children:["As you might have guessed, supporting several versions is a challenging topic.",(0,n.jsx)(s.br,{}),"\n","A few selected keywords are unsupported for the time being :"]}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Specification"}),(0,n.jsx)(s.th,{children:"keyword"}),(0,n.jsx)(s.th,{children:"Main Reason"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2019-09/release-notes.html",children:"2019-09"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2019-09/json-schema-core.html#recursive-ref",children:"$recursiveRef"})}),(0,n.jsx)(s.td,{children:"Recursive schemas are not on the roadmap yet"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2019-09/release-notes.html",children:"2019-09"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2019-09/json-schema-core.html#recursive-ref",children:"$recursiveAnchor"})}),(0,n.jsx)(s.td,{children:"Recursive schemas are not on the roadmap yet"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html",children:"2020-12"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html#dynamicref-and-dynamicanchor",children:"$dynamicRef"})}),(0,n.jsx)(s.td,{children:"Recursive schemas are not on the roadmap yet"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html",children:"2020-12"})}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.a,{href:"https://json-schema.org/draft/2020-12/release-notes.html#dynamicref-and-dynamicanchor",children:"$dynamicAnchor"})}),(0,n.jsx)(s.td,{children:"Recursive schemas are not on the roadmap yet"})]})]})]}),"\n",(0,n.jsx)(s.p,{children:"If you wish to see them covered, consider to contribute to the project \ud83d\ude09"})]})}function l(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}}}]); \ No newline at end of file diff --git a/assets/js/ef99d285.ac430606.js b/assets/js/ef99d285.ac430606.js deleted file mode 100644 index 505ceb97..00000000 --- a/assets/js/ef99d285.ac430606.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1283,4360],{4244:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>b,frontMatter:()=>p,metadata:()=>s,toc:()=>v});const s=JSON.parse('{"id":"demo-viewer/object/unevaluatedProperties1","title":"\ud83e\uddd0 UnevaluatedProperties (1)","description":"object with properties / unevaluatedProperties (false) showcase","source":"@site/docs/demo-viewer/object/unevaluatedProperties1.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/unevaluatedProperties1","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/unevaluatedProperties1.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / unevaluatedProperties (false) showcase","title":"\ud83e\uddd0 UnevaluatedProperties (1)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccf Size","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size"},"next":{"title":"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f UnevaluatedProperties (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2"}}');var a=r(62540),i=r(28453),o=r(21432),n=r(44360),u=r(21344),d=r.n(u),l=r(11470),c=r(19365);const p={description:"object with properties / unevaluatedProperties (false) showcase",title:"\ud83e\uddd0 UnevaluatedProperties (1)"},h="UnevaluatedProperties (1)",m={},v=[];function j(e){const t={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.header,{children:(0,a.jsx)(t.h1,{id:"unevaluatedproperties-1",children:"UnevaluatedProperties (1)"})}),"\n",(0,a.jsxs)(l.default,{children:[(0,a.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:n})}),(0,a.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(o.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function b(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(j,{...e})}):j(e)}},44360:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"unevaluatedProperties":false}')}}]); \ No newline at end of file diff --git a/assets/js/ef99d285.bfb1f2e9.js b/assets/js/ef99d285.bfb1f2e9.js new file mode 100644 index 00000000..5db7fbc7 --- /dev/null +++ b/assets/js/ef99d285.bfb1f2e9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[1283,4360],{57240:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>m,contentTitle:()=>h,default:()=>b,frontMatter:()=>p,metadata:()=>s,toc:()=>v});const s=JSON.parse('{"id":"demo-viewer/object/unevaluatedProperties1","title":"\ud83e\uddd0 UnevaluatedProperties (1)","description":"object with properties / unevaluatedProperties (false) showcase","source":"@site/docs/demo-viewer/object/unevaluatedProperties1.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/unevaluatedProperties1","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/unevaluatedProperties1.mdx","tags":[],"version":"current","frontMatter":{"description":"object with properties / unevaluatedProperties (false) showcase","title":"\ud83e\uddd0 UnevaluatedProperties (1)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udccf Size","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size"},"next":{"title":"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f UnevaluatedProperties (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2"}}');var a=r(62540),i=r(28453),o=r(58069),n=r(44360),u=r(88307),d=r.n(u),l=r(65537),c=r(79329);const p={description:"object with properties / unevaluatedProperties (false) showcase",title:"\ud83e\uddd0 UnevaluatedProperties (1)"},h="UnevaluatedProperties (1)",m={},v=[];function j(e){const t={h1:"h1",header:"header",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.header,{children:(0,a.jsx)(t.h1,{id:"unevaluatedproperties-1",children:"UnevaluatedProperties (1)"})}),"\n",(0,a.jsxs)(l.default,{children:[(0,a.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,a.jsx)(d(),{schema:n})}),(0,a.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,a.jsx)(o.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function b(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(j,{...e})}):j(e)}},44360:e=>{e.exports=JSON.parse('{"type":"object","properties":{"number":{"type":"number"},"street_name":{"type":"string"},"street_type":{"enum":["Street","Avenue","Boulevard"]}},"unevaluatedProperties":false}')}}]); \ No newline at end of file diff --git a/assets/js/f149d4e3.3d6d7306.js b/assets/js/f149d4e3.88f0afee.js similarity index 90% rename from assets/js/f149d4e3.3d6d7306.js rename to assets/js/f149d4e3.88f0afee.js index 55403063..bdc9a948 100644 --- a/assets/js/f149d4e3.3d6d7306.js +++ b/assets/js/f149d4e3.88f0afee.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3869,5607],{43856:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>h,contentTitle:()=>m,default:()=>b,frontMatter:()=>u,metadata:()=>s,toc:()=>j});const s=JSON.parse('{"id":"demo-viewer/object/propertyNames","title":"\ud83c\udff7\ufe0f PropertyNames","description":"object with propertyNames showcase","source":"@site/docs/demo-viewer/object/propertyNames.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/propertyNames","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/propertyNames.mdx","tags":[],"version":"current","frontMatter":{"description":"object with propertyNames showcase","title":"\ud83c\udff7\ufe0f PropertyNames"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcdd Properties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties"},"next":{"title":"\ud83d\udd34 Required","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required"}}');var o=r(62540),a=r(28453),i=r(21432),c=r(55607),n=r(21344),p=r.n(n),d=r(11470),l=r(19365);const u={description:"object with propertyNames showcase",title:"\ud83c\udff7\ufe0f PropertyNames"},m="PropertyNames",h={},j=[];function N(e){const t={h1:"h1",header:"header",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"propertynames",children:"PropertyNames"})}),"\n",(0,o.jsxs)(d.default,{children:[(0,o.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(p(),{schema:c})}),(0,o.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(i.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function b(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(N,{...e})}):N(e)}},55607:e=>{e.exports=JSON.parse('{"type":"object","propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3869,5607],{33190:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>h,contentTitle:()=>m,default:()=>b,frontMatter:()=>u,metadata:()=>s,toc:()=>j});const s=JSON.parse('{"id":"demo-viewer/object/propertyNames","title":"\ud83c\udff7\ufe0f PropertyNames","description":"object with propertyNames showcase","source":"@site/docs/demo-viewer/object/propertyNames.mdx","sourceDirName":"demo-viewer/object","slug":"/demo-viewer/object/propertyNames","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/object/propertyNames.mdx","tags":[],"version":"current","frontMatter":{"description":"object with propertyNames showcase","title":"\ud83c\udff7\ufe0f PropertyNames"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcdd Properties","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties"},"next":{"title":"\ud83d\udd34 Required","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required"}}');var o=r(62540),a=r(28453),i=r(58069),c=r(55607),n=r(88307),p=r.n(n),d=r(65537),l=r(79329);const u={description:"object with propertyNames showcase",title:"\ud83c\udff7\ufe0f PropertyNames"},m="PropertyNames",h={},j=[];function N(e){const t={h1:"h1",header:"header",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"propertynames",children:"PropertyNames"})}),"\n",(0,o.jsxs)(d.default,{children:[(0,o.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,o.jsx)(p(),{schema:c})}),(0,o.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,o.jsx)(i.default,{language:"json-schema",children:JSON.stringify(c,null,2)})})]})]})}function b(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(N,{...e})}):N(e)}},55607:e=>{e.exports=JSON.parse('{"type":"object","propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}}')}}]); \ No newline at end of file diff --git a/assets/js/f37a108b.1afad96f.js b/assets/js/f37a108b.c7a2d85a.js similarity index 91% rename from assets/js/f37a108b.1afad96f.js rename to assets/js/f37a108b.c7a2d85a.js index 7f3c7237..d88adc97 100644 --- a/assets/js/f37a108b.1afad96f.js +++ b/assets/js/f37a108b.c7a2d85a.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4416,8263],{89890:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>v,contentTitle:()=>h,default:()=>y,frontMatter:()=>m,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"demo-viewer/array/unevaluatedItems2","title":"\ud83d\udccb UnevaluatedItems (2)","description":"array with unevaluatedItems showcase","source":"@site/docs/demo-viewer/array/unevaluatedItems2.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/unevaluatedItems2","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/unevaluatedItems2.mdx","tags":[],"version":"current","frontMatter":{"description":"array with unevaluatedItems showcase","title":"\ud83d\udccb UnevaluatedItems (2)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\udd14 UnevaluatedItems (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1"},"next":{"title":"\ud83e\udd84 Unique items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems"}}');var r=a(62540),n=a(28453),u=a(21432),i=a(54416),d=a(21344),l=a.n(d),o=a(11470),c=a(19365);const m={description:"array with unevaluatedItems showcase",title:"\ud83d\udccb UnevaluatedItems (2)"},h="UnevaluatedItems (2)",v={},p=[];function w(e){const t={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"unevaluateditems-2",children:"UnevaluatedItems (2)"})}),"\n",(0,r.jsxs)(o.default,{children:[(0,r.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(l(),{schema:i})}),(0,r.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(u.default,{language:"json-schema",children:JSON.stringify(i,null,2)})})]})]})}function y(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(w,{...e})}):w(e)}},54416:e=>{e.exports=JSON.parse('{"type":"array","prefixItems":[{"type":"integer"},{"type":"string"}],"unevaluatedItems":{"type":"boolean"}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[4416,8263],{76415:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>v,contentTitle:()=>h,default:()=>y,frontMatter:()=>m,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"demo-viewer/array/unevaluatedItems2","title":"\ud83d\udccb UnevaluatedItems (2)","description":"array with unevaluatedItems showcase","source":"@site/docs/demo-viewer/array/unevaluatedItems2.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/unevaluatedItems2","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/unevaluatedItems2.mdx","tags":[],"version":"current","frontMatter":{"description":"array with unevaluatedItems showcase","title":"\ud83d\udccb UnevaluatedItems (2)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\udd14 UnevaluatedItems (1)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1"},"next":{"title":"\ud83e\udd84 Unique items","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems"}}');var r=a(62540),n=a(28453),u=a(58069),i=a(54416),d=a(88307),l=a.n(d),o=a(65537),c=a(79329);const m={description:"array with unevaluatedItems showcase",title:"\ud83d\udccb UnevaluatedItems (2)"},h="UnevaluatedItems (2)",v={},p=[];function w(e){const t={h1:"h1",header:"header",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"unevaluateditems-2",children:"UnevaluatedItems (2)"})}),"\n",(0,r.jsxs)(o.default,{children:[(0,r.jsx)(c.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,r.jsx)(l(),{schema:i})}),(0,r.jsx)(c.default,{value:"JSON Schema",label:"JSON Schema",children:(0,r.jsx)(u.default,{language:"json-schema",children:JSON.stringify(i,null,2)})})]})]})}function y(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(w,{...e})}):w(e)}},54416:e=>{e.exports=JSON.parse('{"type":"array","prefixItems":[{"type":"integer"},{"type":"string"}],"unevaluatedItems":{"type":"boolean"}}')}}]); \ No newline at end of file diff --git a/assets/js/f45d2610.1469b955.js b/assets/js/f45d2610.abd9037f.js similarity index 91% rename from assets/js/f45d2610.1469b955.js rename to assets/js/f45d2610.abd9037f.js index 17a7bd92..2a826243 100644 --- a/assets/js/f45d2610.1469b955.js +++ b/assets/js/f45d2610.abd9037f.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2869,7240],{98827:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>s,toc:()=>y});const s=JSON.parse('{"id":"demo-viewer/array/additionalItems1","title":"\u274c AdditionalItems (1)","description":"array with additionalItems showcase","source":"@site/docs/demo-viewer/array/additionalItems1.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/additionalItems1","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/additionalItems1.mdx","tags":[],"version":"current","frontMatter":{"description":"array with additionalItems showcase","title":"\u274c AdditionalItems (1)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcda Array","permalink":"/docusaurus-json-schema-plugin/docs/category/-array"},"next":{"title":"\u2795 AdditionalItems (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2"}}');var i=a(62540),r=a(28453),d=a(21432),n=a(77240),o=a(21344),l=a.n(o),c=a(11470),m=a(19365);const u={description:"array with additionalItems showcase",title:"\u274c AdditionalItems (1)"},h="AdditionalItems (1)",p={},y=[];function w(e){const t={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"additionalitems-1",children:"AdditionalItems (1)"})}),"\n",(0,i.jsxs)(c.default,{children:[(0,i.jsx)(m.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(l(),{schema:n})}),(0,i.jsx)(m.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(d.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(w,{...e})}):w(e)}},77240:e=>{e.exports=JSON.parse('{"type":"array","items":[{"type":"integer"},{"type":"string"}],"additionalItems":false}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2869,7240],{32369:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>h,default:()=>f,frontMatter:()=>u,metadata:()=>s,toc:()=>y});const s=JSON.parse('{"id":"demo-viewer/array/additionalItems1","title":"\u274c AdditionalItems (1)","description":"array with additionalItems showcase","source":"@site/docs/demo-viewer/array/additionalItems1.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/additionalItems1","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/additionalItems1.mdx","tags":[],"version":"current","frontMatter":{"description":"array with additionalItems showcase","title":"\u274c AdditionalItems (1)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcda Array","permalink":"/docusaurus-json-schema-plugin/docs/category/-array"},"next":{"title":"\u2795 AdditionalItems (2)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2"}}');var i=a(62540),r=a(28453),d=a(58069),n=a(77240),o=a(88307),l=a.n(o),c=a(65537),m=a(79329);const u={description:"array with additionalItems showcase",title:"\u274c AdditionalItems (1)"},h="AdditionalItems (1)",p={},y=[];function w(e){const t={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"additionalitems-1",children:"AdditionalItems (1)"})}),"\n",(0,i.jsxs)(c.default,{children:[(0,i.jsx)(m.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(l(),{schema:n})}),(0,i.jsx)(m.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(d.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function f(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(w,{...e})}):w(e)}},77240:e=>{e.exports=JSON.parse('{"type":"array","items":[{"type":"integer"},{"type":"string"}],"additionalItems":false}')}}]); \ No newline at end of file diff --git a/assets/js/f595544d.2c56ad71.js b/assets/js/f595544d.7084a062.js similarity index 91% rename from assets/js/f595544d.2c56ad71.js rename to assets/js/f595544d.7084a062.js index bf300f80..a9ea4eb2 100644 --- a/assets/js/f595544d.2c56ad71.js +++ b/assets/js/f595544d.7084a062.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3839,6997],{59487:(n,a,e)=>{e.r(a),e.d(a,{assets:()=>C,contentTitle:()=>h,default:()=>w,frontMatter:()=>u,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"demo-viewer/array/minContainsAndMaxContains","title":"\ud83d\udcca minContains & maxContains","description":"array with contains / minContains / maxContains showcase","source":"@site/docs/demo-viewer/array/minContainsAndMaxContains.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/minContainsAndMaxContains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/minContainsAndMaxContains.mdx","tags":[],"version":"current","frontMatter":{"description":"array with contains / minContains / maxContains showcase","title":"\ud83d\udcca minContains & maxContains"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcd0 Length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length"},"next":{"title":"\ud83d\udfe6 Simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple"}}');var i=e(62540),t=e(28453),r=e(21432),o=e(53839),m=e(21344),c=e.n(m),d=e(11470),l=e(19365);const u={description:"array with contains / minContains / maxContains showcase",title:"\ud83d\udcca minContains & maxContains"},h="minContains & maxContains",C={},x=[];function p(n){const a={h1:"h1",header:"header",...(0,t.R)(),...n.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.header,{children:(0,i.jsx)(a.h1,{id:"mincontains--maxcontains",children:"minContains & maxContains"})}),"\n",(0,i.jsxs)(d.default,{children:[(0,i.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(c(),{schema:o})}),(0,i.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(r.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function w(n={}){const{wrapper:a}={...(0,t.R)(),...n.components};return a?(0,i.jsx)(a,{...n,children:(0,i.jsx)(p,{...n})}):p(n)}},53839:n=>{n.exports=JSON.parse('{"type":"array","contains":{"type":"number"},"minContains":2,"maxContains":3}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[3839,6997],{71031:(n,a,e)=>{e.r(a),e.d(a,{assets:()=>C,contentTitle:()=>h,default:()=>w,frontMatter:()=>u,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"demo-viewer/array/minContainsAndMaxContains","title":"\ud83d\udcca minContains & maxContains","description":"array with contains / minContains / maxContains showcase","source":"@site/docs/demo-viewer/array/minContainsAndMaxContains.mdx","sourceDirName":"demo-viewer/array","slug":"/demo-viewer/array/minContainsAndMaxContains","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/array/minContainsAndMaxContains.mdx","tags":[],"version":"current","frontMatter":{"description":"array with contains / minContains / maxContains showcase","title":"\ud83d\udcca minContains & maxContains"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83d\udcd0 Length","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length"},"next":{"title":"\ud83d\udfe6 Simple","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple"}}');var i=e(62540),t=e(28453),r=e(58069),o=e(53839),m=e(88307),c=e.n(m),d=e(65537),l=e(79329);const u={description:"array with contains / minContains / maxContains showcase",title:"\ud83d\udcca minContains & maxContains"},h="minContains & maxContains",C={},x=[];function p(n){const a={h1:"h1",header:"header",...(0,t.R)(),...n.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.header,{children:(0,i.jsx)(a.h1,{id:"mincontains--maxcontains",children:"minContains & maxContains"})}),"\n",(0,i.jsxs)(d.default,{children:[(0,i.jsx)(l.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(c(),{schema:o})}),(0,i.jsx)(l.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(r.default,{language:"json-schema",children:JSON.stringify(o,null,2)})})]})]})}function w(n={}){const{wrapper:a}={...(0,t.R)(),...n.components};return a?(0,i.jsx)(a,{...n,children:(0,i.jsx)(p,{...n})}):p(n)}},53839:n=>{n.exports=JSON.parse('{"type":"array","contains":{"type":"number"},"minContains":2,"maxContains":3}')}}]); \ No newline at end of file diff --git a/assets/js/f746fa1f.5d408522.js b/assets/js/f746fa1f.5d408522.js deleted file mode 100644 index 649e5205..00000000 --- a/assets/js/f746fa1f.5d408522.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2778,5465],{3122:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>h,contentTitle:()=>m,default:()=>j,frontMatter:()=>d,metadata:()=>i,toc:()=>y});const i=JSON.parse('{"id":"demo-viewer/type/multipleType","title":"\ud83d\udc3e Multiple types","description":"multiple types showcase","source":"@site/docs/demo-viewer/type/multipleType.mdx","sourceDirName":"demo-viewer/type","slug":"/demo-viewer/type/multipleType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/type/multipleType.mdx","tags":[],"version":"current","frontMatter":{"description":"multiple types showcase","title":"\ud83d\udc3e Multiple types"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udfad Type","permalink":"/docusaurus-json-schema-plugin/docs/category/-type"},"next":{"title":"\ud83c\udf1f Single type","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType"}}');var l=s(62540),r=s(28453),p=s(21432),n=s(65465),u=s(21344),a=s.n(u),c=s(11470),o=s(19365);const d={description:"multiple types showcase",title:"\ud83d\udc3e Multiple types"},m="Multiple types",h={},y=[];function f(e){const t={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.header,{children:(0,l.jsx)(t.h1,{id:"multiple-types",children:"Multiple types"})}),"\n",(0,l.jsxs)(c.default,{children:[(0,l.jsx)(o.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,l.jsx)(a(),{schema:n})}),(0,l.jsx)(o.default,{value:"JSON Schema",label:"JSON Schema",children:(0,l.jsx)(p.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function j(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(f,{...e})}):f(e)}},65465:e=>{e.exports=JSON.parse('{"type":["number","string"]}')}}]); \ No newline at end of file diff --git a/assets/js/f746fa1f.6da04c81.js b/assets/js/f746fa1f.6da04c81.js new file mode 100644 index 00000000..a77a94bd --- /dev/null +++ b/assets/js/f746fa1f.6da04c81.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2778,5465],{34599:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>h,contentTitle:()=>m,default:()=>j,frontMatter:()=>d,metadata:()=>i,toc:()=>y});const i=JSON.parse('{"id":"demo-viewer/type/multipleType","title":"\ud83d\udc3e Multiple types","description":"multiple types showcase","source":"@site/docs/demo-viewer/type/multipleType.mdx","sourceDirName":"demo-viewer/type","slug":"/demo-viewer/type/multipleType","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/type/multipleType.mdx","tags":[],"version":"current","frontMatter":{"description":"multiple types showcase","title":"\ud83d\udc3e Multiple types"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83c\udfad Type","permalink":"/docusaurus-json-schema-plugin/docs/category/-type"},"next":{"title":"\ud83c\udf1f Single type","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType"}}');var l=s(62540),r=s(28453),p=s(58069),n=s(65465),u=s(88307),a=s.n(u),c=s(65537),o=s(79329);const d={description:"multiple types showcase",title:"\ud83d\udc3e Multiple types"},m="Multiple types",h={},y=[];function f(e){const t={h1:"h1",header:"header",...(0,r.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.header,{children:(0,l.jsx)(t.h1,{id:"multiple-types",children:"Multiple types"})}),"\n",(0,l.jsxs)(c.default,{children:[(0,l.jsx)(o.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,l.jsx)(a(),{schema:n})}),(0,l.jsx)(o.default,{value:"JSON Schema",label:"JSON Schema",children:(0,l.jsx)(p.default,{language:"json-schema",children:JSON.stringify(n,null,2)})})]})]})}function j(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(f,{...e})}):f(e)}},65465:e=>{e.exports=JSON.parse('{"type":["number","string"]}')}}]); \ No newline at end of file diff --git a/assets/js/f7f7156a.50ca90cb.js b/assets/js/f7f7156a.46e85af6.js similarity index 92% rename from assets/js/f7f7156a.50ca90cb.js rename to assets/js/f7f7156a.46e85af6.js index 6a6e6eab..08766f29 100644 --- a/assets/js/f7f7156a.50ca90cb.js +++ b/assets/js/f7f7156a.46e85af6.js @@ -1 +1 @@ -"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2783,9842],{80474:(e,n,d)=>{d.r(n),d.d(n,{assets:()=>u,contentTitle:()=>m,default:()=>_,frontMatter:()=>h,metadata:()=>s,toc:()=>S});const s=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependencies_dependentSchemas","title":"\ud83c\udf33 dependencies (dependentSchemas)","description":"schema conditionally with dependencies (dependentSchemas) showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependencies_dependentSchemas","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependencies (dependentSchemas) showcase","title":"\ud83c\udf33 dependencies (dependentSchemas)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\udd1e dependencies (dependentRequired)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired"},"next":{"title":"\ud83d\udd11 dependentRequired","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired"}}');var i=d(62540),t=d(28453),c=d(21432),a=d(42783),r=d(21344),o=d.n(r),l=d(11470),p=d(19365);const h={description:"schema conditionally with dependencies (dependentSchemas) showcase",title:"\ud83c\udf33 dependencies (dependentSchemas)"},m="dependencies (dependentSchemas)",u={},S=[];function w(e){const n={h1:"h1",header:"header",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"dependencies-dependentschemas",children:"dependencies (dependentSchemas)"})}),"\n",(0,i.jsxs)(l.default,{children:[(0,i.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(o(),{schema:a})}),(0,i.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(c.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function _(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(w,{...e})}):w(e)}},42783:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"}},"required":["name"],"dependencies":{"credit_card":{"properties":{"billing_address":{"type":"string"}},"required":["billing_address"]}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[2783,9842],{92065:(e,n,d)=>{d.r(n),d.d(n,{assets:()=>u,contentTitle:()=>m,default:()=>_,frontMatter:()=>h,metadata:()=>s,toc:()=>S});const s=JSON.parse('{"id":"demo-viewer/schema_conditionally/dependencies_dependentSchemas","title":"\ud83c\udf33 dependencies (dependentSchemas)","description":"schema conditionally with dependencies (dependentSchemas) showcase","source":"@site/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.mdx","sourceDirName":"demo-viewer/schema_conditionally","slug":"/demo-viewer/schema_conditionally/dependencies_dependentSchemas","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas","draft":false,"unlisted":false,"editUrl":"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.mdx","tags":[],"version":"current","frontMatter":{"description":"schema conditionally with dependencies (dependentSchemas) showcase","title":"\ud83c\udf33 dependencies (dependentSchemas)"},"sidebar":"tutorialSidebar","previous":{"title":"\ud83e\udd1e dependencies (dependentRequired)","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired"},"next":{"title":"\ud83d\udd11 dependentRequired","permalink":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired"}}');var i=d(62540),t=d(28453),c=d(58069),a=d(42783),r=d(88307),o=d.n(r),l=d(65537),p=d(79329);const h={description:"schema conditionally with dependencies (dependentSchemas) showcase",title:"\ud83c\udf33 dependencies (dependentSchemas)"},m="dependencies (dependentSchemas)",u={},S=[];function w(e){const n={h1:"h1",header:"header",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"dependencies-dependentschemas",children:"dependencies (dependentSchemas)"})}),"\n",(0,i.jsxs)(l.default,{children:[(0,i.jsx)(p.default,{value:"Viewer",label:"Viewer",default:!0,children:(0,i.jsx)(o(),{schema:a})}),(0,i.jsx)(p.default,{value:"JSON Schema",label:"JSON Schema",children:(0,i.jsx)(c.default,{language:"json-schema",children:JSON.stringify(a,null,2)})})]})]})}function _(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(w,{...e})}):w(e)}},42783:e=>{e.exports=JSON.parse('{"type":"object","properties":{"name":{"type":"string"},"credit_card":{"type":"number"}},"required":["name"],"dependencies":{"credit_card":{"properties":{"billing_address":{"type":"string"}},"required":["billing_address"]}}}')}}]); \ No newline at end of file diff --git a/assets/js/main.0dbb5983.js b/assets/js/main.0dbb5983.js deleted file mode 100644 index d0971515..00000000 --- a/assets/js/main.0dbb5983.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.0dbb5983.js.LICENSE.txt */ -(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[8792],{2192:(e,t,n)=>{"use strict";var r=n(63696),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:s.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},14403:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var w=v.prototype=new b;w.constructor=v,h(w,y.prototype),w.isPureReactComponent=!0;var S=Array.isArray,x=Object.prototype.hasOwnProperty,k={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var o,a={},i=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)x.call(t,o)&&!j.hasOwnProperty(o)&&(a[o]=t[o]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===a[o]&&(a[o]=l[o]);return{$$typeof:n,type:e,key:i,ref:s,props:a,_owner:k.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var O=/\/+/g;function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,o,a,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return i=i(l=e),e=""===a?"."+P(l,0):a,S(i)?(o="",null!=e&&(o=e.replace(O,"$&/")+"/"),C(i,t,o,"",(function(e){return e}))):null!=i&&(E(i)&&(i=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,o+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(O,"$&/")+"/")+e)),t.push(i)),1;if(l=0,a=""===a?".":a+":",S(e))for(var c=0;c<e.length;c++){var u=a+P(s=e[c],c);l+=C(s,t,o,u,i)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=C(s=s.value,t,o,u=a+P(s,c++),i);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function A(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I={current:null},N={transition:null},L={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:N,ReactCurrentOwner:k};function R(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=o,t.Profiler=i,t.PureComponent=v,t.StrictMode=a,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.act=R,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=h({},e.props),a=e.key,i=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,s=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)x.call(t,c)&&!j.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:n,type:e.type,key:a,ref:i,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=R,t.useCallback=function(e,t){return I.current.useCallback(e,t)},t.useContext=function(e){return I.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return I.current.useDeferredValue(e)},t.useEffect=function(e,t){return I.current.useEffect(e,t)},t.useId=function(){return I.current.useId()},t.useImperativeHandle=function(e,t,n){return I.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return I.current.useMemo(e,t)},t.useReducer=function(e,t,n){return I.current.useReducer(e,t,n)},t.useRef=function(e){return I.current.useRef(e)},t.useState=function(e){return I.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return I.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return I.current.useTransition()},t.version="18.3.1"},63696:(e,t,n)=>{"use strict";e.exports=n(14403)},62540:(e,t,n)=>{"use strict";e.exports=n(2192)},55600:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>P,E8:()=>Zn,a1:()=>Yn});var r=n(63696);n(40961);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){a(i,r,o,s,l,"next",e)}function l(e){a(i,r,o,s,l,"throw",e)}s(void 0)}))}}function s(e,t,n){return t=p(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(null,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(){b=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),s=new T(r||[]);return o(i,"_invoke",{value:O(e,n,s)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="suspendedYield",m="executing",h="completed",g={};function y(){}function v(){}function w(){}var S={};c(S,i,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==n&&r.call(k,i)&&(S=k);var j=w.prototype=y.prototype=Object.create(S);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,a,i,s){var l=d(e[o],e,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,s)}))}s(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function O(t,n,r){var o=p;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var s=r.delegate;if(s){var l=P(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?h:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=h,r.method="throw",r.arg=c.arg)}}}function P(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=w,o(j,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:v,configurable:!0}),v.displayName=c(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,l,"GeneratorFunction")),e.prototype=Object.create(j),e},t.awrap=function(e){return{__await:e}},_(E.prototype),c(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new E(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},_(j),c(j,l,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function k(e){var t="function"==typeof Map?new Map:void 0;return k=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(m())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&v(o,n.prototype),o}(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,e)},k(e)}function j(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function _(){return r.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},r.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var E=["translations"],O="Ctrl",P=r.forwardRef((function(e,t){var n=e.translations,o=void 0===n?{}:n,a=y(e,E),i=o.buttonText,s=void 0===i?"Search":i,l=o.buttonAriaLabel,c=void 0===l?"Search":l,u=w((0,r.useState)(null),2),p=u[0],f=u[1];(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?f("\u2318"):f(O))}),[]);var m=w(p===O?[O,"Ctrl",r.createElement(j,null)]:["Meta","Command",p],3),h=m[0],g=m[1],b=m[2];return r.createElement("button",d({type:"button",className:"DocSearch DocSearch-Button","aria-label":"".concat(c," (").concat(g,"+K)")},a,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(_,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},s)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==p&&r.createElement(r.Fragment,null,r.createElement(C,{reactsToKey:h},b),r.createElement(C,{reactsToKey:"k"},"K"))))}));function C(e){var t=e.reactsToKey,n=e.children,o=w((0,r.useState)(!1),2),a=o[0],i=o[1];return(0,r.useEffect)((function(){if(t)return window.addEventListener("keydown",e),window.addEventListener("keyup",n),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",n)};function e(e){e.key===t&&i(!0)}function n(e){e.key!==t&&"Meta"!==e.key||i(!1)}}),[t]),r.createElement("kbd",{className:a?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},n)}function A(e,t){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,o)}),t)}}function T(e){return e.reduce((function(e,t){return e.concat(t)}),[])}var I=0;function N(e){return 0===e.collections.length?0:e.collections.reduce((function(e,t){return e+t.items.length}),0)}function L(e){return e!==Object(e)}function R(e,t){if(e===t)return!0;if(L(e)||L(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];if(!(o in t))return!1;if(!R(e[o],t[o]))return!1}return!0}var D=function(){},M=[{segment:"autocomplete-core",version:"1.17.7"}];function F(e){var t=e.item,n=e.items,r=void 0===n?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var z=["items"],U=["items"];function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function q(e){return function(e){if(Array.isArray(e))return H(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){G(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G(e,t,n){return(t=function(e){var t=function(e){if("object"!==$(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===$(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(e){return e.map((function(e){var t=e.items,n=V(e,z);return K(K({},n),{},{objectIDs:(null==t?void 0:t.map((function(e){return e.objectID})))||n.objectIDs})}))}function Y(e){var t,n,r,o=(t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((e.version||"").split(".").map(Number),2),n=t[0],r=t[1],n>=3||2===n&&r>=4||1===n&&r>=10);function a(t,n,r){if(o&&void 0!==r){var a=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[t].concat(q(n),[{headers:i}]))}else e.apply(void 0,[t].concat(q(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("clickedObjectIDsAfterSearch",Q(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("clickedObjectIDs",Q(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("convertedObjectIDsAfterSearch",Q(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("convertedObjectIDs",Q(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&t.reduce((function(e,t){var n=t.items,r=V(t,U);return[].concat(q(e),q(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r<e.objectIDs.length;r+=t)n.push(K(K({},e),{},{objectIDs:e.objectIDs.slice(r,r+t)}));return n}(K(K({},r),{},{objectIDs:(null==n?void 0:n.map((function(e){return e.objectID})))||r.objectIDs})).map((function(e){return{items:n,payload:e}}))))}),[]).forEach((function(e){var t=e.items;return a("viewedObjectIDs",[e.payload],t)}))},viewedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function Z(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function J(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e,t,n){return(t=function(e){var t=function(e){if("object"!==X(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==X(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===X(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae="2.15.0",ie="https://cdn.jsdelivr.net/npm/search-insights@".concat(ae,"/dist/search-insights.min.js"),se=A((function(e){var t=e.onItemsChange,n=e.items,r=e.insights,o=e.state;t({insights:r,insightsEvents:Z({items:n}).map((function(e){return re({eventName:"Items Viewed"},e)})),state:o})}),400);function le(e){var t=function(e){return re({onItemsChange:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.viewedObjectIDs.apply(t,ee(n.map((function(e){return re(re({},e),{},{algoliaSource:ce(e.algoliaSource,r.context)})}))))},onSelect:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.clickedObjectIDsAfterSearch.apply(t,ee(n.map((function(e){return re(re({},e),{},{algoliaSource:ce(e.algoliaSource,r.context)})}))))},onActive:D,__autocomplete_clickAnalytics:!0},e)}(e),n=t.insightsClient,r=t.insightsInitParams,o=t.onItemsChange,a=t.onSelect,i=t.onActive,s=t.__autocomplete_clickAnalytics,l=n;if(n||"undefined"!=typeof window&&function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||"aa";"string"==typeof n&&(l=t[n]),l||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){t[n].queue||(t[n].queue=[]);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t[n].queue.push(r)}),t[n].version=ae,l=t[n],function(e){var t="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var n=e.document.createElement("script");n.async=!0,n.src=ie,n.onerror=function(){console.error(t)},document.body.appendChild(n)}catch(e){console.error(t)}}(t))}({window:window}),!l)return{};r&&l("init",re({partial:!0},r));var c=Y(l),u={current:[]},d=A((function(e){var t=e.state;if(t.isOpen){var n=t.collections.reduce((function(e,t){return[].concat(ee(e),ee(t.items))}),[]).filter(J);R(u.current.map((function(e){return e.objectID})),n.map((function(e){return e.objectID})))||(u.current=n,n.length>0&&se({onItemsChange:o,items:n,insights:c,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive,o=!1;function u(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:re(re({},s?{clickAnalytics:!0}:{}),e?{userToken:ue(e)}:{}),insights:c}})}l("addAlgoliaAgent","insights-plugin"),u(),l("onUserTokenChange",(function(e){o||u(e)})),l("getUserToken",null,(function(e,t){o||u(t)})),l("onAuthenticatedUserTokenChange",(function(e){e?(o=!0,u(e)):(o=!1,l("getUserToken",null,(function(e,t){return u(t)})))})),l("getAuthenticatedUserToken",null,(function(e,t){t&&(o=!0,u(t))})),n((function(e){var t=e.item,n=e.state,r=e.event,o=e.source;J(t)&&a({state:n,event:r,insights:c,item:t,insightsEvents:[re({eventName:"Item Selected"},F({item:t,items:o.getItems().filter(J)}))]})})),r((function(e){var t=e.item,n=e.source,r=e.state,o=e.event;J(t)&&i({state:r,event:o,insights:c,item:t,insightsEvents:[re({eventName:"Item Active"},F({item:t,items:n.getItems().filter(J)}))]})}))},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function ce(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(ee(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],ee(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function ue(e){return"number"==typeof e?e.toString():e}function de(e,t){var n=t;return{then:function(t,r){return de(e.then(fe(t,n,e),fe(r,n,e)),n)},catch:function(t){return de(e.catch(fe(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),de(e.finally(fe(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function pe(e){return de(e,{isCanceled:!1,onCancelList:[]})}function fe(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function me(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var o=(null===t?-1:t)+e;return o<=-1||o>=n?null===r?null:0:o}function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return(t=function(e){var t=function(e){if("object"!==be(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===be(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ve(e){var t=function(e){var t=e.collections.map((function(e){return e.items.length})).reduce((function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e}),[]).reduce((function(t,n){return n<=e.activeItemId?t+1:t}),0);return e.collections[t]}(e);if(!t)return null;var n=t.items[function(e){for(var t=e.state,n=e.collection,r=!1,o=0,a=0;!1===r;){var i=t.collections[o];if(i===n){r=!0;break}a+=i.items.length,o++}return t.activeItemId-a}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function we(e,t,n){return[e,null==n?void 0:n.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}var Se=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function xe(e){return e.nativeEvent||e}function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e,t,n){return(t=function(e){var t=function(e){if("object"!==ke(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ke(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){Ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ce(e,t,n){return(t=function(e){var t=function(e){if("object"!==Ee(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ee(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){Le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e,t,n){return(t=function(e){var t=function(e){if("object"!==Ae(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ae(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e,t){var n,r="undefined"!=typeof window?window:{},o=e.plugins||[];return Ne(Ne({debug:!1,openOnFocus:!1,enterKeyHint:void 0,ignoreCompositionEvents:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:void 0,environment:r,shouldPanelOpen:function(e){return N(e.state)>0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(I++),plugins:o,initialState:Ne({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:D,onResolve:D};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=ge(ge({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return T(e)})).then((function(e){return e.map((function(e){return Ne(Ne({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:Ne({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach((function(t){Be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Be(e,t,n){return(t=function(e){var t=function(e){if("object"!==De(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===De(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ze(e){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ze(e)}function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){qe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qe(e,t,n){return(t=function(e){var t=function(e){if("object"!==ze(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ze(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function We(e){return Boolean(e.execute)}function Ke(e){var t=e.reduce((function(e,t){if(!We(t))return e.push(t),e;var n=t.searchClient,r=t.execute,o=t.requesterId,a=t.requests,i=e.find((function(e){return We(t)&&We(e)&&e.searchClient===n&&Boolean(o)&&e.requesterId===o}));if(i){var s;(s=i.items).push.apply(s,He(a))}else{var l={execute:r,requesterId:o,items:a,searchClient:n};e.push(l)}return e}),[]).map((function(e){if(!We(e))return Promise.resolve(e);var t=e,n=t.execute,r=t.items;return n({searchClient:t.searchClient,requests:r})}));return Promise.all(t).then((function(e){return T(e)}))}function Ge(e){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(e)}var Qe=["event","nextState","props","query","refresh","store"];function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){Je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Je(e,t,n){return(t=function(e){var t=function(e){if("object"!==Ge(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ge(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xe,et,tt,nt=null,rt=(Xe=-1,et=-1,tt=void 0,function(e){var t=++Xe;return Promise.resolve(e).then((function(e){return tt&&t<et?tt:(et=t,tt=e,e)}))});function ot(e){var t=e.event,n=e.nextState,r=void 0===n?{}:n,o=e.props,a=e.query,i=e.refresh,s=e.store,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Qe);nt&&o.environment.clearTimeout(nt);var c=l.setCollections,u=l.setIsOpen,d=l.setQuery,p=l.setActiveItemId,f=l.setStatus,m=l.setContext;if(d(a),p(o.defaultActiveItemId),!a&&!1===o.openOnFocus){var h,g=s.getState().collections.map((function(e){return Ze(Ze({},e),{},{items:[]})}));f("idle"),c(g),u(null!==(h=r.isOpen)&&void 0!==h?h:o.shouldPanelOpen({state:s.getState()}));var y=pe(rt(g).then((function(){return Promise.resolve()})));return s.pendingRequests.add(y)}f("loading"),nt=o.environment.setTimeout((function(){f("stalled")}),o.stallThreshold);var b=pe(rt(o.getSources(Ze({query:a,refresh:i,state:s.getState()},l)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(Ze({query:a,refresh:i,state:s.getState()},l))).then((function(t){return function(e,t,n){if(o=e,Boolean(null==o?void 0:o.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(He(Object.keys(n.context).map((function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return $e($e({},e),{},{requests:e.queries.map((function(n){return{query:"algolia"===e.requesterId?$e($e({},n),{},{params:$e($e({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}}))})}var o;return{items:e,sourceId:t}}(t,e.sourceId,s.getState())}))}))).then(Ke).then((function(t){var n,r=t.some((function(e){return function(e){return!Array.isArray(e)&&Boolean(null==e?void 0:e._automaticInsights)}(e.items)}));return r&&m({algoliaInsightsPlugin:Ze(Ze({},(null===(n=s.getState().context)||void 0===n?void 0:n.algoliaInsightsPlugin)||{}),{},{__automaticInsights:r})}),function(e,t,n){return t.map((function(t){var r,o=e.filter((function(e){return e.sourceId===t.sourceId})),a=o.map((function(e){return e.items})),i=o[0].transformResponse,s=i?i({results:r=a,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):a;return t.onResolve({source:t,results:a,items:s,state:n.getState()}),s.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:s}}))}(t,e,s)})).then((function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce((function(e,t){return Fe(Fe({},e),{},Be({},t.source.sourceId,Fe(Fe({},t.source),{},{getItems:function(){return T(t.items)}})))}),{}),o=t.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return T(t.reshape({sourcesBySourceId:o,sources:Object.values(o),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:o,state:s.getState()})}))})))).then((function(e){var n;f("idle"),c(e);var d=o.shouldPanelOpen({state:s.getState()});u(null!==(n=r.isOpen)&&void 0!==n?n:o.openOnFocus&&!a&&d||d);var p=ve(s.getState());if(null!==s.getState().activeItemId&&p){var m=p.item,h=p.itemInputValue,g=p.itemUrl,y=p.source;y.onActive(Ze({event:t,item:m,itemInputValue:h,itemUrl:g,refresh:i,source:y,state:s.getState()},l))}})).finally((function(){f("idle"),nt&&o.environment.clearTimeout(nt)}));return s.pendingRequests.add(b)}function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}var it=["event","props","refresh","store"];function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?st(Object(n),!0).forEach((function(t){ct(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ct(e,t,n){return(t=function(e){var t=function(e){if("object"!==at(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===at(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}var dt=["props","refresh","store"],pt=["inputElement","formElement","panelElement"],ft=["inputElement"],mt=["inputElement","maxLength"],ht=["source"],gt=["item","source"];function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach((function(t){vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vt(e,t,n){return(t=function(e){var t=function(e){if("object"!==ut(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ut(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function St(e){var t=e.props,n=e.refresh,r=e.store,o=wt(e,dt);return{getEnvironmentProps:function(e){var n=e.inputElement,o=e.formElement,a=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[o,a].some((function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return bt({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},wt(e,pt))},getRootProps:function(e){return bt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return we(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":we(t.id,"label")},e)},getFormProps:function(e){return e.inputElement,bt({action:"",noValidate:!0,role:"search",onSubmit:function(a){var i;a.preventDefault(),t.onSubmit(bt({event:a,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(a){var i;a.preventDefault(),t.onReset(bt({event:a,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},wt(e,ft))},getLabelProps:function(e){return bt({htmlFor:we(t.id,"input"),id:we(t.id,"label")},e)},getInputProps:function(e){var a;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&ot(bt({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var s=e||{};s.inputElement;var l=s.maxLength,c=void 0===l?512:l,u=wt(s,mt),d=ve(r.getState()),p=function(e){return Boolean(e&&e.match(Se))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),f=t.enterKeyHint||(null!=d&&d.itemUrl&&!p?"go":"search");return bt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?we(t.id,"item-".concat(r.getState().activeItemId),null==d?void 0:d.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return we(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":we(t.id,"label"),value:r.getState().completion||r.getState().query,id:we(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:f,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:"search",onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&xe(e).isComposing?o.setQuery(a):ot(bt({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},o))},onCompositionEnd:function(e){ot(bt({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},o))},onKeyDown:function(e){xe(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,o=e.store,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,it);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=ve(o.getState()),t=n.environment.document.getElementById(we(n.id,"item-".concat(o.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},s=function(){var e=ve(o.getState());if(null!==o.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,s=e.itemUrl,l=e.source;l.onActive(lt({event:t,item:n,itemInputValue:i,itemUrl:s,refresh:r,source:l,state:o.getState()},a))}};t.preventDefault(),!1===o.getState().isOpen&&(n.openOnFocus||Boolean(o.getState().query))?ot(lt({event:t,props:n,query:o.getState().query,refresh:r,store:o},a)).then((function(){o.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(i,0)})):(o.dispatch(t.key,{}),s(),i())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=ve(o.getState()),c=l.item,u=l.itemInputValue,d=l.itemUrl,p=l.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(p.onSelect(lt({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:o.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:c,state:o.getState()}));else if(t.shiftKey)void 0!==d&&(p.onSelect(lt({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:o.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:c,state:o.getState()}));else if(t.altKey);else{if(void 0!==d)return p.onSelect(lt({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:o.getState()},a)),void n.navigator.navigate({itemUrl:d,item:c,state:o.getState()});ot(lt({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:o},a)).then((function(){p.onSelect(lt({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:o.getState()},a))}))}}}(bt({event:e,props:t,refresh:n,store:r},o))},onFocus:i,onBlur:D,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},u)},getPanelProps:function(e){return bt({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,o=wt(n,ht);return bt({role:"listbox","aria-labelledby":we(t.id,"label"),id:we(t.id,"list",r)},o)},getItemProps:function(e){var a=e.item,i=e.source,s=wt(e,gt);return bt({id:we(t.id,"item-".concat(a.__autocomplete_id),i),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=ve(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,s=t.itemInputValue,l=t.itemUrl,c=t.source;c.onActive(bt({event:e,item:i,itemInputValue:s,itemUrl:l,refresh:n,source:c,state:r.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var s=i.getItemInputValue({item:a,state:r.getState()}),l=i.getItemUrl({item:a,state:r.getState()});(l?Promise.resolve():ot(bt({event:e,nextState:{isOpen:!1},props:t,query:s,refresh:n,store:r},o))).then((function(){i.onSelect(bt({event:e,item:a,itemInputValue:s,itemUrl:l,refresh:n,source:i,state:r.getState()},o))}))}},s)}}}function xt(e){return xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xt(e)}function kt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kt(Object(n),!0).forEach((function(t){_t(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _t(e,t,n){return(t=function(e){var t=function(e){if("object"!==xt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===xt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Et(e){var t,n,r,o,a=e.plugins,i=e.options,s=null===(t=((null===(n=i.__autocomplete_metadata)||void 0===n?void 0:n.userAgents)||[])[0])||void 0===t?void 0:t.segment,l=s?_t({},s,Object.keys((null===(r=i.__autocomplete_metadata)||void 0===r?void 0:r.options)||{})):{};return{plugins:a.map((function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}})),options:jt({"autocomplete-core":Object.keys(i)},l),ua:M.concat((null===(o=i.__autocomplete_metadata)||void 0===o?void 0:o.userAgents)||[])}}function Ot(e){var t,n=e.state;return!1===n.isOpen||null===n.activeItemId?null:(null===(t=ve(n))||void 0===t?void 0:t.itemInputValue)||null}function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){Tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tt(e,t,n){return(t=function(e){var t=function(e){if("object"!==Pt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Pt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var It=function(e,t){switch(t.type){case"setActiveItemId":case"mousemove":return At(At({},e),{},{activeItemId:t.payload});case"setQuery":return At(At({},e),{},{query:t.payload,completion:null});case"setCollections":return At(At({},e),{},{collections:t.payload});case"setIsOpen":return At(At({},e),{},{isOpen:t.payload});case"setStatus":return At(At({},e),{},{status:t.payload});case"setContext":return At(At({},e),{},{context:At(At({},e.context),t.payload)});case"ArrowDown":var n=At(At({},e),{},{activeItemId:t.payload.hasOwnProperty("nextActiveItemId")?t.payload.nextActiveItemId:me(1,e.activeItemId,N(e),t.props.defaultActiveItemId)});return At(At({},n),{},{completion:Ot({state:n})});case"ArrowUp":var r=At(At({},e),{},{activeItemId:me(-1,e.activeItemId,N(e),t.props.defaultActiveItemId)});return At(At({},r),{},{completion:Ot({state:r})});case"Escape":return e.isOpen?At(At({},e),{},{activeItemId:null,isOpen:!1,completion:null}):At(At({},e),{},{activeItemId:null,query:"",status:"idle",collections:[]});case"submit":return At(At({},e),{},{activeItemId:null,isOpen:!1,status:"idle"});case"reset":return At(At({},e),{},{activeItemId:!0===t.props.openOnFocus?t.props.defaultActiveItemId:null,status:"idle",completion:null,query:""});case"focus":return At(At({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||Boolean(e.query))&&t.props.shouldPanelOpen({state:e})});case"blur":return t.props.debug?e:At(At({},e),{},{isOpen:!1,activeItemId:null});case"mouseleave":return At(At({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function Nt(e){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nt(e)}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){Dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dt(e,t,n){return(t=function(e){var t=function(e){if("object"!==Nt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Nt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(e){var t=[],n=Re(e,t),r=function(e,t,n){var r,o=t.initialState;return{getState:function(){return o},dispatch:function(r,a){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){_e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o);o=e(o,{type:r,props:t,payload:a}),n({state:o,prevState:i})},pendingRequests:(r=[],{add:function(e){return r.push(e),e.finally((function(){r=r.filter((function(t){return t!==e}))}))},cancelAll:function(){r.forEach((function(e){return e.cancel()}))},isEmpty:function(){return 0===r.length}})}}(It,n,(function(e){var t,r,a=e.prevState,c=e.state;if(n.onStateChange(Rt({prevState:a,state:c,refresh:i,navigator:n.navigator},o)),!l()&&null!==(t=c.context)&&void 0!==t&&null!==(r=t.algoliaInsightsPlugin)&&void 0!==r&&r.__automaticInsights&&!1!==n.insights){var u=le({__autocomplete_clickAnalytics:!1});n.plugins.push(u),s([u])}})),o=function(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch("setActiveItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var n=0,r=e.map((function(e){return Pe(Pe({},e),{},{items:T(e.items).map((function(e){return Pe(Pe({},e),{},{__autocomplete_id:n++})}))})}));t.dispatch("setCollections",r)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:r}),a=St(Rt({props:n,refresh:i,store:r,navigator:n.navigator},o));function i(){return ot(Rt({event:new Event("input"),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:i,store:r},o))}function s(e){e.forEach((function(e){var r;return null===(r=e.subscribe)||void 0===r?void 0:r.call(e,Rt(Rt({},o),{},{navigator:n.navigator,refresh:i,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))}))}function l(){return n.plugins.some((function(e){return"aa.algoliaInsightsPlugin"===e.name}))}if(n.insights&&!l()){var c="boolean"==typeof n.insights?{}:n.insights;n.plugins.push(le(c))}return s(n.plugins),function(e){var t,n,r=e.metadata,o=e.environment;if(null===(t=o.navigator)||void 0===t||null===(n=t.userAgent)||void 0===n?void 0:n.includes("Algolia Crawler")){var a=o.document.createElement("meta"),i=o.document.querySelector("head");a.name="algolia:metadata",setTimeout((function(){a.content=JSON.stringify(r),i.appendChild(a)}),0)}}({metadata:Et({plugins:n.plugins,options:e}),environment:n.environment}),Rt(Rt({refresh:i,navigator:n.navigator},a),o)}function Ft(e){var t=e.translations,n=(void 0===t?{}:t).searchByText,o=void 0===n?"Search by":n;return r.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},r.createElement("span",{className:"DocSearch-Label"},o),r.createElement("svg",{width:"77",height:"19","aria-label":"Algolia",role:"img",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500"},r.createElement("defs",null,r.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),r.createElement("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),r.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),r.createElement("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),r.createElement("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),r.createElement("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),r.createElement("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),r.createElement("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),r.createElement("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),r.createElement("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})))}function Bt(e){return r.createElement("svg",{width:"15",height:"15","aria-label":e.ariaLabel,role:"img"},r.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2"},e.children))}function zt(e){var t=e.translations,n=void 0===t?{}:t,o=n.selectText,a=void 0===o?"to select":o,i=n.selectKeyAriaLabel,s=void 0===i?"Enter key":i,l=n.navigateText,c=void 0===l?"to navigate":l,u=n.navigateUpKeyAriaLabel,d=void 0===u?"Arrow up":u,p=n.navigateDownKeyAriaLabel,f=void 0===p?"Arrow down":p,m=n.closeText,h=void 0===m?"to close":m,g=n.closeKeyAriaLabel,y=void 0===g?"Escape key":g,b=n.searchByText,v=void 0===b?"Search by":b;return r.createElement(r.Fragment,null,r.createElement("div",{className:"DocSearch-Logo"},r.createElement(Ft,{translations:{searchByText:v}})),r.createElement("ul",{className:"DocSearch-Commands"},r.createElement("li",null,r.createElement("kbd",{className:"DocSearch-Commands-Key"},r.createElement(Bt,{ariaLabel:s},r.createElement("path",{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}))),r.createElement("span",{className:"DocSearch-Label"},a)),r.createElement("li",null,r.createElement("kbd",{className:"DocSearch-Commands-Key"},r.createElement(Bt,{ariaLabel:f},r.createElement("path",{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}))),r.createElement("kbd",{className:"DocSearch-Commands-Key"},r.createElement(Bt,{ariaLabel:d},r.createElement("path",{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}))),r.createElement("span",{className:"DocSearch-Label"},c)),r.createElement("li",null,r.createElement("kbd",{className:"DocSearch-Commands-Key"},r.createElement(Bt,{ariaLabel:y},r.createElement("path",{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}))),r.createElement("span",{className:"DocSearch-Label"},h))))}function Ut(e){var t=e.hit,n=e.children;return r.createElement("a",{href:t.url},n)}function $t(){return r.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),r.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},r.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function qt(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),r.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function Ht(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Vt(){return r.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),r.createElement("path",{d:"M8 17l-6-6 6-6"})))}var Wt=function(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Kt(e){switch(e.type){case"lvl1":return r.createElement(Wt,null);case"content":return r.createElement(Qt,null);default:return r.createElement(Gt,null)}}function Gt(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Qt(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Yt(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Zt(){return r.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function Jt(){return r.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"}))}function Xt(e){var t=e.translations,n=void 0===t?{}:t,o=n.titleText,a=void 0===o?"Unable to fetch results":o,i=n.helpText,s=void 0===i?"You might want to check your network connection.":i;return r.createElement("div",{className:"DocSearch-ErrorScreen"},r.createElement("div",{className:"DocSearch-Screen-Icon"},r.createElement(Zt,null)),r.createElement("p",{className:"DocSearch-Title"},a),r.createElement("p",{className:"DocSearch-Help"},s))}var en=["translations"];function tn(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,en),a=n.noResultsText,i=void 0===a?"No results for":a,s=n.suggestedQueryText,l=void 0===s?"Try searching for":s,c=n.reportMissingResultsText,u=void 0===c?"Believe this query should return results?":c,d=n.reportMissingResultsLinkText,p=void 0===d?"Let us know.":d,f=o.state.context.searchSuggestions;return r.createElement("div",{className:"DocSearch-NoResults"},r.createElement("div",{className:"DocSearch-Screen-Icon"},r.createElement(Jt,null)),r.createElement("p",{className:"DocSearch-Title"},i,' "',r.createElement("strong",null,o.state.query),'"'),f&&f.length>0&&r.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},r.createElement("p",{className:"DocSearch-Help"},l,":"),r.createElement("ul",null,f.slice(0,3).reduce((function(e,t){return[].concat(S(e),[r.createElement("li",{key:t},r.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){o.setQuery(t.toLowerCase()+" "),o.refresh(),o.inputRef.current.focus()}},t))])}),[]))),o.getMissingResultsUrl&&r.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),r.createElement("a",{href:o.getMissingResultsUrl({query:o.state.query}),target:"_blank",rel:"noopener noreferrer"},p)))}var nn=["hit","attribute","tagName"];function rn(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function on(e){var t=e.hit,n=e.attribute,o=e.tagName,a=void 0===o?"span":o,i=y(e,nn);return(0,r.createElement)(a,g(g({},i),{},{dangerouslySetInnerHTML:{__html:rn(t,"_snippetResult.".concat(n,".value"))||rn(t,n)}}))}function an(e){return e.collection&&0!==e.collection.items.length?r.createElement("section",{className:"DocSearch-Hits"},r.createElement("div",{className:"DocSearch-Hit-source"},e.title),r.createElement("ul",e.getListProps(),e.collection.items.map((function(t,n){return r.createElement(sn,d({key:[e.title,t.objectID].join(":"),item:t,index:n},e))})))):null}function sn(e){var t=e.item,n=e.index,o=e.renderIcon,a=e.renderAction,i=e.getItemProps,s=e.onItemClick,l=e.collection,c=e.hitComponent,u=w(r.useState(!1),2),p=u[0],f=u[1],m=w(r.useState(!1),2),h=m[0],g=m[1],y=r.useRef(null),b=c;return r.createElement("li",d({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",p&&"DocSearch-Hit--deleting",h&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){y.current&&y.current()}},i({item:t,source:l.source,onClick:function(e){s(t,e)}})),r.createElement(b,{hit:t},r.createElement("div",{className:"DocSearch-Hit-Container"},o({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(on,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&r.createElement(on,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(on,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),r.createElement(on,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(on,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),r.createElement(on,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),a({item:t,runDeleteTransition:function(e){f(!0),y.current=e},runFavoriteTransition:function(e){g(!0),y.current=e}}))))}function ln(e,t,n){return e.reduce((function(e,r){var o=t(r);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(n||5)&&e[o].push(r),e}),{})}function cn(e){return e}function un(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function dn(){}var pn=/(<mark>|<\/mark>)/g,fn=RegExp(pn.source);function mn(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0;return o?o.value&&fn.test(o.value)?o.value.replace(pn,""):o.value:e.hierarchy.lvl0}function hn(e){return r.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map((function(t){if(0===t.items.length)return null;var n=mn(t.items[0]);return r.createElement(an,d({},e,{key:t.source.sourceId,title:n,collection:t,renderIcon:function(e){var n,o=e.item,a=e.index;return r.createElement(r.Fragment,null,o.__docsearch_parent&&r.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},o.__docsearch_parent!==(null===(n=t.items[a+1])||void 0===n?void 0:n.__docsearch_parent)?r.createElement("path",{d:"M8 6v21M20 27H8.3"}):r.createElement("path",{d:"M8 6v42M20 27H8.3"}))),r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Kt,{type:o.type})))},renderAction:function(){return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement(Vt,null))}}))})),e.resultsFooterComponent&&r.createElement("section",{className:"DocSearch-HitsFooter"},r.createElement(e.resultsFooterComponent,{state:e.state})))}var gn=["translations"];function yn(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,gn),a=n.recentSearchesTitle,i=void 0===a?"Recent":a,s=n.noRecentSearchesText,l=void 0===s?"No recent searches":s,c=n.saveRecentSearchButtonTitle,u=void 0===c?"Save this search":c,p=n.removeRecentSearchButtonTitle,f=void 0===p?"Remove this search from history":p,m=n.favoriteSearchesTitle,h=void 0===m?"Favorite":m,g=n.removeFavoriteSearchButtonTitle,b=void 0===g?"Remove this search from favorites":g;return"idle"===o.state.status&&!1===o.hasCollections?o.disableUserPersonalization?null:r.createElement("div",{className:"DocSearch-StartScreen"},r.createElement("p",{className:"DocSearch-Help"},l)):!1===o.hasCollections?null:r.createElement("div",{className:"DocSearch-Dropdown-Container"},r.createElement(an,d({},o,{title:i,collection:o.state.collections[0],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(qt,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,a=e.runDeleteTransition;return r.createElement(r.Fragment,null,r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){o.favoriteSearches.add(t),o.recentSearches.remove(t),o.refresh()}))}},r.createElement(Yt,null))),r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),a((function(){o.recentSearches.remove(t),o.refresh()}))}},r.createElement(Ht,null))))}})),r.createElement(an,d({},o,{title:h,collection:o.state.collections[1],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Yt,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:b,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){o.favoriteSearches.remove(t),o.refresh()}))}},r.createElement(Ht,null)))}})))}var bn=["translations"],vn=r.memo((function(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,bn);if("error"===o.state.status)return r.createElement(Xt,{translations:null==n?void 0:n.errorScreen});var a=o.state.collections.some((function(e){return e.items.length>0}));return o.state.query?!1===a?r.createElement(tn,d({},o,{translations:null==n?void 0:n.noResultsScreen})):r.createElement(hn,o):r.createElement(yn,d({},o,{hasCollections:a,translations:null==n?void 0:n.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status})),wn=["translations"];function Sn(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,wn),a=n.resetButtonTitle,i=void 0===a?"Clear the query":a,s=n.resetButtonAriaLabel,l=void 0===s?"Clear the query":s,c=n.cancelButtonText,u=void 0===c?"Cancel":c,p=n.cancelButtonAriaLabel,f=void 0===p?"Cancel":p,m=n.searchInputLabel,h=void 0===m?"Search":m,g=o.getFormProps({inputElement:o.inputRef.current}).onReset;return r.useEffect((function(){o.autoFocus&&o.inputRef.current&&o.inputRef.current.focus()}),[o.autoFocus,o.inputRef]),r.useEffect((function(){o.isFromSelection&&o.inputRef.current&&o.inputRef.current.select()}),[o.isFromSelection,o.inputRef]),r.createElement(r.Fragment,null,r.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:g},r.createElement("label",d({className:"DocSearch-MagnifierLabel"},o.getLabelProps()),r.createElement(_,null),r.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},h)),r.createElement("div",{className:"DocSearch-LoadingIndicator"},r.createElement($t,null)),r.createElement("input",d({className:"DocSearch-Input",ref:o.inputRef},o.getInputProps({inputElement:o.inputRef.current,autoFocus:o.autoFocus,maxLength:64}))),r.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":l,hidden:!o.state.query},r.createElement(Ht,null))),r.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:o.onClose},u))}var xn=["_highlightResult","_snippetResult"];function kn(e){var t=e.key,n=e.limit,r=void 0===n?5:n,o=function(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}(t),a=o.getItem().slice(0,r);return{add:function(e){var t=e;t._highlightResult,t._snippetResult;var n=y(t,xn),i=a.findIndex((function(e){return e.objectID===n.objectID}));i>-1&&a.splice(i,1),a.unshift(n),a=a.slice(0,r),o.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),o.setItem(a)},getAll:function(){return a}}}function jn(e){var t,n="algolia-client-js-".concat(e.key);function r(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(r().getItem(n)||"{}")}function a(e){r().setItem(n,JSON.stringify(e))}return{get:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var n,r,i;return n=e.timeToLive?1e3*e.timeToLive:null,r=o(),a(i=Object.fromEntries(Object.entries(r).filter((function(e){return void 0!==w(e,2)[1].timestamp})))),n&&a(Object.fromEntries(Object.entries(i).filter((function(e){var t=w(e,2)[1],r=(new Date).getTime();return!(t.timestamp+n<r)})))),o()[JSON.stringify(t)]})).then((function(e){return Promise.all([e?e.value:n(),void 0!==e])})).then((function(e){var t=w(e,2),n=t[0],o=t[1];return Promise.all([n,o||r.miss(n)])})).then((function(e){return w(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var a=o();return a[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},r().setItem(n,JSON.stringify(a)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=o();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function _n(e){var t=S(e.caches),n=t.shift();return void 0===n?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return w(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,o).catch((function(){return _n({caches:t}).get(e,r,o)}))},set:function(e,r){return n.set(e,r).catch((function(){return _n({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return _n({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return _n({caches:t}).clear()}))}}}function En(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var i=r();return i.then((function(e){return o.miss(e)})).then((function(){return i}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function On(e){var t=e.algoliaAgents,n=e.client,r=e.version,o=function(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}(r).add({segment:n,version:r});return t.forEach((function(e){return o.add(e)})),o}var Pn=12e4;function Cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",n=Date.now();return g(g({},e),{},{status:t,lastUpdate:n,isUp:function(){return"up"===t||Date.now()-n>Pn},isTimedOut:function(){return"timed out"===t&&Date.now()-n<=Pn}})}var An=function(){function e(t,n){var r;return l(this,e),u(r=s(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return f(e,k(Error)),c(e)}(),Tn=function(){function e(t,n,r){var o;return l(this,e),u(o=s(this,e,[t,r]),"stackTrace",void 0),o.stackTrace=n,o}return f(e,An),c(e)}(),In=function(){function e(t){return l(this,e),s(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError"])}return f(e,Tn),c(e)}(),Nn=function(){function e(t,n,r){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ApiError";return l(this,e),u(o=s(this,e,[t,r,a]),"status",void 0),o.status=n,o}return f(e,Tn),c(e)}(),Ln=function(){function e(t,n){var r;return l(this,e),u(r=s(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return f(e,An),c(e)}(),Rn=function(){function e(t,n,r,o){var a;return l(this,e),u(a=s(this,e,[t,n,o,"DetailedApiError"]),"error",void 0),a.error=r,a}return f(e,Nn),c(e)}();function Dn(e,t,n){var r,o=(r=n,Object.keys(r).filter((function(e){return void 0!==r[e]})).sort().map((function(e){return"".concat(e,"=").concat(encodeURIComponent("[object Array]"===Object.prototype.toString.call(r[e])?r[e].join(","):r[e]).replace(/\+/g,"%20"))})).join("&")),a="".concat(e.protocol,"://").concat(e.url).concat(e.port?":".concat(e.port):"","/").concat("/"===t.charAt(0)?t.substring(1):t);return o.length&&(a+="?".concat(o)),a}function Mn(e,t){if("GET"!==e.method&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:g(g({},e.data),t.data);return JSON.stringify(n)}}function Fn(e,t,n){var r=g(g(g({Accept:"application/json"},e),t),n),o={};return Object.keys(r).forEach((function(e){var t=r[e];o[e.toLowerCase()]=t})),o}function Bn(e){try{return JSON.parse(e.content)}catch(t){throw new Ln(t.message,e)}}function zn(e,t){var n=e.content,r=e.status;try{var o=JSON.parse(n);return"error"in o?new Rn(o.message,r,o.error,t):new Nn(o.message,r,t)}catch(e){}return new Nn(n,r,t)}function Un(e){return e.map((function(e){return $n(e)}))}function $n(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return g(g({},e),{},{request:g(g({},e.request),{},{headers:g(g({},e.request.headers),t)})})}var qn=["appId","apiKey","authMode","algoliaAgents"],Hn=["params"],Vn="5.12.0";function Wn(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){for(var t=e,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),o=e[n];t[n]=e[r],t[r]=o}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var Kn="3.8.0";function Gn(e,t,n){return r.useMemo((function(){var r=function(e,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,n=e.apiKey,r=e.authMode,o=e.algoliaAgents,a=y(e,qn),s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"WithinHeaders",r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:function(){return"WithinHeaders"===n?r:{}},queryParameters:function(){return"WithinQueryParameters"===n?r:{}}}}(t,n,r),l=function(e){var t=e.hosts,n=e.hostsCache,r=e.baseHeaders,o=e.logger,a=e.baseQueryParameters,s=e.algoliaAgent,l=e.timeouts,c=e.requester,u=e.requestsCache,d=e.responsesCache;function p(e){return f.apply(this,arguments)}function f(){return(f=i(b().mark((function e(t){var r,o,a,i,s;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return n.get(e,(function(){return Promise.resolve(Cn(e))}))})));case 2:return r=e.sent,o=r.filter((function(e){return e.isUp()})),a=r.filter((function(e){return e.isTimedOut()})),i=[].concat(S(o),S(a)),s=i.length>0?i:t,e.abrupt("return",{hosts:s,getTimeout:function(e,t){return(0===a.length&&0===e?1:a.length+3+e)*t}});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){return h.apply(this,arguments)}function h(){return h=i(b().mark((function e(u,d){var f,m,h,y,v,w,x,k,j,_,E,O,P,C=arguments;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=!(C.length>2&&void 0!==C[2])||C[2],m=[],h=Mn(u,d),y=Fn(r,u.headers,d.headers),v="GET"===u.method?g(g({},u.data),d.data):{},w=g(g(g({},a),u.queryParameters),v),s.value&&(w["x-algolia-agent"]=s.value),d&&d.queryParameters)for(x=0,k=Object.keys(d.queryParameters);x<k.length;x++)j=k[x],d.queryParameters[j]&&"[object Object]"!==Object.prototype.toString.call(d.queryParameters[j])?w[j]=d.queryParameters[j].toString():w[j]=d.queryParameters[j];return _=0,E=function(){var e=i(b().mark((function e(t,r){var a,i,s,p,v,S;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==(a=t.pop())){e.next=3;break}throw new In(Un(m));case 3:return i=g(g({},l),d.timeouts),s={data:h,headers:y,method:u.method,url:Dn(a,u.path,w),connectTimeout:r(_,i.connect),responseTimeout:r(_,f?i.read:i.write)},p=function(e){var n={request:s,response:e,host:a,triesLeft:t.length};return m.push(n),n},e.next=8,c.send(s);case 8:if(x=(b=v=e.sent).isTimedOut,k=b.status,!(x||function(e){return!e.isTimedOut&&!~~e.status}({isTimedOut:x,status:k})||2!=~~(k/100)&&4!=~~(k/100))){e.next=16;break}return S=p(v),v.isTimedOut&&_++,o.info("Retryable failure",$n(S)),e.next=15,n.set(a,Cn(a,v.isTimedOut?"timed out":"down"));case 15:return e.abrupt("return",E(t,r));case 16:if(2!=~~(v.status/100)){e.next=18;break}return e.abrupt("return",Bn(v));case 18:throw p(v),zn(v,m);case 20:case"end":return e.stop()}var b,x,k}),e)})));return function(t,n){return e.apply(this,arguments)}}(),O=t.filter((function(e){return"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept)})),e.next=13,p(O);case 13:return P=e.sent,e.abrupt("return",E(S(P.hosts).reverse(),P.getTimeout));case 15:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}return{hostsCache:n,requester:c,timeouts:l,logger:o,algoliaAgent:s,baseHeaders:r,baseQueryParameters:a,hosts:t,request:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.useReadTransporter||"GET"===e.method;if(!n)return m(e,t,n);var o=function(){return m(e,t)};if(!0!==(t.cacheable||e.cacheable))return o();var i={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return d.get(i,(function(){return u.get(i,(function(){return u.set(i,o()).then((function(e){return Promise.all([u.delete(i),e])}),(function(e){return Promise.all([u.delete(i),Promise.reject(e)])})).then((function(e){var t=w(e,2);return t[0],t[1]}))}))}),{miss:function(e){return d.set(i,e)}})},requestsCache:u,responsesCache:d}}(g(g({hosts:Wn(t)},a),{},{algoliaAgent:On({algoliaAgents:o,client:"Lite",version:Vn}),baseHeaders:g(g({"content-type":"text/plain"},s.headers()),a.baseHeaders),baseQueryParameters:g(g({},s.queryParameters()),a.baseQueryParameters)}));return{transporter:l,appId:t,clearCache:function(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then((function(){}))},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent:function(e,t){l.algoliaAgent.add({segment:e,version:t})},setClientApiKey:function(e){var t=e.apiKey;r&&"WithinHeaders"!==r?l.baseQueryParameters["x-algolia-api-key"]=t:l.baseHeaders["x-algolia-api-key"]=t},searchForHits:function(e,t){return this.search(e,t)},searchForFacets:function(e,t){return this.search(e,t)},customPost:function(e,t){var n=e.path,r=e.parameters,o=e.body;if(!n)throw new Error("Parameter `path` is required when calling `customPost`.");var a={method:"POST",path:"/{path}".replace("{path}",n),queryParameters:r||{},headers:{},data:o||{}};return l.request(a,t)},getRecommendations:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return l.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var n={requests:e.map((function(e){var t=e.params,n=y(e,Hn);return"facet"===n.type?g(g(g({},n),t),{},{type:"facet"}):g(g(g({},n),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=n}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return l.request(r,t)}}}(g({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return Promise.resolve()}},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,o=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),e)},a=o(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=o(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:En(),requestsCache:En({serializable:!1}),hostsCache:_n({caches:[jn({key:"".concat(Vn,"-").concat(e)}),En()]})},void 0))}(e,t);return r.addAlgoliaAgent("docsearch",Kn),!1===/docsearch.js \(.*\)/.test(r.transporter.algoliaAgent.value)&&r.addAlgoliaAgent("docsearch-react",Kn),n(r)}),[e,t,n])}var Qn=["footer","searchBox"];function Yn(e){var t=e.appId,n=e.apiKey,o=e.indexName,a=e.placeholder,i=void 0===a?"Search docs":a,s=e.searchParameters,l=e.maxResultsPerGroup,c=e.onClose,u=void 0===c?dn:c,p=e.transformItems,f=void 0===p?cn:p,m=e.hitComponent,h=void 0===m?Ut:m,b=e.resultsFooterComponent,v=void 0===b?function(){return null}:b,S=e.navigator,x=e.initialScrollY,k=void 0===x?0:x,j=e.transformSearchClient,_=void 0===j?cn:j,E=e.disableUserPersonalization,O=void 0!==E&&E,P=e.initialQuery,C=void 0===P?"":P,A=e.translations,T=void 0===A?{}:A,I=e.getMissingResultsUrl,N=e.insights,L=void 0!==N&&N,R=T.footer,D=T.searchBox,M=y(T,Qn),F=w(r.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),B=F[0],z=F[1],U=r.useRef(null),$=r.useRef(null),q=r.useRef(null),H=r.useRef(null),V=r.useRef(null),W=r.useRef(10),K=r.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,G=r.useRef(C||K).current,Q=Gn(t,n,_),Y=r.useRef(kn({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(o),limit:10})).current,Z=r.useRef(kn({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(o),limit:0===Y.getAll().length?7:4})).current,J=r.useCallback((function(e){if(!O){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===Y.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&Z.add(t)}}),[Y,Z,O]),X=r.useCallback((function(e){if(B.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};B.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[B.context.algoliaInsightsPlugin]),ee=r.useMemo((function(){return Mt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:G,context:{searchSuggestions:[]}},insights:L,navigator:S,onStateChange:function(e){z(e.state)},getSources:function(e){var r=e.query,a=e.state,i=e.setContext,c=e.setStatus;if(!r)return O?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),un(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return Z.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),un(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return Y.getAll()}}];var d=Boolean(L);return Q.search({requests:[g({query:r,indexName:o,attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(W.current),"hierarchy.lvl2:".concat(W.current),"hierarchy.lvl3:".concat(W.current),"hierarchy.lvl4:".concat(W.current),"hierarchy.lvl5:".concat(W.current),"hierarchy.lvl6:".concat(W.current),"content:".concat(W.current)],snippetEllipsisText:"\u2026",highlightPreTag:"<mark>",highlightPostTag:"</mark>",hitsPerPage:20,clickAnalytics:d},s)]}).catch((function(e){throw"RetryError"===e.name&&c("error"),e})).then((function(e){var r=e.results[0],s=r.hits,c=r.nbHits,p=ln(s,(function(e){return mn(e)}),l);a.context.searchSuggestions.length<Object.keys(p).length&&i({searchSuggestions:Object.keys(p)}),i({nbHits:c});var m={};return d&&(m={__autocomplete_indexName:o,__autocomplete_queryID:r.queryID,__autocomplete_algoliaCredentials:{appId:t,apiKey:n}}),Object.values(p).map((function(e,t){return{sourceId:"hits".concat(t),onSelect:function(e){var t=e.item,n=e.event;J(t),un(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return Object.values(ln(e,(function(e){return e.hierarchy.lvl1}),l)).map(f).map((function(e){return e.map((function(t){var n=null,r=e.find((function(e){return"lvl1"===e.type&&e.hierarchy.lvl1===t.hierarchy.lvl1}));return"lvl1"!==t.type&&r&&(n=r),g(g({},t),{},{__docsearch_parent:n},m)}))})).flat()}}}))}))}})}),[o,s,l,Q,u,Z,Y,J,G,i,S,f,O,L,t,n]),te=ee.getEnvironmentProps,ne=ee.getRootProps,re=ee.refresh;return function(e){var t=e.getEnvironmentProps,n=e.panelElement,o=e.formElement,a=e.inputElement;r.useEffect((function(){if(n&&o&&a){var e=t({panelElement:n,formElement:o,inputElement:a}),r=e.onTouchStart,i=e.onTouchMove;return window.addEventListener("touchstart",r),window.addEventListener("touchmove",i),function(){window.removeEventListener("touchstart",r),window.removeEventListener("touchmove",i)}}}),[t,n,o,a])}({getEnvironmentProps:te,panelElement:H.current,formElement:q.current,inputElement:V.current}),function(e){var t=e.container;r.useEffect((function(){if(t){var e=t.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),n=e[0],r=e[e.length-1];return t.addEventListener("keydown",o),function(){t.removeEventListener("keydown",o)}}function o(e){"Tab"===e.key&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),r.focus()):document.activeElement===r&&(e.preventDefault(),n.focus()))}}),[t])}({container:U.current}),r.useEffect((function(){return document.body.classList.add("DocSearch--active"),function(){var e,t;document.body.classList.remove("DocSearch--active"),null===(e=(t=window).scrollTo)||void 0===e||e.call(t,0,k)}}),[]),r.useEffect((function(){window.matchMedia("(max-width: 768px)").matches&&(W.current=5)}),[]),r.useEffect((function(){H.current&&(H.current.scrollTop=0)}),[B.query]),r.useEffect((function(){G.length>0&&(re(),V.current&&V.current.focus())}),[G,re]),r.useEffect((function(){function e(){if($.current){var e=.01*window.innerHeight;$.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),r.createElement("div",d({ref:U},ne({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===B.status&&"DocSearch-Container--Stalled","error"===B.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&u()}}),r.createElement("div",{className:"DocSearch-Modal",ref:$},r.createElement("header",{className:"DocSearch-SearchBar",ref:q},r.createElement(Sn,d({},ee,{state:B,autoFocus:0===G.length,inputRef:V,isFromSelection:Boolean(G)&&G===K,translations:D,onClose:u}))),r.createElement("div",{className:"DocSearch-Dropdown",ref:H},r.createElement(vn,d({},ee,{indexName:o,state:B,hitComponent:h,resultsFooterComponent:v,disableUserPersonalization:O,recentSearches:Z,favoriteSearches:Y,inputRef:V,translations:M,getMissingResultsUrl:I,onItemClick:function(e,t){X(e),J(e),un(t)||u()}}))),r.createElement("footer",{className:"DocSearch-Footer"},r.createElement(zt,{translations:R}))))}function Zn(e){var t=e.isOpen,n=e.onOpen,o=e.onClose,a=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){var r;if("Escape"===e.code&&t||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)return e.preventDefault(),void(t?o():document.body.classList.contains("DocSearch--active")||n());i&&i.current===document.activeElement&&a&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&a(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,o,a,i])}},35947:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});n(63696);var r=n(53259),o=n.n(r),a=n(84054);const i={"0087a340":[()=>n.e(180).then(n.t.bind(n,33491,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-references-1b9.json",33491],"03b83387":[()=>n.e(3459).then(n.t.bind(n,46103,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-string-515.json",46103],"03eeee36":[()=>n.e(151).then(n.t.bind(n,33201,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-generic-keywords-293.json",33201],"0446378f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7889)]).then(n.bind(n,1936)),"@site/docs/demo-viewer/refs/localFile.mdx",1936],"08dc474f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(81)]).then(n.bind(n,98826)),"@site/docs/api/MonacoEditor.mdx",98826],"09dbd73b":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1060)]).then(n.bind(n,77187)),"@site/docs/demo-viewer/array/additionalItems2.mdx",77187],"0ce74438":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5274),n.e(7082),n.e(3365)]).then(n.bind(n,81891)),"@site/src/pages/playground.tsx",81891],"0d2bf170":[()=>Promise.all([n.e(1869),n.e(2076),n.e(3177)]).then(n.bind(n,62934)),"@site/docs/demo-viewer/array/unevaluatedItems1.mdx",62934],"0d743cca":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9352)]).then(n.bind(n,72055)),"@site/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.mdx",72055],"0ff7d3d9":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8962)]).then(n.bind(n,27264)),"@site/docs/demo-viewer/schema_conditionally/if-then-else.mdx",27264],"14eb3368":[()=>Promise.all([n.e(1869),n.e(6969)]).then(n.bind(n,34136)),"@theme/DocCategoryGeneratedIndexPage",34136],"16bf5a7a":[()=>n.e(3516).then(n.t.bind(n,48703,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-schema-conditionally-7f6.json",48703],17896441:[()=>Promise.all([n.e(1869),n.e(2076),n.e(8401)]).then(n.bind(n,94577)),"@theme/DocItem",94577],"188a43e1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5232)]).then(n.bind(n,87592)),"@site/docs/demo-viewer/object/unevaluatedProperties2.mdx",87592],"1a4e3797":[()=>Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,74604)),"@theme/SearchPage",74604],"1e804d56":[()=>Promise.all([n.e(1869),n.e(2076),n.e(6444)]).then(n.bind(n,97431)),"@site/docs/demo-viewer/schema_composition/not.mdx",97431],"207c73ba":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1698)]).then(n.bind(n,35672)),"@site/docs/demo-viewer/object/properties.mdx",35672],"22aea3f5":[()=>n.e(4198).then(n.t.bind(n,64761,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-demo-viewer-bb3.json",64761],"247662c2":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5821)]).then(n.bind(n,8665)),"@site/docs/demo-viewer/schema_conditionally/dependentRequired.mdx",8665],"25efcfba":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9617)]).then(n.bind(n,94277)),"@site/docs/demo-viewer/object/patternProperties.mdx",94277],"2b403dce":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5650)]).then(n.bind(n,15738)),"@site/docs/demo-viewer/string/contentEncoding.mdx",15738],"2bd2a82e":[()=>n.e(8117).then(n.t.bind(n,9279,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-array-375.json",9279],"2cc05f38":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1487)]).then(n.bind(n,89265)),"@site/docs/demo-viewer/null.mdx",89265],"2e4a130b":[()=>n.e(8947).then(n.t.bind(n,45872,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-\ufe0f-customizations-e33.json",45872],"39bae550":[()=>Promise.all([n.e(1869),n.e(2076),n.e(417)]).then(n.bind(n,11343)),"@site/docs/demo-viewer/numeric/multipleOf.mdx",11343],"3af02d98":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1552)]).then(n.bind(n,84563)),"@site/docs/api/JSONSchemaViewer.mdx",84563],"3d59b95f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(4362)]).then(n.bind(n,29483)),"@site/docs/demo-viewer/generic_keywords/enum.mdx",29483],"458927b5":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9905)]).then(n.bind(n,60653)),"@site/docs/demo-viewer/schema_conditionally/dependentSchemas.mdx",60653],"4de116f4":[()=>Promise.all([n.e(1869),n.e(2076),n.e(2726)]).then(n.bind(n,45871)),"@site/docs/demo-viewer/schema_composition/anyOf.mdx",45871],"4f68d1a6":[()=>Promise.all([n.e(1869),n.e(2076),n.e(983)]).then(n.bind(n,92284)),"@site/docs/demo-viewer/object/simpleObject.mdx",92284],"5bc82b60":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9873)]).then(n.bind(n,73611)),"@site/docs/demo-viewer/string/length.mdx",73611],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"5f0f252d":[()=>Promise.all([n.e(1869),n.e(2076),n.e(2701)]).then(n.bind(n,61739)),"@site/docs/demo-viewer/string/contentMediaType.mdx",61739],"6713985a":[()=>Promise.all([n.e(1869),n.e(2076),n.e(4655),n.e(7031)]).then(n.bind(n,33987)),"@site/docs/demo-viewer/custom/description.mdx",33987],"6c29c54d":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9681)]).then(n.bind(n,60381)),"@site/docs/demo-viewer/object/required.mdx",60381],"6f77199a":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9517)]).then(n.bind(n,81250)),"@site/docs/demo-viewer/schema_conditionally/if-then-else_multiple.mdx",81250],"720066b1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5687)]).then(n.bind(n,91759)),"@site/docs/demo-viewer/boolean.mdx",91759],"72a427b3":[()=>Promise.all([n.e(2076),n.e(5643)]).then(n.bind(n,93976)),"@site/docs/contributing.mdx",93976],"73e48de0":[()=>Promise.all([n.e(1869),n.e(2076),n.e(4893)]).then(n.bind(n,51007)),"@site/docs/demo-viewer/schema_composition/allOf.mdx",51007],"756e0924":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9823)]).then(n.bind(n,67825)),"@site/docs/demo-viewer/custom/unsolved_refs.mdx",67825],"7f4b4e53":[()=>n.e(8131).then(n.t.bind(n,48990,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-type-61b.json",48990],"808311b0":[()=>n.e(3120).then(n.t.bind(n,92074,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-api-af1.json",92074],84361440:[()=>Promise.all([n.e(1869),n.e(2076),n.e(5274),n.e(19)]).then(n.bind(n,77206)),"@site/src/pages/boxFileSchema.tsx",77206],"890ab00c":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9558)]).then(n.bind(n,36722)),"@site/docs/demo-viewer/refs/remoteFile.mdx",36722],"8e80fdd7":[()=>Promise.all([n.e(1869),n.e(2076),n.e(415)]).then(n.bind(n,4618)),"@site/docs/demo-viewer/numeric/integer.mdx",4618],"8f884ddd":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9233)]).then(n.bind(n,80583)),"@site/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.mdx",80583],"8f9be69b":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7808)]).then(n.bind(n,19353)),"@site/docs/demo-viewer/numeric/number.mdx",19353],"9028850b":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1309)]).then(n.bind(n,505)),"@site/docs/demo-viewer/array/tuples.mdx",505],"93cebb7f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8288)]).then(n.bind(n,39731)),"@site/docs/demo-viewer/refs/ref.mdx",39731],"9a079c62":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8142)]).then(n.bind(n,88270)),"@site/docs/demo-viewer/numeric/ranges.mdx",88270],"9a29e754":[()=>Promise.all([n.e(1869),n.e(2076),n.e(3693)]).then(n.bind(n,22479)),"@site/docs/demo-viewer/array/uniqueItems.mdx",22479],"9dfa20e1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5771)]).then(n.bind(n,73957)),"@site/docs/demo-viewer/string/contentEncodingWithContentMediaType.mdx",73957],a7456010:[()=>n.e(1235).then(n.t.bind(n,88552,19)),"@generated/docusaurus-plugin-content-pages/default/__plugin.json",88552],a78d2520:[()=>Promise.all([n.e(1869),n.e(2076),n.e(5150)]).then(n.bind(n,18453)),"@site/docs/demo-viewer/object/additionalProperties.mdx",18453],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,74532)),"@theme/DocVersionRoot",74532],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,11377)),"@theme/DocRoot",11377],a9655ce0:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2837)]).then(n.bind(n,90726)),"@site/docs/demo-viewer/array/length.mdx",90726],a998845c:[()=>Promise.all([n.e(1869),n.e(2076),n.e(7846)]).then(n.bind(n,9118)),"@site/docs/demo-viewer/string/format.mdx",9118],a9c29fe5:[()=>n.e(8109).then(n.t.bind(n,93573,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-demo-7f1.json",93573],aba21aa0:[()=>n.e(5742).then(n.t.bind(n,27093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",27093],af4dc41c:[()=>n.e(947).then(n.t.bind(n,3987,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-df8.json",3987],b34a7af0:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4655),n.e(5533)]).then(n.bind(n,52841)),"@site/docs/demo-viewer/generic_keywords/annotations.mdx",52841],bb96c887:[()=>Promise.all([n.e(1869),n.e(2076),n.e(5184)]).then(n.bind(n,37306)),"@site/docs/demo-viewer/custom/values.mdx",37306],bf17fbd2:[()=>Promise.all([n.e(1869),n.e(2076),n.e(7949)]).then(n.bind(n,65665)),"@site/docs/demo-viewer/string/contentSchema.mdx",65665],c09ae39f:[()=>n.e(8853).then(n.t.bind(n,88967,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-object-823.json",88967],c141421f:[()=>n.e(957).then(n.t.bind(n,40936,19)),"@generated/docusaurus-theme-search-algolia/default/__plugin.json",40936],c179f821:[()=>Promise.all([n.e(1869),n.e(2076),n.e(1110)]).then(n.bind(n,86387)),"@site/docs/quick-start.mdx",86387],c37467e1:[()=>Promise.all([n.e(1869),n.e(2076),n.e(7279)]).then(n.bind(n,40690)),"@site/docs/demo-viewer/type/singleType.mdx",40690],c3bb5603:[()=>Promise.all([n.e(2076),n.e(5887)]).then(n.bind(n,17712)),"@site/docs/api/config.mdx",17712],c4f5d8e4:[()=>Promise.all([n.e(1869),n.e(2634)]).then(n.bind(n,62468)),"@site/src/pages/index.js",62468],c7088344:[()=>Promise.all([n.e(1869),n.e(2076),n.e(6358)]).then(n.bind(n,84269)),"@site/docs/demo-viewer/generic_keywords/const.mdx",84269],ca1962f0:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4923)]).then(n.bind(n,44567)),"@site/docs/demo-viewer/array/items.mdx",44567],ca1c8d76:[()=>Promise.all([n.e(1869),n.e(2076),n.e(7368)]).then(n.bind(n,30262)),"@site/docs/demo-viewer/array/simple.mdx",30262],cbc552c0:[()=>Promise.all([n.e(1869),n.e(2076),n.e(8272)]).then(n.bind(n,41498)),"@site/docs/demo-viewer/string/pattern.mdx",41498],cd537aaf:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3263)]).then(n.bind(n,19584)),"@site/docs/demo-viewer/schema_composition/oneOf.mdx",19584],d4ff3b58:[()=>Promise.all([n.e(1869),n.e(2076),n.e(5271)]).then(n.bind(n,63411)),"@site/docs/api/JSONSchemaEditor.mdx",63411],d672ff73:[()=>Promise.all([n.e(1869),n.e(2076),n.e(36)]).then(n.bind(n,48192)),"@site/docs/demo-viewer/object/additionalProperties2.mdx",48192],dba41c5f:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2539)]).then(n.bind(n,13655)),"@site/docs/demo-viewer/object/size.mdx",13655],dc7a627d:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3829)]).then(n.bind(n,33839)),"@site/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.mdx",33839],e5bfc516:[()=>Promise.all([n.e(1869),n.e(2076),n.e(1116)]).then(n.bind(n,87059)),"@site/docs/demo-viewer/string/simple.mdx",87059],e6818ad2:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4648)]).then(n.bind(n,94530)),"@site/docs/demo-viewer/array/contains.mdx",94530],ea313555:[()=>Promise.all([n.e(1869),n.e(2076),n.e(1011)]).then(n.bind(n,86280)),"@site/docs/faq.mdx",86280],ec99730f:[()=>Promise.all([n.e(2076),n.e(2209)]).then(n.bind(n,52373)),"@site/docs/next-steps.mdx",52373],ee47f93d:[()=>n.e(4032).then(n.t.bind(n,28685,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-schema-composition-381.json",28685],ef99d285:[()=>Promise.all([n.e(1869),n.e(2076),n.e(1283)]).then(n.bind(n,4244)),"@site/docs/demo-viewer/object/unevaluatedProperties1.mdx",4244],f149d4e3:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3869)]).then(n.bind(n,43856)),"@site/docs/demo-viewer/object/propertyNames.mdx",43856],f37a108b:[()=>Promise.all([n.e(1869),n.e(2076),n.e(8263)]).then(n.bind(n,89890)),"@site/docs/demo-viewer/array/unevaluatedItems2.mdx",89890],f45d2610:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2869)]).then(n.bind(n,98827)),"@site/docs/demo-viewer/array/additionalItems1.mdx",98827],f595544d:[()=>Promise.all([n.e(1869),n.e(2076),n.e(6997)]).then(n.bind(n,59487)),"@site/docs/demo-viewer/array/minContainsAndMaxContains.mdx",59487],f746fa1f:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2778)]).then(n.bind(n,3122)),"@site/docs/demo-viewer/type/multipleType.mdx",3122],f7f7156a:[()=>Promise.all([n.e(1869),n.e(2076),n.e(9842)]).then(n.bind(n,80474)),"@site/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.mdx",80474],ffca4553:[()=>n.e(2610).then(n.t.bind(n,36049,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-numeric-450.json",36049]};var s=n(62540);function l(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(86921),u=n(53102);function d(e,t){if("*"===e)return o()({loading:l,loader:()=>n.e(2237).then(n.bind(n,82237)),modules:["@theme/NotFound"],webpack:()=>[82237],render(e,t){const n=e.default;return(0,s.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,{...t})})}});const r=a[`${e}-${t}`],d={},p=[],f=[],m=(0,c.A)(r);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),o().Map({loading:l,loader:d,modules:p,webpack:()=>f,render(t,n){const o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let i=o;const s=n.split(".");s.slice(0,-1).forEach((e=>{i=i[e]})),i[s[s.length-1]]=a}));const a=o.__comp;delete o.__comp;const i=o.__context;delete o.__context;const l=o.__props;return delete o.__props,(0,s.jsx)(u.W,{value:i,children:(0,s.jsx)(a,{...o,...l,...n})})}})}const p=[{path:"/docusaurus-json-schema-plugin/boxFileSchema",component:d("/docusaurus-json-schema-plugin/boxFileSchema","f25"),exact:!0},{path:"/docusaurus-json-schema-plugin/playground",component:d("/docusaurus-json-schema-plugin/playground","353"),exact:!0},{path:"/docusaurus-json-schema-plugin/search",component:d("/docusaurus-json-schema-plugin/search","36e"),exact:!0},{path:"/docusaurus-json-schema-plugin/docs",component:d("/docusaurus-json-schema-plugin/docs","37f"),routes:[{path:"/docusaurus-json-schema-plugin/docs",component:d("/docusaurus-json-schema-plugin/docs","246"),routes:[{path:"/docusaurus-json-schema-plugin/docs",component:d("/docusaurus-json-schema-plugin/docs","575"),routes:[{path:"/docusaurus-json-schema-plugin/docs/api",component:d("/docusaurus-json-schema-plugin/docs/api","53e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/api/config",component:d("/docusaurus-json-schema-plugin/docs/api/config","58a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor",component:d("/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor","15f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer",component:d("/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer","48b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/api/MonacoEditor",component:d("/docusaurus-json-schema-plugin/docs/api/MonacoEditor","0c8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-array",component:d("/docusaurus-json-schema-plugin/docs/category/-array","fe0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations",component:d("/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations","56f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-generic-keywords",component:d("/docusaurus-json-schema-plugin/docs/category/-generic-keywords","a5c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-numeric",component:d("/docusaurus-json-schema-plugin/docs/category/-numeric","2d1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-object",component:d("/docusaurus-json-schema-plugin/docs/category/-object","b53"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-references",component:d("/docusaurus-json-schema-plugin/docs/category/-references","f27"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-schema-composition",component:d("/docusaurus-json-schema-plugin/docs/category/-schema-composition","b88"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally",component:d("/docusaurus-json-schema-plugin/docs/category/-schema-conditionally","1bf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-string",component:d("/docusaurus-json-schema-plugin/docs/category/-string","56a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-type",component:d("/docusaurus-json-schema-plugin/docs/category/-type","bde"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/contributing",component:d("/docusaurus-json-schema-plugin/docs/contributing","68d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo",component:d("/docusaurus-json-schema-plugin/docs/demo","576"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1","874"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2","e9f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains","ec1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/items","f60"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/length","211"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains","0af"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple","19f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples","408"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1","eb8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2","a1c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems","2ce"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/boolean","21d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description","c98"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs","129"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values","070"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations","fc3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const","c56"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum","1e6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/null",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/null","79e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer","4bc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf","54e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number","34d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges","b09"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties","e5f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2","f08"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties","66d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties","071"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties","2a2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames","abf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/required","06e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject","6bb"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/size","8b4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1","f04"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2","08e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile","1f6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref","5ab"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile","ae8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf","269"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf","4bd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not","1c7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf","82b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired","540"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas","03c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired","104"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional","557"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas","c6f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else","9c3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple","fb2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding","e86"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType","e83"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType","3a3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema","7b3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/format","4a7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/length","1c6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern","dc1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple","53f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType","cfb"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType","65b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo/viewer",component:d("/docusaurus-json-schema-plugin/docs/demo/viewer","a86"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/faq",component:d("/docusaurus-json-schema-plugin/docs/faq","11d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/next-steps",component:d("/docusaurus-json-schema-plugin/docs/next-steps","aac"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/quick-start",component:d("/docusaurus-json-schema-plugin/docs/quick-start","0de"),exact:!0,sidebar:"tutorialSidebar"}]}]}]},{path:"/docusaurus-json-schema-plugin/",component:d("/docusaurus-json-schema-plugin/","17b"),exact:!0},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>i});var r=n(63696),o=n(62540);const a=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,o.jsx)(a.Provider,{value:n,children:t})}},38536:(e,t,n)=>{"use strict";var r=n(63696),o=n(5338),a=n(80545),i=n(54625),s=n(4784),l=n(38193);const c=[n(10119),n(46491),n(76294),n(51043)];var u=n(35947),d=n(56347),p=n(22831),f=n(62540);function m(e){let{children:t}=e;return(0,f.jsx)(f.Fragment,{children:t})}var h=n(5260),g=n(44586),y=n(86025),b=n(6342),v=n(69024),w=n(32131),S=n(14090),x=n(2967),k=n(70440),j=n(41463);function _(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,g.A)(),r=(0,w.o)(),o=n[e].htmlLang,a=e=>e.replace("-","_");return(0,f.jsxs)(h.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:a(o)}),Object.values(n).filter((e=>o!==e.htmlLang)).map((e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:a(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function E(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,g.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,g.A)(),{pathname:r}=(0,d.zy)();return e+(0,k.Ks)((0,y.Ay)(r),{trailingSlash:n,baseUrl:t})}(),o=t?`${n}${t}`:r;return(0,f.jsxs)(h.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:o}),(0,f.jsx)("link",{rel:"canonical",href:o})]})}function O(){const{i18n:{currentLocale:e}}=(0,g.A)(),{metadata:t,image:n}=(0,b.p)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(h.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:S.w})]}),n&&(0,f.jsx)(v.be,{image:n}),(0,f.jsx)(E,{}),(0,f.jsx)(_,{}),(0,f.jsx)(j.A,{tag:x.C,locale:e}),(0,f.jsx)(h.A,{children:t.map(((e,t)=>(0,f.jsx)("meta",{...e},t)))})]})}const P=new Map;var C=n(6125),A=n(26988),T=n(205);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const o=c.map((t=>{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>o.forEach((e=>e?.()))}const N=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,T.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,o=t.hash===n.hash,a=t.search===n.search;if(r&&o&&!a)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),I("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function L(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,p.u)(u.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class R extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.A.canUseDOM?I("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=I("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),L(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,f.jsx)(N,{previousLocation:this.previousLocation,location:t,children:(0,f.jsx)(d.qh,{location:t,render:()=>e})})}}const D=R,M="__docusaurus-base-url-issue-banner-suggestion-container";function F(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '__docusaurus-base-url-issue-banner-container';\n var bannerHtml = ${JSON.stringify(function(e){return`\n<div id="__docusaurus-base-url-issue-banner" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseUrl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">${e}</span> ${"/"===e?" (default value)":""}</p>\n <p>We suggest trying baseUrl = <span id="${M}" style="font-weight: bold; color: green;"></span></p>\n</div>\n`}(e)).replace(/</g,"\\<")};\n bannerContainer.innerHTML = bannerHtml;\n document.body.prepend(bannerContainer);\n var suggestionContainer = document.getElementById('${M}');\n var actualHomePagePath = window.location.pathname;\n var suggestedBaseUrl = actualHomePagePath.substr(-1) === '/'\n ? actualHomePagePath\n : actualHomePagePath + '/';\n suggestionContainer.innerHTML = suggestedBaseUrl;\n}\n`}function B(){const{siteConfig:{baseUrl:e}}=(0,g.A)();return(0,f.jsx)(f.Fragment,{children:!l.A.canUseDOM&&(0,f.jsx)(h.A,{children:(0,f.jsx)("script",{children:F(e)})})})}function z(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,g.A)(),{pathname:n}=(0,d.zy)();return t&&n===e?(0,f.jsx)(B,{}):null}function U(){const{siteConfig:{favicon:e,title:t,noIndex:n},i18n:{currentLocale:r,localeConfigs:o}}=(0,g.A)(),a=(0,y.Ay)(e),{htmlLang:i,direction:s}=o[r];return(0,f.jsxs)(h.A,{children:[(0,f.jsx)("html",{lang:i,dir:s}),(0,f.jsx)("title",{children:t}),(0,f.jsx)("meta",{property:"og:title",content:t}),(0,f.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),n&&(0,f.jsx)("meta",{name:"robots",content:"noindex, nofollow"}),e&&(0,f.jsx)("link",{rel:"icon",href:a})]})}var $=n(67489),q=n(92303);function H(){const e=(0,q.A)();return(0,f.jsx)(h.A,{children:(0,f.jsx)("html",{"data-has-hydrated":e})})}const V=(0,p.v)(u.A);function W(){const e=function(e){if(P.has(e.pathname))return{...e,pathname:P.get(e.pathname)};if((0,p.u)(u.A,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return P.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return P.set(e.pathname,t),{...e,pathname:t}}((0,d.zy)());return(0,f.jsx)(D,{location:e,children:V})}function K(){return(0,f.jsx)($.default,{children:(0,f.jsx)(A.l,{children:(0,f.jsxs)(C.x,{children:[(0,f.jsxs)(m,{children:[(0,f.jsx)(U,{}),(0,f.jsx)(O,{}),(0,f.jsx)(z,{}),(0,f.jsx)(W,{})]}),(0,f.jsx)(H,{})]})})})}var G=n(84054);const Q=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;o?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Y=n(86921);const Z=new Set,J=new Set,X=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ee={prefetch:e=>{if(!(e=>!X()&&!J.has(e)&&!Z.has(e))(e))return!1;Z.add(e);const t=(0,p.u)(u.A,e).flatMap((e=>{return t=e.route.path,Object.entries(G).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Y.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Q(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!X()&&!J.has(e))(e)&&(J.add(e),L(e))},te=Object.freeze(ee);function ne(e){let{children:t}=e;return"hash"===s.default.future.experimental_router?(0,f.jsx)(i.I9,{children:t}):(0,f.jsx)(i.Kd,{children:t})}const re=Boolean(!0);if(l.A.canUseDOM){window.docusaurus=te;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(a.vd,{children:(0,f.jsx)(ne,{children:(0,f.jsx)(K,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},i=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(re)window.docusaurusRoot=o.hydrateRoot(e,t,{onRecoverableError:n});else{const r=o.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};L(window.location.pathname).then((()=>{(0,r.startTransition)(i)}))}},26988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(63696),o=n(4784);const a=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docusaurus-json-schema-plugin/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docusaurus-json-schema-plugin/docs","mainDocId":"quick-start","docs":[{"id":"api/config","path":"/docusaurus-json-schema-plugin/docs/api/config","sidebar":"tutorialSidebar"},{"id":"api/JSONSchemaEditor","path":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor","sidebar":"tutorialSidebar"},{"id":"api/JSONSchemaViewer","path":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer","sidebar":"tutorialSidebar"},{"id":"api/MonacoEditor","path":"/docusaurus-json-schema-plugin/docs/api/MonacoEditor","sidebar":"tutorialSidebar"},{"id":"contributing","path":"/docusaurus-json-schema-plugin/docs/contributing","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/additionalItems1","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/additionalItems2","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/contains","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/items","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/length","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/minContainsAndMaxContains","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/simple","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/tuples","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/unevaluatedItems1","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/unevaluatedItems2","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/uniqueItems","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems","sidebar":"tutorialSidebar"},{"id":"demo-viewer/boolean","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean","sidebar":"tutorialSidebar"},{"id":"demo-viewer/custom/description","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description","sidebar":"tutorialSidebar"},{"id":"demo-viewer/custom/unsolved_refs","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs","sidebar":"tutorialSidebar"},{"id":"demo-viewer/custom/values","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values","sidebar":"tutorialSidebar"},{"id":"demo-viewer/generic_keywords/annotations","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations","sidebar":"tutorialSidebar"},{"id":"demo-viewer/generic_keywords/const","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const","sidebar":"tutorialSidebar"},{"id":"demo-viewer/generic_keywords/enum","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum","sidebar":"tutorialSidebar"},{"id":"demo-viewer/null","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/null","sidebar":"tutorialSidebar"},{"id":"demo-viewer/numeric/integer","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer","sidebar":"tutorialSidebar"},{"id":"demo-viewer/numeric/multipleOf","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf","sidebar":"tutorialSidebar"},{"id":"demo-viewer/numeric/number","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number","sidebar":"tutorialSidebar"},{"id":"demo-viewer/numeric/ranges","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/additionalProperties","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/additionalProperties2","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/additionalPropertiesWithPatternProperties","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/patternProperties","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/properties","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/propertyNames","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/required","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/simpleObject","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/size","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/unevaluatedProperties1","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/unevaluatedProperties2","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2","sidebar":"tutorialSidebar"},{"id":"demo-viewer/refs/localFile","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile","sidebar":"tutorialSidebar"},{"id":"demo-viewer/refs/ref","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref","sidebar":"tutorialSidebar"},{"id":"demo-viewer/refs/remoteFile","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_composition/allOf","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_composition/anyOf","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_composition/not","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_composition/oneOf","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependencies_dependentRequired","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependencies_dependentSchemas","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependentRequired","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependentRequired_bidirectional","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependentSchemas","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/if-then-else","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/if-then-else_multiple","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/contentEncoding","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/contentEncodingWithContentMediaType","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/contentMediaType","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/contentSchema","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/format","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/length","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/pattern","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/simple","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple","sidebar":"tutorialSidebar"},{"id":"demo-viewer/type/multipleType","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType","sidebar":"tutorialSidebar"},{"id":"demo-viewer/type/singleType","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType","sidebar":"tutorialSidebar"},{"id":"faq","path":"/docusaurus-json-schema-plugin/docs/faq","sidebar":"tutorialSidebar"},{"id":"next-steps","path":"/docusaurus-json-schema-plugin/docs/next-steps","sidebar":"tutorialSidebar"},{"id":"quick-start","path":"/docusaurus-json-schema-plugin/docs/quick-start","sidebar":"tutorialSidebar"},{"id":"/demo","path":"/docusaurus-json-schema-plugin/docs/demo","sidebar":"tutorialSidebar"},{"id":"/demo/viewer","path":"/docusaurus-json-schema-plugin/docs/demo/viewer","sidebar":"tutorialSidebar"},{"id":"/category/-array","path":"/docusaurus-json-schema-plugin/docs/category/-array","sidebar":"tutorialSidebar"},{"id":"/category/\ufe0f-customizations","path":"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations","sidebar":"tutorialSidebar"},{"id":"/category/-generic-keywords","path":"/docusaurus-json-schema-plugin/docs/category/-generic-keywords","sidebar":"tutorialSidebar"},{"id":"/category/-numeric","path":"/docusaurus-json-schema-plugin/docs/category/-numeric","sidebar":"tutorialSidebar"},{"id":"/category/-object","path":"/docusaurus-json-schema-plugin/docs/category/-object","sidebar":"tutorialSidebar"},{"id":"/category/-references","path":"/docusaurus-json-schema-plugin/docs/category/-references","sidebar":"tutorialSidebar"},{"id":"/category/-schema-composition","path":"/docusaurus-json-schema-plugin/docs/category/-schema-composition","sidebar":"tutorialSidebar"},{"id":"/category/-schema-conditionally","path":"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally","sidebar":"tutorialSidebar"},{"id":"/category/-string","path":"/docusaurus-json-schema-plugin/docs/category/-string","sidebar":"tutorialSidebar"},{"id":"/category/-type","path":"/docusaurus-json-schema-plugin/docs/category/-type","sidebar":"tutorialSidebar"},{"id":"/api","path":"/docusaurus-json-schema-plugin/docs/api","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/docusaurus-json-schema-plugin/docs/quick-start","label":"quick-start"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(22654);const l=JSON.parse('{"docusaurusVersion":"3.6.3","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.6.3"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.6.3"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.6.3"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.6.3"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.6.3"},"resolve-react":{"type":"local"},"docusaurus-json-schema-plugin":{"type":"package","name":"docusaurus-json-schema-plugin","version":"0.0.0-development"}}}');var c=n(62540);const u={siteConfig:o.default,siteMetadata:l,globalData:a,i18n:i,codeTranslations:s},d=r.createContext(u);function p(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},67489:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(63696),o=n(38193),a=n(5260),i=n(70440),s=n(41957),l=n(53102),c=n(62540);function u(e){let{error:t,tryAgain:n}=e;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(d,{error:t})]})}function d(e){let{error:t}=e;const n=(0,i.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){let{children:t}=e;return(0,c.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function f(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)(p,{children:(0,c.jsxs)(h,{fallback:()=>(0,c.jsx)(u,{error:t,tryAgain:n}),children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(s.A,{children:(0,c.jsx)(u,{error:t,tryAgain:n})})]})})}const m=e=>(0,c.jsx)(f,{...e});class h extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??m)(e)}return e??null}}},38193:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(63696);var r=n(80545),o=n(62540);function a(e){return(0,o.jsx)(r.mg,{...e})}},28774:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(63696),o=n(54625),a=n(70440),i=n(44586),s=n(16654),l=n(38193),c=n(63427),u=n(86025),d=n(62540);function p(e,t){let{isNavLink:n,to:p,href:f,activeClassName:m,isActive:h,"data-noBrokenLinkCheck":g,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:v}=(0,i.A)(),{trailingSlash:w,baseUrl:S}=v,x=v.future.experimental_router,{withBaseUrl:k}=(0,u.hH)(),j=(0,c.A)(),_=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>_.current));const E=p||f;const O=(0,s.A)(E),P=E?.replace("pathname://","");let C=void 0!==P?(A=P,y&&(e=>e.startsWith("/"))(A)?k(A):A):void 0;var A;"hash"===x&&C?.startsWith("./")&&(C=C?.slice(1)),C&&O&&(C=(0,a.Ks)(C,{trailingSlash:w,baseUrl:S}));const T=(0,r.useRef)(!1),I=n?o.k2:o.N_,N=l.A.canUseIntersectionObserver,L=(0,r.useRef)(),R=()=>{T.current||null==C||(window.docusaurus.preload(C),T.current=!0)};(0,r.useEffect)((()=>(!N&&O&&l.A.canUseDOM&&null!=C&&window.docusaurus.prefetch(C),()=>{N&&L.current&&L.current.disconnect()})),[L,C,N,O]);const D=C?.startsWith("#")??!1,M=!b.target||"_self"===b.target,F=!C||!O||!M||D&&"hash"!==x;g||!D&&F||j.collectLink(C),b.id&&j.collectAnchor(b.id);const B={};return F?(0,d.jsx)("a",{ref:_,href:C,...E&&!O&&{target:"_blank",rel:"noopener noreferrer"},...b,...B}):(0,d.jsx)(I,{...b,onMouseEnter:R,onTouchStart:R,innerRef:e=>{_.current=e,N&&e&&O&&(L.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(L.current.unobserve(e),L.current.disconnect(),null!=C&&window.docusaurus.prefetch(C))}))})),L.current.observe(e))},to:C,...n&&{isActive:h,activeClassName:m},...B})}const f=r.forwardRef(p)},21312:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c,translate:()=>l});var r=n(63696),o=n(62540);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(22654);function s(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return a(s({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal <Translate> children",t),new Error("The Docusaurus <Translate> component only accept simple string values");const i=s({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(i,r)})}},17065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},16654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},86025:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,hH:()=>i});var r=n(63696),o=n(44586),a=n(16654);function i(){const{siteConfig:e}=(0,o.A)(),{baseUrl:t,url:n}=e,i=e.future.experimental_router,s=(0,r.useCallback)(((e,r)=>function(e){let{siteUrl:t,baseUrl:n,url:r,options:{forcePrependBaseUrl:o=!1,absolute:i=!1}={},router:s}=e;if(!r||r.startsWith("#")||(0,a.z)(r))return r;if("hash"===s)return r.startsWith("/")?`.${r}`:`./${r}`;if(o)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;const l=r.startsWith(n)?r:n+r.replace(/^\//,"");return i?t+l:l}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})),[n,t,i]);return{withBaseUrl:s}}function s(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},63427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(63696);n(62540);const o=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),a=()=>(0,r.useContext)(o);function i(){return a()}},44586:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(63696),o=n(26988);function a(){return(0,r.useContext)(o.o)}},92303:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(63696),o=n(6125);function a(){return(0,r.useContext)(o.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(63696);const o=n(38193).A.canUseDOM?r.useLayoutEffect:r.useEffect},86921:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function o(e){const t={};return function e(n,o){Object.entries(n).forEach((n=>{let[a,i]=n;const s=o?`${o}.${a}`:a;r(i)?e(i,s):t[s]=i}))}(e),t}},53102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>a});var r=n(63696),o=n(62540);const a=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(a),s=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,o.jsx)(a.Provider,{value:s,children:t})}},53886:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>g,XK:()=>v,g1:()=>b});var r=n(63696),o=n(44070),a=n(17065),i=n(6342),s=n(70679),l=n(89532),c=n(62540);const u=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,s.Wf)(u(e),{persistence:t}).set(n)},read:(e,t)=>(0,s.Wf)(u(e),{persistence:t}).get(),clear:(e,t)=>{(0,s.Wf)(u(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const f=r.createContext(null);function m(){const e=(0,o.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,s]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function o(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,o(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=m();return(0,c.jsx)(f.Provider,{value:n,children:t})}function g(e){let{children:t}=e;return(0,c.jsx)(h,{children:t})}function y(){const e=(0,r.useContext)(f);if(!e)throw new l.dV("DocsPreferredVersionContextProvider");return e}function b(e){void 0===e&&(e=a.W);const t=(0,o.ht)(e),[n,i]=y(),{preferredVersionName:s}=n[e];return{preferredVersion:t.versions.find((e=>e.name===s))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function v(){const e=(0,o.Gy)(),[t]=y();function n(n){const r=e[n],{preferredVersionName:o}=t[n];return r.versions.find((e=>e.name===o))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},82565:(e,t,n)=>{"use strict";n.d(t,{k:()=>a,v:()=>i});var r=n(44070),o=n(53886);function a(e,t){return`docs-${e}-${t}`}function i(){const e=(0,r.Gy)(),t=(0,r.gk)(),n=(0,o.XK)();return[...Object.keys(e).map((function(r){const o=t?.activePlugin.pluginId===r?t.activeVersion:void 0,i=n[r],s=e[r].versions.find((e=>e.isLast));return a(r,(o??i??s).name)}))]}},60609:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,t:()=>c});var r=n(63696),o=n(89532),a=n(62540);const i=Symbol("EmptyContext"),s=r.createContext(i);function l(e){let{children:t,name:n,items:o}=e;const i=(0,r.useMemo)((()=>n&&o?{name:n,items:o}:null),[n,o]);return(0,a.jsx)(s.Provider,{value:i,children:t})}function c(){const e=(0,r.useContext)(s);if(e===i)throw new o.dV("DocsSidebarProvider");return e}},26972:(e,t,n)=>{"use strict";n.d(t,{$S:()=>m,B5:()=>_,Nr:()=>f,OF:()=>S,QB:()=>j,Vd:()=>x,Y:()=>v,cC:()=>p,d1:()=>E,fW:()=>k,w8:()=>y});var r=n(63696),o=n(56347),a=n(22831),i=n(44070),s=n(99169),l=n(31682),c=n(53886),u=n(23025),d=n(60609);function p(e){const t=(0,u.r)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function f(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=f(t);if(e)return e}}(e):void 0:e.href}function m(){const{pathname:e}=(0,o.zy)(),t=(0,d.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const h=(e,t)=>void 0!==e&&(0,s.ys)(e,t),g=(e,t)=>e.some((e=>y(e,t)));function y(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||g(e.items,t))}function b(e,t){switch(e.type){case"category":return y(e,t)||e.items.some((e=>b(e,t)));case"link":return!e.unlisted||y(e,t);default:return!0}}function v(e,t){return(0,r.useMemo)((()=>e.filter((e=>b(e,t)))),[e,t])}function w(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const o=[];return function e(t){for(const a of t)if("category"===a.type&&((0,s.ys)(a.href,n)||e(a.items))||"link"===a.type&&(0,s.ys)(a.href,n)){return r&&"category"!==a.type||o.unshift(a),!0}return!1}(t),o}function S(){const e=(0,d.t)(),{pathname:t}=(0,o.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?w({sidebarItems:e.items,pathname:t}):null}function x(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,c.g1)(e),o=(0,i.r7)(e);return(0,r.useMemo)((()=>(0,l.sb)([t,n,o].filter(Boolean))),[t,n,o])}function k(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function j(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,l.sb)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function _(e){let{route:t}=e;const n=(0,o.zy)(),r=(0,u.r)(),i=t.routes,s=i.find((e=>(0,o.B6)(n.pathname,e)));if(!s)return null;const l=s.sidebar,c=l?r.docsSidebars[l]:void 0;return{docElement:(0,a.v)(i),sidebarName:l,sidebarItems:c}}function E(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!f(e)))}},23025:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,r:()=>l});var r=n(63696),o=n(89532),a=n(62540);const i=r.createContext(null);function s(e){let{children:t,version:n}=e;return(0,a.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(null===e)throw new o.dV("DocsVersionProvider");return e}},44070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>y,vT:()=>f,gk:()=>m,Gy:()=>d,HW:()=>b,ht:()=>p,r7:()=>g,jh:()=>h});var r=n(56347),o=n(44586),a=n(17065);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,o.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const s=e=>e.versions.find((e=>e.isLast));function l(e,t){return[...e.versions].sort(((e,t)=>e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0)).find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}function c(e,t){const n=l(e,t),o=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}}const u={},d=()=>i("docusaurus-plugin-content-docs")??u,p=e=>{try{return function(e,t,n){void 0===t&&(t=a.W),void 0===n&&(n={});const r=i(e),o=r?.[t];if(!o&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return o}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":` (pluginId=${e}`),{cause:t})}};function f(e){void 0===e&&(e={});const t=d(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const o=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return a}(t,n,e)}function m(e){void 0===e&&(e={});const t=f(e),{pathname:n}=(0,r.zy)();if(!t)return;return{activePlugin:t,activeVersion:l(t.pluginData,n)}}function h(e){return p(e).versions}function g(e){const t=p(e);return s(t)}function y(e){const t=p(e),{pathname:n}=(0,r.zy)();return c(t,n)}function b(e){const t=p(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=s(e);return{latestDocSuggestion:c(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},76294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(5947),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{o().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},46491:(e,t,n)=>{"use strict";var r=n(71765),o=n(4784);!function(e){const{themeConfig:{prism:t}}=o.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(19700),n(89863)(`./prism-${e}`)})),n(70479),delete globalThis.Prism}(r.My)},51107:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(63696);var r=n(34164),o=n(21312),a=n(6342),i=n(28774),s=n(63427);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=n(62540);function u(e){let{as:t,id:n,...u}=e;const d=(0,s.A)(),{navbar:{hideOnScroll:p}}=(0,a.p)();if("h1"===t||!n)return(0,c.jsx)(t,{...u,id:void 0});d.collectAnchor(n);const f=(0,o.translate)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:n});return(0,c.jsxs)(t,{...u,className:(0,r.A)("anchor",p?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,u.className),id:n,children:[u.children,(0,c.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":f,title:f,children:"\u200b"})]})}},43186:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(63696);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=n(62540);function a(e){let{width:t=13.5,height:n=13.5}=e;return(0,o.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},41957:(e,t,n)=>{"use strict";n.d(t,{A:()=>Et});var r=n(63696),o=n(34164),a=n(67489),i=n(69024),s=n(56347),l=n(21312),c=n(75062),u=n(62540);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,s.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)}),[]);return(0,c.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}const m=(0,l.translate)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){const t=e.children??m,{containerRef:n,onClick:r}=f();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var g=n(17559),y=n(14090);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(h,{className:b.skipToContent})}var w=n(6342),S=n(65041);function x(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:o=1.2,className:a,...i}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,u.jsx)("g",{stroke:r,strokeWidth:o,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const k={closeButton:"closeButton_CVFx"};function j(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,l.translate)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.A)("clean-btn close",k.closeButton,e.className),children:(0,u.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const _={content:"content_knG7"};function E(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,o.A)(_.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const O={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function P(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,S.M)();if(!t)return null;const{backgroundColor:r,textColor:o,isCloseable:a}=e;return(0,u.jsxs)("div",{className:O.announcementBar,style:{backgroundColor:r,color:o},role:"banner",children:[a&&(0,u.jsx)("div",{className:O.announcementBarPlaceholder}),(0,u.jsx)(E,{className:O.announcementBarContent}),a&&(0,u.jsx)(j,{onClick:n,className:O.announcementBarClose})]})}var C=n(22069),A=n(23104);var T=n(89532),I=n(75600);const N=r.createContext(null);function L(e){let{children:t}=e;const n=function(){const e=(0,C.M)(),t=(0,I.YL)(),[n,o]=(0,r.useState)(!1),a=null!==t.component,i=(0,T.ZC)(a);return(0,r.useEffect)((()=>{a&&!i&&o(!0)}),[a,i]),(0,r.useEffect)((()=>{a?e.shown||o(!0):o(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[n,o]),[n])}();return(0,u.jsx)(N.Provider,{value:n,children:t})}function R(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function D(){const e=(0,r.useContext)(N);if(!e)throw new T.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,o=(0,r.useCallback)((()=>n(!1)),[n]),a=(0,I.YL)();return(0,r.useMemo)((()=>({shown:t,hide:o,content:R(a)})),[o,a,t])}function M(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:a}=D();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var F=n(95293),B=n(92303);function z(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function U(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const $={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function q(e){let{className:t,buttonClassName:n,value:r,onChange:a}=e;const i=(0,B.A)(),s=(0,l.translate)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.translate)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.translate)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,o.A)($.toggle,t),children:(0,u.jsxs)("button",{className:(0,o.A)("clean-btn",$.toggleButton,!i&&$.toggleButtonDisabled,n),type:"button",onClick:()=>a("dark"===r?"light":"dark"),disabled:!i,title:s,"aria-label":s,"aria-live":"polite","aria-pressed":"dark"===r?"true":"false",children:[(0,u.jsx)(z,{className:(0,o.A)($.toggleIcon,$.lightToggleIcon)}),(0,u.jsx)(U,{className:(0,o.A)($.toggleIcon,$.darkToggleIcon)})]})})}const H=r.memo(q),V={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function W(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:o,setColorMode:a}=(0,F.G)();return r?null:(0,u.jsx)(H,{className:t,buttonClassName:"dark"===n?V.darkNavbarColorModeToggle:void 0,value:o,onChange:a})}var K=n(23465);function G(){return(0,u.jsx)(K.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Q(){const e=(0,C.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.translate)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(G,{}),(0,u.jsx)(W,{className:"margin-right--md"}),(0,u.jsx)(Q,{})]})}var Z=n(28774),J=n(86025),X=n(16654),ee=n(91252),te=n(43186);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:o,label:a,html:i,isDropdownLink:s,prependBaseUrlToHref:l,...c}=e;const d=(0,J.Ay)(r),p=(0,J.Ay)(t),f=(0,J.Ay)(o,{forcePrependBaseUrl:!0}),m=a&&o&&!(0,X.A)(o),h=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[a,m&&(0,u.jsx)(te.A,{...s&&{width:12,height:12}})]})};return o?(0,u.jsx)(Z.A,{href:l?f:o,...c,...h}):(0,u.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?(0,ee.G)(n,t.pathname):t.pathname.startsWith(p)},...c,...h})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const a=(0,u.jsx)(ne,{className:(0,o.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:a}):a}function oe(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ne,{className:(0,o.A)("menu__link",t),...r})})}function ae(e){let{mobile:t=!1,position:n,...r}=e;const o=t?oe:re;return(0,u.jsx)(o,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(41422),se=n(99169),le=n(44586);const ce="dropdownNavbarItemMobile_S0Fm";function ue(e,t){return e.some((e=>function(e,t){return!!(0,se.ys)(e.to,t)||!!(0,ee.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:a,onClick:i,...s}=e;const l=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),(0,u.jsxs)("div",{ref:l,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(ne,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:s.to?void 0:"#",className:(0,o.A)("navbar__link",a),...s,onClick:s.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:s.children??s.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Fe,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function pe(e){let{items:t,className:n,position:a,onClick:i,...l}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,le.A)(),{pathname:t}=(0,s.zy)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:p,toggleCollapsed:f,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[c,d,m]),(0,u.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":p}),children:[(0,u.jsx)(ne,{role:"button",className:(0,o.A)(ce,"menu__link menu__link--sublist menu__link--sublist-caret",n),...l,onClick:e=>{e.preventDefault(),f()},children:l.children??l.label}),(0,u.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:p,children:t.map(((e,t)=>(0,r.createElement)(Fe,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function fe(e){let{mobile:t=!1,...n}=e;const r=t?pe:de;return(0,u.jsx)(r,{...n})}var me=n(32131);function he(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const ge="iconLanguage_nlXk";var ye=n(40961),be=n(55600),ve=n(5260),we=n(24255),Se=n(51062),xe=n(2967),ke=n(82565);function je(){return[`language:${(0,le.A)().i18n.currentLocale}`,function(){const e=(0,ke.v)();return[xe.C,...e]}().map((e=>`docusaurus_tag:${e}`))]}const _e={button:{buttonText:(0,l.translate)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,l.translate)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,l.translate)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,l.translate)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,l.translate)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,l.translate)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,l.translate)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,l.translate)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,l.translate)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,l.translate)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,l.translate)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,l.translate)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,l.translate)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,l.translate)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,l.translate)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,l.translate)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,l.translate)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,l.translate)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,l.translate)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,l.translate)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,l.translate)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,l.translate)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};let Ee=null;function Oe(e){let{hit:t,children:n}=e;return(0,u.jsx)(Z.A,{to:t.url,children:n})}function Pe(e){let{state:t,onClose:n}=e;const r=(0,we.w)();return(0,u.jsx)(Z.A,{to:r(t.query),onClick:n,children:(0,u.jsx)(l.default,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits},children:"See all {count} results"})})}function Ce(e){let{contextualSearch:t,externalUrlRegex:o,...a}=e;const{siteMetadata:i}=(0,le.A)(),l=(0,Se.C)(),c=je(),d=a.searchParameters?.facetFilters??[],p=t?function(e,t){const n=e=>"string"==typeof e?[e]:e;return[...n(e),...n(t)]}(c,d):d,f={...a.searchParameters,facetFilters:p},m=(0,s.W6)(),h=(0,r.useRef)(null),g=(0,r.useRef)(null),[y,b]=(0,r.useState)(!1),[v,w]=(0,r.useState)(void 0),S=(0,r.useCallback)((()=>Ee?Promise.resolve():Promise.all([n.e(8158).then(n.bind(n,48158)),Promise.all([n.e(1869),n.e(8913)]).then(n.bind(n,58913)),Promise.all([n.e(1869),n.e(416)]).then(n.bind(n,90416))]).then((e=>{let[{DocSearchModal:t}]=e;Ee=t}))),[]),x=(0,r.useCallback)((()=>{if(!h.current){const e=document.createElement("div");h.current=e,document.body.insertBefore(e,document.body.firstChild)}}),[]),k=(0,r.useCallback)((()=>{x(),S().then((()=>b(!0)))}),[S,x]),j=(0,r.useCallback)((()=>{b(!1),g.current?.focus()}),[]),_=(0,r.useCallback)((e=>{"f"===e.key&&(e.metaKey||e.ctrlKey)||(e.preventDefault(),w(e.key),k())}),[k]),E=(0,r.useRef)({navigate(e){let{itemUrl:t}=e;(0,ee.G)(o,t)?window.location.href=t:m.push(t)}}).current,O=(0,r.useRef)((e=>a.transformItems?a.transformItems(e):e.map((e=>({...e,url:l(e.url)}))))).current,P=(0,r.useMemo)((()=>e=>(0,u.jsx)(Pe,{...e,onClose:j})),[j]),C=(0,r.useCallback)((e=>(e.addAlgoliaAgent("docusaurus",i.docusaurusVersion),e)),[i.docusaurusVersion]);return(0,be.E8)({isOpen:y,onOpen:k,onClose:j,onInput:_,searchButtonRef:g}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ve.A,{children:(0,u.jsx)("link",{rel:"preconnect",href:`https://${a.appId}-dsn.algolia.net`,crossOrigin:"anonymous"})}),(0,u.jsx)(be.Bc,{onTouchStart:S,onFocus:S,onMouseOver:S,onClick:k,ref:g,translations:_e.button}),y&&Ee&&h.current&&(0,ye.createPortal)((0,u.jsx)(Ee,{onClose:j,initialScrollY:window.scrollY,initialQuery:v,navigator:E,transformItems:O,hitComponent:Oe,transformSearchClient:C,...a.searchPagePath&&{resultsFooterComponent:P},...a,searchParameters:f,placeholder:_e.placeholder,translations:_e.modal}),h.current)]})}function Ae(){const{siteConfig:e}=(0,le.A)();return(0,u.jsx)(Ce,{...e.themeConfig.algolia})}const Te={navbarSearchContainer:"navbarSearchContainer_Bca1"};function Ie(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,o.A)(n,Te.navbarSearchContainer),children:t})}var Ne=n(44070),Le=n(26972);var Re=n(53886);function De(e,t){return t.alternateDocVersions[e.name]??function(e){return e.docs.find((t=>t.id===e.mainDocId))}(e)}const Me={default:ae,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:o="",...a}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,le.A)(),p=(0,me.o)(),{search:f,hash:m}=(0,s.zy)(),h=[...n,...c.map((e=>{const n=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${m}${o}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],g=t?(0,l.translate)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,u.jsx)(fe,{...a,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(he,{className:ge}),g]}),items:h})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(Ie,{className:n,children:(0,u.jsx)(Ae,{})})},dropdown:fe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:a=!1}=e;const i=a?"li":"div";return(0,u.jsx)(i,{className:(0,o.A)({navbar__item:!r&&!a,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,Ne.zK)(r),i=(0,Le.QB)(t,r),s=a?.path===i?.path;return null===i||i.unlisted&&!s?null:(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>s||!!a?.sidebar&&a.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,Ne.zK)(r),i=(0,Le.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>a?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...o}=e;const a=(0,Le.Vd)(r)[0],i=t??a.label,s=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(a).path;return(0,u.jsx)(ae,{...o,label:i,to:s})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:o,dropdownItemsAfter:a,...i}=e;const{search:c,hash:d}=(0,s.zy)(),p=(0,Ne.zK)(n),f=(0,Ne.jh)(n),{savePreferredVersionName:m}=(0,Re.g1)(n),h=[...o,...f.map((function(e){const t=De(e,p);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===p.activeVersion,onClick:()=>m(e.name)}})),...a],g=(0,Le.Vd)(n)[0],y=t&&h.length>1?(0,l.translate)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,b=t&&h.length>1?void 0:De(g,p).path;return h.length<=1?(0,u.jsx)(ae,{...i,mobile:t,label:y,to:b,isActive:r?()=>!1:void 0}):(0,u.jsx)(fe,{...i,mobile:t,label:y,to:b,items:h,isActive:r?()=>!1:void 0})}};function Fe(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=Me[r];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(o,{...n})}function Be(){const e=(0,C.M)(),t=(0,w.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Fe,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function ze(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(l.default,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Ue(){const e=0===(0,w.p)().navbar.items.length,t=D();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(ze,{onClick:()=>t.hide()}),t.content]})}function $e(){const e=(0,C.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(M,{header:(0,u.jsx)(Y,{}),primaryMenu:(0,u.jsx)(Be,{}),secondaryMenu:(0,u.jsx)(Ue,{})}):null}const qe={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function He(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,o.A)("navbar-sidebar__backdrop",e.className)})}function Ve(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:a}}=(0,w.p)(),i=(0,C.M)(),{navbarRef:s,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,A.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i<a.current)return void n(!0);if(o.current)return void(o.current=!1);const s=r?.scrollY,l=document.documentElement.scrollHeight-a.current,c=window.innerHeight;s&&i>=s?n(!1):i+c<l&&n(!0)})),(0,c.$)((t=>{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:s,"aria-label":(0,l.translate)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.A)("navbar","navbar--fixed-top",n&&[qe.navbarHideable,!d&&qe.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(He,{onClick:i.toggle}),(0,u.jsx)($e,{})]})}var We=n(70440);const Ke={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function Ge(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(l.default,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function Qe(e){let{error:t}=e;const n=(0,We.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{className:Ke.errorBoundaryError,children:n})}class Ye extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const Ze="right";function Je(e){let{width:t=30,height:n=30,className:r,...o}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...o,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Xe(){const{toggle:e,shown:t}=(0,C.M)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,l.translate)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(Je,{})})}const et={colorModeToggle:"colorModeToggle_DEke"};function tt(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(Ye,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(Fe,{...e})},t)))})}function nt(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function rt(){const e=(0,C.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??Ze)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return(0,u.jsx)(nt,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(Xe,{}),(0,u.jsx)(G,{}),(0,u.jsx)(tt,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(tt,{items:r}),(0,u.jsx)(W,{className:et.colorModeToggle}),!o&&(0,u.jsx)(Ie,{children:(0,u.jsx)(Ae,{})})]})})}function ot(){return(0,u.jsx)(Ve,{children:(0,u.jsx)(rt,{})})}function at(e){let{item:t}=e;const{to:n,href:r,label:o,prependBaseUrlToHref:a,...i}=t,s=(0,J.Ay)(n),l=(0,J.Ay)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(Z.A,{className:"footer__link-item",...r?{href:a?l:r}:{to:s},...i,children:[o,r&&!(0,X.A)(r)&&(0,u.jsx)(te.A,{})]})}function it(e){let{item:t}=e;return t.html?(0,u.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(at,{item:t})},t.href??t.to)}function st(e){let{column:t}=e;return(0,u.jsxs)("div",{className:"col footer__col",children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,u.jsx)(it,{item:e},t)))})]})}function lt(e){let{columns:t}=e;return(0,u.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,u.jsx)(st,{column:e},t)))})}function ct(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function ut(e){let{item:t}=e;return t.html?(0,u.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(at,{item:t})}function dt(e){let{links:t}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(ut,{item:e}),t.length!==n+1&&(0,u.jsx)(ct,{})]},n)))})})}function pt(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(lt,{columns:t}):(0,u.jsx)(dt,{links:t})}var ft=n(21122);const mt="footerLogoLink_BH7S";function ht(e){let{logo:t}=e;const{withBaseUrl:n}=(0,J.hH)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,u.jsx)(ft.A,{className:(0,o.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function gt(e){let{logo:t}=e;return t.href?(0,u.jsx)(Z.A,{href:t.href,className:mt,target:t.target,children:(0,u.jsx)(ht,{logo:t})}):(0,u.jsx)(ht,{logo:t})}function yt(e){let{copyright:t}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function bt(e){let{style:t,links:n,logo:r,copyright:a}=e;return(0,u.jsx)("footer",{className:(0,o.A)("footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||a)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function vt(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:o}=e;return(0,u.jsx)(bt,{style:o,links:n&&n.length>0&&(0,u.jsx)(pt,{links:n}),logo:r&&(0,u.jsx)(gt,{logo:r}),copyright:t&&(0,u.jsx)(yt,{copyright:t})})}const wt=r.memo(vt),St=(0,T.fM)([F.a,S.o,A.Tv,Re.VQ,i.Jx,function(e){let{children:t}=e;return(0,u.jsx)(I.y_,{children:(0,u.jsx)(C.e,{children:(0,u.jsx)(L,{children:t})})})}]);function xt(e){let{children:t}=e;return(0,u.jsx)(St,{children:t})}var kt=n(51107);function jt(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(kt.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(l.default,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(Ge,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(Qe,{error:t})})]})})})}const _t={mainWrapper:"mainWrapper_z2l0"};function Et(e){const{children:t,noFooter:n,wrapperClassName:r,title:s,description:l}=e;return(0,y.J)(),(0,u.jsxs)(xt,{children:[(0,u.jsx)(i.be,{title:s,description:l}),(0,u.jsx)(v,{}),(0,u.jsx)(P,{}),(0,u.jsx)(ot,{}),(0,u.jsx)("div",{id:d,className:(0,o.A)(g.G.wrapper.main,_t.mainWrapper,r),children:(0,u.jsx)(a.default,{fallback:e=>(0,u.jsx)(jt,{...e}),children:t})}),!n&&(0,u.jsx)(wt,{})]})}},23465:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(63696);var r=n(28774),o=n(86025),a=n(44586),i=n(6342),s=n(21122),l=n(62540);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.Ay)(t.src),dark:(0,o.Ay)(t.srcDark||t.src)},i=(0,l.jsx)(s.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,l.jsx)("div",{className:r,children:i}):i}function u(e){const{siteConfig:{title:t}}=(0,a.A)(),{navbar:{title:n,logo:s}}=(0,i.p)(),{imageClassName:u,titleClassName:d,...p}=e,f=(0,o.Ay)(s?.href||"/"),m=n?"":t,h=s?.alt??m;return(0,l.jsxs)(r.A,{to:f,...p,...s?.target&&{target:s.target},children:[s&&(0,l.jsx)(c,{logo:s,alt:h,imageClassName:u}),null!=n&&(0,l.jsx)("b",{className:d,children:n})]})}},41463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(63696);var r=n(5260),o=n(62540);function a(e){let{locale:t,version:n,tag:a}=e;const i=t;return(0,o.jsxs)(r.A,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),i&&(0,o.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},21122:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(63696),o=n(34164),a=n(92303),i=n(95293);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var l=n(62540);function c(e){let{className:t,children:n}=e;const c=(0,a.A)(),{colorMode:u}=(0,i.G)();return(0,l.jsx)(l.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const a=n({theme:e,className:(0,o.A)(t,s.themedComponent,s[`themedComponent--${e}`])});return(0,l.jsx)(r.Fragment,{children:a},e)}))})}function u(e){const{sources:t,className:n,alt:r,...o}=e;return(0,l.jsx)(c,{className:n,children:e=>{let{theme:n,className:a}=e;return(0,l.jsx)("img",{src:t[n],alt:r,className:a,...o})}})}},41422:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(63696),o=n(38193),a=n(205),i=n(53109),s=n(62540);const l="ease-in-out";function c(e){let{initialState:t}=e;const[n,o]=(0,r.useState)(t??!1),a=(0,r.useCallback)((()=>{o((e=>!e))}),[]);return{collapsed:n,setCollapsed:o,toggleCollapsed:a}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){let{collapsibleRef:t,collapsed:n,animation:o}=e;const a=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=o?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${o?.easing??l}`,height:`${t}px`}}function s(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return p(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,o])}function m(e){if(!o.A.canUseDOM)return e?u:d}function h(e){let{as:t="div",collapsed:n,children:o,animation:a,onCollapseTransitionEnd:i,className:l,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return f({collapsibleRef:u,collapsed:n,animation:a}),(0,s.jsx)(t,{ref:u,style:c?void 0:m(n),onTransitionEnd:e=>{"height"===e.propertyName&&(p(u.current,n),i?.(n))},className:l,children:o})}function g(e){let{collapsed:t,...n}=e;const[o,i]=(0,r.useState)(!t),[l,c]=(0,r.useState)(t);return(0,a.A)((()=>{t||i(!0)}),[t]),(0,a.A)((()=>{o&&c(t)}),[o,t]),o?(0,s.jsx)(h,{...n,collapsed:l}):null}function y(e){let{lazy:t,...n}=e;const r=t?g:h;return(0,s.jsx)(r,{...n})}},65041:(e,t,n)=>{"use strict";n.d(t,{M:()=>h,o:()=>m});var r=n(63696),o=n(92303),a=n(70679),i=n(89532),s=n(6342),l=n(62540);const c=(0,a.Wf)("docusaurus.announcement.dismiss"),u=(0,a.Wf)("docusaurus.announcement.id"),d=()=>"true"===c.get(),p=e=>c.set(String(e)),f=r.createContext(null);function m(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.p)(),t=(0,o.A)(),[n,a]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{a(d())}),[]);const i=(0,r.useCallback)((()=>{p(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&p(!1),!r&&d()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,l.jsx)(f.Provider,{value:n,children:t})}function h(){const e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},95293:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>g});var r=n(63696),o=n(38193),a=n(89532),i=n(70679),s=n(6342),l=n(62540);const c=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),p={light:"light",dark:"dark"},f=e=>e===p.dark?p.dark:p.light,m=e=>o.A.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),h=e=>{d.set(f(e))};function g(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.p)(),[o,a]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:o=!0}=r;t?(a(t),o&&h(t)):(a(n?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:i,get isDarkTheme(){return o===p.dark},setLightTheme(){i(p.light)},setDarkTheme(){i(p.dark)}})),[o,i])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(c);if(null==e)throw new a.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},22069:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(63696),o=n(75600),a=n(24581),i=n(57485),s=n(6342),l=n(89532),c=n(62540);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,o.YL)(),{items:t}=(0,s.p)().navbar;return 0===t.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,[l,c]=(0,r.useState)(!1);(0,i.$Z)((()=>{if(l)return c(!1),!1}));const u=(0,r.useCallback)((()=>{c((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&c(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:l})),[e,n,u,l])}function p(e){let{children:t}=e;const n=d();return(0,c.jsx)(u.Provider,{value:n,children:t})}function f(){const e=r.useContext(u);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},75600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>c,YL:()=>l,y_:()=>s});var r=n(63696),o=n(89532),a=n(62540);const i=r.createContext(null);function s(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(!e)throw new o.dV("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const a=(0,r.useContext)(i);if(!a)throw new o.dV("NavbarSecondaryMenuContentProvider");const[,s]=a,l=(0,o.Be)(n);return(0,r.useEffect)((()=>{s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},14090:(e,t,n)=>{"use strict";n.d(t,{w:()=>o,J:()=>a});var r=n(63696);const o="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},24255:(e,t,n)=>{"use strict";n.d(t,{b:()=>s,w:()=>l});var r=n(63696),o=n(44586),a=n(57485);const i="q";function s(){return(0,a.l)(i)}function l(){const{siteConfig:{baseUrl:e,themeConfig:t}}=(0,o.A)(),{algolia:{searchPagePath:n}}=t;return(0,r.useCallback)((t=>`${e}${n}?${i}=${encodeURIComponent(t)}`),[e,n])}},24581:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(63696),o=n(38193);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,s]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){s(function(e){if(!o.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a.desktop:a.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},17559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},53109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},20481:(e,t,n)=>{"use strict";n.d(t,{s:()=>o});var r=n(44586);function o(e){const{siteConfig:t}=(0,r.A)(),{title:n,titleDelimiter:o}=t;return e?.trim().length?`${e.trim()} ${o} ${n}`:n}},57485:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>l,l:()=>c});var r=n(63696),o=n(56347),a=n(89532);function i(e){!function(e){const t=(0,o.W6)(),n=(0,a._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function s(e){const t=(0,o.W6)();return(0,r.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}function l(e){return s((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}function c(e){const t=l(e)??"",n=function(e){const t=(0,o.W6)();return(0,r.useCallback)(((n,r)=>{const o=new URLSearchParams(t.location.search);n?o.set(e,n):o.delete(e),(r?.push?t.push:t.replace)({search:o.toString()})}),[e,t])}(e);return[t,n]}},31682:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function o(e){return Array.from(new Set(e))}n.d(t,{XI:()=>r,sb:()=>o})},69024:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>d,Jx:()=>m});var r=n(63696),o=n(34164),a=n(5260),i=n(53102);function s(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(86025),c=n(20481),u=n(62540);function d(e){let{title:t,description:n,keywords:r,image:o,children:i}=e;const s=(0,c.s)(t),{withBaseUrl:d}=(0,l.hH)(),p=o?d(o,{absolute:!0}):void 0;return(0,u.jsxs)(a.A,{children:[t&&(0,u.jsx)("title",{children:s}),t&&(0,u.jsx)("meta",{property:"og:title",content:s}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,u.jsx)("meta",{property:"og:image",content:p}),p&&(0,u.jsx)("meta",{name:"twitter:image",content:p}),i]})}const p=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(p),s=(0,o.A)(i,t);return(0,u.jsxs)(p.Provider,{value:s,children:[(0,u.jsx)(a.A,{children:(0,u.jsx)("html",{className:s})}),n]})}function m(e){let{children:t}=e;const n=s(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const a=`plugin-id-${n.plugin.id}`;return(0,u.jsx)(f,{className:(0,o.A)(r,a),children:t})}},89532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>c,ZC:()=>s,_q:()=>i,dV:()=>l,fM:()=>u});var r=n(63696),o=n(205),a=n(62540);function i(e){const t=(0,r.useRef)(e);return(0,o.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function s(e){const t=(0,r.useRef)();return(0,o.A)((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?<name>\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,a.jsx)(a.Fragment,{children:e.reduceRight(((e,t)=>(0,a.jsx)(t,{children:e})),n)})}}},91252:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{G:()=>r})},99169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>s,ys:()=>i});var r=n(63696),o=n(35947),a=n(44586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function s(){const{baseUrl:e}=(0,a.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function o(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(o).flatMap((e=>e.routes??[])))}(n)}({routes:o.A,baseUrl:e})),[e])}},23104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,a_:()=>m,gk:()=>h});var r=n(63696),o=n(38193),a=n(92303),i=n(205),s=n(89532),l=n(62540);const c=r.createContext(void 0);function u(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function d(){const e=(0,r.useContext)(c);if(null==e)throw new s.dV("ScrollControllerProvider");return e}const p=()=>o.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function f(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=d(),o=(0,r.useRef)(p()),a=(0,s._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=p();a(e,o.current),o.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function m(){const e=d(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),o=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,i.A)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:o}}function h(){const e=(0,r.useRef)(null),t=(0,a.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(n&&o>e||!n&&o<e)&&(t=requestAnimationFrame(r),window.scrollTo(0,Math.floor(.85*(o-e))+e))}(),()=>t&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},2967:(e,t,n)=>{"use strict";n.d(t,{C:()=>r});const r="default"},70679:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>u,Dv:()=>d});var r=n(63696);const o=JSON.parse('{"N":"localStorage","M":""}'),a=o.N;function i(e){let{key:t,oldValue:n,newValue:r,storage:o}=e;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}function s(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}let l=!1;const c={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){const n=`${e}${o.M}`;if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(n);const r=s(t?.persistence);return null===r?c:{get:()=>{try{return r.getItem(n)}catch(e){return console.error(`Docusaurus storage error, can't get key=${n}`,e),null}},set:e=>{try{const t=r.getItem(n);r.setItem(n,e),i({key:n,oldValue:t,newValue:e,storage:r})}catch(t){console.error(`Docusaurus storage error, can't set ${n}=${e}`,t)}},del:()=>{try{const e=r.getItem(n);r.removeItem(n),i({key:n,oldValue:e,newValue:null,storage:r})}catch(e){console.error(`Docusaurus storage error, can't delete key=${n}`,e)}},listen:e=>{try{const t=t=>{t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}catch(t){return console.error(`Docusaurus storage error, can't listen for changes of key=${n}`,t),()=>{}}}}}function d(e,t){const n=(0,r.useRef)((()=>null===e?c:u(e,t))).current(),o=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,r.useSyncExternalStore)(o,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},32131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(44586),o=n(56347),a=n(70440);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:s}}=(0,r.A)(),{pathname:l}=(0,o.zy)(),c=(0,a.Ks)(l,{trailingSlash:n,baseUrl:e}),u=s===i?e:e.replace(`/${s}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${u}`:`${u}${e}/`}(n)}${d}`}}}},75062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(63696),o=n(56347),a=n(89532);function i(e){const t=(0,o.zy)(),n=(0,a.ZC)(t),i=(0,a._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(44586);function o(){return(0,r.A)().siteConfig.themeConfig}},38126:(e,t,n)=>{"use strict";n.d(t,{c:()=>o});var r=n(44586);function o(){const{siteConfig:{themeConfig:e}}=(0,r.A)();return e}},51062:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(63696),o=n(91252),a=n(86025),i=n(38126);function s(){const{withBaseUrl:e}=(0,a.hH)(),{algolia:{externalUrlRegex:t,replaceSearchResultPathname:n}}=(0,i.c)();return(0,r.useCallback)((r=>{const a=new URL(r);if((0,o.G)(t,a.href))return r;const i=`${a.pathname+a.hash}`;return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(i,n))}),[e,t,n])}},12983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=o,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),s="/"===i||i===r?i:(l=i,c=n,c?o(l):a(l));var l,c;return e.replace(i,s)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=a;const r=n(42566);function o(e){return e.endsWith("/")?e:`${e}/`}function a(e){return(0,r.removeSuffix)(e,"/")}},80253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t,...e(t.cause)];return[t]}},70440:(e,t,n)=>{"use strict";t.rA=t.Ks=void 0;const r=n(31635);var o=n(12983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(o).default}});var a=n(42566);var i=n(80253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},42566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:`${t}${e}`},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:`${e}${t}`},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},70479:()=>{!function(e){function t(e){const t=e.map((e=>{return`${t=e,t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`;var t})).join("|");return new RegExp(`\\b(?:${t})\\b`)}e.languages["json-schema"]=e.languages.extend("json5",{keyword:[{pattern:t(["if","then","else"]),alias:["control-flow","schema-conditionally"]},{pattern:t(["allOf","anyOf","oneOf","not"]),alias:"schema-composition"},{pattern:t(["$ref","$defs","$anchor","$defs","$dynamicRef","$dynamicAnchor","$recursiveAnchor","$recursiveRef"]),alias:"refs"},{pattern:t(["dependencies","dependentSchemas","dependentRequired","dependentSchemas"]),alias:"schema-conditionally"},{pattern:t(["additionalItems","contains","items","minItems","maxItems","minContains","maxContains","prefixItems","unevaluatedItems","uniqueItems"]),alias:"array"},{pattern:t(["title","description","default","examples","deprecated","readOnly","writeOnly","$comment"]),alias:"annotations"},{pattern:t(["enum"]),alias:"enum"},{pattern:t(["const"]),alias:"const"},{pattern:t(["contentEncoding","contentMediaType","contentSchema","format","minLength","maxLength","pattern"]),alias:"string"},{pattern:t(["multipleOf","minimum","exclusiveMinimum","maximum","exclusiveMaximum"]),alias:"number"},{pattern:t(["additionalProperties","patternProperties","properties","propertyNames","required","minProperties","maxProperties","unevaluatedProperties"]),alias:"object"}]})}(Prism)},31513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>w,TM:()=>E,yJ:()=>f,sC:()=>P,AO:()=>p});var r=n(58168);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}const i=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],i=t&&t.split("/")||[],s=e&&o(e),l=t&&o(t),c=s||l;if(e&&o(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var u=i[i.length-1];n="."===u||".."===u||""===u}else n=!1;for(var d=0,p=i.length;p>=0;p--){var f=i[p];"."===f?a(i,p):".."===f?(a(i,p),d++):d&&(a(i,p),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(11561);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var h=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(e,t){t(window.confirm(e))}var y="popstate",b="hashchange";function v(){try{return window.history.state||{}}catch(e){return{}}}function w(e){void 0===e&&(e={}),h||(0,s.A)(!1);var t,n=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,c=i.forceRefresh,w=void 0!==c&&c,S=i.getUserConfirmation,x=void 0===S?g:S,k=i.keyLength,j=void 0===k?6:k,_=e.basename?d(l(e.basename)):"";function E(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname+o.search+o.hash;return _&&(a=u(a,_)),f(a,r,n)}function O(){return Math.random().toString(36).substr(2,j)}var P=m();function C(e){(0,r.A)(U,e),U.length=n.length,P.notifyListeners(U.location,U.action)}function A(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||N(E(e.state))}function T(){N(E(v()))}var I=!1;function N(e){if(I)I=!1,C();else{P.confirmTransitionTo(e,"POP",x,(function(t){t?C({action:"POP",location:e}):function(e){var t=U.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(I=!0,M(o))}(e)}))}}var L=E(v()),R=[L.key];function D(e){return _+p(e)}function M(e){n.go(e)}var F=0;function B(e){1===(F+=e)&&1===e?(window.addEventListener(y,A),a&&window.addEventListener(b,T)):0===F&&(window.removeEventListener(y,A),a&&window.removeEventListener(b,T))}var z=!1;var U={length:n.length,action:"POP",location:L,createHref:D,push:function(e,t){var r="PUSH",a=f(e,t,O(),U.location);P.confirmTransitionTo(a,r,x,(function(e){if(e){var t=D(a),i=a.key,s=a.state;if(o)if(n.pushState({key:i,state:s},null,t),w)window.location.href=t;else{var l=R.indexOf(U.location.key),c=R.slice(0,l+1);c.push(a.key),R=c,C({action:r,location:a})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",a=f(e,t,O(),U.location);P.confirmTransitionTo(a,r,x,(function(e){if(e){var t=D(a),i=a.key,s=a.state;if(o)if(n.replaceState({key:i,state:s},null,t),w)window.location.replace(t);else{var l=R.indexOf(U.location.key);-1!==l&&(R[l]=a.key),C({action:r,location:a})}else window.location.replace(t)}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=P.setPrompt(e);return z||(B(1),z=!0),function(){return z&&(z=!1,B(-1)),t()}},listen:function(e){var t=P.appendListener(e);return B(1),function(){B(-1),t()}}};return U}var S="hashchange",x={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+c(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:c,decodePath:l},slash:{encodePath:l,decodePath:l}};function k(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function j(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function _(e){window.location.replace(k(window.location.href)+"#"+e)}function E(e){void 0===e&&(e={}),h||(0,s.A)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),o=n.getUserConfirmation,a=void 0===o?g:o,i=n.hashType,c=void 0===i?"slash":i,y=e.basename?d(l(e.basename)):"",b=x[c],v=b.encodePath,w=b.decodePath;function E(){var e=w(j());return y&&(e=u(e,y)),f(e)}var O=m();function P(e){(0,r.A)(z,e),z.length=t.length,O.notifyListeners(z.location,z.action)}var C=!1,A=null;function T(){var e,t,n=j(),r=v(n);if(n!==r)_(r);else{var o=E(),i=z.location;if(!C&&(t=o,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(A===p(o))return;A=null,function(e){if(C)C=!1,P();else{var t="POP";O.confirmTransitionTo(e,t,a,(function(n){n?P({action:t,location:e}):function(e){var t=z.location,n=R.lastIndexOf(p(t));-1===n&&(n=0);var r=R.lastIndexOf(p(e));-1===r&&(r=0);var o=n-r;o&&(C=!0,D(o))}(e)}))}}(o)}}var I=j(),N=v(I);I!==N&&_(N);var L=E(),R=[p(L)];function D(e){t.go(e)}var M=0;function F(e){1===(M+=e)&&1===e?window.addEventListener(S,T):0===M&&window.removeEventListener(S,T)}var B=!1;var z={length:t.length,action:"POP",location:L,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=k(window.location.href)),n+"#"+v(y+p(e))},push:function(e,t){var n="PUSH",r=f(e,void 0,void 0,z.location);O.confirmTransitionTo(r,n,a,(function(e){if(e){var t=p(r),o=v(y+t);if(j()!==o){A=t,function(e){window.location.hash=e}(o);var a=R.lastIndexOf(p(z.location)),i=R.slice(0,a+1);i.push(t),R=i,P({action:n,location:r})}else P()}}))},replace:function(e,t){var n="REPLACE",r=f(e,void 0,void 0,z.location);O.confirmTransitionTo(r,n,a,(function(e){if(e){var t=p(r),o=v(y+t);j()!==o&&(A=t,_(o));var a=R.indexOf(p(z.location));-1!==a&&(R[a]=t),P({action:n,location:r})}}))},go:D,goBack:function(){D(-1)},goForward:function(){D(1)},block:function(e){void 0===e&&(e=!1);var t=O.setPrompt(e);return B||(F(1),B=!0),function(){return B&&(B=!1,F(-1)),t()}},listen:function(e){var t=O.appendListener(e);return F(1),function(){F(-1),t()}}};return z}function O(e,t,n){return Math.min(Math.max(e,t),n)}function P(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,a=void 0===o?["/"]:o,i=t.initialIndex,s=void 0===i?0:i,l=t.keyLength,c=void 0===l?6:l,u=m();function d(e){(0,r.A)(w,e),w.length=w.entries.length,u.notifyListeners(w.location,w.action)}function h(){return Math.random().toString(36).substr(2,c)}var g=O(s,0,a.length-1),y=a.map((function(e){return f(e,void 0,"string"==typeof e?h():e.key||h())})),b=p;function v(e){var t=O(w.index+e,0,w.entries.length-1),r=w.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?d({action:"POP",location:r,index:t}):d()}))}var w={length:y.length,action:"POP",location:y[g],index:g,entries:y,createHref:b,push:function(e,t){var r="PUSH",o=f(e,t,h(),w.location);u.confirmTransitionTo(o,r,n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=f(e,t,h(),w.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return w}},4146:(e,t,n)=>{"use strict";var r=n(44363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=f(n);o&&o!==m&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),h=l(n),g=0;g<i.length;++g){var y=i[g];if(!(a[y]||r&&r[y]||h&&h[y]||s&&s[y])){var b=p(n,y);try{c(t,y,b)}catch(v){}}}}return t}},20311:e=>{"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},64634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},10119:(e,t,n)=>{"use strict";n.r(t)},51043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function o(e,t,n){return e<t?t:e>n?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){l(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),s=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},35302:(e,t,n)=>{var r=n(64634);e.exports=m,e.exports.parse=a,e.exports.compile=function(e,t){return l(a(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,s=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],p=n[1],f=n.index;if(l+=e.slice(s,f),s=f+d.length,p)l+=p[1];else{var m=e[s],h=n[2],g=n[3],y=n[4],b=n[5],v=n[6],w=n[7];l&&(r.push(l),l="");var S=null!=h&&null!=m&&m!==h,x="+"===v||"*"===v,k="?"===v||"*"===v,j=h||c,_=y||b,E=h||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||a++,prefix:h||"",delimiter:j,optional:k,repeat:x,partial:S,asterisk:!!w,pattern:_?u(_):w?".*":i(j,E)})}}return s<e.length&&(l+=e.substr(s)),l&&r.push(l),r}function i(e,t){return!t||t.indexOf(e)>-1?"[^"+c(e)+"]+?":c(t)+"|(?:(?!"+c(t)+")[^"+c(e)+"])+?"}function s(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",p(t)));return function(t,o){for(var a="",i=t||{},l=(o||{}).pretty?s:encodeURIComponent,c=0;c<e.length;c++){var u=e[c];if("string"!=typeof u){var d,p=i[u.name];if(null==p){if(u.optional){u.partial&&(a+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<p.length;f++){if(d=l(p[f]),!n[c].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");a+=(0===f?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):l(p),!n[c].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');a+=u.prefix+d}}else a+=u}return a}}function c(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function u(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function d(e,t){return e.keys=t,e}function p(e){return e&&e.sensitive?"":"i"}function f(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,a=!1!==n.end,i="",s=0;s<e.length;s++){var l=e[s];if("string"==typeof l)i+=c(l);else{var u=c(l.prefix),f="(?:"+l.pattern+")";t.push(l),l.repeat&&(f+="(?:"+u+f+")*"),i+=f=l.optional?l.partial?u+"("+f+")?":"(?:"+u+"("+f+"))?":u+"("+f+")"}}var m=c(n.delimiter||"/"),h=i.slice(-m.length)===m;return o||(i=(h?i.slice(0,-m.length):i)+"(?:"+m+"(?=$))?"),i+=a?"$":o&&h?"":"(?="+m+"|$)",d(new RegExp("^"+i,p(n)),t)}function m(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return d(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(m(e[o],t,n).source);return d(new RegExp("(?:"+r.join("|")+")",p(n)),t)}(e,t,n):function(e,t,n){return f(a(e,n),t,n)}(e,t,n)}},72514:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},10267:()=>{!function(e){var t=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;e.languages.json5=e.languages.extend("json",{property:[{pattern:RegExp(t.source+"(?=\\s*:)"),greedy:!0},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,alias:"unquoted"}],string:{pattern:t,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/})}(Prism)},19700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,s=i.length;-1!==n.code.indexOf(o=t(r,s));)++s;return i[s]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(s){for(var l=0;l<s.length&&!(o>=a.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++o;var h=p.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=p.substring(m+f.length),b=[];h&&b.push.apply(b,i([h])),b.push(g),y&&b.push.apply(b,i([y])),"string"==typeof c?s.splice.apply(s,[l,1].concat(b)):c.content=b}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(Prism)},89863:(e,t,n)=>{var r={"./prism-json":72514,"./prism-json5":10267};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=89863},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},22551:(e,t,n)=>{"use strict";var r=n(63696),o=n(69982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)i.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},m={};function h(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new h(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new h(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new h(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new h(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new h(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new h(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new h(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new h(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new h(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function v(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(m,e)||!d.call(f,e)&&(p.test(e)?m[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);g[t]=new h(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);g[t]=new h(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);g[t]=new h(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=Symbol.for("react.element"),x=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),O=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),I=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var D,M=Object.assign;function F(e){if(void 0===D)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var B=!1;function z(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var o=c.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(1!==i||1!==s)do{if(i--,0>--s||o[i]!==a[s]){var l="\n"+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function U(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=z(e.type,!1);case 11:return e=z(e.type.render,!1);case 1:return e=z(e.type,!0);default:return""}}function $(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case k:return"Fragment";case x:return"Portal";case _:return"Profiler";case j:return"StrictMode";case C:return"Suspense";case A:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:$(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return $(e(t))}catch(n){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $(t);case 8:return t===j?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return M({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Z(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function J(e,t){Z(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return M({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ae(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function he(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=he(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(fe).forEach((function(e){me.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ye=M({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function Se(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,ke=null,je=null;function _e(e){if(e=wo(e)){if("function"!=typeof xe)throw Error(a(280));var t=e.stateNode;t&&(t=xo(t),xe(e.stateNode,e.type,t))}}function Ee(e){ke?je?je.push(e):je=[e]:ke=e}function Oe(){if(ke){var e=ke,t=je;if(je=ke=null,_e(e),t)for(e=0;e<t.length;e++)_e(t[e])}}function Pe(e,t){return e(t)}function Ce(){}var Ae=!1;function Te(e,t,n){if(Ae)return e(t,n);Ae=!0;try{return Pe(e,t,n)}finally{Ae=!1,(null!==ke||null!==je)&&(Ce(),Oe())}}function Ie(e,t){var n=e.stateNode;if(null===n)return null;var r=xo(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Ne=!1;if(u)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Ne=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(ue){Ne=!1}function Re(e,t,n,r,o,a,i,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var De=!1,Me=null,Fe=!1,Be=null,ze={onError:function(e){De=!0,Me=e}};function Ue(e,t,n,r,o,a,i,s,l){De=!1,Me=null,Re.apply(ze,arguments)}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if($e(e)!==e)throw Error(a(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return He(o),e;if(i===r)return He(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var Ke=o.unstable_scheduleCallback,Ge=o.unstable_cancelCallback,Qe=o.unstable_shouldYield,Ye=o.unstable_requestPaint,Ze=o.unstable_now,Je=o.unstable_getCurrentPriorityLevel,Xe=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,at=null;var it=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~o;0!==s?r=dt(s):0!==(a&=i)&&(r=dt(a))}else 0!==(i=n&~o)?r=dt(i):0!==a&&(r=dt(a));if(0===r)return 0;if(0!==t&&t!==r&&!(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-it(t)),r|=e[n],t&=~o;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ht(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var vt=0;function wt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var St,xt,kt,jt,_t,Et=!1,Ot=[],Pt=null,Ct=null,At=null,Tt=new Map,It=new Map,Nt=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Rt(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":Ct=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":Tt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":It.delete(t.pointerId)}}function Dt(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=wo(t))&&xt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Mt(e){var t=vo(e.target);if(null!==t){var n=$e(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=qe(n)))return e.blockedOn=t,void _t(e.priority,(function(){kt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wo(n))&&xt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Bt(e,t,n){Ft(e)&&n.delete(t)}function zt(){Et=!1,null!==Pt&&Ft(Pt)&&(Pt=null),null!==Ct&&Ft(Ct)&&(Ct=null),null!==At&&Ft(At)&&(At=null),Tt.forEach(Bt),It.forEach(Bt)}function Ut(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,zt)))}function $t(e){function t(t){return Ut(t,e)}if(0<Ot.length){Ut(Ot[0],e);for(var n=1;n<Ot.length;n++){var r=Ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Pt&&Ut(Pt,e),null!==Ct&&Ut(Ct,e),null!==At&&Ut(At,e),Tt.forEach(t),It.forEach(t),n=0;n<Nt.length;n++)(r=Nt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&null===(n=Nt[0]).blockedOn;)Mt(n),null===n.blockedOn&&Nt.shift()}var qt=w.ReactCurrentBatchConfig,Ht=!0;function Vt(e,t,n,r){var o=vt,a=qt.transition;qt.transition=null;try{vt=1,Kt(e,t,n,r)}finally{vt=o,qt.transition=a}}function Wt(e,t,n,r){var o=vt,a=qt.transition;qt.transition=null;try{vt=4,Kt(e,t,n,r)}finally{vt=o,qt.transition=a}}function Kt(e,t,n,r){if(Ht){var o=Qt(e,t,n,r);if(null===o)Hr(e,t,r,Gt,n),Rt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Pt=Dt(Pt,e,t,n,r,o),!0;case"dragenter":return Ct=Dt(Ct,e,t,n,r,o),!0;case"mouseover":return At=Dt(At,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Tt.set(a,Dt(Tt.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,It.set(a,Dt(It.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Rt(e,r),4&t&&-1<Lt.indexOf(e)){for(;null!==o;){var a=wo(o);if(null!==a&&St(a),null===(a=Qt(e,t,n,r))&&Hr(e,t,r,Gt,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Gt=null;function Qt(e,t,n,r){if(Gt=null,null!==(e=vo(e=Se(r))))if(null===(t=$e(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=qe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Xe:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Zt=null,Jt=null,Xt=null;function en(){if(Xt)return Xt;var e,t,n=Jt,r=n.length,o="value"in Zt?Zt.value:Zt.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return Xt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=M({},cn,{view:0,detail:0}),pn=on(dn),fn=M({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),mn=on(fn),hn=on(M({},fn,{dataTransfer:0})),gn=on(M({},dn,{relatedTarget:0})),yn=on(M({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=M({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vn=on(bn),wn=on(M({},cn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kn[e])&&!!t[e]}function _n(){return jn}var En=M({},dn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),On=on(En),Pn=on(M({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=on(M({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),An=on(M({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Tn=M({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),In=on(Tn),Nn=[9,13,27,32],Ln=u&&"CompositionEvent"in window,Rn=null;u&&"documentMode"in document&&(Rn=document.documentMode);var Dn=u&&"TextEvent"in window&&!Rn,Mn=u&&(!Ln||Rn&&8<Rn&&11>=Rn),Fn=String.fromCharCode(32),Bn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var $n=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Vn(e,t,n,r){Ee(r),0<(t=Wr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Kn=null;function Gn(e){Fr(e,0)}function Qn(e){if(K(So(e)))return e}function Yn(e,t){if("change"===e)return t}var Zn=!1;if(u){var Jn;if(u){var Xn="oninput"in document;if(!Xn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Xn="function"==typeof er.oninput}Jn=Xn}else Jn=!1;Zn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),Kn=Wn=null)}function nr(e){if("value"===e.propertyName&&Qn(Kn)){var t=[];Vn(t,Kn,e,Se(e)),Te(Gn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Kn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Kn)}function ar(e,t){if("click"===e)return Qn(t)}function ir(e,t){if("input"===e||"change"===e)return Qn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!sr(e[o],t[o]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=ur(n,a);var i=ur(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,yr=null,br=null,vr=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==gr||gr!==G(r)||("selectionStart"in(r=gr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&lr(br,r)||(br=r,0<(r=Wr(yr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function Sr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:Sr("Animation","AnimationEnd"),animationiteration:Sr("Animation","AnimationIteration"),animationstart:Sr("Animation","AnimationStart"),transitionend:Sr("Transition","TransitionEnd")},kr={},jr={};function _r(e){if(kr[e])return kr[e];if(!xr[e])return e;var t,n=xr[e];for(t in n)if(n.hasOwnProperty(t)&&t in jr)return kr[e]=n[t];return e}u&&(jr=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Er=_r("animationend"),Or=_r("animationiteration"),Pr=_r("animationstart"),Cr=_r("transitionend"),Ar=new Map,Tr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ir(e,t){Ar.set(e,t),l(t,[e])}for(var Nr=0;Nr<Tr.length;Nr++){var Lr=Tr[Nr];Ir(Lr.toLowerCase(),"on"+(Lr[0].toUpperCase()+Lr.slice(1)))}Ir(Er,"onAnimationEnd"),Ir(Or,"onAnimationIteration"),Ir(Pr,"onAnimationStart"),Ir("dblclick","onDoubleClick"),Ir("focusin","onFocus"),Ir("focusout","onBlur"),Ir(Cr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rr));function Mr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,l,c){if(Ue.apply(this,arguments),De){if(!De)throw Error(a(198));var u=Me;De=!1,Me=null,Fe||(Fe=!0,Be=u)}}(r,t,void 0,e),e.currentTarget=null}function Fr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;Mr(o,s,c),a=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,c=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;Mr(o,s,c),a=l}}}if(Fe)throw e=Be,Fe=!1,Be=null,e}function Br(e,t){var n=t[go];void 0===n&&(n=t[go]=new Set);var r=e+"__bubble";n.has(r)||(qr(t,e,2,!1),n.add(r))}function zr(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var Ur="_reactListening"+Math.random().toString(36).slice(2);function $r(e){if(!e[Ur]){e[Ur]=!0,i.forEach((function(t){"selectionchange"!==t&&(Dr.has(t)||zr(t,!1,e),zr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ur]||(t[Ur]=!0,zr("selectionchange",!1,t))}}function qr(e,t,n,r){switch(Yt(t)){case 1:var o=Vt;break;case 4:o=Wt;break;default:o=Kt}n=o.bind(null,t,n,e),o=void 0,!Ne||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,o){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;i=i.return}for(;null!==s;){if(null===(i=vo(s)))return;if(5===(l=i.tag)||6===l){r=a=i;continue e}s=s.parentNode}}r=r.return}Te((function(){var r=a,o=Se(n),i=[];e:{var s=Ar.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=On;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=hn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Cn;break;case Er:case Or:case Pr:l=yn;break;case Cr:l=An;break;case"scroll":l=pn;break;case"wheel":l=In;break;case"copy":case"cut":case"paste":l=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Pn}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==s?s+"Capture":null:s;u=[];for(var f,m=r;null!==m;){var h=(f=m).stateNode;if(5===f.tag&&null!==h&&(f=h,null!==p&&(null!=(h=Ie(m,p))&&u.push(Vr(m,h,f)))),d)break;m=m.return}0<u.length&&(s=new l(s,c,null,n,o),i.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(c=n.relatedTarget||n.fromElement)||!vo(c)&&!c[ho])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?vo(c):null)&&(c!==(d=$e(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=mn,h="onMouseLeave",p="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(u=Pn,h="onPointerLeave",p="onPointerEnter",m="pointer"),d=null==l?s:So(l),f=null==c?s:So(c),(s=new u(h,m+"leave",l,n,o)).target=d,s.relatedTarget=f,h=null,vo(o)===r&&((u=new u(p,m+"enter",c,n,o)).target=f,u.relatedTarget=d,h=u),d=h,l&&c)e:{for(p=c,m=0,f=u=l;f;f=Kr(f))m++;for(f=0,h=p;h;h=Kr(h))f++;for(;0<m-f;)u=Kr(u),m--;for(;0<f-m;)p=Kr(p),f--;for(;m--;){if(u===p||null!==p&&u===p.alternate)break e;u=Kr(u),p=Kr(p)}u=null}else u=null;null!==l&&Gr(i,s,l,u,!1),null!==c&&null!==d&&Gr(i,d,c,u,!0)}if("select"===(l=(s=r?So(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Yn;else if(Hn(s))if(Zn)g=ir;else{g=or;var y=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ar);switch(g&&(g=g(e,r))?Vn(i,g,n,o):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ee(s,"number",s.value)),y=r?So(r):window,e){case"focusin":(Hn(y)||"true"===y.contentEditable)&&(gr=y,yr=r,br=null);break;case"focusout":br=yr=gr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,wr(i,n,o);break;case"selectionchange":if(hr)break;case"keydown":case"keyup":wr(i,n,o)}var b;if(Ln)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else $n?zn(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Mn&&"ko"!==n.locale&&($n||"onCompositionStart"!==v?"onCompositionEnd"===v&&$n&&(b=en()):(Jt="value"in(Zt=o)?Zt.value:Zt.textContent,$n=!0)),0<(y=Wr(r,v)).length&&(v=new wn(v,e,null,n,o),i.push({event:v,listeners:y}),b?v.data=b:null!==(b=Un(n))&&(v.data=b))),(b=Dn?function(e,t){switch(e){case"compositionend":return Un(t);case"keypress":return 32!==t.which?null:(Bn=!0,Fn);case"textInput":return(e=t.data)===Fn&&Bn?null:e;default:return null}}(e,n):function(e,t){if($n)return"compositionend"===e||!Ln&&zn(e,t)?(e=en(),Xt=Jt=Zt=null,$n=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Wr(r,"onBeforeInput")).length&&(o=new wn("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=b))}Fr(i,t)}))}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Ie(e,n))&&r.unshift(Vr(e,a,o)),null!=(a=Ie(e,t))&&r.push(Vr(e,a,o))),e=e.return}return r}function Kr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gr(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=Ie(n,a))&&i.unshift(Vr(n,l,s)):o||null!=(l=Ie(n,a))&&i.push(Vr(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var Qr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Zr(e){return("string"==typeof e?e:""+e).replace(Qr,"\n").replace(Yr,"")}function Jr(e,t,n){if(t=Zr(t),Zr(e)!==t&&n)throw Error(a(425))}function Xr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"==typeof setTimeout?setTimeout:void 0,oo="function"==typeof clearTimeout?clearTimeout:void 0,ao="function"==typeof Promise?Promise:void 0,io="function"==typeof queueMicrotask?queueMicrotask:void 0!==ao?function(e){return ao.resolve(null).then(e).catch(so)}:ro;function so(e){setTimeout((function(){throw e}))}function lo(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void $t(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);$t(t)}function co(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var po=Math.random().toString(36).slice(2),fo="__reactFiber$"+po,mo="__reactProps$"+po,ho="__reactContainer$"+po,go="__reactEvents$"+po,yo="__reactListeners$"+po,bo="__reactHandles$"+po;function vo(e){var t=e[fo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ho]||n[fo]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[fo])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function wo(e){return!(e=e[fo]||e[ho])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function So(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function xo(e){return e[mo]||null}var ko=[],jo=-1;function _o(e){return{current:e}}function Eo(e){0>jo||(e.current=ko[jo],ko[jo]=null,jo--)}function Oo(e,t){jo++,ko[jo]=e.current,e.current=t}var Po={},Co=_o(Po),Ao=_o(!1),To=Po;function Io(e,t){var n=e.type.contextTypes;if(!n)return Po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function No(e){return null!=(e=e.childContextTypes)}function Lo(){Eo(Ao),Eo(Co)}function Ro(e,t,n){if(Co.current!==Po)throw Error(a(168));Oo(Co,t),Oo(Ao,n)}function Do(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,q(e)||"Unknown",o));return M({},n,r)}function Mo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Po,To=Co.current,Oo(Co,e),Oo(Ao,Ao.current),!0}function Fo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Do(e,t,To),r.__reactInternalMemoizedMergedChildContext=e,Eo(Ao),Eo(Co),Oo(Co,e)):Eo(Ao),Oo(Ao,n)}var Bo=null,zo=!1,Uo=!1;function $o(e){null===Bo?Bo=[e]:Bo.push(e)}function qo(){if(!Uo&&null!==Bo){Uo=!0;var e=0,t=vt;try{var n=Bo;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bo=null,zo=!1}catch(o){throw null!==Bo&&(Bo=Bo.slice(e+1)),Ke(Xe,qo),o}finally{vt=t,Uo=!1}}return null}var Ho=[],Vo=0,Wo=null,Ko=0,Go=[],Qo=0,Yo=null,Zo=1,Jo="";function Xo(e,t){Ho[Vo++]=Ko,Ho[Vo++]=Wo,Wo=e,Ko=t}function ea(e,t,n){Go[Qo++]=Zo,Go[Qo++]=Jo,Go[Qo++]=Yo,Yo=e;var r=Zo;e=Jo;var o=32-it(r)-1;r&=~(1<<o),n+=1;var a=32-it(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Zo=1<<32-it(t)+o|n<<o|r,Jo=a+e}else Zo=1<<a|n<<o|r,Jo=e}function ta(e){null!==e.return&&(Xo(e,1),ea(e,1,0))}function na(e){for(;e===Wo;)Wo=Ho[--Vo],Ho[Vo]=null,Ko=Ho[--Vo],Ho[Vo]=null;for(;e===Yo;)Yo=Go[--Qo],Go[Qo]=null,Jo=Go[--Qo],Go[Qo]=null,Zo=Go[--Qo],Go[Qo]=null}var ra=null,oa=null,aa=!1,ia=null;function sa(e,t){var n=Tc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function la(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ra=e,oa=co(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ra=e,oa=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yo?{id:Zo,overflow:Jo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ra=e,oa=null,!0);default:return!1}}function ca(e){return!(!(1&e.mode)||128&e.flags)}function ua(e){if(aa){var t=oa;if(t){var n=t;if(!la(e,t)){if(ca(e))throw Error(a(418));t=co(n.nextSibling);var r=ra;t&&la(e,t)?sa(r,n):(e.flags=-4097&e.flags|2,aa=!1,ra=e)}}else{if(ca(e))throw Error(a(418));e.flags=-4097&e.flags|2,aa=!1,ra=e}}}function da(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ra=e}function pa(e){if(e!==ra)return!1;if(!aa)return da(e),aa=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oa)){if(ca(e))throw fa(),Error(a(418));for(;t;)sa(e,t),t=co(t.nextSibling)}if(da(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oa=co(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oa=null}}else oa=ra?co(e.stateNode.nextSibling):null;return!0}function fa(){for(var e=oa;e;)e=co(e.nextSibling)}function ma(){oa=ra=null,aa=!1}function ha(e){null===ia?ia=[e]:ia.push(e)}var ga=w.ReactCurrentBatchConfig;function ya(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ba(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function va(e){return(0,e._init)(e._payload)}function wa(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Nc(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Mc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===k?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===I&&va(a)===t.type)?((r=o(t,n.props)).ref=ya(e,t,n),r.return=e,r):((r=Lc(n.type,n.key,n.props,null,e.mode,r)).ref=ya(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Rc(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Mc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case S:return(n=Lc(t.type,t.key,t.props,null,e.mode,n)).ref=ya(e,null,t),n.return=e,n;case x:return(t=Fc(t,e.mode,n)).return=e,t;case I:return p(e,(0,t._init)(t._payload),n)}if(te(t)||R(t))return(t=Rc(t,e.mode,n,null)).return=e,t;ba(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case S:return n.key===o?c(e,t,n,r):null;case x:return n.key===o?u(e,t,n,r):null;case I:return f(e,t,(o=n._init)(n._payload),r)}if(te(n)||R(n))return null!==o?null:d(e,t,n,r,null);ba(e,n)}return null}function m(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case x:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case I:return m(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||R(r))return d(t,e=e.get(n)||null,r,o,null);ba(t,r)}return null}function h(o,a,s,l){for(var c=null,u=null,d=a,h=a=0,g=null;null!==d&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var y=f(o,d,s[h],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(o,d),a=i(y,a,h),null===u?c=y:u.sibling=y,u=y,d=g}if(h===s.length)return n(o,d),aa&&Xo(o,h),c;if(null===d){for(;h<s.length;h++)null!==(d=p(o,s[h],l))&&(a=i(d,a,h),null===u?c=d:u.sibling=d,u=d);return aa&&Xo(o,h),c}for(d=r(o,d);h<s.length;h++)null!==(g=m(d,o,h,s[h],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?h:g.key),a=i(g,a,h),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(o,e)})),aa&&Xo(o,h),c}function g(o,s,l,c){var u=R(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,h=s,g=s=0,y=null,b=l.next();null!==h&&!b.done;g++,b=l.next()){h.index>g?(y=h,h=null):y=h.sibling;var v=f(o,h,b.value,c);if(null===v){null===h&&(h=y);break}e&&h&&null===v.alternate&&t(o,h),s=i(v,s,g),null===d?u=v:d.sibling=v,d=v,h=y}if(b.done)return n(o,h),aa&&Xo(o,g),u;if(null===h){for(;!b.done;g++,b=l.next())null!==(b=p(o,b.value,c))&&(s=i(b,s,g),null===d?u=b:d.sibling=b,d=b);return aa&&Xo(o,g),u}for(h=r(o,h);!b.done;g++,b=l.next())null!==(b=m(h,o,g,b.value,c))&&(e&&null!==b.alternate&&h.delete(null===b.key?g:b.key),s=i(b,s,g),null===d?u=b:d.sibling=b,d=b);return e&&h.forEach((function(e){return t(o,e)})),aa&&Xo(o,g),u}return function e(r,a,i,l){if("object"==typeof i&&null!==i&&i.type===k&&null===i.key&&(i=i.props.children),"object"==typeof i&&null!==i){switch(i.$$typeof){case S:e:{for(var c=i.key,u=a;null!==u;){if(u.key===c){if((c=i.type)===k){if(7===u.tag){n(r,u.sibling),(a=o(u,i.props.children)).return=r,r=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===I&&va(c)===u.type){n(r,u.sibling),(a=o(u,i.props)).ref=ya(r,u,i),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}i.type===k?((a=Rc(i.props.children,r.mode,l,i.key)).return=r,r=a):((l=Lc(i.type,i.key,i.props,null,r.mode,l)).ref=ya(r,a,i),l.return=r,r=l)}return s(r);case x:e:{for(u=i.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===i.containerInfo&&a.stateNode.implementation===i.implementation){n(r,a.sibling),(a=o(a,i.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Fc(i,r.mode,l)).return=r,r=a}return s(r);case I:return e(r,a,(u=i._init)(i._payload),l)}if(te(i))return h(r,a,i,l);if(R(i))return g(r,a,i,l);ba(r,i)}return"string"==typeof i&&""!==i||"number"==typeof i?(i=""+i,null!==a&&6===a.tag?(n(r,a.sibling),(a=o(a,i)).return=r,r=a):(n(r,a),(a=Mc(i,r.mode,l)).return=r,r=a),s(r)):n(r,a)}}var Sa=wa(!0),xa=wa(!1),ka=_o(null),ja=null,_a=null,Ea=null;function Oa(){Ea=_a=ja=null}function Pa(e){var t=ka.current;Eo(ka),e._currentValue=t}function Ca(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Aa(e,t){ja=e,Ea=_a=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(vs=!0),e.firstContext=null)}function Ta(e){var t=e._currentValue;if(Ea!==e)if(e={context:e,memoizedValue:t,next:null},null===_a){if(null===ja)throw Error(a(308));_a=e,ja.dependencies={lanes:0,firstContext:e}}else _a=_a.next=e;return t}var Ia=null;function Na(e){null===Ia?Ia=[e]:Ia.push(e)}function La(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Na(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ra(e,r)}function Ra(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Da=!1;function Ma(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ba(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Pl){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ra(e,n)}return null===(o=r.interleaved)?(t.next=t,Na(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ra(e,n)}function Ua(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function $a(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function qa(e,t,n,r){var o=e.updateQueue;Da=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===i?a=c:i.next=c,i=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==i&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==a){var d=o.baseState;for(i=0,u=c=l=null,s=a;;){var p=s.lane,f=s.eventTime;if((r&p)===p){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,h=s;switch(p=t,f=n,h.tag){case 1:if("function"==typeof(m=h.payload)){d=m.call(f,d,p);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(p="function"==typeof(m=h.payload)?m.call(f,d,p):m))break e;d=M({},d,p);break e;case 2:Da=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=o.effects)?o.effects=[s]:p.push(s))}else f={eventTime:f,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,i|=p;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(p=s).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);Dl|=i,e.lanes=i,e.memoizedState=d}}function Ha(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(a(191,o));o.call(r)}}}var Va={},Wa=_o(Va),Ka=_o(Va),Ga=_o(Va);function Qa(e){if(e===Va)throw Error(a(174));return e}function Ya(e,t){switch(Oo(Ga,t),Oo(Ka,e),Oo(Wa,Va),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Eo(Wa),Oo(Wa,t)}function Za(){Eo(Wa),Eo(Ka),Eo(Ga)}function Ja(e){Qa(Ga.current);var t=Qa(Wa.current),n=le(t,e.type);t!==n&&(Oo(Ka,e),Oo(Wa,n))}function Xa(e){Ka.current===e&&(Eo(Wa),Eo(Ka))}var ei=_o(0);function ti(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ni=[];function ri(){for(var e=0;e<ni.length;e++)ni[e]._workInProgressVersionPrimary=null;ni.length=0}var oi=w.ReactCurrentDispatcher,ai=w.ReactCurrentBatchConfig,ii=0,si=null,li=null,ci=null,ui=!1,di=!1,pi=0,fi=0;function mi(){throw Error(a(321))}function hi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function gi(e,t,n,r,o,i){if(ii=i,si=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oi.current=null===e||null===e.memoizedState?Xi:es,e=n(r,o),di){i=0;do{if(di=!1,pi=0,25<=i)throw Error(a(301));i+=1,ci=li=null,t.updateQueue=null,oi.current=ts,e=n(r,o)}while(di)}if(oi.current=Ji,t=null!==li&&null!==li.next,ii=0,ci=li=si=null,ui=!1,t)throw Error(a(300));return e}function yi(){var e=0!==pi;return pi=0,e}function bi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ci?si.memoizedState=ci=e:ci=ci.next=e,ci}function vi(){if(null===li){var e=si.alternate;e=null!==e?e.memoizedState:null}else e=li.next;var t=null===ci?si.memoizedState:ci.next;if(null!==t)ci=t,li=e;else{if(null===e)throw Error(a(310));e={memoizedState:(li=e).memoizedState,baseState:li.baseState,baseQueue:li.baseQueue,queue:li.queue,next:null},null===ci?si.memoizedState=ci=e:ci=ci.next=e}return ci}function wi(e,t){return"function"==typeof t?t(e):t}function Si(e){var t=vi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=li,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var l=s=null,c=null,u=i;do{var d=u.lane;if((ii&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var p={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=p,s=r):c=c.next=p,si.lanes|=d,Dl|=d}u=u.next}while(null!==u&&u!==i);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(vs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,si.lanes|=i,Dl|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function xi(e){var t=vi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);sr(i,t.memoizedState)||(vs=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ki(){}function ji(e,t){var n=si,r=vi(),o=t(),i=!sr(r.memoizedState,o);if(i&&(r.memoizedState=o,vs=!0),r=r.queue,Di(Oi.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==ci&&1&ci.memoizedState.tag){if(n.flags|=2048,Ti(9,Ei.bind(null,n,r,o,t),void 0,null),null===Cl)throw Error(a(349));30&ii||_i(n,t,o)}return o}function _i(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=si.updateQueue)?(t={lastEffect:null,stores:null},si.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ei(e,t,n,r){t.value=n,t.getSnapshot=r,Pi(t)&&Ci(e)}function Oi(e,t,n){return n((function(){Pi(t)&&Ci(e)}))}function Pi(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Ci(e){var t=Ra(e,1);null!==t&&nc(t,e,1,-1)}function Ai(e){var t=bi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:e},t.queue=e,e=e.dispatch=Gi.bind(null,si,e),[t.memoizedState,e]}function Ti(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=si.updateQueue)?(t={lastEffect:null,stores:null},si.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ii(){return vi().memoizedState}function Ni(e,t,n,r){var o=bi();si.flags|=e,o.memoizedState=Ti(1|t,n,void 0,void 0===r?null:r)}function Li(e,t,n,r){var o=vi();r=void 0===r?null:r;var a=void 0;if(null!==li){var i=li.memoizedState;if(a=i.destroy,null!==r&&hi(r,i.deps))return void(o.memoizedState=Ti(t,n,a,r))}si.flags|=e,o.memoizedState=Ti(1|t,n,a,r)}function Ri(e,t){return Ni(8390656,8,e,t)}function Di(e,t){return Li(2048,8,e,t)}function Mi(e,t){return Li(4,2,e,t)}function Fi(e,t){return Li(4,4,e,t)}function Bi(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function zi(e,t,n){return n=null!=n?n.concat([e]):null,Li(4,4,Bi.bind(null,t,e),n)}function Ui(){}function $i(e,t){var n=vi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&hi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qi(e,t){var n=vi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&hi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Hi(e,t,n){return 21&ii?(sr(n,t)||(n=ht(),si.lanes|=n,Dl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,vs=!0),e.memoizedState=n)}function Vi(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=ai.transition;ai.transition={};try{e(!1),t()}finally{vt=n,ai.transition=r}}function Wi(){return vi().memoizedState}function Ki(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qi(e))Yi(t,n);else if(null!==(n=La(e,t,n,r))){nc(n,e,r,ec()),Zi(n,t,r)}}function Gi(e,t,n){var r=tc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qi(e))Yi(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,sr(s,i)){var l=t.interleaved;return null===l?(o.next=o,Na(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=La(e,t,o,r))&&(nc(n,e,r,o=ec()),Zi(n,t,r))}}function Qi(e){var t=e.alternate;return e===si||null!==t&&t===si}function Yi(e,t){di=ui=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zi(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Ji={readContext:Ta,useCallback:mi,useContext:mi,useEffect:mi,useImperativeHandle:mi,useInsertionEffect:mi,useLayoutEffect:mi,useMemo:mi,useReducer:mi,useRef:mi,useState:mi,useDebugValue:mi,useDeferredValue:mi,useTransition:mi,useMutableSource:mi,useSyncExternalStore:mi,useId:mi,unstable_isNewReconciler:!1},Xi={readContext:Ta,useCallback:function(e,t){return bi().memoizedState=[e,void 0===t?null:t],e},useContext:Ta,useEffect:Ri,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ni(4194308,4,Bi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ni(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ni(4,2,e,t)},useMemo:function(e,t){var n=bi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ki.bind(null,si,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},bi().memoizedState=e},useState:Ai,useDebugValue:Ui,useDeferredValue:function(e){return bi().memoizedState=e},useTransition:function(){var e=Ai(!1),t=e[0];return e=Vi.bind(null,e[1]),bi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=si,o=bi();if(aa){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Cl)throw Error(a(349));30&ii||_i(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ri(Oi.bind(null,r,i,e),[e]),r.flags|=2048,Ti(9,Ei.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=bi(),t=Cl.identifierPrefix;if(aa){var n=Jo;t=":"+t+"R"+(n=(Zo&~(1<<32-it(Zo)-1)).toString(32)+n),0<(n=pi++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fi++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Ta,useCallback:$i,useContext:Ta,useEffect:Di,useImperativeHandle:zi,useInsertionEffect:Mi,useLayoutEffect:Fi,useMemo:qi,useReducer:Si,useRef:Ii,useState:function(){return Si(wi)},useDebugValue:Ui,useDeferredValue:function(e){return Hi(vi(),li.memoizedState,e)},useTransition:function(){return[Si(wi)[0],vi().memoizedState]},useMutableSource:ki,useSyncExternalStore:ji,useId:Wi,unstable_isNewReconciler:!1},ts={readContext:Ta,useCallback:$i,useContext:Ta,useEffect:Di,useImperativeHandle:zi,useInsertionEffect:Mi,useLayoutEffect:Fi,useMemo:qi,useReducer:xi,useRef:Ii,useState:function(){return xi(wi)},useDebugValue:Ui,useDeferredValue:function(e){var t=vi();return null===li?t.memoizedState=e:Hi(t,li.memoizedState,e)},useTransition:function(){return[xi(wi)[0],vi().memoizedState]},useMutableSource:ki,useSyncExternalStore:ji,useId:Wi,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=M({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:M({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var os={isMounted:function(e){return!!(e=e._reactInternals)&&$e(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),o=tc(e),a=Ba(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=za(e,a,o))&&(nc(t,e,o,r),Ua(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),o=tc(e),a=Ba(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=za(e,a,o))&&(nc(t,e,o,r),Ua(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),o=Ba(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=za(e,o,r))&&(nc(t,e,r,n),Ua(t,e,r))}};function as(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(o,a))}function is(e,t,n){var r=!1,o=Po,a=t.contextType;return"object"==typeof a&&null!==a?a=Ta(a):(o=No(t)?To:Co.current,a=(r=null!=(r=t.contextTypes))?Io(e,o):Po),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=os,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&os.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ma(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=Ta(a):(a=No(t)?To:Co.current,o.context=Io(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(rs(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&os.enqueueReplaceState(o,o.state,null),qa(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=U(r),r=r.return}while(r);var o=n}catch(a){o="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:o,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ps="function"==typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=Ba(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),ds(0,t)},n}function ms(e,t,n){(n=Ba(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ds(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===Wl?Wl=new Set([this]):Wl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function hs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ps;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=_c.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ba(-1,1)).tag=2,za(n,t,1))),n.lanes|=1),e)}var bs=w.ReactCurrentOwner,vs=!1;function ws(e,t,n,r){t.child=null===e?xa(t,null,n,r):Sa(t,e.child,n,r)}function Ss(e,t,n,r,o){n=n.render;var a=t.ref;return Aa(t,o),r=gi(e,t,n,r,a,o),n=yi(),null===e||vs?(aa&&n&&ta(t),t.flags|=1,ws(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Hs(e,t,o))}function xs(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Ic(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Lc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ks(e,t,a,r,o))}if(a=e.child,!(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(i,r)&&e.ref===t.ref)return Hs(e,t,o)}return t.flags|=1,(e=Nc(a,r)).ref=t.ref,e.return=t,t.child=e}function ks(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref){if(vs=!1,t.pendingProps=r=a,!(e.lanes&o))return t.lanes=e.lanes,Hs(e,t,o);131072&e.flags&&(vs=!0)}}return Es(e,t,n,r,o)}function js(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oo(Nl,Il),Il|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Oo(Nl,Il),Il|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oo(Nl,Il),Il|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Oo(Nl,Il),Il|=r;return ws(e,t,o,n),t.child}function _s(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Es(e,t,n,r,o){var a=No(n)?To:Co.current;return a=Io(t,a),Aa(t,o),n=gi(e,t,n,r,a,o),r=yi(),null===e||vs?(aa&&r&&ta(t),t.flags|=1,ws(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Hs(e,t,o))}function Os(e,t,n,r,o){if(No(n)){var a=!0;Mo(t)}else a=!1;if(Aa(t,o),null===t.stateNode)qs(e,t),is(t,n,r),ls(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ta(c):c=Io(t,c=No(n)?To:Co.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,i,r,c),Da=!1;var p=t.memoizedState;i.state=p,qa(t,r,i,o),l=t.memoizedState,s!==r||p!==l||Ao.current||Da?("function"==typeof u&&(rs(t,n,u,r),l=t.memoizedState),(s=Da||as(t,n,s,r,p,l,c))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Fa(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),i.props=c,d=t.pendingProps,p=i.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ta(l):l=Io(t,l=No(n)?To:Co.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||p!==l)&&ss(t,i,r,l),Da=!1,p=t.memoizedState,i.state=p,qa(t,r,i,o);var m=t.memoizedState;s!==d||p!==m||Ao.current||Da?("function"==typeof f&&(rs(t,n,f,r),m=t.memoizedState),(c=Da||as(t,n,c,r,p,m,l)||!1)?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,m,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,m,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=l,r=c):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ps(e,t,n,r,a,o)}function Ps(e,t,n,r,o,a){_s(e,t);var i=!!(128&t.flags);if(!r&&!i)return o&&Fo(t,n,!1),Hs(e,t,a);r=t.stateNode,bs.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=Sa(t,e.child,null,a),t.child=Sa(t,null,s,a)):ws(e,t,s,a),t.memoizedState=r.state,o&&Fo(t,n,!0),t.child}function Cs(e){var t=e.stateNode;t.pendingContext?Ro(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ro(0,t.context,!1),Ya(e,t.containerInfo)}function As(e,t,n,r,o){return ma(),ha(o),t.flags|=256,ws(e,t,n,r),t.child}var Ts,Is,Ns,Ls,Rs={dehydrated:null,treeContext:null,retryLane:0};function Ds(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ms(e,t,n){var r,o=t.pendingProps,i=ei.current,s=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&i)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Oo(ei,1&i),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},1&o||null===s?s=Dc(l,o,0,null):(s.childLanes=0,s.pendingProps=l),e=Rc(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ds(n),t.memoizedState=Rs,e):Fs(t,l));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,s){if(n)return 256&t.flags?(t.flags&=-257,Bs(e,t,s,r=us(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Dc({mode:"visible",children:r.children},o,0,null),(i=Rc(i,o,s,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,1&t.mode&&Sa(t,e.child,null,s),t.child.memoizedState=Ds(s),t.memoizedState=Rs,i);if(!(1&t.mode))return Bs(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,Bs(e,t,s,r=us(i=Error(a(419)),r,void 0))}if(l=!!(s&e.childLanes),vs||l){if(null!==(r=Cl)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=o&(r.suspendedLanes|s)?0:o)&&o!==i.retryLane&&(i.retryLane=o,Ra(e,o),nc(r,e,o,-1))}return hc(),Bs(e,t,s,r=us(Error(a(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Oc.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,oa=co(o.nextSibling),ra=t,aa=!0,ia=null,null!==e&&(Go[Qo++]=Zo,Go[Qo++]=Jo,Go[Qo++]=Yo,Zo=e.id,Jo=e.overflow,Yo=t),t=Fs(t,r.children),t.flags|=4096,t)}(e,t,l,o,r,i,n);if(s){s=o.fallback,l=t.mode,r=(i=e.child).sibling;var c={mode:"hidden",children:o.children};return 1&l||t.child===i?(o=Nc(i,c)).subtreeFlags=14680064&i.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null),null!==r?s=Nc(r,s):(s=Rc(s,l,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Ds(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Rs,o}return e=(s=e.child).sibling,o=Nc(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Fs(e,t){return(t=Dc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bs(e,t,n,r){return null!==r&&ha(r),Sa(t,e.child,null,n),(e=Fs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function zs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ca(e.return,t,n)}function Us(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function $s(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(ws(e,t,r.children,n),2&(r=ei.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&zs(e,n,t);else if(19===e.tag)zs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oo(ei,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ti(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Us(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ti(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Us(t,!0,n,null,a);break;case"together":Us(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function qs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Dl|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Nc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Nc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Vs(e,t){if(!aa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ws(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ks(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ws(t),null;case 1:case 17:return No(t.type)&&Lo(),Ws(t),null;case 3:return r=t.stateNode,Za(),Eo(Ao),Eo(Co),ri(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(pa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ia&&(ic(ia),ia=null))),Is(e,t),Ws(t),null;case 5:Xa(t);var o=Qa(Ga.current);if(n=t.type,null!==e&&null!=t.stateNode)Ns(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Ws(t),null}if(e=Qa(Wa.current),pa(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[fo]=t,r[mo]=i,e=!!(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(o=0;o<Rr.length;o++)Br(Rr[o],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":Y(r,i),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Br("invalid",r);break;case"textarea":oe(r,i),Br("invalid",r)}for(var l in be(n,i),o=null,i)if(i.hasOwnProperty(l)){var c=i[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==i.suppressHydrationWarning&&Jr(r.textContent,c,e),o=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==i.suppressHydrationWarning&&Jr(r.textContent,c,e),o=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Br("scroll",r)}switch(n){case"input":W(r),X(r,i,!0);break;case"textarea":W(r),ie(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=Xr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[fo]=t,e[mo]=r,Ts(e,t,!1,!1),t.stateNode=e;e:{switch(l=ve(n,r),n){case"dialog":Br("cancel",e),Br("close",e),o=r;break;case"iframe":case"object":case"embed":Br("load",e),o=r;break;case"video":case"audio":for(o=0;o<Rr.length;o++)Br(Rr[o],e);o=r;break;case"source":Br("error",e),o=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),o=r;break;case"details":Br("toggle",e),o=r;break;case"input":Y(e,r),o=Q(e,r),Br("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=M({},r,{value:void 0}),Br("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Br("invalid",e)}for(i in be(n,o),c=o)if(c.hasOwnProperty(i)){var u=c[i];"style"===i?ge(e,u):"dangerouslySetInnerHTML"===i?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===i?"string"==typeof u?("textarea"!==n||""!==u)&&pe(e,u):"number"==typeof u&&pe(e,""+u):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(s.hasOwnProperty(i)?null!=u&&"onScroll"===i&&Br("scroll",e):null!=u&&v(e,i,u,l))}switch(n){case"input":W(e),X(e,r,!1);break;case"textarea":W(e),ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?ne(e,!!r.multiple,i,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Xr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ws(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=Qa(Ga.current),Qa(Wa.current),pa(t)){if(r=t.stateNode,n=t.memoizedProps,r[fo]=t,(i=r.nodeValue!==n)&&null!==(e=ra))switch(e.tag){case 3:Jr(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,!!(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[fo]=t,t.stateNode=r}return Ws(t),null;case 13:if(Eo(ei),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(aa&&null!==oa&&1&t.mode&&!(128&t.flags))fa(),ma(),t.flags|=98560,i=!1;else if(i=pa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));i[fo]=t}else ma(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ws(t),i=!1}else null!==ia&&(ic(ia),ia=null),i=!0;if(!i)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ei.current?0===Ll&&(Ll=3):hc())),null!==t.updateQueue&&(t.flags|=4),Ws(t),null);case 4:return Za(),Is(e,t),null===e&&$r(t.stateNode.containerInfo),Ws(t),null;case 10:return Pa(t.type._context),Ws(t),null;case 19:if(Eo(ei),null===(i=t.memoizedState))return Ws(t),null;if(r=!!(128&t.flags),null===(l=i.rendering))if(r)Vs(i,!1);else{if(0!==Ll||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ti(e))){for(t.flags|=128,Vs(i,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(l=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oo(ei,1&ei.current|2),t.child}e=e.sibling}null!==i.tail&&Ze()>$l&&(t.flags|=128,r=!0,Vs(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ti(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Vs(i,!0),null===i.tail&&"hidden"===i.tailMode&&!l.alternate&&!aa)return Ws(t),null}else 2*Ze()-i.renderingStartTime>$l&&1073741824!==n&&(t.flags|=128,r=!0,Vs(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=i.last)?n.sibling=l:t.child=l,i.last=l)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ze(),t.sibling=null,n=ei.current,Oo(ei,r?1&n|2:1&n),t):(Ws(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Il)&&(Ws(t),6&t.subtreeFlags&&(t.flags|=8192)):Ws(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Gs(e,t){switch(na(t),t.tag){case 1:return No(t.type)&&Lo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Za(),Eo(Ao),Eo(Co),ri(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Xa(t),null;case 13:if(Eo(ei),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));ma()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Eo(ei),null;case 4:return Za(),null;case 10:return Pa(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ts=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Is=function(){},Ns=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Qa(Wa.current);var a,i=null;switch(n){case"input":o=Q(e,o),r=Q(e,r),i=[];break;case"select":o=M({},o,{value:void 0}),r=M({},r,{value:void 0}),i=[];break;case"textarea":o=re(e,o),r=re(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Xr)}for(u in be(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var l=o[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(i||(i=[]),i.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(i=i||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(i=i||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Br("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Qs=!1,Ys=!1,Zs="function"==typeof WeakSet?WeakSet:Set,Js=null;function Xs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){jc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){jc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&el(t,n,a)}o=o.next}while(o!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ol(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fo],delete t[mo],delete t[go],delete t[yo],delete t[bo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function il(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||il(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Xr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function pl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(ot,n)}catch(s){}switch(n.tag){case 5:Ys||Xs(n,t);case 6:var r=ul,o=dl;ul=null,pl(e,t,n),dl=o,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?lo(e.parentNode,n):1===e.nodeType&&lo(e,n),$t(e)):lo(ul,n.stateNode));break;case 4:r=ul,o=dl,ul=n.stateNode.containerInfo,dl=!0,pl(e,t,n),ul=r,dl=o;break;case 0:case 11:case 14:case 15:if(!Ys&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(2&a||4&a)&&el(n,t,i),o=o.next}while(o!==r)}pl(e,t,n);break;case 1:if(!Ys&&(Xs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){jc(n,t,s)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,pl(e,t,n),Ys=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Zs),t.forEach((function(t){var r=Pc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function hl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(a(160));fl(i,s,o),ul=null,dl=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(u){jc(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hl(t,e),yl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(g){jc(e,e.return,g)}try{nl(5,e,e.return)}catch(g){jc(e,e.return,g)}}break;case 1:hl(t,e),yl(e),512&r&&null!==n&&Xs(n,n.return);break;case 5:if(hl(t,e),yl(e),512&r&&null!==n&&Xs(n,n.return),32&e.flags){var o=e.stateNode;try{pe(o,"")}catch(g){jc(e,e.return,g)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,s=null!==n?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===i.type&&null!=i.name&&Z(o,i),ve(l,s);var u=ve(l,i);for(s=0;s<c.length;s+=2){var d=c[s],p=c[s+1];"style"===d?ge(o,p):"dangerouslySetInnerHTML"===d?de(o,p):"children"===d?pe(o,p):v(o,d,p,u)}switch(l){case"input":J(o,i);break;case"textarea":ae(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var m=i.value;null!=m?ne(o,!!i.multiple,m,!1):f!==!!i.multiple&&(null!=i.defaultValue?ne(o,!!i.multiple,i.defaultValue,!0):ne(o,!!i.multiple,i.multiple?[]:"",!1))}o[mo]=i}catch(g){jc(e,e.return,g)}}break;case 6:if(hl(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(a(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){jc(e,e.return,g)}}break;case 3:if(hl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{$t(t.containerInfo)}catch(g){jc(e,e.return,g)}break;case 4:default:hl(t,e),yl(e);break;case 13:hl(t,e),yl(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Ul=Ze())),4&r&&ml(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ys=(u=Ys)||d,hl(t,e),Ys=u):hl(t,e),yl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Js=e,d=e.child;null!==d;){for(p=Js=d;null!==Js;){switch(m=(f=Js).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:Xs(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(g){jc(r,n,g)}}break;case 5:Xs(f,f.return);break;case 22:if(null!==f.memoizedState){Sl(p);continue}}null!==m?(m.return=f,Js=m):Sl(p)}d=d.sibling}e:for(d=null,p=e;;){if(5===p.tag){if(null===d){d=p;try{o=p.stateNode,u?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(l=p.stateNode,s=null!=(c=p.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=he("display",s))}catch(g){jc(e,e.return,g)}}}else if(6===p.tag){if(null===d)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(g){jc(e,e.return,g)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===e)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;null===p.sibling;){if(null===p.return||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:hl(t,e),yl(e),4&r&&ml(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(il(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(pe(o,""),r.flags&=-33),cl(e,sl(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;ll(e,sl(e),i);break;default:throw Error(a(161))}}catch(s){jc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bl(e,t,n){Js=e,vl(e,t,n)}function vl(e,t,n){for(var r=!!(1&e.mode);null!==Js;){var o=Js,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Qs;if(!i){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Ys;s=Qs;var c=Ys;if(Qs=i,(Ys=l)&&!c)for(Js=o;null!==Js;)l=(i=Js).child,22===i.tag&&null!==i.memoizedState?xl(o):null!==l?(l.return=i,Js=l):xl(o);for(;null!==a;)Js=a,vl(a,t,n),a=a.sibling;Js=o,Qs=s,Ys=c}wl(e)}else 8772&o.subtreeFlags&&null!==a?(a.return=o,Js=a):wl(e)}}function wl(e){for(;null!==Js;){var t=Js;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ys||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ys)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Ha(t,i,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ha(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var p=d.dehydrated;null!==p&&$t(p)}}}break;default:throw Error(a(163))}Ys||512&t.flags&&ol(t)}catch(f){jc(t,t.return,f)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function Sl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function xl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){jc(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){jc(t,o,l)}}var a=t.return;try{ol(t)}catch(l){jc(t,a,l)}break;case 5:var i=t.return;try{ol(t)}catch(l){jc(t,i,l)}}}catch(l){jc(t,t.return,l)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var kl,jl=Math.ceil,_l=w.ReactCurrentDispatcher,El=w.ReactCurrentOwner,Ol=w.ReactCurrentBatchConfig,Pl=0,Cl=null,Al=null,Tl=0,Il=0,Nl=_o(0),Ll=0,Rl=null,Dl=0,Ml=0,Fl=0,Bl=null,zl=null,Ul=0,$l=1/0,ql=null,Hl=!1,Vl=null,Wl=null,Kl=!1,Gl=null,Ql=0,Yl=0,Zl=null,Jl=-1,Xl=0;function ec(){return 6&Pl?Ze():-1!==Jl?Jl:Jl=Ze()}function tc(e){return 1&e.mode?2&Pl&&0!==Tl?Tl&-Tl:null!==ga.transition?(0===Xl&&(Xl=ht()),Xl):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function nc(e,t,n,r){if(50<Yl)throw Yl=0,Zl=null,Error(a(185));yt(e,n,r),2&Pl&&e===Cl||(e===Cl&&(!(2&Pl)&&(Ml|=n),4===Ll&&sc(e,Tl)),rc(e,r),1===n&&0===Pl&&!(1&t.mode)&&($l=Ze()+500,zo&&qo()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-it(a),s=1<<i,l=o[i];-1===l?s&n&&!(s&r)||(o[i]=ft(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=pt(e,e===Cl?Tl:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){zo=!0,$o(e)}(lc.bind(null,e)):$o(lc.bind(null,e)),io((function(){!(6&Pl)&&qo()})),n=null;else{switch(wt(r)){case 1:n=Xe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Cc(n,oc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function oc(e,t){if(Jl=-1,Xl=0,6&Pl)throw Error(a(327));var n=e.callbackNode;if(xc()&&e.callbackNode!==n)return null;var r=pt(e,e===Cl?Tl:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=gc(e,r);else{t=r;var o=Pl;Pl|=2;var i=mc();for(Cl===e&&Tl===t||(ql=null,$l=Ze()+500,pc(e,t));;)try{bc();break}catch(l){fc(e,l)}Oa(),_l.current=i,Pl=o,null!==Al?t=0:(Cl=null,Tl=0,t=Ll)}if(0!==t){if(2===t&&(0!==(o=mt(e))&&(r=o,t=ac(e,o))),1===t)throw n=Rl,pc(e,0),sc(e,r),rc(e,Ze()),n;if(6===t)sc(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!sr(a(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=gc(e,r),2===t&&(i=mt(e),0!==i&&(r=i,t=ac(e,i))),1!==t)))throw n=Rl,pc(e,0),sc(e,r),rc(e,Ze()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:Sc(e,zl,ql);break;case 3:if(sc(e,r),(130023424&r)===r&&10<(t=Ul+500-Ze())){if(0!==pt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(Sc.bind(null,e,zl,ql),t);break}Sc(e,zl,ql);break;case 4:if(sc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-it(r);i=1<<s,(s=t[s])>o&&(o=s),r&=~i}if(r=o,10<(r=(120>(r=Ze()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jl(r/1960))-r)){e.timeoutHandle=ro(Sc.bind(null,e,zl,ql),r);break}Sc(e,zl,ql);break;default:throw Error(a(329))}}}return rc(e,Ze()),e.callbackNode===n?oc.bind(null,e):null}function ac(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(pc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=zl,zl=n,null!==t&&ic(t)),e}function ic(e){null===zl?zl=e:zl.push.apply(zl,e)}function sc(e,t){for(t&=~Fl,t&=~Ml,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(6&Pl)throw Error(a(327));xc();var t=pt(e,0);if(!(1&t))return rc(e,Ze()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=mt(e);0!==r&&(t=r,n=ac(e,r))}if(1===n)throw n=Rl,pc(e,0),sc(e,t),rc(e,Ze()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Sc(e,zl,ql),rc(e,Ze()),null}function cc(e,t){var n=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=n)&&($l=Ze()+500,zo&&qo())}}function uc(e){null!==Gl&&0===Gl.tag&&!(6&Pl)&&xc();var t=Pl;Pl|=1;var n=Ol.transition,r=vt;try{if(Ol.transition=null,vt=1,e)return e()}finally{vt=r,Ol.transition=n,!(6&(Pl=t))&&qo()}}function dc(){Il=Nl.current,Eo(Nl)}function pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Al)for(n=Al.return;null!==n;){var r=n;switch(na(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Lo();break;case 3:Za(),Eo(Ao),Eo(Co),ri();break;case 5:Xa(r);break;case 4:Za();break;case 13:case 19:Eo(ei);break;case 10:Pa(r.type._context);break;case 22:case 23:dc()}n=n.return}if(Cl=e,Al=e=Nc(e.current,null),Tl=Il=t,Ll=0,Rl=null,Fl=Ml=Dl=0,zl=Bl=null,null!==Ia){for(t=0;t<Ia.length;t++)if(null!==(r=(n=Ia[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Ia=null}return e}function fc(e,t){for(;;){var n=Al;try{if(Oa(),oi.current=Ji,ui){for(var r=si.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ui=!1}if(ii=0,ci=li=si=null,di=!1,pi=0,El.current=null,null===n||null===n.return){Ll=1,Rl=t,Al=null;break}e:{var i=e,s=n.return,l=n,c=t;if(t=Tl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,p=d.tag;if(!(1&d.mode||0!==p&&11!==p&&15!==p)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=gs(s);if(null!==m){m.flags&=-257,ys(m,s,l,0,t),1&m.mode&&hs(i,u,t),c=u;var h=(t=m).updateQueue;if(null===h){var g=new Set;g.add(c),t.updateQueue=g}else h.add(c);break e}if(!(1&t)){hs(i,u,t),hc();break e}c=Error(a(426))}else if(aa&&1&l.mode){var y=gs(s);if(null!==y){!(65536&y.flags)&&(y.flags|=256),ys(y,s,l,0,t),ha(cs(c,l));break e}}i=c=cs(c,l),4!==Ll&&(Ll=2),null===Bl?Bl=[i]:Bl.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,$a(i,fs(0,c,t));break e;case 1:l=c;var b=i.type,v=i.stateNode;if(!(128&i.flags||"function"!=typeof b.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==Wl&&Wl.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t,$a(i,ms(i,l,t));break e}}i=i.return}while(null!==i)}wc(n)}catch(w){t=w,Al===n&&null!==n&&(Al=n=n.return);continue}break}}function mc(){var e=_l.current;return _l.current=Ji,null===e?Ji:e}function hc(){0!==Ll&&3!==Ll&&2!==Ll||(Ll=4),null===Cl||!(268435455&Dl)&&!(268435455&Ml)||sc(Cl,Tl)}function gc(e,t){var n=Pl;Pl|=2;var r=mc();for(Cl===e&&Tl===t||(ql=null,pc(e,t));;)try{yc();break}catch(o){fc(e,o)}if(Oa(),Pl=n,_l.current=r,null!==Al)throw Error(a(261));return Cl=null,Tl=0,Ll}function yc(){for(;null!==Al;)vc(Al)}function bc(){for(;null!==Al&&!Qe();)vc(Al)}function vc(e){var t=kl(e.alternate,e,Il);e.memoizedProps=e.pendingProps,null===t?wc(e):Al=t,El.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Gs(n,t)))return n.flags&=32767,void(Al=n);if(null===e)return Ll=6,void(Al=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ks(n,t,Il)))return void(Al=n);if(null!==(t=t.sibling))return void(Al=t);Al=t=e}while(null!==t);0===Ll&&(Ll=5)}function Sc(e,t,n){var r=vt,o=Ol.transition;try{Ol.transition=null,vt=1,function(e,t,n,r){do{xc()}while(null!==Gl);if(6&Pl)throw Error(a(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-it(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,i),e===Cl&&(Al=Cl=null,Tl=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Kl||(Kl=!0,Cc(tt,(function(){return xc(),null}))),i=!!(15990&n.flags),!!(15990&n.subtreeFlags)||i){i=Ol.transition,Ol.transition=null;var s=vt;vt=1;var l=Pl;Pl|=4,El.current=null,function(e,t){if(eo=Ht,fr(e=pr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(S){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,p=e,f=null;t:for(;;){for(var m;p!==n||0!==o&&3!==p.nodeType||(l=s+o),p!==i||0!==r&&3!==p.nodeType||(c=s+r),3===p.nodeType&&(s+=p.nodeValue.length),null!==(m=p.firstChild);)f=p,p=m;for(;;){if(p===e)break t;if(f===n&&++u===o&&(l=s),f===i&&++d===r&&(c=s),null!==(m=p.nextSibling))break;f=(p=f).parentNode}p=m}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Ht=!1,Js=t;null!==Js;)if(e=(t=Js).child,1028&t.subtreeFlags&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var g=h.memoizedProps,y=h.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(a(163))}}catch(S){jc(t,t.return,S)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}h=tl,tl=!1}(e,n),gl(n,e),mr(to),Ht=!!eo,to=eo=null,e.current=n,bl(n,e,o),Ye(),Pl=l,vt=s,Ol.transition=i}else e.current=n;if(Kl&&(Kl=!1,Gl=e,Ql=o),i=e.pendingLanes,0===i&&(Wl=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(ot,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),rc(e,Ze()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Hl)throw Hl=!1,e=Vl,Vl=null,e;!!(1&Ql)&&0!==e.tag&&xc(),i=e.pendingLanes,1&i?e===Zl?Yl++:(Yl=0,Zl=e):Yl=0,qo()}(e,t,n,r)}finally{Ol.transition=o,vt=r}return null}function xc(){if(null!==Gl){var e=wt(Ql),t=Ol.transition,n=vt;try{if(Ol.transition=null,vt=16>e?16:e,null===Gl)var r=!1;else{if(e=Gl,Gl=null,Ql=0,6&Pl)throw Error(a(331));var o=Pl;for(Pl|=4,Js=e.current;null!==Js;){var i=Js,s=i.child;if(16&Js.flags){var l=i.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Js=u;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:nl(8,d,i)}var p=d.child;if(null!==p)p.return=d,Js=p;else for(;null!==Js;){var f=(d=Js).sibling,m=d.return;if(al(d),d===u){Js=null;break}if(null!==f){f.return=m,Js=f;break}Js=m}}}var h=i.alternate;if(null!==h){var g=h.child;if(null!==g){h.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Js=i}}if(2064&i.subtreeFlags&&null!==s)s.return=i,Js=s;else e:for(;null!==Js;){if(2048&(i=Js).flags)switch(i.tag){case 0:case 11:case 15:nl(9,i,i.return)}var b=i.sibling;if(null!==b){b.return=i.return,Js=b;break e}Js=i.return}}var v=e.current;for(Js=v;null!==Js;){var w=(s=Js).child;if(2064&s.subtreeFlags&&null!==w)w.return=s,Js=w;else e:for(s=v;null!==Js;){if(2048&(l=Js).flags)try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(x){jc(l,l.return,x)}if(l===s){Js=null;break e}var S=l.sibling;if(null!==S){S.return=l.return,Js=S;break e}Js=l.return}}if(Pl=o,qo(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(ot,e)}catch(x){}r=!0}return r}finally{vt=n,Ol.transition=t}}return!1}function kc(e,t,n){e=za(e,t=fs(0,t=cs(n,t),1),1),t=ec(),null!==e&&(yt(e,1,t),rc(e,t))}function jc(e,t,n){if(3===e.tag)kc(e,e,n);else for(;null!==t;){if(3===t.tag){kc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Wl||!Wl.has(r))){t=za(t,e=ms(t,e=cs(n,e),1),1),e=ec(),null!==t&&(yt(t,1,e),rc(t,e));break}}t=t.return}}function _c(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Cl===e&&(Tl&n)===n&&(4===Ll||3===Ll&&(130023424&Tl)===Tl&&500>Ze()-Ul?pc(e,0):Fl|=n),rc(e,t)}function Ec(e,t){0===t&&(1&e.mode?(t=ut,!(130023424&(ut<<=1))&&(ut=4194304)):t=1);var n=ec();null!==(e=Ra(e,t))&&(yt(e,t,n),rc(e,n))}function Oc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ec(e,n)}function Pc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Ec(e,n)}function Cc(e,t){return Ke(e,t)}function Ac(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tc(e,t,n,r){return new Ac(e,t,n,r)}function Ic(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Nc(e,t){var n=e.alternate;return null===n?((n=Tc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Lc(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)Ic(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case k:return Rc(n.children,o,i,t);case j:s=8,o|=8;break;case _:return(e=Tc(12,n,t,2|o)).elementType=_,e.lanes=i,e;case C:return(e=Tc(13,n,t,o)).elementType=C,e.lanes=i,e;case A:return(e=Tc(19,n,t,o)).elementType=A,e.lanes=i,e;case N:return Dc(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:s=10;break e;case O:s=9;break e;case P:s=11;break e;case T:s=14;break e;case I:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Tc(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Rc(e,t,n,r){return(e=Tc(7,e,r,t)).lanes=n,e}function Dc(e,t,n,r){return(e=Tc(22,e,r,t)).elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function Mc(e,t,n){return(e=Tc(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Tc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function zc(e,t,n,r,o,a,i,s,l){return e=new Bc(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Tc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ma(a),e}function Uc(e){if(!e)return Po;e:{if($e(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(No(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(No(n))return Do(e,n,t)}return t}function $c(e,t,n,r,o,a,i,s,l){return(e=zc(n,r,!0,e,0,a,0,s,l)).context=Uc(null),n=e.current,(a=Ba(r=ec(),o=tc(n))).callback=null!=t?t:null,za(n,a,o),e.current.lanes=o,yt(e,o,r),rc(e,r),e}function qc(e,t,n,r){var o=t.current,a=ec(),i=tc(o);return n=Uc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ba(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=za(o,t,i))&&(nc(e,o,i,a),Ua(e,o,i)),i}function Hc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Wc(e,t){Vc(e,t),(e=e.alternate)&&Vc(e,t)}kl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ao.current)vs=!0;else{if(!(e.lanes&n||128&t.flags))return vs=!1,function(e,t,n){switch(t.tag){case 3:Cs(t),ma();break;case 5:Ja(t);break;case 1:No(t.type)&&Mo(t);break;case 4:Ya(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Oo(ka,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Oo(ei,1&ei.current),t.flags|=128,null):n&t.child.childLanes?Ms(e,t,n):(Oo(ei,1&ei.current),null!==(e=Hs(e,t,n))?e.sibling:null);Oo(ei,1&ei.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return $s(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Oo(ei,ei.current),r)break;return null;case 22:case 23:return t.lanes=0,js(e,t,n)}return Hs(e,t,n)}(e,t,n);vs=!!(131072&e.flags)}else vs=!1,aa&&1048576&t.flags&&ea(t,Ko,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qs(e,t),e=t.pendingProps;var o=Io(t,Co.current);Aa(t,n),o=gi(null,t,r,e,o,n);var i=yi();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,No(r)?(i=!0,Mo(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ma(t),o.updater=os,t.stateNode=o,o._reactInternals=t,ls(t,r,e,n),t=Ps(null,t,r,!0,i,n)):(t.tag=0,aa&&i&&ta(t),ws(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qs(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Ic(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===T)return 14}return 2}(r),e=ns(r,e),o){case 0:t=Es(null,t,r,e,n);break e;case 1:t=Os(null,t,r,e,n);break e;case 11:t=Ss(null,t,r,e,n);break e;case 14:t=xs(null,t,r,ns(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Es(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 1:return r=t.type,o=t.pendingProps,Os(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 3:e:{if(Cs(t),null===e)throw Error(a(387));r=t.pendingProps,o=(i=t.memoizedState).element,Fa(e,t),qa(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=As(e,t,r,n,o=cs(Error(a(423)),t));break e}if(r!==o){t=As(e,t,r,n,o=cs(Error(a(424)),t));break e}for(oa=co(t.stateNode.containerInfo.firstChild),ra=t,aa=!0,ia=null,n=xa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ma(),r===o){t=Hs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return Ja(t),null===e&&ua(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,no(r,o)?s=null:null!==i&&no(r,i)&&(t.flags|=32),_s(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&ua(t),null;case 13:return Ms(e,t,n);case 4:return Ya(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Sa(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ss(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Oo(ka,r._currentValue),r._currentValue=s,null!==i)if(sr(i.value,s)){if(i.children===o.children&&!Ao.current){t=Hs(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var l=i.dependencies;if(null!==l){s=i.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===i.tag){(c=Ba(-1,n&-n)).tag=2;var u=i.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,null!==(c=i.alternate)&&(c.lanes|=n),Ca(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===i.tag)s=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(s=i.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Ca(s,n,t),s=i.sibling}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===t){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}ws(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Aa(t,n),r=r(o=Ta(o)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return o=ns(r=t.type,t.pendingProps),xs(e,t,r,o=ns(r.type,o),n);case 15:return ks(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ns(r,o),qs(e,t),t.tag=1,No(r)?(e=!0,Mo(t)):e=!1,Aa(t,n),is(t,r,o),ls(t,r,o,n),Ps(null,t,r,!0,e,n);case 19:return $s(e,t,n);case 22:return js(e,t,n)}throw Error(a(156,t.tag))};var Kc="function"==typeof reportError?reportError:function(e){console.error(e)};function Gc(e){this._internalRoot=e}function Qc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jc(){}function Xc(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var s=o;o=function(){var e=Hc(i);s.call(e)}}qc(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=Hc(i);a.call(e)}}var i=$c(t,r,e,0,null,!1,0,"",Jc);return e._reactRootContainer=i,e[ho]=i.current,$r(8===e.nodeType?e.parentNode:e),uc(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=Hc(l);s.call(e)}}var l=zc(e,0,!1,null,0,!1,0,"",Jc);return e._reactRootContainer=l,e[ho]=l.current,$r(8===e.nodeType?e.parentNode:e),uc((function(){qc(t,l,n,r)})),l}(n,t,e,o,r);return Hc(i)}Qc.prototype.render=Gc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));qc(e,t,null,null)},Qc.prototype.unmount=Gc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc((function(){qc(null,e,null,null)})),t[ho]=null}},Qc.prototype.unstable_scheduleHydration=function(e){if(e){var t=jt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&0!==t&&t<Nt[n].priority;n++);Nt.splice(n,0,e),0===n&&Mt(e)}},St=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(bt(t,1|n),rc(t,Ze()),!(6&Pl)&&($l=Ze()+500,qo()))}break;case 13:uc((function(){var t=Ra(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),Wc(e,1)}},xt=function(e){if(13===e.tag){var t=Ra(e,134217728);if(null!==t)nc(t,e,134217728,ec());Wc(e,134217728)}},kt=function(e){if(13===e.tag){var t=tc(e),n=Ra(e,t);if(null!==n)nc(n,e,t,ec());Wc(e,t)}},jt=function(){return vt},_t=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}},xe=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=xo(r);if(!o)throw Error(a(90));K(r),J(r,o)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Pe=cc,Ce=uc;var eu={usingClientEntryPoint:!1,Events:[wo,So,xo,Ee,Oe,cc]},tu={findFiberByHostInstance:vo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{ot=ru.inject(nu),at=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Yc(e))throw Error(a(299));var n=!1,r="",o=Kc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=zc(e,1,!1,null,0,n,0,r,o),e[ho]=t.current,$r(8===e.nodeType?e.parentNode:e),new Gc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!Zc(t))throw Error(a(200));return Xc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yc(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",s=Kc;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=$c(t,null,e,1,null!=n?n:null,o,0,i,s),e[ho]=t.current,$r(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Qc(t)},t.render=function(e,t,n){if(!Zc(t))throw Error(a(200));return Xc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Zc(e))throw Error(a(40));return!!e._reactRootContainer&&(uc((function(){Xc(null,null,e,!1,(function(){e._reactRootContainer=null,e[ho]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return Xc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},5338:(e,t,n)=>{"use strict";var r=n(40961);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},40961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(22551)},30115:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var s,l,c,u;if(Array.isArray(e)){if((s=e.length)!=i.length)return!1;for(l=s;0!=l--;)if(!a(e[l],i[l]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!i.has(l.value[0]))return!1;for(u=e.entries();!(l=u.next()).done;)if(!a(l.value[1],i.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!i.has(l.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((s=e.length)!=i.length)return!1;for(l=s;0!=l--;)if(e[l]!==i[l])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof i.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof i.toString)return e.toString()===i.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(i,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!a(e[c[l]],i[c[l]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return a(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},80545:(e,t,n)=>{"use strict";n.d(t,{mg:()=>X,vd:()=>V});var r=n(63696),o=n(5556),a=n.n(o),i=n(30115),s=n.n(i),l=n(20311),c=n.n(l),u=n(2833),d=n.n(u);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function f(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(o[n]=e[n]);return o}var g={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},y={rel:["amphtml","canonical","alternate"]},b={type:["application/ld+json"]},v={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(g).map((function(e){return g[e]})),S={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(S).reduce((function(e,t){return e[S[t]]=t,e}),{}),k=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},j=function(e){var t=k(e,g.TITLE),n=k(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(function(){return t}));var r=k(e,"defaultTitle");return t||r||void 0},_=function(e){return k(e,"onChangeClientState")||function(){}},E=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return p({},e,t)}),{})},O=function(e,t){return t.filter((function(e){return void 0!==e[g.BASE]})).map((function(e){return e[g.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),o=0;o<r.length;o+=1){var a=r[o].toLowerCase();if(-1!==e.indexOf(a)&&n[a])return t.concat(n)}return t}),[])},P=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var o={};n.filter((function(e){for(var n,a=Object.keys(e),i=0;i<a.length;i+=1){var s=a[i],l=s.toLowerCase();-1===t.indexOf(l)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===l&&"stylesheet"===e[l].toLowerCase()||(n=l),-1===t.indexOf(s)||"innerHTML"!==s&&"cssText"!==s&&"itemprop"!==s||(n=s)}if(!n||!e[n])return!1;var c=e[n].toLowerCase();return r[n]||(r[n]={}),o[n]||(o[n]={}),!r[n][c]&&(o[n][c]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var a=Object.keys(o),i=0;i<a.length;i+=1){var s=a[i],l=p({},r[s],o[s]);r[s]=l}return e}),[]).reverse()},C=function(e,t){if(Array.isArray(e)&&e.length)for(var n=0;n<e.length;n+=1)if(e[n][t])return!0;return!1},A=function(e){return Array.isArray(e)?e.join(""):e},T=function(e,t){return Array.isArray(e)?e.reduce((function(e,n){return function(e,t){for(var n=Object.keys(e),r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1}(n,t)?e.priority.push(n):e.default.push(n),e}),{priority:[],default:[]}):{default:e}},I=function(e,t){var n;return p({},e,((n={})[t]=void 0,n))},N=[g.NOSCRIPT,g.SCRIPT,g.STYLE],L=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},R=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},D=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce((function(t,n){return t[S[n]||n]=e[n],t}),t)},M=function(e,t){return t.map((function(t,n){var o,a=((o={key:n})["data-rh"]=!0,o);return Object.keys(t).forEach((function(e){var n=S[e]||e;"innerHTML"===n||"cssText"===n?a.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:a[n]=t[e]})),r.createElement(e,a)}))},F=function(e,t,n){switch(e){case g.TITLE:return{toComponent:function(){return n=t.titleAttributes,(o={key:e=t.title})["data-rh"]=!0,a=D(n,o),[r.createElement(g.TITLE,a,e)];var e,n,o,a},toString:function(){return function(e,t,n,r){var o=R(n),a=A(t);return o?"<"+e+' data-rh="true" '+o+">"+L(a,r)+"</"+e+">":"<"+e+' data-rh="true">'+L(a,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return D(t)},toString:function(){return R(t)}};default:return{toComponent:function(){return M(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var o=Object.keys(r).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,t){var o=void 0===r[t]?t:t+'="'+L(r[t],n)+'"';return e?e+" "+o:o}),""),a=r.innerHTML||r.cssText||"",i=-1===N.indexOf(e);return t+"<"+e+' data-rh="true" '+o+(i?"/>":">"+a+"</"+e+">")}),"")}(e,t,n)}}}},B=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,a=e.noscriptTags,i=e.styleTags,s=e.title,l=void 0===s?"":s,c=e.titleAttributes,u=e.linkTags,d=e.metaTags,p=e.scriptTags,f={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,o=T(e.metaTags,v),a=T(t,y),i=T(n,b);return{priorityMethods:{toComponent:function(){return[].concat(M(g.META,o.priority),M(g.LINK,a.priority),M(g.SCRIPT,i.priority))},toString:function(){return F(g.META,o.priority,r)+" "+F(g.LINK,a.priority,r)+" "+F(g.SCRIPT,i.priority,r)}},metaTags:o.default,linkTags:a.default,scriptTags:i.default}}(e);f=m.priorityMethods,u=m.linkTags,d=m.metaTags,p=m.scriptTags}return{priority:f,base:F(g.BASE,t,r),bodyAttributes:F("bodyAttributes",n,r),htmlAttributes:F("htmlAttributes",o,r),link:F(g.LINK,u,r),meta:F(g.META,d,r),noscript:F(g.NOSCRIPT,a,r),script:F(g.SCRIPT,p,r),style:F(g.STYLE,i,r),title:F(g.TITLE,{title:l,titleAttributes:c},r)}},z=[],U=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?z:n.instances},add:function(e){(n.canUseDOM?z:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?z:n.instances).indexOf(e);(n.canUseDOM?z:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=B({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},$=r.createContext({}),q=a().shape({setHelmet:a().func,helmetInstances:a().shape({get:a().func,add:a().func,remove:a().func})}),H="undefined"!=typeof document,V=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new U(r.props.context,t.canUseDOM),r}return f(t,e),t.prototype.render=function(){return r.createElement($.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);V.canUseDOM=H,V.propTypes={context:a().shape({helmet:a().shape()}),children:a().node.isRequired},V.defaultProps={context:{}},V.displayName="HelmetProvider";var W=function(e,t){var n,r=document.head||document.querySelector(g.HEAD),o=r.querySelectorAll(e+"[data-rh]"),a=[].slice.call(o),i=[];return t&&t.length&&t.forEach((function(t){var r=document.createElement(e);for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&("innerHTML"===o?r.innerHTML=t.innerHTML:"cssText"===o?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(o,void 0===t[o]?"":t[o]));r.setAttribute("data-rh","true"),a.some((function(e,t){return n=t,r.isEqualNode(e)}))?a.splice(n,1):i.push(r)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return r.appendChild(e)})),{oldTags:a,newTags:i}},K=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),o=r?r.split(","):[],a=[].concat(o),i=Object.keys(t),s=0;s<i.length;s+=1){var l=i[s],c=t[l]||"";n.getAttribute(l)!==c&&n.setAttribute(l,c),-1===o.indexOf(l)&&o.push(l);var u=a.indexOf(l);-1!==u&&a.splice(u,1)}for(var d=a.length-1;d>=0;d-=1)n.removeAttribute(a[d]);o.length===a.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},G=function(e,t){var n=e.baseTag,r=e.htmlAttributes,o=e.linkTags,a=e.metaTags,i=e.noscriptTags,s=e.onChangeClientState,l=e.scriptTags,c=e.styleTags,u=e.title,d=e.titleAttributes;K(g.BODY,e.bodyAttributes),K(g.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=A(e)),K(g.TITLE,t)}(u,d);var p={baseTag:W(g.BASE,n),linkTags:W(g.LINK,o),metaTags:W(g.META,a),noscriptTags:W(g.NOSCRIPT,i),scriptTags:W(g.SCRIPT,l),styleTags:W(g.STYLE,c)},f={},m={};Object.keys(p).forEach((function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(f[e]=n),r.length&&(m[e]=p[e].oldTags)})),t&&t(),s(e,f,m)},Q=null,Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).rendered=!1,t}f(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!d()(e,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var e,t,n=this.props.context,r=n.setHelmet,o=null,a=(e=n.helmetInstances.get().map((function(e){var t=p({},e.props);return delete t.context,t})),{baseTag:O(["href"],e),bodyAttributes:E("bodyAttributes",e),defer:k(e,"defer"),encode:k(e,"encodeSpecialCharacters"),htmlAttributes:E("htmlAttributes",e),linkTags:P(g.LINK,["rel","href"],e),metaTags:P(g.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:P(g.NOSCRIPT,["innerHTML"],e),onChangeClientState:_(e),scriptTags:P(g.SCRIPT,["src","innerHTML"],e),styleTags:P(g.STYLE,["cssText"],e),title:j(e),titleAttributes:E("titleAttributes",e),prioritizeSeoTags:C(e,"prioritizeSeoTags")});V.canUseDOM?(t=a,Q&&cancelAnimationFrame(Q),t.defer?Q=requestAnimationFrame((function(){G(t,(function(){Q=null}))})):(G(t),Q=null)):B&&(o=B(a)),r(o)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(r.Component);Y.propTypes={context:q.isRequired},Y.displayName="HelmetDispatcher";var Z=["children"],J=["children"],X=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!s()(I(this.props,"helmetData"),I(e,"helmetData"))},n.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case g.SCRIPT:case g.NOSCRIPT:return{innerHTML:t};case g.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return p({},r,((t={})[n.type]=[].concat(r[n.type]||[],[p({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,o=e.newProps,a=e.newChildProps,i=e.nestedChildren;switch(r.type){case g.TITLE:return p({},o,((t={})[r.type]=i,t.titleAttributes=p({},a),t));case g.BODY:return p({},o,{bodyAttributes:p({},a)});case g.HTML:return p({},o,{htmlAttributes:p({},a)});default:return p({},o,((n={})[r.type]=p({},a),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=p({},t);return Object.keys(e).forEach((function(t){var r;n=p({},n,((r={})[t]=e[t],r))})),n},n.warnOnInvalidChildren=function(e,t){return c()(w.some((function(t){return e.type===t})),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),c()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,o={};return r.Children.forEach(e,(function(e){if(e&&e.props){var r=e.props,a=r.children,i=h(r,Z),s=Object.keys(i).reduce((function(e,t){return e[x[t]||t]=i[t],e}),{}),l=e.type;switch("symbol"==typeof l?l=l.toString():n.warnOnInvalidChildren(e,a),l){case g.FRAGMENT:t=n.mapChildrenToProps(a,t);break;case g.LINK:case g.META:case g.NOSCRIPT:case g.SCRIPT:case g.STYLE:o=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:o,newChildProps:s,nestedChildren:a});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:a})}}})),this.mapArrayTypeChildrenToProps(o,t)},n.render=function(){var e=this.props,t=e.children,n=h(e,J),o=p({},n),a=n.helmetData;return t&&(o=this.mapChildrenToProps(t,o)),!a||a instanceof U||(a=new U(a.context,a.instances)),a?r.createElement(Y,p({},o,{context:a.value,helmetData:void 0})):r.createElement($.Consumer,null,(function(e){return r.createElement(Y,p({},o,{context:e}))}))},t}(r.Component);X.propTypes={base:a().object,bodyAttributes:a().object,children:a().oneOfType([a().arrayOf(a().node),a().node]),defaultTitle:a().string,defer:a().bool,encodeSpecialCharacters:a().bool,htmlAttributes:a().object,link:a().arrayOf(a().object),meta:a().arrayOf(a().object),noscript:a().arrayOf(a().object),onChangeClientState:a().func,script:a().arrayOf(a().object),style:a().arrayOf(a().object),title:a().string,titleAttributes:a().object,titleTemplate:a().string,prioritizeSeoTags:a().bool,helmetData:a().object},X.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},X.displayName="Helmet"},22799:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case h:case l:return e;default:return t}}case o:return t}}}function x(e){return S(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=h,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||S(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return S(e)===c},t.isContextProvider=function(e){return S(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return S(e)===p},t.isFragment=function(e){return S(e)===a},t.isLazy=function(e){return S(e)===g},t.isMemo=function(e){return S(e)===h},t.isPortal=function(e){return S(e)===o},t.isProfiler=function(e){return S(e)===s},t.isStrictMode=function(e){return S(e)===i},t.isSuspense=function(e){return S(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===i||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},t.typeOf=S},44363:(e,t,n)=>{"use strict";e.exports=n(22799)},53259:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}var s=n(63696),l=[],c=[];var u=s.createContext(null);function d(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function p(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var o=d(e[r]);o.loading?t.loading=!0:(t.loaded[r]=o.loaded,t.error=o.error),n.push(o.promise),o.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function f(e,t){return s.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function m(e,t){var d,p;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var m=i({loader:null,loading:null,delay:200,timeout:null,render:f,webpack:null,modules:null},t),h=null;function g(){return h||(h=e(m.loader)),h.promise}return l.push(g),"function"==typeof m.webpack&&c.push((function(){if((0,m.webpack)().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return g()})),p=d=function(t){function n(n){var r;return a(o(o(r=t.call(this,n)||this)),"retry",(function(){r.setState({error:null,loading:!0,timedOut:!1}),h=e(m.loader),r._loadModule()})),g(),r.state={error:h.error,pastDelay:!1,timedOut:!1,loading:h.loading,loaded:h.loaded},r}r(n,t),n.preload=function(){return g()};var i=n.prototype;return i.UNSAFE_componentWillMount=function(){this._loadModule()},i.componentDidMount=function(){this._mounted=!0},i._loadModule=function(){var e=this;if(this.context&&Array.isArray(m.modules)&&m.modules.forEach((function(t){e.context.report(t)})),h.loading){var t=function(t){e._mounted&&e.setState(t)};"number"==typeof m.delay&&(0===m.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){t({pastDelay:!0})}),m.delay)),"number"==typeof m.timeout&&(this._timeout=setTimeout((function(){t({timedOut:!0})}),m.timeout));var n=function(){t({error:h.error,loaded:h.loaded,loading:h.loading}),e._clearTimeouts()};h.promise.then((function(){return n(),null})).catch((function(e){return n(),null}))}},i.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},i._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},i.render=function(){return this.state.loading||this.state.error?s.createElement(m.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?m.render(this.state.loaded,this.props):null},n}(s.Component),a(d,"contextType",u),p}function h(e){return m(d,e)}h.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(p,e)};var g=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return s.createElement(u.Provider,{value:{report:this.props.report}},s.Children.only(this.props.children))},t}(s.Component);function y(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return y(e)}))}h.Capture=g,h.preloadAll=function(){return new Promise((function(e,t){y(l).then(e,t)}))},h.preloadReady=function(){return new Promise((function(e,t){y(c).then(e,e)}))},e.exports=h},22831:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,v:()=>s});var r=n(56347),o=n(58168),a=n(63696);function i(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var o=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return o&&(n.push({route:e,match:o}),e.routes&&i(e.routes,t,n)),o})),n}function s(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?a.createElement(r.dO,n,e.map((function(e,n){return a.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,o.A)({},n,{},t,{route:e})):a.createElement(e.component,(0,o.A)({},n,t,{route:e}))}})}))):null}},54625:(e,t,n)=>{"use strict";n.d(t,{I9:()=>d,Kd:()=>u,N_:()=>y,k2:()=>w});var r=n(56347),o=n(42892),a=n(63696),i=n(31513),s=n(58168),l=n(98587),c=n(11561),u=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.zR)(t.props),t}return(0,o.A)(t,e),t.prototype.render=function(){return a.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(a.Component);var d=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.TM)(t.props),t}return(0,o.A)(t,e),t.prototype.render=function(){return a.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(a.Component);var p=function(e,t){return"function"==typeof e?e(t):e},f=function(e,t){return"string"==typeof e?(0,i.yJ)(e,null,null,t):e},m=function(e){return e},h=a.forwardRef;void 0===h&&(h=m);var g=h((function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=(0,l.A)(e,["innerRef","navigate","onClick"]),c=i.target,u=(0,s.A)({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||c&&"_self"!==c||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=m!==h&&t||n,a.createElement("a",u)}));var y=h((function(e,t){var n=e.component,o=void 0===n?g:n,u=e.replace,d=e.to,y=e.innerRef,b=(0,l.A)(e,["component","replace","to","innerRef"]);return a.createElement(r.XZ.Consumer,null,(function(e){e||(0,c.A)(!1);var n=e.history,r=f(p(d,e.location),e.location),l=r?n.createHref(r):"",g=(0,s.A)({},b,{href:l,navigate:function(){var t=p(d,e.location),r=(0,i.AO)(e.location)===(0,i.AO)(f(t));(u||r?n.replace:n.push)(t)}});return m!==h?g.ref=t||y:g.innerRef=y,a.createElement(o,g)}))})),b=function(e){return e},v=a.forwardRef;void 0===v&&(v=b);var w=v((function(e,t){var n=e["aria-current"],o=void 0===n?"page":n,i=e.activeClassName,u=void 0===i?"active":i,d=e.activeStyle,m=e.className,h=e.exact,g=e.isActive,w=e.location,S=e.sensitive,x=e.strict,k=e.style,j=e.to,_=e.innerRef,E=(0,l.A)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.createElement(r.XZ.Consumer,null,(function(e){e||(0,c.A)(!1);var n=w||e.location,i=f(p(j,n),n),l=i.pathname,O=l&&l.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),P=O?(0,r.B6)(n.pathname,{path:O,exact:h,sensitive:S,strict:x}):null,C=!!(g?g(P,n):P),A="function"==typeof m?m(C):m,T="function"==typeof k?k(C):k;C&&(A=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(A,u),T=(0,s.A)({},T,d));var I=(0,s.A)({"aria-current":C&&o||null,className:A,style:T,to:i},E);return b!==v?I.ref=t||_:I.innerRef=_,a.createElement(y,I)}))}))},56347:(e,t,n)=>{"use strict";n.d(t,{B6:()=>k,Ix:()=>v,W6:()=>I,XZ:()=>b,dO:()=>A,qh:()=>j,zy:()=>N});var r=n(42892),o=n(63696),a=n(5556),i=n.n(a),s=n(31513),l=n(11561),c=n(58168),u=n(35302),d=n.n(u),p=(n(44363),n(98587)),f=(n(4146),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var h=o.createContext||function(e,t){var n,a,s="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",l=function(e){function n(){for(var t,n,r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(t=e.call.apply(e,[this].concat(a))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter((function(t){return t!==e}))},get:function(){return n},set:function(e,t){n=e,r.forEach((function(e){return e(n,t)}))}}),t}(0,r.A)(n,e);var o=n.prototype;return o.getChildContext=function(){var e;return(e={})[s]=this.emitter,e},o.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((a=r)===(i=o)?0!==a||1/a==1/i:a!=a&&i!=i)?n=0:(n="function"==typeof t?t(r,o):f,0!==(n|=0)&&this.emitter.set(e.value,n))}var a,i},o.render=function(){return this.props.children},n}(o.Component);l.childContextTypes=((n={})[s]=i().object.isRequired,n);var c=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(0|e.observedBits)&n&&e.setState({value:e.getValue()})},e}(0,r.A)(n,t);var o=n.prototype;return o.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?f:t},o.componentDidMount=function(){this.context[s]&&this.context[s].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?f:e},o.componentWillUnmount=function(){this.context[s]&&this.context[s].off(this.onUpdate)},o.getValue=function(){return this.context[s]?this.context[s].get():e},o.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(o.Component);return c.contextTypes=((a={})[s]=i().object,a),{Provider:l,Consumer:c}},g=function(e){var t=h();return t.displayName=e,t},y=g("Router-History"),b=g("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}(0,r.A)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return o.createElement(b.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.createElement(y.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.Component);o.Component;o.Component;var w={},S=1e4,x=0;function k(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,a=void 0!==o&&o,i=n.strict,s=void 0!==i&&i,l=n.sensitive,c=void 0!==l&&l;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=w[n]||(w[n]={});if(r[e])return r[e];var o=[],a={regexp:d()(e,o,t),keys:o};return x<S&&(r[e]=a,x++),a}(n,{end:a,strict:s,sensitive:c}),o=r.regexp,i=r.keys,l=o.exec(e);if(!l)return null;var u=l[0],p=l.slice(1),f=e===u;return a&&!f?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:f,params:i.reduce((function(e,t,n){return e[t.name]=p[n],e}),{})}}),null)}var j=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return o.createElement(b.Consumer,null,(function(t){t||(0,l.A)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?k(n.pathname,e.props):t.match,a=(0,c.A)({},t,{location:n,match:r}),i=e.props,s=i.children,u=i.component,d=i.render;return Array.isArray(s)&&function(e){return 0===o.Children.count(e)}(s)&&(s=null),o.createElement(b.Provider,{value:a},a.match?s?"function"==typeof s?s(a):s:u?o.createElement(u,a):d?d(a):null:"function"==typeof s?s(a):null)}))},t}(o.Component);function _(e){return"/"===e.charAt(0)?e:"/"+e}function E(e,t){if(!e)return t;var n=_(e);return 0!==t.pathname.indexOf(n)?t:(0,c.A)({},t,{pathname:t.pathname.substr(n.length)})}function O(e){return"string"==typeof e?e:(0,s.AO)(e)}function P(e){return function(){(0,l.A)(!1)}}function C(){}o.Component;var A=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return o.createElement(b.Consumer,null,(function(t){t||(0,l.A)(!1);var n,r,a=e.props.location||t.location;return o.Children.forEach(e.props.children,(function(e){if(null==r&&o.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?k(a.pathname,(0,c.A)({},e.props,{path:i})):t.match}})),r?o.cloneElement(n,{location:a,computedMatch:r}):null}))},t}(o.Component);var T=o.useContext;function I(){return T(y)}function N(){return T(b).location}},7463:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>a(l,n))c<o&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,p=null,f=3,m=!1,h=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function S(e){if(g=!1,w(e),!h)if(null!==r(c))h=!0,N(x);else{var t=r(u);null!==t&&L(S,t.startTime-e)}}function x(e,n){h=!1,g&&(g=!1,b(E),E=-1),m=!0;var a=f;try{for(w(n),p=r(c);null!==p&&(!(p.expirationTime>n)||e&&!C());){var i=p.callback;if("function"==typeof i){p.callback=null,f=p.priorityLevel;var s=i(p.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?p.callback=s:p===r(c)&&o(c),w(n)}else o(c);p=r(c)}if(null!==p)var l=!0;else{var d=r(u);null!==d&&L(S,d.startTime-n),l=!1}return l}finally{p=null,f=a,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,j=!1,_=null,E=-1,O=5,P=-1;function C(){return!(t.unstable_now()-P<O)}function A(){if(null!==_){var e=t.unstable_now();P=e;var n=!0;try{n=_(!0,e)}finally{n?k():(j=!1,_=null)}}else j=!1}if("function"==typeof v)k=function(){v(A)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,I=T.port2;T.port1.onmessage=A,k=function(){I.postMessage(null)}}else k=function(){y(A,0)};function N(e){_=e,j||(j=!0,k())}function L(e,n){E=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){h||m||(h=!0,N(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,o,a){var i=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?i+a:i:a=i,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>i?(e.sortIndex=a,n(u,e),null===r(c)&&e===r(u)&&(g?(b(E),E=-1):g=!0,L(S,a-i))):(e.sortIndex=s,n(c,e),h||m||(h=!0,N(x))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},69982:(e,t,n)=>{"use strict";e.exports=n(7463)},2833:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}},4784:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={title:"Docusaurus JSON Schema Plugin",tagline:"JSON Schema plugin viewer / editor in Docusaurus",url:"https://jy95.github.io",baseUrl:"/docusaurus-json-schema-plugin/",onBrokenLinks:"throw",onBrokenMarkdownLinks:"warn",favicon:"img/favicon.ico",trailingSlash:!1,organizationName:"jy95",projectName:"docusaurus-json-schema-plugin",themeConfig:{algolia:{appId:"IQ028YCDJT",apiKey:"8bd1d98fae984449f5cc44eed58ddb2d",indexName:"jy95io",contextualSearch:!0,searchParameters:{},searchPagePath:"search"},navbar:{title:"JSON Schema viewer / editor",logo:{alt:"My Site Logo",src:"img/project_icon.svg"},items:[{to:"docs/demo/",activeBasePath:"docs",label:"Demos",position:"left"},{to:"playground",label:"Playground",position:"left"},{label:"Github",position:"right",to:"https://github.com/jy95/docusaurus-json-schema-plugin"}],hideOnScroll:!1},footer:{style:"dark",links:[],copyright:"Copyright \xa9 2025. Built with Docusaurus."},prism:{additionalLanguages:["json","json5"],theme:{plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},blog:{sidebar:{groupByYear:!0}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},presets:[["@docusaurus/preset-classic",{docs:{remarkPlugins:[[null,{sync:!0}]],sidebarPath:"/home/runner/work/docusaurus-json-schema-plugin/docusaurus-json-schema-plugin/testsite/sidebars.js",editUrl:"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/"},blog:!1,theme:{customCss:"/home/runner/work/docusaurus-json-schema-plugin/docusaurus-json-schema-plugin/testsite/src/css/custom.css"}}]],themes:[["docusaurus-json-schema-plugin",{}]],plugins:[null],baseUrlIssueBanner:!0,i18n:{defaultLocale:"en",path:"i18n",locales:["en"],localeConfigs:{}},future:{experimental_faster:{swcJsLoader:!1,swcJsMinimizer:!1,swcHtmlMinimizer:!1,lightningCssMinimizer:!1,mdxCrossCompilerCache:!1,rspackBundler:!1},experimental_storage:{type:"localStorage",namespace:!1},experimental_router:"browser"},onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},scripts:[],headTags:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1,markdown:{format:"mdx",mermaid:!1,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0},anchors:{maintainCase:!1}}}},58168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},42892:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>o})},98587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},34164:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}n.d(t,{A:()=>o});const o=function(){for(var e,t,n=0,o="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}},71765:(e,t,n)=>{"use strict";n.d(t,{My:()=>S,f4:()=>Y});var r,o,a=n(63696),i=n(34164),s=Object.create,l=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,m=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,y=(e,t,n)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b=(e,t)=>{for(var n in t||(t={}))h.call(t,n)&&y(e,n,t[n]);if(f)for(var n of f(t))g.call(t,n)&&y(e,n,t[n]);return e},v=(e,t)=>c(e,d(t)),w=(e,t)=>{var n={};for(var r in e)h.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&f)for(var r of f(e))t.indexOf(r)<0&&g.call(e,r)&&(n[r]=e[r]);return n},S=((e,t,n)=>(n=null!=e?s(m(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of p(t))h.call(e,o)||o===n||l(e,o,{get:()=>t[o],enumerable:!(r=u(t,o))||r.enumerable});return e})(!t&&e&&e.__esModule?n:l(n,"default",{value:e,enumerable:!0}),e)))((r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var o,a;switch(n=n||{},r.util.type(t)){case"Object":if(a=r.util.objId(t),n[a])return n[a];for(var i in o={},n[a]=o,t)t.hasOwnProperty(i)&&(o[i]=e(t[i],n));return o;case"Array":return a=r.util.objId(t),n[a]?n[a]:(o=[],n[a]=o,t.forEach((function(t,r){o[r]=e(t,n)})),o);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var o in t)n[o]=t[o];return n},insertBefore:function(e,t,n,o){var a=(o=o||r.languages)[e],i={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=a[s])}var c=o[e];return o[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,o,a){a=a||{};var i=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],o||s);var l=t[s],c=r.util.type(l);"Object"!==c||a[i(l)]?"Array"!==c||a[i(l)]||(a[i(l)]=!0,e(l,n,s,a)):(a[i(l)]=!0,e(l,n,null,a))}}},plugins:{},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",a),!a.grammar)throw new Error('The language "'+a.language+'" has no grammar.');return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run("after-tokenize",a),o.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new s;return l(o,o.head,e),i(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var o,a=0;o=n[a++];)o(t)}},Token:o};function o(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function i(e,t,n,s,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var m=0;m<f.length;++m){if(d&&d.cause==p+","+m)return;var h=f[m],g=h.inside,y=!!h.lookbehind,b=!!h.greedy,v=h.alias;if(b&&!h.pattern.global){var w=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,w+"g")}for(var S=h.pattern||h,x=s.next,k=u;x!==t.tail&&!(d&&k>=d.reach);k+=x.value.length,x=x.next){var j=x.value;if(t.length>e.length)return;if(!(j instanceof o)){var _,E=1;if(b){if(!(_=a(S,k,e,y))||_.index>=e.length)break;var O=_.index,P=_.index+_[0].length,C=k;for(C+=x.value.length;O>=C;)C+=(x=x.next).value.length;if(k=C-=x.value.length,x.value instanceof o)continue;for(var A=x;A!==t.tail&&(C<P||"string"==typeof A.value);A=A.next)E++,C+=A.value.length;E--,j=e.slice(k,C),_.index-=k}else if(!(_=a(S,0,j,y)))continue;O=_.index;var T=_[0],I=j.slice(0,O),N=j.slice(O+T.length),L=k+j.length;d&&L>d.reach&&(d.reach=L);var R=x.prev;if(I&&(R=l(t,R,I),k+=I.length),c(t,R,E),x=l(t,R,new o(p,g?r.tokenize(T,g):T,v,T)),N&&l(t,x,N),E>1){var D={cause:p+","+m,reach:L};i(e,t,n,x.prev,k,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}return o.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var o="";return t.forEach((function(t){o+=e(t,n)})),o}var a={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),r.hooks.run("wrap",a);var s="";for(var l in a.attributes)s+=" "+l+'="'+(a.attributes[l]||"").replace(/"/g,""")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+s+">"+a.content+"</"+a.tag+">"},r}();t.exports=n,n.default=n}},function(){return o||(0,r[p(r)[0]])((o={exports:{}}).exports,o),o.exports})());S.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},S.languages.markup.tag.inside["attr-value"].inside.entity=S.languages.markup.entity,S.languages.markup.doctype.inside["internal-subset"].inside=S.languages.markup,S.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(S.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:S.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:S.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},S.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(S.languages.markup.tag,"addAttribute",{value:function(e,t){S.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:S.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),S.languages.html=S.languages.markup,S.languages.mathml=S.languages.markup,S.languages.svg=S.languages.markup,S.languages.xml=S.languages.extend("markup",{}),S.languages.ssml=S.languages.xml,S.languages.atom=S.languages.xml,S.languages.rss=S.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",o=(r=RegExp(r+"-"+r),{pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"});e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(S),S.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},S.languages.javascript=S.languages.extend("clike",{"class-name":[S.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),S.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,S.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:S.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:S.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:S.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:S.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:S.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),S.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:S.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),S.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),S.languages.markup&&(S.languages.markup.tag.addInlined("script","javascript"),S.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),S.languages.js=S.languages.javascript,S.languages.actionscript=S.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),S.languages.actionscript["class-name"].alias="function",delete S.languages.actionscript.parameter,delete S.languages.actionscript["literal-property"],S.languages.markup&&S.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:S.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(S),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},o="doc-comment";if(a=e.languages[t]){var a,i=a[o];if((i=i||(a=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[o])instanceof RegExp&&(i=a[o]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s<l;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),r(i[s]);else r(i)}}))}}),t.addSupport(["java","javascript","php"],t)}(S),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;(t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup))&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(S),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(S),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(S),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o,a=t[n];"code"!==a.type?e(a.content):(o=a.content[1],a=a.content[3],o&&a&&"code-language"===o.type&&"code-block"===a.type&&"string"==typeof o.content&&(o=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),o="language-"+(o=(/[a-z][\w-]*/i.exec(o)||[""])[0].toLowerCase()),a.alias?"string"==typeof a.alias?a.alias=[a.alias,o]:a.alias.push(o):a.alias=[o]))}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var a=t.classes[r];if(a=/language-(.+)/.exec(a)){n=a[1];break}}var c,u=e.languages[n];u?t.content=e.highlight(t.content.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e})),u,n):n&&"none"!==n&&e.plugins.autoloader&&(c="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})))}})),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(S),S.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:S.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},S.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var o=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var a=p(/^\($/,/^\)$/);if(-1===a)continue;for(;n<a;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),o.push(i.content))}n=a+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),0<o.length)){var s=p(/^\{$/,/^\}$/);if(-1!==s)for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&0<=o.indexOf(c.content)&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function p(e,r){for(var o=1,a=n;a<t.length;a++){var i=t[a],s=i.content;if("punctuation"===i.type&&"string"==typeof s)if(e.test(s))o++;else if(r.test(s)&&0==--o)return a}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),S.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function l(t,n,i){var l=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),c=0,u={},d=(l=s(l.map((function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=c++,n="___"+i.toUpperCase()+"_"+r+"___")););return u[n]=e,n})).join(""),n,i),Object.keys(u));return c=0,function t(n){for(var a=0;a<n.length;a++){if(c>=d.length)return;var i,l,p,f,m,h,g,y=n[a];"string"==typeof y||"string"==typeof y.content?(i=d[c],-1!==(g=(h="string"==typeof y?y:y.content).indexOf(i))&&(++c,l=h.substring(0,g),m=u[i],p=void 0,(f={})["interpolation-punctuation"]=o,3===(f=e.tokenize(m,f)).length&&((p=[1,1]).push.apply(p,s(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,m),f=h.substring(g+i.length),m=[],l&&m.push(l),m.push(p),f&&(t(h=[f]),m.push.apply(m,h)),"string"==typeof y?(n.splice.apply(n,[a,1].concat(m)),a+=m.length-1):y.content=m)):(g=y.content,Array.isArray(g)?t(g):t([g]))}}(l),new e.Token(i,l,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(u).join(""):u(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in c&&function t(n){for(var r=0,o=n.length;r<o;r++){var a,i,s,c=n[r];"string"!=typeof c&&(a=c.content,Array.isArray(a)?"template-string"===c.type?(c=a[1],3===a.length&&"string"!=typeof c&&"embedded-code"===c.type&&(i=u(c),c=c.alias,c=Array.isArray(c)?c[0]:c,s=e.languages[c])&&(a[1]=l(i,s,c))):t(a):"string"!=typeof a&&t([a]))}}(t.tokens)}))}(S),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(S),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(S),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(S),S.languages.n4js=S.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),S.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),S.languages.n4jsd=S.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var o=n[r],a=e.languages.javascript[o];o=(a="RegExp"===e.util.type(a)?e.languages.javascript[o]={pattern:a}:a).inside||{};(a.inside=o)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(S),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return o})),RegExp(e,t)}function i(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],a=!1;"string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===s(o.content[0].content[1])&&n.pop():"/>"!==o.content[o.content.length-1].content&&n.push({tagName:s(o.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&0<n.length&&0===n[n.length-1].openedBraces&&(a=s(o),r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(a+=s(t[r+1]),t.splice(r+1,1)),0<r&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(a=s(t[r-1])+a,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",a,null,a)),o.content&&"string"!=typeof o.content&&i(o.content)}}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)}))}(S),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(S),S.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},S.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=S.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(S),S.languages.c=S.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),S.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),S.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},S.languages.c.string],char:S.languages.c.char,comment:S.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:S.languages.c}}}}),S.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete S.languages.c.boolean,S.languages.objectivec=S.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete S.languages.objectivec["class-name"],S.languages.objc=S.languages.objectivec,S.languages.reason=S.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),S.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete S.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(S),S.languages.go=S.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),S.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete S.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(S),S.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},S.languages.python["string-interpolation"].inside.interpolation.inside.rest=S.languages.python,S.languages.py=S.languages.python,S.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},S.languages.webmanifest=S.languages.json;((e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0})})({},{dracula:()=>x,duotoneDark:()=>k,duotoneLight:()=>j,github:()=>_,gruvboxMaterialDark:()=>$,gruvboxMaterialLight:()=>q,jettwaveDark:()=>F,jettwaveLight:()=>B,nightOwl:()=>E,nightOwlLight:()=>O,oceanicNext:()=>A,okaidia:()=>T,oneDark:()=>z,oneLight:()=>U,palenight:()=>I,shadesOfPurple:()=>N,synthwave84:()=>L,ultramin:()=>R,vsDark:()=>D,vsLight:()=>M});var x={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},k={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},j={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},_={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},E={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},O={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},P="#c5a5c5",C="#8dc891",A={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:P}},{types:["attr-value"],style:{color:C}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:C}},{types:["punctuation"],style:{color:C}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:P}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},T={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},I={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},N={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},L={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},R={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},D={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},M={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},F={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},B={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},z={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},U={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},$={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},q={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},H=(e,t)=>{const{plain:n}=e,r=e.styles.reduce(((e,n)=>{const{languages:r,style:o}=n;return r&&!r.includes(t)||n.types.forEach((t=>{const n=b(b({},e[t]),o);e[t]=n})),e}),{});return r.root=n,r.plain=v(b({},n),{backgroundColor:void 0}),r},V=/\r\n|\r|\n/,W=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},K=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},G=e=>{const t=[[]],n=[e],r=[0],o=[e.length];let a=0,i=0,s=[];const l=[s];for(;i>-1;){for(;(a=r[i]++)<o[i];){let e,c=t[i];const u=n[i][a];if("string"==typeof u?(c=i>0?c:["plain"],e=u):(c=K(c,u.type),u.alias&&(c=K(c,u.alias)),e=u.content),"string"!=typeof e){i++,t.push(c),n.push(e),r.push(0),o.push(e.length);continue}const d=e.split(V),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)W(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),o.pop()}return W(s),l},Q=({children:e,language:t,code:n,theme:r,prism:o})=>{const s=t.toLowerCase(),l=((e,t)=>{const[n,r]=(0,a.useState)(H(t,e)),o=(0,a.useRef)(),i=(0,a.useRef)();return(0,a.useEffect)((()=>{t===o.current&&e===i.current||(o.current=t,i.current=e,r(H(t,e)))}),[e,t]),n})(s,r),c=(e=>(0,a.useCallback)((t=>{var n=t,{className:r,style:o,line:a}=n,s=w(n,["className","style","line"]);const l=v(b({},s),{className:(0,i.A)("token-line",r)});return"object"==typeof e&&"plain"in e&&(l.style=e.plain),"object"==typeof o&&(l.style=b(b({},l.style||{}),o)),l}),[e]))(l),u=(e=>{const t=(0,a.useCallback)((({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map((t=>e[t])))}),[e]);return(0,a.useCallback)((e=>{var n=e,{token:r,className:o,style:a}=n,s=w(n,["token","className","style"]);const l=v(b({},s),{className:(0,i.A)("token",...r.types,o),children:r.content,style:t(r)});return null!=a&&(l.style=b(b({},l.style||{}),a)),l}),[t])})(l),d=(({prism:e,code:t,grammar:n,language:r})=>{const o=(0,a.useRef)(e);return(0,a.useMemo)((()=>{if(null==n)return G([t]);const e={code:t,grammar:n,language:r,tokens:[]};return o.current.hooks.run("before-tokenize",e),e.tokens=o.current.tokenize(t,n),o.current.hooks.run("after-tokenize",e),G(e.tokens)}),[t,n,r])})({prism:o,language:s,code:n,grammar:o.languages[s]});return e({tokens:d,className:`prism-code language-${s}`,style:null!=l?l.root:{},getLineProps:c,getTokenProps:u})},Y=e=>(0,a.createElement)(Q,v(b({},e),{prism:e.prism||S,theme:e.theme||D,code:e.code,language:e.language}))},11561:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=!0,o="Invariant failed";function a(e,t){if(!e){if(r)throw new Error(o);var n="function"==typeof t?t():t,a=n?"".concat(o,": ").concat(n):o;throw new Error(a)}}},31635:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>R,__assign:()=>a,__asyncDelegator:()=>_,__asyncGenerator:()=>j,__asyncValues:()=>E,__await:()=>k,__awaiter:()=>m,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>L,__classPrivateFieldSet:()=>N,__createBinding:()=>g,__decorate:()=>s,__disposeResources:()=>M,__esDecorate:()=>c,__exportStar:()=>y,__extends:()=>o,__generator:()=>h,__importDefault:()=>T,__importStar:()=>A,__makeTemplateObject:()=>O,__metadata:()=>f,__param:()=>l,__propKey:()=>d,__read:()=>v,__rest:()=>i,__rewriteRelativeImportExtension:()=>F,__runInitializers:()=>u,__setFunctionName:()=>p,__spread:()=>w,__spreadArray:()=>x,__spreadArrays:()=>S,__values:()=>b,default:()=>B});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),p=!1,f=n.length-1;f>=0;f--){var m={};for(var h in r)m[h]="access"===h?{}:r[h];for(var h in r.access)m.access[h]=r.access[h];m.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var g=(0,n[f])("accessor"===l?{get:d.get,set:d.set}:d[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=i(g.get))&&(d.get=s),(s=i(g.set))&&(d.set=s),(s=i(g.init))&&o.unshift(s)}else(s=i(g))&&("field"===l?o.unshift(s):d[c]=s)}u&&Object.defineProperty(u,r.name,d),p=!0}function u(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{l(r.next(e))}catch(t){a(t)}}function s(e){try{l(r.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))}function h(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(l){s=[6,l],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function y(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function S(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}function x(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function k(e){return this instanceof k?(this.v=e,this):new k(e)}function j(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),r[Symbol.asyncIterator]=function(){return this},r;function i(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof k?Promise.resolve(n.value.v).then(l,c):u(a[0][2],n)}catch(r){u(a[0][3],r)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:k(e[r](t)),done:!1}:o?o(t):t}:o}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},C=function(e){return C=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},C(e)};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=C(e),r=0;r<n.length;r++)"default"!==n[r]&&g(t,e,n[r]);return P(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function I(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function N(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function L(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function R(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var D="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function M(e){function t(t){e.error=e.hasError?new D(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(o,(function(e){return t(e),o()}))}else r|=1}catch(i){t(i)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function F(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,r,o,a){return n?t?".jsx":".js":!r||o&&a?r+o+"."+a.toLowerCase()+"js":e})):e}const B={__extends:o,__assign:a,__rest:i,__decorate:s,__param:l,__esDecorate:c,__runInitializers:u,__propKey:d,__setFunctionName:p,__metadata:f,__awaiter:m,__generator:h,__createBinding:g,__exportStar:y,__values:b,__read:v,__spread:w,__spreadArrays:S,__spreadArray:x,__await:k,__asyncGenerator:j,__asyncDelegator:_,__asyncValues:E,__makeTemplateObject:O,__importStar:A,__importDefault:T,__classPrivateFieldGet:I,__classPrivateFieldSet:N,__classPrivateFieldIn:L,__addDisposableResource:R,__disposeResources:M,__rewriteRelativeImportExtension:F}},22654:e=>{"use strict";e.exports={}},84054:e=>{"use strict";e.exports=JSON.parse('{"/docusaurus-json-schema-plugin/boxFileSchema-f25":{"__comp":"84361440","__context":{"plugin":"a7456010"},"config":"5e9f5e1a"},"/docusaurus-json-schema-plugin/playground-353":{"__comp":"0ce74438","__context":{"plugin":"a7456010"},"config":"5e9f5e1a"},"/docusaurus-json-schema-plugin/search-36e":{"__comp":"1a4e3797","__context":{"plugin":"c141421f"}},"/docusaurus-json-schema-plugin/docs-37f":{"__comp":"5e95c892","__context":{"plugin":"aba21aa0"}},"/docusaurus-json-schema-plugin/docs-246":{"__comp":"a7bd4aaa","__props":"af4dc41c"},"/docusaurus-json-schema-plugin/docs-575":{"__comp":"a94703ab"},"/docusaurus-json-schema-plugin/docs/api-53e":{"__comp":"14eb3368","__props":"808311b0"},"/docusaurus-json-schema-plugin/docs/api/config-58a":{"__comp":"17896441","content":"c3bb5603"},"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor-15f":{"__comp":"17896441","content":"d4ff3b58"},"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer-48b":{"__comp":"17896441","content":"3af02d98"},"/docusaurus-json-schema-plugin/docs/api/MonacoEditor-0c8":{"__comp":"17896441","content":"08dc474f"},"/docusaurus-json-schema-plugin/docs/category/-array-fe0":{"__comp":"14eb3368","__props":"2bd2a82e"},"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations-56f":{"__comp":"14eb3368","__props":"2e4a130b"},"/docusaurus-json-schema-plugin/docs/category/-generic-keywords-a5c":{"__comp":"14eb3368","__props":"03eeee36"},"/docusaurus-json-schema-plugin/docs/category/-numeric-2d1":{"__comp":"14eb3368","__props":"ffca4553"},"/docusaurus-json-schema-plugin/docs/category/-object-b53":{"__comp":"14eb3368","__props":"c09ae39f"},"/docusaurus-json-schema-plugin/docs/category/-references-f27":{"__comp":"14eb3368","__props":"0087a340"},"/docusaurus-json-schema-plugin/docs/category/-schema-composition-b88":{"__comp":"14eb3368","__props":"ee47f93d"},"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally-1bf":{"__comp":"14eb3368","__props":"16bf5a7a"},"/docusaurus-json-schema-plugin/docs/category/-string-56a":{"__comp":"14eb3368","__props":"03b83387"},"/docusaurus-json-schema-plugin/docs/category/-type-bde":{"__comp":"14eb3368","__props":"7f4b4e53"},"/docusaurus-json-schema-plugin/docs/contributing-68d":{"__comp":"17896441","content":"72a427b3"},"/docusaurus-json-schema-plugin/docs/demo-576":{"__comp":"14eb3368","__props":"a9c29fe5"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1-874":{"__comp":"17896441","content":"f45d2610"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2-e9f":{"__comp":"17896441","content":"09dbd73b"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains-ec1":{"__comp":"17896441","content":"e6818ad2"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items-f60":{"__comp":"17896441","content":"ca1962f0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length-211":{"__comp":"17896441","content":"a9655ce0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains-0af":{"__comp":"17896441","content":"f595544d"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple-19f":{"__comp":"17896441","content":"ca1c8d76"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples-408":{"__comp":"17896441","content":"9028850b"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1-eb8":{"__comp":"17896441","content":"0d2bf170"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2-a1c":{"__comp":"17896441","content":"f37a108b"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems-2ce":{"__comp":"17896441","content":"9a29e754"},"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean-21d":{"__comp":"17896441","content":"720066b1"},"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description-c98":{"__comp":"17896441","content":"6713985a"},"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs-129":{"__comp":"17896441","content":"756e0924"},"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values-070":{"__comp":"17896441","content":"bb96c887"},"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations-fc3":{"__comp":"17896441","content":"b34a7af0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const-c56":{"__comp":"17896441","content":"c7088344"},"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum-1e6":{"__comp":"17896441","content":"3d59b95f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/null-79e":{"__comp":"17896441","content":"2cc05f38"},"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer-4bc":{"__comp":"17896441","content":"8e80fdd7"},"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf-54e":{"__comp":"17896441","content":"39bae550"},"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number-34d":{"__comp":"17896441","content":"8f9be69b"},"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges-b09":{"__comp":"17896441","content":"9a079c62"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties-e5f":{"__comp":"17896441","content":"a78d2520"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2-f08":{"__comp":"17896441","content":"d672ff73"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties-66d":{"__comp":"17896441","content":"dc7a627d"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties-071":{"__comp":"17896441","content":"25efcfba"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties-2a2":{"__comp":"17896441","content":"207c73ba"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames-abf":{"__comp":"17896441","content":"f149d4e3"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required-06e":{"__comp":"17896441","content":"6c29c54d"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject-6bb":{"__comp":"17896441","content":"4f68d1a6"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size-8b4":{"__comp":"17896441","content":"dba41c5f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1-f04":{"__comp":"17896441","content":"ef99d285"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2-08e":{"__comp":"17896441","content":"188a43e1"},"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile-1f6":{"__comp":"17896441","content":"0446378f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref-5ab":{"__comp":"17896441","content":"93cebb7f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile-ae8":{"__comp":"17896441","content":"890ab00c"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf-269":{"__comp":"17896441","content":"73e48de0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf-4bd":{"__comp":"17896441","content":"4de116f4"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not-1c7":{"__comp":"17896441","content":"1e804d56"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf-82b":{"__comp":"17896441","content":"cd537aaf"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired-540":{"__comp":"17896441","content":"8f884ddd"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas-03c":{"__comp":"17896441","content":"f7f7156a"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired-104":{"__comp":"17896441","content":"247662c2"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional-557":{"__comp":"17896441","content":"0d743cca"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas-c6f":{"__comp":"17896441","content":"458927b5"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else-9c3":{"__comp":"17896441","content":"0ff7d3d9"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple-fb2":{"__comp":"17896441","content":"6f77199a"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding-e86":{"__comp":"17896441","content":"2b403dce"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType-e83":{"__comp":"17896441","content":"9dfa20e1"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType-3a3":{"__comp":"17896441","content":"5f0f252d"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema-7b3":{"__comp":"17896441","content":"bf17fbd2"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format-4a7":{"__comp":"17896441","content":"a998845c"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length-1c6":{"__comp":"17896441","content":"5bc82b60"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern-dc1":{"__comp":"17896441","content":"cbc552c0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple-53f":{"__comp":"17896441","content":"e5bfc516"},"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType-cfb":{"__comp":"17896441","content":"f746fa1f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType-65b":{"__comp":"17896441","content":"c37467e1"},"/docusaurus-json-schema-plugin/docs/demo/viewer-a86":{"__comp":"14eb3368","__props":"22aea3f5"},"/docusaurus-json-schema-plugin/docs/faq-11d":{"__comp":"17896441","content":"ea313555"},"/docusaurus-json-schema-plugin/docs/next-steps-aac":{"__comp":"17896441","content":"ec99730f"},"/docusaurus-json-schema-plugin/docs/quick-start-0de":{"__comp":"17896441","content":"c179f821"},"/docusaurus-json-schema-plugin/-17b":{"__comp":"c4f5d8e4","__context":{"plugin":"a7456010"},"config":"5e9f5e1a"}}')}},e=>{e.O(0,[1869],(()=>{return t=38536,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/assets/js/main.c589e2f0.js b/assets/js/main.c589e2f0.js new file mode 100644 index 00000000..345e05f1 --- /dev/null +++ b/assets/js/main.c589e2f0.js @@ -0,0 +1,2 @@ +/*! For license information please see main.c589e2f0.js.LICENSE.txt */ +(self.webpackChunktestsite=self.webpackChunktestsite||[]).push([[8792],{2192:(e,t,n)=>{"use strict";var r=n(63696),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:s.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},14403:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var w=v.prototype=new b;w.constructor=v,h(w,y.prototype),w.isPureReactComponent=!0;var S=Array.isArray,x=Object.prototype.hasOwnProperty,k={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var o,a={},i=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)x.call(t,o)&&!j.hasOwnProperty(o)&&(a[o]=t[o]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===a[o]&&(a[o]=l[o]);return{$$typeof:n,type:e,key:i,ref:s,props:a,_owner:k.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var O=/\/+/g;function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,o,a,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return i=i(l=e),e=""===a?"."+P(l,0):a,S(i)?(o="",null!=e&&(o=e.replace(O,"$&/")+"/"),C(i,t,o,"",(function(e){return e}))):null!=i&&(E(i)&&(i=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,o+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(O,"$&/")+"/")+e)),t.push(i)),1;if(l=0,a=""===a?".":a+":",S(e))for(var c=0;c<e.length;c++){var u=a+P(s=e[c],c);l+=C(s,t,o,u,i)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=C(s=s.value,t,o,u=a+P(s,c++),i);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function A(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I={current:null},N={transition:null},L={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:N,ReactCurrentOwner:k};function R(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=o,t.Profiler=i,t.PureComponent=v,t.StrictMode=a,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.act=R,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=h({},e.props),a=e.key,i=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,s=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)x.call(t,c)&&!j.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:n,type:e.type,key:a,ref:i,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=R,t.useCallback=function(e,t){return I.current.useCallback(e,t)},t.useContext=function(e){return I.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return I.current.useDeferredValue(e)},t.useEffect=function(e,t){return I.current.useEffect(e,t)},t.useId=function(){return I.current.useId()},t.useImperativeHandle=function(e,t,n){return I.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return I.current.useMemo(e,t)},t.useReducer=function(e,t,n){return I.current.useReducer(e,t,n)},t.useRef=function(e){return I.current.useRef(e)},t.useState=function(e){return I.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return I.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return I.current.useTransition()},t.version="18.3.1"},63696:(e,t,n)=>{"use strict";e.exports=n(14403)},62540:(e,t,n)=>{"use strict";e.exports=n(2192)},55600:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>P,E8:()=>Zn,a1:()=>Yn});var r=n(63696);n(40961);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){a(i,r,o,s,l,"next",e)}function l(e){a(i,r,o,s,l,"throw",e)}s(void 0)}))}}function s(e,t,n){return t=p(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(null,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(){b=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),s=new T(r||[]);return o(i,"_invoke",{value:O(e,n,s)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="suspendedYield",m="executing",h="completed",g={};function y(){}function v(){}function w(){}var S={};c(S,i,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(I([])));k&&k!==n&&r.call(k,i)&&(S=k);var j=w.prototype=y.prototype=Object.create(S);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,a,i,s){var l=d(e[o],e,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,s)}))}s(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function O(t,n,r){var o=p;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var s=r.delegate;if(s){var l=P(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?h:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=h,r.method="throw",r.arg=c.arg)}}}function P(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=w,o(j,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:v,configurable:!0}),v.displayName=c(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,l,"GeneratorFunction")),e.prototype=Object.create(j),e},t.awrap=function(e){return{__await:e}},_(E.prototype),c(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new E(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},_(j),c(j,l,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function k(e){var t="function"==typeof Map?new Map:void 0;return k=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(m())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&v(o,n.prototype),o}(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,e)},k(e)}function j(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function _(){return r.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},r.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var E=["translations"],O="Ctrl",P=r.forwardRef((function(e,t){var n=e.translations,o=void 0===n?{}:n,a=y(e,E),i=o.buttonText,s=void 0===i?"Search":i,l=o.buttonAriaLabel,c=void 0===l?"Search":l,u=w((0,r.useState)(null),2),p=u[0],f=u[1];(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?f("\u2318"):f(O))}),[]);var m=w(p===O?[O,"Ctrl",r.createElement(j,null)]:["Meta","Command",p],3),h=m[0],g=m[1],b=m[2];return r.createElement("button",d({type:"button",className:"DocSearch DocSearch-Button","aria-label":"".concat(c," (").concat(g,"+K)")},a,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(_,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},s)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==p&&r.createElement(r.Fragment,null,r.createElement(C,{reactsToKey:h},b),r.createElement(C,{reactsToKey:"k"},"K"))))}));function C(e){var t=e.reactsToKey,n=e.children,o=w((0,r.useState)(!1),2),a=o[0],i=o[1];return(0,r.useEffect)((function(){if(t)return window.addEventListener("keydown",e),window.addEventListener("keyup",n),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",n)};function e(e){e.key===t&&i(!0)}function n(e){e.key!==t&&"Meta"!==e.key||i(!1)}}),[t]),r.createElement("kbd",{className:a?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},n)}function A(e,t){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,o)}),t)}}function T(e){return e.reduce((function(e,t){return e.concat(t)}),[])}var I=0;function N(e){return 0===e.collections.length?0:e.collections.reduce((function(e,t){return e+t.items.length}),0)}function L(e){return e!==Object(e)}function R(e,t){if(e===t)return!0;if(L(e)||L(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];if(!(o in t))return!1;if(!R(e[o],t[o]))return!1}return!0}var D=function(){},M=[{segment:"autocomplete-core",version:"1.17.7"}];function F(e){var t=e.item,n=e.items,r=void 0===n?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var z=["items"],U=["items"];function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function q(e){return function(e){if(Array.isArray(e))return H(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){G(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G(e,t,n){return(t=function(e){var t=function(e){if("object"!==$(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===$(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(e){return e.map((function(e){var t=e.items,n=V(e,z);return K(K({},n),{},{objectIDs:(null==t?void 0:t.map((function(e){return e.objectID})))||n.objectIDs})}))}function Y(e){var t,n,r,o=(t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((e.version||"").split(".").map(Number),2),n=t[0],r=t[1],n>=3||2===n&&r>=4||1===n&&r>=10);function a(t,n,r){if(o&&void 0!==r){var a=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[t].concat(q(n),[{headers:i}]))}else e.apply(void 0,[t].concat(q(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("clickedObjectIDsAfterSearch",Q(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("clickedObjectIDs",Q(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("convertedObjectIDsAfterSearch",Q(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("convertedObjectIDs",Q(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&t.reduce((function(e,t){var n=t.items,r=V(t,U);return[].concat(q(e),q(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r<e.objectIDs.length;r+=t)n.push(K(K({},e),{},{objectIDs:e.objectIDs.slice(r,r+t)}));return n}(K(K({},r),{},{objectIDs:(null==n?void 0:n.map((function(e){return e.objectID})))||r.objectIDs})).map((function(e){return{items:n,payload:e}}))))}),[]).forEach((function(e){var t=e.items;return a("viewedObjectIDs",[e.payload],t)}))},viewedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function Z(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function J(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e,t,n){return(t=function(e){var t=function(e){if("object"!==X(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==X(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===X(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae="2.15.0",ie="https://cdn.jsdelivr.net/npm/search-insights@".concat(ae,"/dist/search-insights.min.js"),se=A((function(e){var t=e.onItemsChange,n=e.items,r=e.insights,o=e.state;t({insights:r,insightsEvents:Z({items:n}).map((function(e){return re({eventName:"Items Viewed"},e)})),state:o})}),400);function le(e){var t=function(e){return re({onItemsChange:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.viewedObjectIDs.apply(t,ee(n.map((function(e){return re(re({},e),{},{algoliaSource:ce(e.algoliaSource,r.context)})}))))},onSelect:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.clickedObjectIDsAfterSearch.apply(t,ee(n.map((function(e){return re(re({},e),{},{algoliaSource:ce(e.algoliaSource,r.context)})}))))},onActive:D,__autocomplete_clickAnalytics:!0},e)}(e),n=t.insightsClient,r=t.insightsInitParams,o=t.onItemsChange,a=t.onSelect,i=t.onActive,s=t.__autocomplete_clickAnalytics,l=n;if(n||"undefined"!=typeof window&&function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||"aa";"string"==typeof n&&(l=t[n]),l||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){t[n].queue||(t[n].queue=[]);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t[n].queue.push(r)}),t[n].version=ae,l=t[n],function(e){var t="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var n=e.document.createElement("script");n.async=!0,n.src=ie,n.onerror=function(){console.error(t)},document.body.appendChild(n)}catch(e){console.error(t)}}(t))}({window:window}),!l)return{};r&&l("init",re({partial:!0},r));var c=Y(l),u={current:[]},d=A((function(e){var t=e.state;if(t.isOpen){var n=t.collections.reduce((function(e,t){return[].concat(ee(e),ee(t.items))}),[]).filter(J);R(u.current.map((function(e){return e.objectID})),n.map((function(e){return e.objectID})))||(u.current=n,n.length>0&&se({onItemsChange:o,items:n,insights:c,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive,o=!1;function u(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:re(re({},s?{clickAnalytics:!0}:{}),e?{userToken:ue(e)}:{}),insights:c}})}l("addAlgoliaAgent","insights-plugin"),u(),l("onUserTokenChange",(function(e){o||u(e)})),l("getUserToken",null,(function(e,t){o||u(t)})),l("onAuthenticatedUserTokenChange",(function(e){e?(o=!0,u(e)):(o=!1,l("getUserToken",null,(function(e,t){return u(t)})))})),l("getAuthenticatedUserToken",null,(function(e,t){t&&(o=!0,u(t))})),n((function(e){var t=e.item,n=e.state,r=e.event,o=e.source;J(t)&&a({state:n,event:r,insights:c,item:t,insightsEvents:[re({eventName:"Item Selected"},F({item:t,items:o.getItems().filter(J)}))]})})),r((function(e){var t=e.item,n=e.source,r=e.state,o=e.event;J(t)&&i({state:r,event:o,insights:c,item:t,insightsEvents:[re({eventName:"Item Active"},F({item:t,items:n.getItems().filter(J)}))]})}))},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function ce(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(ee(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],ee(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function ue(e){return"number"==typeof e?e.toString():e}function de(e,t){var n=t;return{then:function(t,r){return de(e.then(fe(t,n,e),fe(r,n,e)),n)},catch:function(t){return de(e.catch(fe(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),de(e.finally(fe(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function pe(e){return de(e,{isCanceled:!1,onCancelList:[]})}function fe(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function me(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var o=(null===t?-1:t)+e;return o<=-1||o>=n?null===r?null:0:o}function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return(t=function(e){var t=function(e){if("object"!==be(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===be(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ve(e){var t=function(e){var t=e.collections.map((function(e){return e.items.length})).reduce((function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e}),[]).reduce((function(t,n){return n<=e.activeItemId?t+1:t}),0);return e.collections[t]}(e);if(!t)return null;var n=t.items[function(e){for(var t=e.state,n=e.collection,r=!1,o=0,a=0;!1===r;){var i=t.collections[o];if(i===n){r=!0;break}a+=i.items.length,o++}return t.activeItemId-a}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function we(e,t,n){return[e,null==n?void 0:n.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}var Se=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function xe(e){return e.nativeEvent||e}function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e,t,n){return(t=function(e){var t=function(e){if("object"!==ke(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ke(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){Ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ce(e,t,n){return(t=function(e){var t=function(e){if("object"!==Ee(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ee(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){Le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e,t,n){return(t=function(e){var t=function(e){if("object"!==Ae(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ae(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e,t){var n,r="undefined"!=typeof window?window:{},o=e.plugins||[];return Ne(Ne({debug:!1,openOnFocus:!1,enterKeyHint:void 0,ignoreCompositionEvents:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:void 0,environment:r,shouldPanelOpen:function(e){return N(e.state)>0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(I++),plugins:o,initialState:Ne({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:D,onResolve:D};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=ge(ge({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return T(e)})).then((function(e){return e.map((function(e){return Ne(Ne({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:Ne({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach((function(t){Be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Be(e,t,n){return(t=function(e){var t=function(e){if("object"!==De(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===De(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ze(e){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ze(e)}function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){qe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qe(e,t,n){return(t=function(e){var t=function(e){if("object"!==ze(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ze(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function We(e){return Boolean(e.execute)}function Ke(e){var t=e.reduce((function(e,t){if(!We(t))return e.push(t),e;var n=t.searchClient,r=t.execute,o=t.requesterId,a=t.requests,i=e.find((function(e){return We(t)&&We(e)&&e.searchClient===n&&Boolean(o)&&e.requesterId===o}));if(i){var s;(s=i.items).push.apply(s,He(a))}else{var l={execute:r,requesterId:o,items:a,searchClient:n};e.push(l)}return e}),[]).map((function(e){if(!We(e))return Promise.resolve(e);var t=e,n=t.execute,r=t.items;return n({searchClient:t.searchClient,requests:r})}));return Promise.all(t).then((function(e){return T(e)}))}function Ge(e){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(e)}var Qe=["event","nextState","props","query","refresh","store"];function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){Je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Je(e,t,n){return(t=function(e){var t=function(e){if("object"!==Ge(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ge(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xe,et,tt,nt=null,rt=(Xe=-1,et=-1,tt=void 0,function(e){var t=++Xe;return Promise.resolve(e).then((function(e){return tt&&t<et?tt:(et=t,tt=e,e)}))});function ot(e){var t=e.event,n=e.nextState,r=void 0===n?{}:n,o=e.props,a=e.query,i=e.refresh,s=e.store,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Qe);nt&&o.environment.clearTimeout(nt);var c=l.setCollections,u=l.setIsOpen,d=l.setQuery,p=l.setActiveItemId,f=l.setStatus,m=l.setContext;if(d(a),p(o.defaultActiveItemId),!a&&!1===o.openOnFocus){var h,g=s.getState().collections.map((function(e){return Ze(Ze({},e),{},{items:[]})}));f("idle"),c(g),u(null!==(h=r.isOpen)&&void 0!==h?h:o.shouldPanelOpen({state:s.getState()}));var y=pe(rt(g).then((function(){return Promise.resolve()})));return s.pendingRequests.add(y)}f("loading"),nt=o.environment.setTimeout((function(){f("stalled")}),o.stallThreshold);var b=pe(rt(o.getSources(Ze({query:a,refresh:i,state:s.getState()},l)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(Ze({query:a,refresh:i,state:s.getState()},l))).then((function(t){return function(e,t,n){if(o=e,Boolean(null==o?void 0:o.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(He(Object.keys(n.context).map((function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return $e($e({},e),{},{requests:e.queries.map((function(n){return{query:"algolia"===e.requesterId?$e($e({},n),{},{params:$e($e({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}}))})}var o;return{items:e,sourceId:t}}(t,e.sourceId,s.getState())}))}))).then(Ke).then((function(t){var n,r=t.some((function(e){return function(e){return!Array.isArray(e)&&Boolean(null==e?void 0:e._automaticInsights)}(e.items)}));return r&&m({algoliaInsightsPlugin:Ze(Ze({},(null===(n=s.getState().context)||void 0===n?void 0:n.algoliaInsightsPlugin)||{}),{},{__automaticInsights:r})}),function(e,t,n){return t.map((function(t){var r,o=e.filter((function(e){return e.sourceId===t.sourceId})),a=o.map((function(e){return e.items})),i=o[0].transformResponse,s=i?i({results:r=a,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):a;return t.onResolve({source:t,results:a,items:s,state:n.getState()}),s.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:s}}))}(t,e,s)})).then((function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce((function(e,t){return Fe(Fe({},e),{},Be({},t.source.sourceId,Fe(Fe({},t.source),{},{getItems:function(){return T(t.items)}})))}),{}),o=t.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return T(t.reshape({sourcesBySourceId:o,sources:Object.values(o),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:o,state:s.getState()})}))})))).then((function(e){var n;f("idle"),c(e);var d=o.shouldPanelOpen({state:s.getState()});u(null!==(n=r.isOpen)&&void 0!==n?n:o.openOnFocus&&!a&&d||d);var p=ve(s.getState());if(null!==s.getState().activeItemId&&p){var m=p.item,h=p.itemInputValue,g=p.itemUrl,y=p.source;y.onActive(Ze({event:t,item:m,itemInputValue:h,itemUrl:g,refresh:i,source:y,state:s.getState()},l))}})).finally((function(){f("idle"),nt&&o.environment.clearTimeout(nt)}));return s.pendingRequests.add(b)}function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}var it=["event","props","refresh","store"];function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?st(Object(n),!0).forEach((function(t){ct(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ct(e,t,n){return(t=function(e){var t=function(e){if("object"!==at(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===at(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}var dt=["props","refresh","store"],pt=["inputElement","formElement","panelElement"],ft=["inputElement"],mt=["inputElement","maxLength"],ht=["source"],gt=["item","source"];function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach((function(t){vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vt(e,t,n){return(t=function(e){var t=function(e){if("object"!==ut(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ut(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function St(e){var t=e.props,n=e.refresh,r=e.store,o=wt(e,dt);return{getEnvironmentProps:function(e){var n=e.inputElement,o=e.formElement,a=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[o,a].some((function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return bt({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},wt(e,pt))},getRootProps:function(e){return bt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return we(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":we(t.id,"label")},e)},getFormProps:function(e){return e.inputElement,bt({action:"",noValidate:!0,role:"search",onSubmit:function(a){var i;a.preventDefault(),t.onSubmit(bt({event:a,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(a){var i;a.preventDefault(),t.onReset(bt({event:a,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},wt(e,ft))},getLabelProps:function(e){return bt({htmlFor:we(t.id,"input"),id:we(t.id,"label")},e)},getInputProps:function(e){var a;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&ot(bt({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var s=e||{};s.inputElement;var l=s.maxLength,c=void 0===l?512:l,u=wt(s,mt),d=ve(r.getState()),p=function(e){return Boolean(e&&e.match(Se))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),f=t.enterKeyHint||(null!=d&&d.itemUrl&&!p?"go":"search");return bt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?we(t.id,"item-".concat(r.getState().activeItemId),null==d?void 0:d.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return we(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":we(t.id,"label"),value:r.getState().completion||r.getState().query,id:we(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:f,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:"search",onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&xe(e).isComposing?o.setQuery(a):ot(bt({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},o))},onCompositionEnd:function(e){ot(bt({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},o))},onKeyDown:function(e){xe(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,o=e.store,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,it);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=ve(o.getState()),t=n.environment.document.getElementById(we(n.id,"item-".concat(o.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},s=function(){var e=ve(o.getState());if(null!==o.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,s=e.itemUrl,l=e.source;l.onActive(lt({event:t,item:n,itemInputValue:i,itemUrl:s,refresh:r,source:l,state:o.getState()},a))}};t.preventDefault(),!1===o.getState().isOpen&&(n.openOnFocus||Boolean(o.getState().query))?ot(lt({event:t,props:n,query:o.getState().query,refresh:r,store:o},a)).then((function(){o.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(i,0)})):(o.dispatch(t.key,{}),s(),i())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=ve(o.getState()),c=l.item,u=l.itemInputValue,d=l.itemUrl,p=l.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(p.onSelect(lt({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:o.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:c,state:o.getState()}));else if(t.shiftKey)void 0!==d&&(p.onSelect(lt({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:o.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:c,state:o.getState()}));else if(t.altKey);else{if(void 0!==d)return p.onSelect(lt({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:o.getState()},a)),void n.navigator.navigate({itemUrl:d,item:c,state:o.getState()});ot(lt({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:o},a)).then((function(){p.onSelect(lt({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:o.getState()},a))}))}}}(bt({event:e,props:t,refresh:n,store:r},o))},onFocus:i,onBlur:D,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},u)},getPanelProps:function(e){return bt({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,o=wt(n,ht);return bt({role:"listbox","aria-labelledby":we(t.id,"label"),id:we(t.id,"list",r)},o)},getItemProps:function(e){var a=e.item,i=e.source,s=wt(e,gt);return bt({id:we(t.id,"item-".concat(a.__autocomplete_id),i),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=ve(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,s=t.itemInputValue,l=t.itemUrl,c=t.source;c.onActive(bt({event:e,item:i,itemInputValue:s,itemUrl:l,refresh:n,source:c,state:r.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var s=i.getItemInputValue({item:a,state:r.getState()}),l=i.getItemUrl({item:a,state:r.getState()});(l?Promise.resolve():ot(bt({event:e,nextState:{isOpen:!1},props:t,query:s,refresh:n,store:r},o))).then((function(){i.onSelect(bt({event:e,item:a,itemInputValue:s,itemUrl:l,refresh:n,source:i,state:r.getState()},o))}))}},s)}}}function xt(e){return xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xt(e)}function kt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kt(Object(n),!0).forEach((function(t){_t(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _t(e,t,n){return(t=function(e){var t=function(e){if("object"!==xt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===xt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Et(e){var t,n,r,o,a=e.plugins,i=e.options,s=null===(t=((null===(n=i.__autocomplete_metadata)||void 0===n?void 0:n.userAgents)||[])[0])||void 0===t?void 0:t.segment,l=s?_t({},s,Object.keys((null===(r=i.__autocomplete_metadata)||void 0===r?void 0:r.options)||{})):{};return{plugins:a.map((function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}})),options:jt({"autocomplete-core":Object.keys(i)},l),ua:M.concat((null===(o=i.__autocomplete_metadata)||void 0===o?void 0:o.userAgents)||[])}}function Ot(e){var t,n=e.state;return!1===n.isOpen||null===n.activeItemId?null:(null===(t=ve(n))||void 0===t?void 0:t.itemInputValue)||null}function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){Tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tt(e,t,n){return(t=function(e){var t=function(e){if("object"!==Pt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Pt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var It=function(e,t){switch(t.type){case"setActiveItemId":case"mousemove":return At(At({},e),{},{activeItemId:t.payload});case"setQuery":return At(At({},e),{},{query:t.payload,completion:null});case"setCollections":return At(At({},e),{},{collections:t.payload});case"setIsOpen":return At(At({},e),{},{isOpen:t.payload});case"setStatus":return At(At({},e),{},{status:t.payload});case"setContext":return At(At({},e),{},{context:At(At({},e.context),t.payload)});case"ArrowDown":var n=At(At({},e),{},{activeItemId:t.payload.hasOwnProperty("nextActiveItemId")?t.payload.nextActiveItemId:me(1,e.activeItemId,N(e),t.props.defaultActiveItemId)});return At(At({},n),{},{completion:Ot({state:n})});case"ArrowUp":var r=At(At({},e),{},{activeItemId:me(-1,e.activeItemId,N(e),t.props.defaultActiveItemId)});return At(At({},r),{},{completion:Ot({state:r})});case"Escape":return e.isOpen?At(At({},e),{},{activeItemId:null,isOpen:!1,completion:null}):At(At({},e),{},{activeItemId:null,query:"",status:"idle",collections:[]});case"submit":return At(At({},e),{},{activeItemId:null,isOpen:!1,status:"idle"});case"reset":return At(At({},e),{},{activeItemId:!0===t.props.openOnFocus?t.props.defaultActiveItemId:null,status:"idle",completion:null,query:""});case"focus":return At(At({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||Boolean(e.query))&&t.props.shouldPanelOpen({state:e})});case"blur":return t.props.debug?e:At(At({},e),{},{isOpen:!1,activeItemId:null});case"mouseleave":return At(At({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function Nt(e){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nt(e)}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){Dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dt(e,t,n){return(t=function(e){var t=function(e){if("object"!==Nt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Nt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(e){var t=[],n=Re(e,t),r=function(e,t,n){var r,o=t.initialState;return{getState:function(){return o},dispatch:function(r,a){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){_e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o);o=e(o,{type:r,props:t,payload:a}),n({state:o,prevState:i})},pendingRequests:(r=[],{add:function(e){return r.push(e),e.finally((function(){r=r.filter((function(t){return t!==e}))}))},cancelAll:function(){r.forEach((function(e){return e.cancel()}))},isEmpty:function(){return 0===r.length}})}}(It,n,(function(e){var t,r,a=e.prevState,c=e.state;if(n.onStateChange(Rt({prevState:a,state:c,refresh:i,navigator:n.navigator},o)),!l()&&null!==(t=c.context)&&void 0!==t&&null!==(r=t.algoliaInsightsPlugin)&&void 0!==r&&r.__automaticInsights&&!1!==n.insights){var u=le({__autocomplete_clickAnalytics:!1});n.plugins.push(u),s([u])}})),o=function(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch("setActiveItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var n=0,r=e.map((function(e){return Pe(Pe({},e),{},{items:T(e.items).map((function(e){return Pe(Pe({},e),{},{__autocomplete_id:n++})}))})}));t.dispatch("setCollections",r)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:r}),a=St(Rt({props:n,refresh:i,store:r,navigator:n.navigator},o));function i(){return ot(Rt({event:new Event("input"),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:i,store:r},o))}function s(e){e.forEach((function(e){var r;return null===(r=e.subscribe)||void 0===r?void 0:r.call(e,Rt(Rt({},o),{},{navigator:n.navigator,refresh:i,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))}))}function l(){return n.plugins.some((function(e){return"aa.algoliaInsightsPlugin"===e.name}))}if(n.insights&&!l()){var c="boolean"==typeof n.insights?{}:n.insights;n.plugins.push(le(c))}return s(n.plugins),function(e){var t,n,r=e.metadata,o=e.environment;if(null===(t=o.navigator)||void 0===t||null===(n=t.userAgent)||void 0===n?void 0:n.includes("Algolia Crawler")){var a=o.document.createElement("meta"),i=o.document.querySelector("head");a.name="algolia:metadata",setTimeout((function(){a.content=JSON.stringify(r),i.appendChild(a)}),0)}}({metadata:Et({plugins:n.plugins,options:e}),environment:n.environment}),Rt(Rt({refresh:i,navigator:n.navigator},a),o)}function Ft(e){var t=e.translations,n=(void 0===t?{}:t).searchByText,o=void 0===n?"Search by":n;return r.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},r.createElement("span",{className:"DocSearch-Label"},o),r.createElement("svg",{width:"77",height:"19","aria-label":"Algolia",role:"img",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500"},r.createElement("defs",null,r.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),r.createElement("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),r.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),r.createElement("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),r.createElement("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),r.createElement("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),r.createElement("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),r.createElement("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),r.createElement("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),r.createElement("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})))}function Bt(e){return r.createElement("svg",{width:"15",height:"15","aria-label":e.ariaLabel,role:"img"},r.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2"},e.children))}function zt(e){var t=e.translations,n=void 0===t?{}:t,o=n.selectText,a=void 0===o?"to select":o,i=n.selectKeyAriaLabel,s=void 0===i?"Enter key":i,l=n.navigateText,c=void 0===l?"to navigate":l,u=n.navigateUpKeyAriaLabel,d=void 0===u?"Arrow up":u,p=n.navigateDownKeyAriaLabel,f=void 0===p?"Arrow down":p,m=n.closeText,h=void 0===m?"to close":m,g=n.closeKeyAriaLabel,y=void 0===g?"Escape key":g,b=n.searchByText,v=void 0===b?"Search by":b;return r.createElement(r.Fragment,null,r.createElement("div",{className:"DocSearch-Logo"},r.createElement(Ft,{translations:{searchByText:v}})),r.createElement("ul",{className:"DocSearch-Commands"},r.createElement("li",null,r.createElement("kbd",{className:"DocSearch-Commands-Key"},r.createElement(Bt,{ariaLabel:s},r.createElement("path",{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}))),r.createElement("span",{className:"DocSearch-Label"},a)),r.createElement("li",null,r.createElement("kbd",{className:"DocSearch-Commands-Key"},r.createElement(Bt,{ariaLabel:f},r.createElement("path",{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}))),r.createElement("kbd",{className:"DocSearch-Commands-Key"},r.createElement(Bt,{ariaLabel:d},r.createElement("path",{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}))),r.createElement("span",{className:"DocSearch-Label"},c)),r.createElement("li",null,r.createElement("kbd",{className:"DocSearch-Commands-Key"},r.createElement(Bt,{ariaLabel:y},r.createElement("path",{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}))),r.createElement("span",{className:"DocSearch-Label"},h))))}function Ut(e){var t=e.hit,n=e.children;return r.createElement("a",{href:t.url},n)}function $t(){return r.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),r.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},r.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function qt(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),r.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function Ht(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Vt(){return r.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),r.createElement("path",{d:"M8 17l-6-6 6-6"})))}var Wt=function(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Kt(e){switch(e.type){case"lvl1":return r.createElement(Wt,null);case"content":return r.createElement(Qt,null);default:return r.createElement(Gt,null)}}function Gt(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Qt(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Yt(){return r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},r.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Zt(){return r.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function Jt(){return r.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"}))}function Xt(e){var t=e.translations,n=void 0===t?{}:t,o=n.titleText,a=void 0===o?"Unable to fetch results":o,i=n.helpText,s=void 0===i?"You might want to check your network connection.":i;return r.createElement("div",{className:"DocSearch-ErrorScreen"},r.createElement("div",{className:"DocSearch-Screen-Icon"},r.createElement(Zt,null)),r.createElement("p",{className:"DocSearch-Title"},a),r.createElement("p",{className:"DocSearch-Help"},s))}var en=["translations"];function tn(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,en),a=n.noResultsText,i=void 0===a?"No results for":a,s=n.suggestedQueryText,l=void 0===s?"Try searching for":s,c=n.reportMissingResultsText,u=void 0===c?"Believe this query should return results?":c,d=n.reportMissingResultsLinkText,p=void 0===d?"Let us know.":d,f=o.state.context.searchSuggestions;return r.createElement("div",{className:"DocSearch-NoResults"},r.createElement("div",{className:"DocSearch-Screen-Icon"},r.createElement(Jt,null)),r.createElement("p",{className:"DocSearch-Title"},i,' "',r.createElement("strong",null,o.state.query),'"'),f&&f.length>0&&r.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},r.createElement("p",{className:"DocSearch-Help"},l,":"),r.createElement("ul",null,f.slice(0,3).reduce((function(e,t){return[].concat(S(e),[r.createElement("li",{key:t},r.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){o.setQuery(t.toLowerCase()+" "),o.refresh(),o.inputRef.current.focus()}},t))])}),[]))),o.getMissingResultsUrl&&r.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),r.createElement("a",{href:o.getMissingResultsUrl({query:o.state.query}),target:"_blank",rel:"noopener noreferrer"},p)))}var nn=["hit","attribute","tagName"];function rn(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function on(e){var t=e.hit,n=e.attribute,o=e.tagName,a=void 0===o?"span":o,i=y(e,nn);return(0,r.createElement)(a,g(g({},i),{},{dangerouslySetInnerHTML:{__html:rn(t,"_snippetResult.".concat(n,".value"))||rn(t,n)}}))}function an(e){return e.collection&&0!==e.collection.items.length?r.createElement("section",{className:"DocSearch-Hits"},r.createElement("div",{className:"DocSearch-Hit-source"},e.title),r.createElement("ul",e.getListProps(),e.collection.items.map((function(t,n){return r.createElement(sn,d({key:[e.title,t.objectID].join(":"),item:t,index:n},e))})))):null}function sn(e){var t=e.item,n=e.index,o=e.renderIcon,a=e.renderAction,i=e.getItemProps,s=e.onItemClick,l=e.collection,c=e.hitComponent,u=w(r.useState(!1),2),p=u[0],f=u[1],m=w(r.useState(!1),2),h=m[0],g=m[1],y=r.useRef(null),b=c;return r.createElement("li",d({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",p&&"DocSearch-Hit--deleting",h&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){y.current&&y.current()}},i({item:t,source:l.source,onClick:function(e){s(t,e)}})),r.createElement(b,{hit:t},r.createElement("div",{className:"DocSearch-Hit-Container"},o({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(on,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&r.createElement(on,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(on,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),r.createElement(on,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(on,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),r.createElement(on,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),a({item:t,runDeleteTransition:function(e){f(!0),y.current=e},runFavoriteTransition:function(e){g(!0),y.current=e}}))))}function ln(e,t,n){return e.reduce((function(e,r){var o=t(r);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(n||5)&&e[o].push(r),e}),{})}function cn(e){return e}function un(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function dn(){}var pn=/(<mark>|<\/mark>)/g,fn=RegExp(pn.source);function mn(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0;return o?o.value&&fn.test(o.value)?o.value.replace(pn,""):o.value:e.hierarchy.lvl0}function hn(e){return r.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map((function(t){if(0===t.items.length)return null;var n=mn(t.items[0]);return r.createElement(an,d({},e,{key:t.source.sourceId,title:n,collection:t,renderIcon:function(e){var n,o=e.item,a=e.index;return r.createElement(r.Fragment,null,o.__docsearch_parent&&r.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},o.__docsearch_parent!==(null===(n=t.items[a+1])||void 0===n?void 0:n.__docsearch_parent)?r.createElement("path",{d:"M8 6v21M20 27H8.3"}):r.createElement("path",{d:"M8 6v42M20 27H8.3"}))),r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Kt,{type:o.type})))},renderAction:function(){return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement(Vt,null))}}))})),e.resultsFooterComponent&&r.createElement("section",{className:"DocSearch-HitsFooter"},r.createElement(e.resultsFooterComponent,{state:e.state})))}var gn=["translations"];function yn(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,gn),a=n.recentSearchesTitle,i=void 0===a?"Recent":a,s=n.noRecentSearchesText,l=void 0===s?"No recent searches":s,c=n.saveRecentSearchButtonTitle,u=void 0===c?"Save this search":c,p=n.removeRecentSearchButtonTitle,f=void 0===p?"Remove this search from history":p,m=n.favoriteSearchesTitle,h=void 0===m?"Favorite":m,g=n.removeFavoriteSearchButtonTitle,b=void 0===g?"Remove this search from favorites":g;return"idle"===o.state.status&&!1===o.hasCollections?o.disableUserPersonalization?null:r.createElement("div",{className:"DocSearch-StartScreen"},r.createElement("p",{className:"DocSearch-Help"},l)):!1===o.hasCollections?null:r.createElement("div",{className:"DocSearch-Dropdown-Container"},r.createElement(an,d({},o,{title:i,collection:o.state.collections[0],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(qt,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,a=e.runDeleteTransition;return r.createElement(r.Fragment,null,r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){o.favoriteSearches.add(t),o.recentSearches.remove(t),o.refresh()}))}},r.createElement(Yt,null))),r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),a((function(){o.recentSearches.remove(t),o.refresh()}))}},r.createElement(Ht,null))))}})),r.createElement(an,d({},o,{title:h,collection:o.state.collections[1],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Yt,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:b,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){o.favoriteSearches.remove(t),o.refresh()}))}},r.createElement(Ht,null)))}})))}var bn=["translations"],vn=r.memo((function(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,bn);if("error"===o.state.status)return r.createElement(Xt,{translations:null==n?void 0:n.errorScreen});var a=o.state.collections.some((function(e){return e.items.length>0}));return o.state.query?!1===a?r.createElement(tn,d({},o,{translations:null==n?void 0:n.noResultsScreen})):r.createElement(hn,o):r.createElement(yn,d({},o,{hasCollections:a,translations:null==n?void 0:n.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status})),wn=["translations"];function Sn(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,wn),a=n.resetButtonTitle,i=void 0===a?"Clear the query":a,s=n.resetButtonAriaLabel,l=void 0===s?"Clear the query":s,c=n.cancelButtonText,u=void 0===c?"Cancel":c,p=n.cancelButtonAriaLabel,f=void 0===p?"Cancel":p,m=n.searchInputLabel,h=void 0===m?"Search":m,g=o.getFormProps({inputElement:o.inputRef.current}).onReset;return r.useEffect((function(){o.autoFocus&&o.inputRef.current&&o.inputRef.current.focus()}),[o.autoFocus,o.inputRef]),r.useEffect((function(){o.isFromSelection&&o.inputRef.current&&o.inputRef.current.select()}),[o.isFromSelection,o.inputRef]),r.createElement(r.Fragment,null,r.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:g},r.createElement("label",d({className:"DocSearch-MagnifierLabel"},o.getLabelProps()),r.createElement(_,null),r.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},h)),r.createElement("div",{className:"DocSearch-LoadingIndicator"},r.createElement($t,null)),r.createElement("input",d({className:"DocSearch-Input",ref:o.inputRef},o.getInputProps({inputElement:o.inputRef.current,autoFocus:o.autoFocus,maxLength:64}))),r.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":l,hidden:!o.state.query},r.createElement(Ht,null))),r.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:o.onClose},u))}var xn=["_highlightResult","_snippetResult"];function kn(e){var t=e.key,n=e.limit,r=void 0===n?5:n,o=function(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}(t),a=o.getItem().slice(0,r);return{add:function(e){var t=e;t._highlightResult,t._snippetResult;var n=y(t,xn),i=a.findIndex((function(e){return e.objectID===n.objectID}));i>-1&&a.splice(i,1),a.unshift(n),a=a.slice(0,r),o.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),o.setItem(a)},getAll:function(){return a}}}function jn(e){var t,n="algolia-client-js-".concat(e.key);function r(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(r().getItem(n)||"{}")}function a(e){r().setItem(n,JSON.stringify(e))}return{get:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var n,r,i;return n=e.timeToLive?1e3*e.timeToLive:null,r=o(),a(i=Object.fromEntries(Object.entries(r).filter((function(e){return void 0!==w(e,2)[1].timestamp})))),n&&a(Object.fromEntries(Object.entries(i).filter((function(e){var t=w(e,2)[1],r=(new Date).getTime();return!(t.timestamp+n<r)})))),o()[JSON.stringify(t)]})).then((function(e){return Promise.all([e?e.value:n(),void 0!==e])})).then((function(e){var t=w(e,2),n=t[0],o=t[1];return Promise.all([n,o||r.miss(n)])})).then((function(e){return w(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var a=o();return a[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},r().setItem(n,JSON.stringify(a)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=o();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function _n(e){var t=S(e.caches),n=t.shift();return void 0===n?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return w(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,o).catch((function(){return _n({caches:t}).get(e,r,o)}))},set:function(e,r){return n.set(e,r).catch((function(){return _n({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return _n({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return _n({caches:t}).clear()}))}}}function En(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var i=r();return i.then((function(e){return o.miss(e)})).then((function(){return i}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function On(e){var t=e.algoliaAgents,n=e.client,r=e.version,o=function(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}(r).add({segment:n,version:r});return t.forEach((function(e){return o.add(e)})),o}var Pn=12e4;function Cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",n=Date.now();return g(g({},e),{},{status:t,lastUpdate:n,isUp:function(){return"up"===t||Date.now()-n>Pn},isTimedOut:function(){return"timed out"===t&&Date.now()-n<=Pn}})}var An=function(){function e(t,n){var r;return l(this,e),u(r=s(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return f(e,k(Error)),c(e)}(),Tn=function(){function e(t,n,r){var o;return l(this,e),u(o=s(this,e,[t,r]),"stackTrace",void 0),o.stackTrace=n,o}return f(e,An),c(e)}(),In=function(){function e(t){return l(this,e),s(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError"])}return f(e,Tn),c(e)}(),Nn=function(){function e(t,n,r){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ApiError";return l(this,e),u(o=s(this,e,[t,r,a]),"status",void 0),o.status=n,o}return f(e,Tn),c(e)}(),Ln=function(){function e(t,n){var r;return l(this,e),u(r=s(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return f(e,An),c(e)}(),Rn=function(){function e(t,n,r,o){var a;return l(this,e),u(a=s(this,e,[t,n,o,"DetailedApiError"]),"error",void 0),a.error=r,a}return f(e,Nn),c(e)}();function Dn(e,t,n){var r,o=(r=n,Object.keys(r).filter((function(e){return void 0!==r[e]})).sort().map((function(e){return"".concat(e,"=").concat(encodeURIComponent("[object Array]"===Object.prototype.toString.call(r[e])?r[e].join(","):r[e]).replace(/\+/g,"%20"))})).join("&")),a="".concat(e.protocol,"://").concat(e.url).concat(e.port?":".concat(e.port):"","/").concat("/"===t.charAt(0)?t.substring(1):t);return o.length&&(a+="?".concat(o)),a}function Mn(e,t){if("GET"!==e.method&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:g(g({},e.data),t.data);return JSON.stringify(n)}}function Fn(e,t,n){var r=g(g(g({Accept:"application/json"},e),t),n),o={};return Object.keys(r).forEach((function(e){var t=r[e];o[e.toLowerCase()]=t})),o}function Bn(e){try{return JSON.parse(e.content)}catch(t){throw new Ln(t.message,e)}}function zn(e,t){var n=e.content,r=e.status;try{var o=JSON.parse(n);return"error"in o?new Rn(o.message,r,o.error,t):new Nn(o.message,r,t)}catch(e){}return new Nn(n,r,t)}function Un(e){return e.map((function(e){return $n(e)}))}function $n(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return g(g({},e),{},{request:g(g({},e.request),{},{headers:g(g({},e.request.headers),t)})})}var qn=["appId","apiKey","authMode","algoliaAgents"],Hn=["params"],Vn="5.14.2";function Wn(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){for(var t=e,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),o=e[n];t[n]=e[r],t[r]=o}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var Kn="3.8.2";function Gn(e,t,n){return r.useMemo((function(){var r=function(e,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,n=e.apiKey,r=e.authMode,o=e.algoliaAgents,a=y(e,qn),s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"WithinHeaders",r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:function(){return"WithinHeaders"===n?r:{}},queryParameters:function(){return"WithinQueryParameters"===n?r:{}}}}(t,n,r),l=function(e){var t=e.hosts,n=e.hostsCache,r=e.baseHeaders,o=e.logger,a=e.baseQueryParameters,s=e.algoliaAgent,l=e.timeouts,c=e.requester,u=e.requestsCache,d=e.responsesCache;function p(e){return f.apply(this,arguments)}function f(){return(f=i(b().mark((function e(t){var r,o,a,i,s;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return n.get(e,(function(){return Promise.resolve(Cn(e))}))})));case 2:return r=e.sent,o=r.filter((function(e){return e.isUp()})),a=r.filter((function(e){return e.isTimedOut()})),i=[].concat(S(o),S(a)),s=i.length>0?i:t,e.abrupt("return",{hosts:s,getTimeout:function(e,t){return(0===a.length&&0===e?1:a.length+3+e)*t}});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){return h.apply(this,arguments)}function h(){return h=i(b().mark((function e(u,d){var f,m,h,y,v,w,x,k,j,_,E,O,P,C=arguments;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=!(C.length>2&&void 0!==C[2])||C[2],m=[],h=Mn(u,d),y=Fn(r,u.headers,d.headers),v="GET"===u.method?g(g({},u.data),d.data):{},w=g(g(g({},a),u.queryParameters),v),s.value&&(w["x-algolia-agent"]=s.value),d&&d.queryParameters)for(x=0,k=Object.keys(d.queryParameters);x<k.length;x++)j=k[x],d.queryParameters[j]&&"[object Object]"!==Object.prototype.toString.call(d.queryParameters[j])?w[j]=d.queryParameters[j].toString():w[j]=d.queryParameters[j];return _=0,E=function(){var e=i(b().mark((function e(t,r){var a,i,s,p,v,S;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==(a=t.pop())){e.next=3;break}throw new In(Un(m));case 3:return i=g(g({},l),d.timeouts),s={data:h,headers:y,method:u.method,url:Dn(a,u.path,w),connectTimeout:r(_,i.connect),responseTimeout:r(_,f?i.read:i.write)},p=function(e){var n={request:s,response:e,host:a,triesLeft:t.length};return m.push(n),n},e.next=8,c.send(s);case 8:if(x=(b=v=e.sent).isTimedOut,k=b.status,!(x||function(e){return!e.isTimedOut&&!~~e.status}({isTimedOut:x,status:k})||2!=~~(k/100)&&4!=~~(k/100))){e.next=16;break}return S=p(v),v.isTimedOut&&_++,o.info("Retryable failure",$n(S)),e.next=15,n.set(a,Cn(a,v.isTimedOut?"timed out":"down"));case 15:return e.abrupt("return",E(t,r));case 16:if(2!=~~(v.status/100)){e.next=18;break}return e.abrupt("return",Bn(v));case 18:throw p(v),zn(v,m);case 20:case"end":return e.stop()}var b,x,k}),e)})));return function(t,n){return e.apply(this,arguments)}}(),O=t.filter((function(e){return"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept)})),e.next=13,p(O);case 13:return P=e.sent,e.abrupt("return",E(S(P.hosts).reverse(),P.getTimeout));case 15:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}return{hostsCache:n,requester:c,timeouts:l,logger:o,algoliaAgent:s,baseHeaders:r,baseQueryParameters:a,hosts:t,request:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.useReadTransporter||"GET"===e.method;if(!n)return m(e,t,n);var o=function(){return m(e,t)};if(!0!==(t.cacheable||e.cacheable))return o();var i={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return d.get(i,(function(){return u.get(i,(function(){return u.set(i,o()).then((function(e){return Promise.all([u.delete(i),e])}),(function(e){return Promise.all([u.delete(i),Promise.reject(e)])})).then((function(e){var t=w(e,2);return t[0],t[1]}))}))}),{miss:function(e){return d.set(i,e)}})},requestsCache:u,responsesCache:d}}(g(g({hosts:Wn(t)},a),{},{algoliaAgent:On({algoliaAgents:o,client:"Lite",version:Vn}),baseHeaders:g(g({"content-type":"text/plain"},s.headers()),a.baseHeaders),baseQueryParameters:g(g({},s.queryParameters()),a.baseQueryParameters)}));return{transporter:l,appId:t,clearCache:function(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then((function(){}))},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent:function(e,t){l.algoliaAgent.add({segment:e,version:t})},setClientApiKey:function(e){var t=e.apiKey;r&&"WithinHeaders"!==r?l.baseQueryParameters["x-algolia-api-key"]=t:l.baseHeaders["x-algolia-api-key"]=t},searchForHits:function(e,t){return this.search(e,t)},searchForFacets:function(e,t){return this.search(e,t)},customPost:function(e,t){var n=e.path,r=e.parameters,o=e.body;if(!n)throw new Error("Parameter `path` is required when calling `customPost`.");var a={method:"POST",path:"/{path}".replace("{path}",n),queryParameters:r||{},headers:{},data:o||{}};return l.request(a,t)},getRecommendations:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return l.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var n={requests:e.map((function(e){var t=e.params,n=y(e,Hn);return"facet"===n.type?g(g(g({},n),t),{},{type:"facet"}):g(g(g({},n),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=n}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return l.request(r,t)}}}(g({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return Promise.resolve()}},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,o=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),e)},a=o(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=o(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:En(),requestsCache:En({serializable:!1}),hostsCache:_n({caches:[jn({key:"".concat(Vn,"-").concat(e)}),En()]})},void 0))}(e,t);return r.addAlgoliaAgent("docsearch",Kn),!1===/docsearch.js \(.*\)/.test(r.transporter.algoliaAgent.value)&&r.addAlgoliaAgent("docsearch-react",Kn),n(r)}),[e,t,n])}var Qn=["footer","searchBox"];function Yn(e){var t=e.appId,n=e.apiKey,o=e.indexName,a=e.placeholder,i=void 0===a?"Search docs":a,s=e.searchParameters,l=e.maxResultsPerGroup,c=e.onClose,u=void 0===c?dn:c,p=e.transformItems,f=void 0===p?cn:p,m=e.hitComponent,h=void 0===m?Ut:m,b=e.resultsFooterComponent,v=void 0===b?function(){return null}:b,S=e.navigator,x=e.initialScrollY,k=void 0===x?0:x,j=e.transformSearchClient,_=void 0===j?cn:j,E=e.disableUserPersonalization,O=void 0!==E&&E,P=e.initialQuery,C=void 0===P?"":P,A=e.translations,T=void 0===A?{}:A,I=e.getMissingResultsUrl,N=e.insights,L=void 0!==N&&N,R=T.footer,D=T.searchBox,M=y(T,Qn),F=w(r.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),B=F[0],z=F[1],U=r.useRef(null),$=r.useRef(null),q=r.useRef(null),H=r.useRef(null),V=r.useRef(null),W=r.useRef(10),K=r.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,G=r.useRef(C||K).current,Q=Gn(t,n,_),Y=r.useRef(kn({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(o),limit:10})).current,Z=r.useRef(kn({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(o),limit:0===Y.getAll().length?7:4})).current,J=r.useCallback((function(e){if(!O){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===Y.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&Z.add(t)}}),[Y,Z,O]),X=r.useCallback((function(e){if(B.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};B.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[B.context.algoliaInsightsPlugin]),ee=r.useMemo((function(){return Mt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:G,context:{searchSuggestions:[]}},insights:L,navigator:S,onStateChange:function(e){z(e.state)},getSources:function(e){var r=e.query,a=e.state,i=e.setContext,c=e.setStatus;if(!r)return O?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),un(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return Z.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),un(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return Y.getAll()}}];var d=Boolean(L);return Q.search({requests:[g({query:r,indexName:o,attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(W.current),"hierarchy.lvl2:".concat(W.current),"hierarchy.lvl3:".concat(W.current),"hierarchy.lvl4:".concat(W.current),"hierarchy.lvl5:".concat(W.current),"hierarchy.lvl6:".concat(W.current),"content:".concat(W.current)],snippetEllipsisText:"\u2026",highlightPreTag:"<mark>",highlightPostTag:"</mark>",hitsPerPage:20,clickAnalytics:d},s)]}).catch((function(e){throw"RetryError"===e.name&&c("error"),e})).then((function(e){var r=e.results[0],s=r.hits,c=r.nbHits,p=ln(s,(function(e){return mn(e)}),l);a.context.searchSuggestions.length<Object.keys(p).length&&i({searchSuggestions:Object.keys(p)}),i({nbHits:c});var m={};return d&&(m={__autocomplete_indexName:o,__autocomplete_queryID:r.queryID,__autocomplete_algoliaCredentials:{appId:t,apiKey:n}}),Object.values(p).map((function(e,t){return{sourceId:"hits".concat(t),onSelect:function(e){var t=e.item,n=e.event;J(t),un(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return Object.values(ln(e,(function(e){return e.hierarchy.lvl1}),l)).map(f).map((function(e){return e.map((function(t){var n=null,r=e.find((function(e){return"lvl1"===e.type&&e.hierarchy.lvl1===t.hierarchy.lvl1}));return"lvl1"!==t.type&&r&&(n=r),g(g({},t),{},{__docsearch_parent:n},m)}))})).flat()}}}))}))}})}),[o,s,l,Q,u,Z,Y,J,G,i,S,f,O,L,t,n]),te=ee.getEnvironmentProps,ne=ee.getRootProps,re=ee.refresh;return function(e){var t=e.getEnvironmentProps,n=e.panelElement,o=e.formElement,a=e.inputElement;r.useEffect((function(){if(n&&o&&a){var e=t({panelElement:n,formElement:o,inputElement:a}),r=e.onTouchStart,i=e.onTouchMove;return window.addEventListener("touchstart",r),window.addEventListener("touchmove",i),function(){window.removeEventListener("touchstart",r),window.removeEventListener("touchmove",i)}}}),[t,n,o,a])}({getEnvironmentProps:te,panelElement:H.current,formElement:q.current,inputElement:V.current}),function(e){var t=e.container;r.useEffect((function(){if(t){var e=t.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),n=e[0],r=e[e.length-1];return t.addEventListener("keydown",o),function(){t.removeEventListener("keydown",o)}}function o(e){"Tab"===e.key&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),r.focus()):document.activeElement===r&&(e.preventDefault(),n.focus()))}}),[t])}({container:U.current}),r.useEffect((function(){return document.body.classList.add("DocSearch--active"),function(){var e,t;document.body.classList.remove("DocSearch--active"),null===(e=(t=window).scrollTo)||void 0===e||e.call(t,0,k)}}),[]),r.useEffect((function(){window.matchMedia("(max-width: 768px)").matches&&(W.current=5)}),[]),r.useEffect((function(){H.current&&(H.current.scrollTop=0)}),[B.query]),r.useEffect((function(){G.length>0&&(re(),V.current&&V.current.focus())}),[G,re]),r.useEffect((function(){function e(){if($.current){var e=.01*window.innerHeight;$.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),r.createElement("div",d({ref:U},ne({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===B.status&&"DocSearch-Container--Stalled","error"===B.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&u()}}),r.createElement("div",{className:"DocSearch-Modal",ref:$},r.createElement("header",{className:"DocSearch-SearchBar",ref:q},r.createElement(Sn,d({},ee,{state:B,autoFocus:0===G.length,inputRef:V,isFromSelection:Boolean(G)&&G===K,translations:D,onClose:u}))),r.createElement("div",{className:"DocSearch-Dropdown",ref:H},r.createElement(vn,d({},ee,{indexName:o,state:B,hitComponent:h,resultsFooterComponent:v,disableUserPersonalization:O,recentSearches:Z,favoriteSearches:Y,inputRef:V,translations:M,getMissingResultsUrl:I,onItemClick:function(e,t){X(e),J(e),un(t)||u()}}))),r.createElement("footer",{className:"DocSearch-Footer"},r.createElement(zt,{translations:R}))))}function Zn(e){var t=e.isOpen,n=e.onOpen,o=e.onClose,a=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){var r;if("Escape"===e.code&&t||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)return e.preventDefault(),void(t?o():document.body.classList.contains("DocSearch--active")||n());i&&i.current===document.activeElement&&a&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&a(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,o,a,i])}},48912:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});n(63696);var r=n(53259),o=n.n(r),a=n(84054);const i={"0087a340":[()=>n.e(180).then(n.t.bind(n,33491,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-references-1b9.json",33491],"03b83387":[()=>n.e(3459).then(n.t.bind(n,46103,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-string-515.json",46103],"03eeee36":[()=>n.e(151).then(n.t.bind(n,33201,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-generic-keywords-293.json",33201],"0446378f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7889)]).then(n.bind(n,50376)),"@site/docs/demo-viewer/refs/localFile.mdx",50376],"08dc474f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(81)]).then(n.bind(n,70571)),"@site/docs/api/MonacoEditor.mdx",70571],"09dbd73b":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1060)]).then(n.bind(n,98272)),"@site/docs/demo-viewer/array/additionalItems2.mdx",98272],"0ce74438":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9295),n.e(7126),n.e(3365)]).then(n.bind(n,77824)),"@site/src/pages/playground.tsx",77824],"0d2bf170":[()=>Promise.all([n.e(1869),n.e(2076),n.e(3177)]).then(n.bind(n,37222)),"@site/docs/demo-viewer/array/unevaluatedItems1.mdx",37222],"0d743cca":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9352)]).then(n.bind(n,39096)),"@site/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.mdx",39096],"0ff7d3d9":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8962)]).then(n.bind(n,30623)),"@site/docs/demo-viewer/schema_conditionally/if-then-else.mdx",30623],"14eb3368":[()=>Promise.all([n.e(1869),n.e(6969)]).then(n.bind(n,67981)),"@theme/DocCategoryGeneratedIndexPage",67981],"16bf5a7a":[()=>n.e(3516).then(n.t.bind(n,48703,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-schema-conditionally-7f6.json",48703],17896441:[()=>Promise.all([n.e(1869),n.e(2076),n.e(8401)]).then(n.bind(n,58404)),"@theme/DocItem",58404],"188a43e1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5232)]).then(n.bind(n,35070)),"@site/docs/demo-viewer/object/unevaluatedProperties2.mdx",35070],"1a4e3797":[()=>Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,90511)),"@theme/SearchPage",90511],"1e804d56":[()=>Promise.all([n.e(1869),n.e(2076),n.e(6444)]).then(n.bind(n,77670)),"@site/docs/demo-viewer/schema_composition/not.mdx",77670],"207c73ba":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1698)]).then(n.bind(n,34349)),"@site/docs/demo-viewer/object/properties.mdx",34349],"22aea3f5":[()=>n.e(4198).then(n.t.bind(n,64761,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-demo-viewer-bb3.json",64761],"247662c2":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5821)]).then(n.bind(n,36672)),"@site/docs/demo-viewer/schema_conditionally/dependentRequired.mdx",36672],"25efcfba":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9617)]).then(n.bind(n,67163)),"@site/docs/demo-viewer/object/patternProperties.mdx",67163],"2b403dce":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5650)]).then(n.bind(n,98755)),"@site/docs/demo-viewer/string/contentEncoding.mdx",98755],"2bd2a82e":[()=>n.e(8117).then(n.t.bind(n,9279,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-array-375.json",9279],"2cc05f38":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1487)]).then(n.bind(n,7924)),"@site/docs/demo-viewer/null.mdx",7924],"2e4a130b":[()=>n.e(8947).then(n.t.bind(n,45872,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-\ufe0f-customizations-e33.json",45872],"39bae550":[()=>Promise.all([n.e(1869),n.e(2076),n.e(417)]).then(n.bind(n,55443)),"@site/docs/demo-viewer/numeric/multipleOf.mdx",55443],"3af02d98":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1552)]).then(n.bind(n,43645)),"@site/docs/api/JSONSchemaViewer.mdx",43645],"3d59b95f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(4362)]).then(n.bind(n,78321)),"@site/docs/demo-viewer/generic_keywords/enum.mdx",78321],"458927b5":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9905)]).then(n.bind(n,15635)),"@site/docs/demo-viewer/schema_conditionally/dependentSchemas.mdx",15635],"4de116f4":[()=>Promise.all([n.e(1869),n.e(2076),n.e(2726)]).then(n.bind(n,47731)),"@site/docs/demo-viewer/schema_composition/anyOf.mdx",47731],"4f68d1a6":[()=>Promise.all([n.e(1869),n.e(2076),n.e(983)]).then(n.bind(n,28071)),"@site/docs/demo-viewer/object/simpleObject.mdx",28071],"5bc82b60":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9873)]).then(n.bind(n,60708)),"@site/docs/demo-viewer/string/length.mdx",60708],"5e95c892":[()=>n.e(9647).then(n.bind(n,18122)),"@theme/DocsRoot",18122],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"5f0f252d":[()=>Promise.all([n.e(1869),n.e(2076),n.e(2701)]).then(n.bind(n,12146)),"@site/docs/demo-viewer/string/contentMediaType.mdx",12146],"6713985a":[()=>Promise.all([n.e(1869),n.e(2076),n.e(4655),n.e(7031)]).then(n.bind(n,36364)),"@site/docs/demo-viewer/custom/description.mdx",36364],"6c29c54d":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9681)]).then(n.bind(n,8195)),"@site/docs/demo-viewer/object/required.mdx",8195],"6f77199a":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9517)]).then(n.bind(n,17339)),"@site/docs/demo-viewer/schema_conditionally/if-then-else_multiple.mdx",17339],"720066b1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5687)]).then(n.bind(n,60567)),"@site/docs/demo-viewer/boolean.mdx",60567],"72a427b3":[()=>Promise.all([n.e(2076),n.e(5643)]).then(n.bind(n,91776)),"@site/docs/contributing.mdx",91776],"73e48de0":[()=>Promise.all([n.e(1869),n.e(2076),n.e(4893)]).then(n.bind(n,85742)),"@site/docs/demo-viewer/schema_composition/allOf.mdx",85742],"756e0924":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9823)]).then(n.bind(n,82153)),"@site/docs/demo-viewer/custom/unsolved_refs.mdx",82153],"7f4b4e53":[()=>n.e(8131).then(n.t.bind(n,48990,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-type-61b.json",48990],"808311b0":[()=>n.e(3120).then(n.t.bind(n,92074,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-api-af1.json",92074],84361440:[()=>Promise.all([n.e(1869),n.e(2076),n.e(9295),n.e(19)]).then(n.bind(n,69727)),"@site/src/pages/boxFileSchema.tsx",69727],"890ab00c":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9558)]).then(n.bind(n,37840)),"@site/docs/demo-viewer/refs/remoteFile.mdx",37840],"8e80fdd7":[()=>Promise.all([n.e(1869),n.e(2076),n.e(415)]).then(n.bind(n,91879)),"@site/docs/demo-viewer/numeric/integer.mdx",91879],"8f884ddd":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9233)]).then(n.bind(n,22782)),"@site/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.mdx",22782],"8f9be69b":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7808)]).then(n.bind(n,5323)),"@site/docs/demo-viewer/numeric/number.mdx",5323],"9028850b":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1309)]).then(n.bind(n,48611)),"@site/docs/demo-viewer/array/tuples.mdx",48611],"93cebb7f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8288)]).then(n.bind(n,44976)),"@site/docs/demo-viewer/refs/ref.mdx",44976],"9a079c62":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8142)]).then(n.bind(n,24171)),"@site/docs/demo-viewer/numeric/ranges.mdx",24171],"9a29e754":[()=>Promise.all([n.e(1869),n.e(2076),n.e(3693)]).then(n.bind(n,12217)),"@site/docs/demo-viewer/array/uniqueItems.mdx",12217],"9dfa20e1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5771)]).then(n.bind(n,92614)),"@site/docs/demo-viewer/string/contentEncodingWithContentMediaType.mdx",92614],a7456010:[()=>n.e(1235).then(n.t.bind(n,88552,19)),"@generated/docusaurus-plugin-content-pages/default/__plugin.json",88552],a78d2520:[()=>Promise.all([n.e(1869),n.e(2076),n.e(5150)]).then(n.bind(n,87014)),"@site/docs/demo-viewer/object/additionalProperties.mdx",87014],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,15047)),"@theme/DocVersionRoot",15047],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,91841)),"@theme/DocRoot",91841],a9655ce0:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2837)]).then(n.bind(n,67530)),"@site/docs/demo-viewer/array/length.mdx",67530],a998845c:[()=>Promise.all([n.e(1869),n.e(2076),n.e(7846)]).then(n.bind(n,71289)),"@site/docs/demo-viewer/string/format.mdx",71289],a9c29fe5:[()=>n.e(8109).then(n.t.bind(n,93573,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-demo-7f1.json",93573],aba21aa0:[()=>n.e(5742).then(n.t.bind(n,27093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",27093],af4dc41c:[()=>n.e(947).then(n.t.bind(n,3987,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-df8.json",3987],b34a7af0:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4655),n.e(5533)]).then(n.bind(n,12109)),"@site/docs/demo-viewer/generic_keywords/annotations.mdx",12109],bb96c887:[()=>Promise.all([n.e(1869),n.e(2076),n.e(5184)]).then(n.bind(n,70609)),"@site/docs/demo-viewer/custom/values.mdx",70609],bf17fbd2:[()=>Promise.all([n.e(1869),n.e(2076),n.e(7949)]).then(n.bind(n,6381)),"@site/docs/demo-viewer/string/contentSchema.mdx",6381],c09ae39f:[()=>n.e(8853).then(n.t.bind(n,88967,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-object-823.json",88967],c141421f:[()=>n.e(957).then(n.t.bind(n,40936,19)),"@generated/docusaurus-theme-search-algolia/default/__plugin.json",40936],c179f821:[()=>Promise.all([n.e(1869),n.e(2076),n.e(1110)]).then(n.bind(n,53215)),"@site/docs/quick-start.mdx",53215],c37467e1:[()=>Promise.all([n.e(1869),n.e(2076),n.e(7279)]).then(n.bind(n,36982)),"@site/docs/demo-viewer/type/singleType.mdx",36982],c3bb5603:[()=>Promise.all([n.e(2076),n.e(5887)]).then(n.bind(n,82121)),"@site/docs/api/config.mdx",82121],c4f5d8e4:[()=>Promise.all([n.e(1869),n.e(2634)]).then(n.bind(n,67025)),"@site/src/pages/index.js",67025],c7088344:[()=>Promise.all([n.e(1869),n.e(2076),n.e(6358)]).then(n.bind(n,63575)),"@site/docs/demo-viewer/generic_keywords/const.mdx",63575],ca1962f0:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4923)]).then(n.bind(n,44480)),"@site/docs/demo-viewer/array/items.mdx",44480],ca1c8d76:[()=>Promise.all([n.e(1869),n.e(2076),n.e(7368)]).then(n.bind(n,84720)),"@site/docs/demo-viewer/array/simple.mdx",84720],cbc552c0:[()=>Promise.all([n.e(1869),n.e(2076),n.e(8272)]).then(n.bind(n,57245)),"@site/docs/demo-viewer/string/pattern.mdx",57245],cd537aaf:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3263)]).then(n.bind(n,22241)),"@site/docs/demo-viewer/schema_composition/oneOf.mdx",22241],d4ff3b58:[()=>Promise.all([n.e(1869),n.e(2076),n.e(5271)]).then(n.bind(n,27288)),"@site/docs/api/JSONSchemaEditor.mdx",27288],d672ff73:[()=>Promise.all([n.e(1869),n.e(2076),n.e(36)]).then(n.bind(n,5276)),"@site/docs/demo-viewer/object/additionalProperties2.mdx",5276],dba41c5f:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2539)]).then(n.bind(n,16098)),"@site/docs/demo-viewer/object/size.mdx",16098],dc7a627d:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3829)]).then(n.bind(n,24434)),"@site/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.mdx",24434],e5bfc516:[()=>Promise.all([n.e(1869),n.e(2076),n.e(1116)]).then(n.bind(n,41212)),"@site/docs/demo-viewer/string/simple.mdx",41212],e6818ad2:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4648)]).then(n.bind(n,38442)),"@site/docs/demo-viewer/array/contains.mdx",38442],ea313555:[()=>Promise.all([n.e(1869),n.e(2076),n.e(1011)]).then(n.bind(n,77103)),"@site/docs/faq.mdx",77103],ec99730f:[()=>Promise.all([n.e(2076),n.e(2209)]).then(n.bind(n,58482)),"@site/docs/next-steps.mdx",58482],ee47f93d:[()=>n.e(4032).then(n.t.bind(n,28685,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-schema-composition-381.json",28685],ef99d285:[()=>Promise.all([n.e(1869),n.e(2076),n.e(1283)]).then(n.bind(n,57240)),"@site/docs/demo-viewer/object/unevaluatedProperties1.mdx",57240],f149d4e3:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3869)]).then(n.bind(n,33190)),"@site/docs/demo-viewer/object/propertyNames.mdx",33190],f37a108b:[()=>Promise.all([n.e(1869),n.e(2076),n.e(8263)]).then(n.bind(n,76415)),"@site/docs/demo-viewer/array/unevaluatedItems2.mdx",76415],f45d2610:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2869)]).then(n.bind(n,32369)),"@site/docs/demo-viewer/array/additionalItems1.mdx",32369],f595544d:[()=>Promise.all([n.e(1869),n.e(2076),n.e(6997)]).then(n.bind(n,71031)),"@site/docs/demo-viewer/array/minContainsAndMaxContains.mdx",71031],f746fa1f:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2778)]).then(n.bind(n,34599)),"@site/docs/demo-viewer/type/multipleType.mdx",34599],f7f7156a:[()=>Promise.all([n.e(1869),n.e(2076),n.e(9842)]).then(n.bind(n,92065)),"@site/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.mdx",92065],ffca4553:[()=>n.e(2610).then(n.t.bind(n,36049,19)),"@generated/docusaurus-plugin-content-docs/default/p/docusaurus-json-schema-plugin-docs-category-numeric-450.json",36049]};var s=n(62540);function l(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(13722),u=n(75313);function d(e,t){if("*"===e)return o()({loading:l,loader:()=>n.e(3042).then(n.bind(n,73042)),modules:["@theme/NotFound"],webpack:()=>[73042],render(e,t){const n=e.default;return(0,s.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,{...t})})}});const r=a[`${e}-${t}`],d={},p=[],f=[],m=(0,c.A)(r);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),o().Map({loading:l,loader:d,modules:p,webpack:()=>f,render(t,n){const o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let i=o;const s=n.split(".");s.slice(0,-1).forEach((e=>{i=i[e]})),i[s[s.length-1]]=a}));const a=o.__comp;delete o.__comp;const i=o.__context;delete o.__context;const l=o.__props;return delete o.__props,(0,s.jsx)(u.W,{value:i,children:(0,s.jsx)(a,{...o,...l,...n})})}})}const p=[{path:"/docusaurus-json-schema-plugin/boxFileSchema",component:d("/docusaurus-json-schema-plugin/boxFileSchema","f25"),exact:!0},{path:"/docusaurus-json-schema-plugin/playground",component:d("/docusaurus-json-schema-plugin/playground","353"),exact:!0},{path:"/docusaurus-json-schema-plugin/search",component:d("/docusaurus-json-schema-plugin/search","36e"),exact:!0},{path:"/docusaurus-json-schema-plugin/docs",component:d("/docusaurus-json-schema-plugin/docs","37f"),routes:[{path:"/docusaurus-json-schema-plugin/docs",component:d("/docusaurus-json-schema-plugin/docs","246"),routes:[{path:"/docusaurus-json-schema-plugin/docs",component:d("/docusaurus-json-schema-plugin/docs","575"),routes:[{path:"/docusaurus-json-schema-plugin/docs/api",component:d("/docusaurus-json-schema-plugin/docs/api","53e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/api/config",component:d("/docusaurus-json-schema-plugin/docs/api/config","58a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor",component:d("/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor","15f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer",component:d("/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer","48b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/api/MonacoEditor",component:d("/docusaurus-json-schema-plugin/docs/api/MonacoEditor","0c8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-array",component:d("/docusaurus-json-schema-plugin/docs/category/-array","fe0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations",component:d("/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations","56f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-generic-keywords",component:d("/docusaurus-json-schema-plugin/docs/category/-generic-keywords","a5c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-numeric",component:d("/docusaurus-json-schema-plugin/docs/category/-numeric","2d1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-object",component:d("/docusaurus-json-schema-plugin/docs/category/-object","b53"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-references",component:d("/docusaurus-json-schema-plugin/docs/category/-references","f27"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-schema-composition",component:d("/docusaurus-json-schema-plugin/docs/category/-schema-composition","b88"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally",component:d("/docusaurus-json-schema-plugin/docs/category/-schema-conditionally","1bf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-string",component:d("/docusaurus-json-schema-plugin/docs/category/-string","56a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/category/-type",component:d("/docusaurus-json-schema-plugin/docs/category/-type","bde"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/contributing",component:d("/docusaurus-json-schema-plugin/docs/contributing","68d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo",component:d("/docusaurus-json-schema-plugin/docs/demo","576"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1","874"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2","e9f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains","ec1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/items","f60"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/length","211"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains","0af"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple","19f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples","408"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1","eb8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2","a1c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems","2ce"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/boolean","21d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description","c98"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs","129"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values","070"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations","fc3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const","c56"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum","1e6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/null",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/null","79e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer","4bc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf","54e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number","34d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges","b09"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties","e5f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2","f08"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties","66d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties","071"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties","2a2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames","abf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/required","06e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject","6bb"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/size","8b4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1","f04"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2","08e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile","1f6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref","5ab"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile","ae8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf","269"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf","4bd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not","1c7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf","82b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired","540"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas","03c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired","104"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional","557"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas","c6f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else","9c3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple","fb2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding","e86"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType","e83"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType","3a3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema","7b3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/format","4a7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/length","1c6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern","dc1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple","53f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType","cfb"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType",component:d("/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType","65b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/demo/viewer",component:d("/docusaurus-json-schema-plugin/docs/demo/viewer","a86"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/faq",component:d("/docusaurus-json-schema-plugin/docs/faq","11d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/next-steps",component:d("/docusaurus-json-schema-plugin/docs/next-steps","aac"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docusaurus-json-schema-plugin/docs/quick-start",component:d("/docusaurus-json-schema-plugin/docs/quick-start","0de"),exact:!0,sidebar:"tutorialSidebar"}]}]}]},{path:"/docusaurus-json-schema-plugin/",component:d("/docusaurus-json-schema-plugin/","17b"),exact:!0},{path:"*",component:d("*")}]},84974:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>i});var r=n(63696),o=n(62540);const a=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,o.jsx)(a.Provider,{value:n,children:t})}},41823:(e,t,n)=>{"use strict";var r=n(63696),o=n(5338),a=n(80545),i=n(54625),s=n(4784),l=n(61934);const c=[n(67378),n(55420),n(78867),n(82094)];var u=n(48912),d=n(56347),p=n(22831),f=n(62540);function m(e){let{children:t}=e;return(0,f.jsx)(f.Fragment,{children:t})}var h=n(27143),g=n(40797),y=n(29030),b=n(53115),v=n(59144),w=n(67976),S=n(67788),x=n(89396),k=n(30099),j=n(37220);function _(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,g.A)(),r=(0,w.o)(),o=n[e].htmlLang,a=e=>e.replace("-","_");return(0,f.jsxs)(h.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:a(o)}),Object.values(n).filter((e=>o!==e.htmlLang)).map((e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:a(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function E(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,g.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,g.A)(),{pathname:r}=(0,d.zy)();return e+(0,k.Ks)((0,y.Ay)(r),{trailingSlash:n,baseUrl:t})}(),o=t?`${n}${t}`:r;return(0,f.jsxs)(h.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:o}),(0,f.jsx)("link",{rel:"canonical",href:o})]})}function O(){const{i18n:{currentLocale:e}}=(0,g.A)(),{metadata:t,image:n}=(0,b.p)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(h.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:S.w})]}),n&&(0,f.jsx)(v.be,{image:n}),(0,f.jsx)(E,{}),(0,f.jsx)(_,{}),(0,f.jsx)(j.A,{tag:x.C,locale:e}),(0,f.jsx)(h.A,{children:t.map(((e,t)=>(0,f.jsx)("meta",{...e},t)))})]})}const P=new Map;var C=n(84974),A=n(46193),T=n(50372);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const o=c.map((t=>{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>o.forEach((e=>e?.()))}const N=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,T.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,o=t.hash===n.hash,a=t.search===n.search;if(r&&o&&!a)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),I("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function L(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,p.u)(u.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class R extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.A.canUseDOM?I("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=I("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),L(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,f.jsx)(N,{previousLocation:this.previousLocation,location:t,children:(0,f.jsx)(d.qh,{location:t,render:()=>e})})}}const D=R,M="__docusaurus-base-url-issue-banner-suggestion-container";function F(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '__docusaurus-base-url-issue-banner-container';\n var bannerHtml = ${JSON.stringify(function(e){return`\n<div id="__docusaurus-base-url-issue-banner" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseUrl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">${e}</span> ${"/"===e?" (default value)":""}</p>\n <p>We suggest trying baseUrl = <span id="${M}" style="font-weight: bold; color: green;"></span></p>\n</div>\n`}(e)).replace(/</g,"\\<")};\n bannerContainer.innerHTML = bannerHtml;\n document.body.prepend(bannerContainer);\n var suggestionContainer = document.getElementById('${M}');\n var actualHomePagePath = window.location.pathname;\n var suggestedBaseUrl = actualHomePagePath.substr(-1) === '/'\n ? actualHomePagePath\n : actualHomePagePath + '/';\n suggestionContainer.innerHTML = suggestedBaseUrl;\n}\n`}function B(){const{siteConfig:{baseUrl:e}}=(0,g.A)();return(0,f.jsx)(f.Fragment,{children:!l.A.canUseDOM&&(0,f.jsx)(h.A,{children:(0,f.jsx)("script",{children:F(e)})})})}function z(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,g.A)(),{pathname:n}=(0,d.zy)();return t&&n===e?(0,f.jsx)(B,{}):null}function U(){const{siteConfig:{favicon:e,title:t,noIndex:n},i18n:{currentLocale:r,localeConfigs:o}}=(0,g.A)(),a=(0,y.Ay)(e),{htmlLang:i,direction:s}=o[r];return(0,f.jsxs)(h.A,{children:[(0,f.jsx)("html",{lang:i,dir:s}),(0,f.jsx)("title",{children:t}),(0,f.jsx)("meta",{property:"og:title",content:t}),(0,f.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),n&&(0,f.jsx)("meta",{name:"robots",content:"noindex, nofollow"}),e&&(0,f.jsx)("link",{rel:"icon",href:a})]})}var $=n(4023),q=n(9136);function H(){const e=(0,q.A)();return(0,f.jsx)(h.A,{children:(0,f.jsx)("html",{"data-has-hydrated":e})})}const V=(0,p.v)(u.A);function W(){const e=function(e){if(P.has(e.pathname))return{...e,pathname:P.get(e.pathname)};if((0,p.u)(u.A,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return P.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return P.set(e.pathname,t),{...e,pathname:t}}((0,d.zy)());return(0,f.jsx)(D,{location:e,children:V})}function K(){return(0,f.jsx)($.default,{children:(0,f.jsx)(A.l,{children:(0,f.jsxs)(C.x,{children:[(0,f.jsxs)(m,{children:[(0,f.jsx)(U,{}),(0,f.jsx)(O,{}),(0,f.jsx)(z,{}),(0,f.jsx)(W,{})]}),(0,f.jsx)(H,{})]})})})}var G=n(84054);const Q=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;o?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Y=n(13722);const Z=new Set,J=new Set,X=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ee={prefetch:e=>{if(!(e=>!X()&&!J.has(e)&&!Z.has(e))(e))return!1;Z.add(e);const t=(0,p.u)(u.A,e).flatMap((e=>{return t=e.route.path,Object.entries(G).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Y.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Q(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!X()&&!J.has(e))(e)&&(J.add(e),L(e))},te=Object.freeze(ee);function ne(e){let{children:t}=e;return"hash"===s.default.future.experimental_router?(0,f.jsx)(i.I9,{children:t}):(0,f.jsx)(i.Kd,{children:t})}const re=Boolean(!0);if(l.A.canUseDOM){window.docusaurus=te;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(a.vd,{children:(0,f.jsx)(ne,{children:(0,f.jsx)(K,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},i=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(re)window.docusaurusRoot=o.hydrateRoot(e,t,{onRecoverableError:n});else{const r=o.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};L(window.location.pathname).then((()=>{(0,r.startTransition)(i)}))}},46193:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(63696),o=n(4784);const a=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docusaurus-json-schema-plugin/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docusaurus-json-schema-plugin/docs","mainDocId":"quick-start","docs":[{"id":"api/config","path":"/docusaurus-json-schema-plugin/docs/api/config","sidebar":"tutorialSidebar"},{"id":"api/JSONSchemaEditor","path":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor","sidebar":"tutorialSidebar"},{"id":"api/JSONSchemaViewer","path":"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer","sidebar":"tutorialSidebar"},{"id":"api/MonacoEditor","path":"/docusaurus-json-schema-plugin/docs/api/MonacoEditor","sidebar":"tutorialSidebar"},{"id":"contributing","path":"/docusaurus-json-schema-plugin/docs/contributing","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/additionalItems1","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/additionalItems2","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/contains","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/items","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/length","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/minContainsAndMaxContains","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/simple","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/tuples","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/unevaluatedItems1","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/unevaluatedItems2","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2","sidebar":"tutorialSidebar"},{"id":"demo-viewer/array/uniqueItems","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems","sidebar":"tutorialSidebar"},{"id":"demo-viewer/boolean","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean","sidebar":"tutorialSidebar"},{"id":"demo-viewer/custom/description","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description","sidebar":"tutorialSidebar"},{"id":"demo-viewer/custom/unsolved_refs","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs","sidebar":"tutorialSidebar"},{"id":"demo-viewer/custom/values","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values","sidebar":"tutorialSidebar"},{"id":"demo-viewer/generic_keywords/annotations","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations","sidebar":"tutorialSidebar"},{"id":"demo-viewer/generic_keywords/const","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const","sidebar":"tutorialSidebar"},{"id":"demo-viewer/generic_keywords/enum","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum","sidebar":"tutorialSidebar"},{"id":"demo-viewer/null","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/null","sidebar":"tutorialSidebar"},{"id":"demo-viewer/numeric/integer","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer","sidebar":"tutorialSidebar"},{"id":"demo-viewer/numeric/multipleOf","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf","sidebar":"tutorialSidebar"},{"id":"demo-viewer/numeric/number","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number","sidebar":"tutorialSidebar"},{"id":"demo-viewer/numeric/ranges","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/additionalProperties","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/additionalProperties2","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/additionalPropertiesWithPatternProperties","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/patternProperties","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/properties","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/propertyNames","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/required","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/simpleObject","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/size","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/unevaluatedProperties1","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1","sidebar":"tutorialSidebar"},{"id":"demo-viewer/object/unevaluatedProperties2","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2","sidebar":"tutorialSidebar"},{"id":"demo-viewer/refs/localFile","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile","sidebar":"tutorialSidebar"},{"id":"demo-viewer/refs/ref","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref","sidebar":"tutorialSidebar"},{"id":"demo-viewer/refs/remoteFile","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_composition/allOf","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_composition/anyOf","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_composition/not","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_composition/oneOf","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependencies_dependentRequired","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependencies_dependentSchemas","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependentRequired","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependentRequired_bidirectional","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/dependentSchemas","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/if-then-else","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else","sidebar":"tutorialSidebar"},{"id":"demo-viewer/schema_conditionally/if-then-else_multiple","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/contentEncoding","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/contentEncodingWithContentMediaType","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/contentMediaType","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/contentSchema","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/format","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/length","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/pattern","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern","sidebar":"tutorialSidebar"},{"id":"demo-viewer/string/simple","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple","sidebar":"tutorialSidebar"},{"id":"demo-viewer/type/multipleType","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType","sidebar":"tutorialSidebar"},{"id":"demo-viewer/type/singleType","path":"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType","sidebar":"tutorialSidebar"},{"id":"faq","path":"/docusaurus-json-schema-plugin/docs/faq","sidebar":"tutorialSidebar"},{"id":"next-steps","path":"/docusaurus-json-schema-plugin/docs/next-steps","sidebar":"tutorialSidebar"},{"id":"quick-start","path":"/docusaurus-json-schema-plugin/docs/quick-start","sidebar":"tutorialSidebar"},{"id":"/demo","path":"/docusaurus-json-schema-plugin/docs/demo","sidebar":"tutorialSidebar"},{"id":"/demo/viewer","path":"/docusaurus-json-schema-plugin/docs/demo/viewer","sidebar":"tutorialSidebar"},{"id":"/category/-array","path":"/docusaurus-json-schema-plugin/docs/category/-array","sidebar":"tutorialSidebar"},{"id":"/category/\ufe0f-customizations","path":"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations","sidebar":"tutorialSidebar"},{"id":"/category/-generic-keywords","path":"/docusaurus-json-schema-plugin/docs/category/-generic-keywords","sidebar":"tutorialSidebar"},{"id":"/category/-numeric","path":"/docusaurus-json-schema-plugin/docs/category/-numeric","sidebar":"tutorialSidebar"},{"id":"/category/-object","path":"/docusaurus-json-schema-plugin/docs/category/-object","sidebar":"tutorialSidebar"},{"id":"/category/-references","path":"/docusaurus-json-schema-plugin/docs/category/-references","sidebar":"tutorialSidebar"},{"id":"/category/-schema-composition","path":"/docusaurus-json-schema-plugin/docs/category/-schema-composition","sidebar":"tutorialSidebar"},{"id":"/category/-schema-conditionally","path":"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally","sidebar":"tutorialSidebar"},{"id":"/category/-string","path":"/docusaurus-json-schema-plugin/docs/category/-string","sidebar":"tutorialSidebar"},{"id":"/category/-type","path":"/docusaurus-json-schema-plugin/docs/category/-type","sidebar":"tutorialSidebar"},{"id":"/api","path":"/docusaurus-json-schema-plugin/docs/api","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/docusaurus-json-schema-plugin/docs/quick-start","label":"quick-start"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(22654);const l=JSON.parse('{"docusaurusVersion":"3.7.0","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.7.0"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.7.0"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.7.0"},"docusaurus-plugin-svgr":{"type":"package","name":"@docusaurus/plugin-svgr","version":"3.7.0"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.7.0"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.7.0"},"resolve-react":{"type":"local"},"docusaurus-json-schema-plugin":{"type":"package","name":"docusaurus-json-schema-plugin","version":"0.0.0-development"}}}');var c=n(62540);const u={siteConfig:o.default,siteMetadata:l,globalData:a,i18n:i,codeTranslations:s},d=r.createContext(u);function p(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},4023:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(63696),o=n(61934),a=n(27143),i=n(30099),s=n(27912),l=n(75313),c=n(62540);function u(e){let{error:t,tryAgain:n}=e;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(d,{error:t})]})}function d(e){let{error:t}=e;const n=(0,i.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){let{children:t}=e;return(0,c.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function f(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)(p,{children:(0,c.jsxs)(h,{fallback:()=>(0,c.jsx)(u,{error:t,tryAgain:n}),children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(s.A,{children:(0,c.jsx)(u,{error:t,tryAgain:n})})]})})}const m=e=>(0,c.jsx)(f,{...e});class h extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??m)(e)}return e??null}}},61934:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},27143:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(63696);var r=n(80545),o=n(62540);function a(e){return(0,o.jsx)(r.mg,{...e})}},56289:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(63696),o=n(54625),a=n(30099),i=n(40797),s=n(22887),l=n(61934),c=n(25246),u=n(29030),d=n(62540);function p(e,t){let{isNavLink:n,to:p,href:f,activeClassName:m,isActive:h,"data-noBrokenLinkCheck":g,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:v}=(0,i.A)(),{trailingSlash:w,baseUrl:S}=v,x=v.future.experimental_router,{withBaseUrl:k}=(0,u.hH)(),j=(0,c.A)(),_=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>_.current));const E=p||f;const O=(0,s.A)(E),P=E?.replace("pathname://","");let C=void 0!==P?(A=P,y&&(e=>e.startsWith("/"))(A)?k(A):A):void 0;var A;"hash"===x&&C?.startsWith("./")&&(C=C?.slice(1)),C&&O&&(C=(0,a.Ks)(C,{trailingSlash:w,baseUrl:S}));const T=(0,r.useRef)(!1),I=n?o.k2:o.N_,N=l.A.canUseIntersectionObserver,L=(0,r.useRef)(),R=()=>{T.current||null==C||(window.docusaurus.preload(C),T.current=!0)};(0,r.useEffect)((()=>(!N&&O&&l.A.canUseDOM&&null!=C&&window.docusaurus.prefetch(C),()=>{N&&L.current&&L.current.disconnect()})),[L,C,N,O]);const D=C?.startsWith("#")??!1,M=!b.target||"_self"===b.target,F=!C||!O||!M||D&&"hash"!==x;g||!D&&F||j.collectLink(C),b.id&&j.collectAnchor(b.id);const B={};return F?(0,d.jsx)("a",{ref:_,href:C,...E&&!O&&{target:"_blank",rel:"noopener noreferrer"},...b,...B}):(0,d.jsx)(I,{...b,onMouseEnter:R,onTouchStart:R,innerRef:e=>{_.current=e,N&&e&&O&&(L.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(L.current.unobserve(e),L.current.disconnect(),null!=C&&window.docusaurus.prefetch(C))}))})),L.current.observe(e))},to:C,...n&&{isActive:h,activeClassName:m},...B})}const f=r.forwardRef(p)},50539:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c,translate:()=>l});var r=n(63696),o=n(62540);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(22654);function s(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return a(s({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal <Translate> children",t),new Error("The Docusaurus <Translate> component only accept simple string values");const i=s({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(i,r)})}},54332:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},22887:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},29030:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,hH:()=>i});var r=n(63696),o=n(40797),a=n(22887);function i(){const{siteConfig:e}=(0,o.A)(),{baseUrl:t,url:n}=e,i=e.future.experimental_router,s=(0,r.useCallback)(((e,r)=>function(e){let{siteUrl:t,baseUrl:n,url:r,options:{forcePrependBaseUrl:o=!1,absolute:i=!1}={},router:s}=e;if(!r||r.startsWith("#")||(0,a.z)(r))return r;if("hash"===s)return r.startsWith("/")?`.${r}`:`./${r}`;if(o)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;const l=r.startsWith(n)?r:n+r.replace(/^\//,"");return i?t+l:l}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})),[n,t,i]);return{withBaseUrl:s}}function s(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},25246:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(63696);n(62540);const o=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),a=()=>(0,r.useContext)(o);function i(){return a()}},40797:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(63696),o=n(46193);function a(){return(0,r.useContext)(o.o)}},9136:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(63696),o=n(84974);function a(){return(0,r.useContext)(o.o)}},50372:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(63696);const o=n(61934).A.canUseDOM?r.useLayoutEffect:r.useEffect},13722:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function o(e){const t={};return function e(n,o){Object.entries(n).forEach((n=>{let[a,i]=n;const s=o?`${o}.${a}`:a;r(i)?e(i,s):t[s]=i}))}(e),t}},75313:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>a});var r=n(63696),o=n(62540);const a=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(a),s=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,o.jsx)(a.Provider,{value:s,children:t})}},96351:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>g,XK:()=>v,g1:()=>b});var r=n(63696),o=n(56942),a=n(54332),i=n(53115),s=n(78749),l=n(26849),c=n(62540);const u=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,s.Wf)(u(e),{persistence:t}).set(n)},read:(e,t)=>(0,s.Wf)(u(e),{persistence:t}).get(),clear:(e,t)=>{(0,s.Wf)(u(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const f=r.createContext(null);function m(){const e=(0,o.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,s]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function o(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,o(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=m();return(0,c.jsx)(f.Provider,{value:n,children:t})}function g(e){let{children:t}=e;return(0,c.jsx)(h,{children:t})}function y(){const e=(0,r.useContext)(f);if(!e)throw new l.dV("DocsPreferredVersionContextProvider");return e}function b(e){void 0===e&&(e=a.W);const t=(0,o.ht)(e),[n,i]=y(),{preferredVersionName:s}=n[e];return{preferredVersion:t.versions.find((e=>e.name===s))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function v(){const e=(0,o.Gy)(),[t]=y();function n(n){const r=e[n],{preferredVersionName:o}=t[n];return r.versions.find((e=>e.name===o))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},23716:(e,t,n)=>{"use strict";n.d(t,{k:()=>a,v:()=>i});var r=n(56942),o=n(96351);function a(e,t){return`docs-${e}-${t}`}function i(){const e=(0,r.Gy)(),t=(0,r.gk)(),n=(0,o.XK)();return[...Object.keys(e).map((function(r){const o=t?.activePlugin.pluginId===r?t.activeVersion:void 0,i=n[r],s=e[r].versions.find((e=>e.isLast));return a(r,(o??i??s).name)}))]}},22306:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,t:()=>c});var r=n(63696),o=n(26849),a=n(62540);const i=Symbol("EmptyContext"),s=r.createContext(i);function l(e){let{children:t,name:n,items:o}=e;const i=(0,r.useMemo)((()=>n&&o?{name:n,items:o}:null),[n,o]);return(0,a.jsx)(s.Provider,{value:i,children:t})}function c(){const e=(0,r.useContext)(s);if(e===i)throw new o.dV("DocsSidebarProvider");return e}},93751:(e,t,n)=>{"use strict";n.d(t,{$S:()=>m,B5:()=>_,Nr:()=>f,OF:()=>S,QB:()=>j,Vd:()=>x,Y:()=>v,cC:()=>p,d1:()=>E,fW:()=>k,w8:()=>y});var r=n(63696),o=n(56347),a=n(22831),i=n(56942),s=n(30214),l=n(11861),c=n(96351),u=n(21858),d=n(22306);function p(e){const t=(0,u.r)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function f(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=f(t);if(e)return e}}(e):void 0:e.href}function m(){const{pathname:e}=(0,o.zy)(),t=(0,d.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const h=(e,t)=>void 0!==e&&(0,s.ys)(e,t),g=(e,t)=>e.some((e=>y(e,t)));function y(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||g(e.items,t))}function b(e,t){switch(e.type){case"category":return y(e,t)||void 0!==e.href&&!e.linkUnlisted||e.items.some((e=>b(e,t)));case"link":return!e.unlisted||y(e,t);default:return!0}}function v(e,t){return(0,r.useMemo)((()=>e.filter((e=>b(e,t)))),[e,t])}function w(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const o=[];return function e(t){for(const a of t)if("category"===a.type&&((0,s.ys)(a.href,n)||e(a.items))||"link"===a.type&&(0,s.ys)(a.href,n)){return r&&"category"!==a.type||o.unshift(a),!0}return!1}(t),o}function S(){const e=(0,d.t)(),{pathname:t}=(0,o.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?w({sidebarItems:e.items,pathname:t}):null}function x(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,c.g1)(e),o=(0,i.r7)(e);return(0,r.useMemo)((()=>(0,l.sb)([t,n,o].filter(Boolean))),[t,n,o])}function k(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function j(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,l.sb)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function _(e){let{route:t}=e;const n=(0,o.zy)(),r=(0,u.r)(),i=t.routes,s=i.find((e=>(0,o.B6)(n.pathname,e)));if(!s)return null;const l=s.sidebar,c=l?r.docsSidebars[l]:void 0;return{docElement:(0,a.v)(i),sidebarName:l,sidebarItems:c}}function E(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!f(e)))}},21858:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,r:()=>l});var r=n(63696),o=n(26849),a=n(62540);const i=r.createContext(null);function s(e){let{children:t,version:n}=e;return(0,a.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(null===e)throw new o.dV("DocsVersionProvider");return e}},56942:(e,t,n)=>{"use strict";n.d(t,{zK:()=>y,vT:()=>f,gk:()=>m,Gy:()=>d,HW:()=>b,ht:()=>p,r7:()=>g,jh:()=>h});var r=n(56347),o=n(40797),a=n(54332);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,o.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const s=e=>e.versions.find((e=>e.isLast));function l(e,t){return[...e.versions].sort(((e,t)=>e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0)).find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}function c(e,t){const n=l(e,t),o=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}}const u={},d=()=>i("docusaurus-plugin-content-docs")??u,p=e=>{try{return function(e,t,n){void 0===t&&(t=a.W),void 0===n&&(n={});const r=i(e),o=r?.[t];if(!o&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return o}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":` (pluginId=${e}`),{cause:t})}};function f(e){void 0===e&&(e={});const t=d(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const o=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return a}(t,n,e)}function m(e){void 0===e&&(e={});const t=f(e),{pathname:n}=(0,r.zy)();if(!t)return;return{activePlugin:t,activeVersion:l(t.pluginData,n)}}function h(e){return p(e).versions}function g(e){const t=p(e);return s(t)}function y(e){const t=p(e),{pathname:n}=(0,r.zy)();return c(t,n)}function b(e){const t=p(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=s(e);return{latestDocSuggestion:c(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},78867:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(5947),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{o().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},55420:(e,t,n)=>{"use strict";var r=n(71765),o=n(4784);!function(e){const{themeConfig:{prism:t}}=o.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(19700),n(89863)(`./prism-${e}`)})),n(5080),delete globalThis.Prism}(r.My)},9303:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(63696);var r=n(34164),o=n(50539),a=n(53115),i=n(56289),s=n(25246);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=n(62540);function u(e){let{as:t,id:n,...u}=e;const d=(0,s.A)(),{navbar:{hideOnScroll:p}}=(0,a.p)();if("h1"===t||!n)return(0,c.jsx)(t,{...u,id:void 0});d.collectAnchor(n);const f=(0,o.translate)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:n});return(0,c.jsxs)(t,{...u,className:(0,r.A)("anchor",p?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,u.className),id:n,children:[u.children,(0,c.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":f,title:f,children:"\u200b"})]})}},15891:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(63696);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=n(62540);function a(e){let{width:t=13.5,height:n=13.5}=e;return(0,o.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},27912:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ot});var r=n(63696),o=n(34164),a=n(4023),i=n(59144),s=n(56347),l=n(50539),c=n(77685),u=n(62540);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,s.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)}),[]);return(0,c.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}const m=(0,l.translate)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){const t=e.children??m,{containerRef:n,onClick:r}=f();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var g=n(204),y=n(67788);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(h,{className:b.skipToContent})}var w=n(53115),S=n(23380);function x(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:o=1.2,className:a,...i}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,u.jsx)("g",{stroke:r,strokeWidth:o,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const k={closeButton:"closeButton_CVFx"};function j(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,l.translate)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.A)("clean-btn close",k.closeButton,e.className),children:(0,u.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const _={content:"content_knG7"};function E(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,o.A)(_.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const O={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function P(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,S.M)();if(!t)return null;const{backgroundColor:r,textColor:o,isCloseable:a}=e;return(0,u.jsxs)("div",{className:O.announcementBar,style:{backgroundColor:r,color:o},role:"banner",children:[a&&(0,u.jsx)("div",{className:O.announcementBarPlaceholder}),(0,u.jsx)(E,{className:O.announcementBarContent}),a&&(0,u.jsx)(j,{onClick:n,className:O.announcementBarClose})]})}var C=n(5528),A=n(65627);var T=n(26849),I=n(63065);const N=r.createContext(null);function L(e){let{children:t}=e;const n=function(){const e=(0,C.M)(),t=(0,I.YL)(),[n,o]=(0,r.useState)(!1),a=null!==t.component,i=(0,T.ZC)(a);return(0,r.useEffect)((()=>{a&&!i&&o(!0)}),[a,i]),(0,r.useEffect)((()=>{a?e.shown||o(!0):o(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[n,o]),[n])}();return(0,u.jsx)(N.Provider,{value:n,children:t})}function R(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function D(){const e=(0,r.useContext)(N);if(!e)throw new T.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,o=(0,r.useCallback)((()=>n(!1)),[n]),a=(0,I.YL)();return(0,r.useMemo)((()=>({shown:t,hide:o,content:R(a)})),[o,a,t])}function M(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:a}=D();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var F=n(8532),B=n(9136);function z(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function U(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const $={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function q(e){let{className:t,buttonClassName:n,value:r,onChange:a}=e;const i=(0,B.A)(),s=(0,l.translate)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.translate)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.translate)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,o.A)($.toggle,t),children:(0,u.jsxs)("button",{className:(0,o.A)("clean-btn",$.toggleButton,!i&&$.toggleButtonDisabled,n),type:"button",onClick:()=>a("dark"===r?"light":"dark"),disabled:!i,title:s,"aria-label":s,"aria-live":"polite","aria-pressed":"dark"===r?"true":"false",children:[(0,u.jsx)(z,{className:(0,o.A)($.toggleIcon,$.lightToggleIcon)}),(0,u.jsx)(U,{className:(0,o.A)($.toggleIcon,$.darkToggleIcon)})]})})}const H=r.memo(q),V={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function W(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:o,setColorMode:a}=(0,F.G)();return r?null:(0,u.jsx)(H,{className:t,buttonClassName:"dark"===n?V.darkNavbarColorModeToggle:void 0,value:o,onChange:a})}var K=n(12862);function G(){return(0,u.jsx)(K.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Q(){const e=(0,C.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.translate)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(G,{}),(0,u.jsx)(W,{className:"margin-right--md"}),(0,u.jsx)(Q,{})]})}var Z=n(56289),J=n(29030),X=n(22887),ee=n(26767),te=n(15891);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:o,label:a,html:i,isDropdownLink:s,prependBaseUrlToHref:l,...c}=e;const d=(0,J.Ay)(r),p=(0,J.Ay)(t),f=(0,J.Ay)(o,{forcePrependBaseUrl:!0}),m=a&&o&&!(0,X.A)(o),h=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[a,m&&(0,u.jsx)(te.A,{...s&&{width:12,height:12}})]})};return o?(0,u.jsx)(Z.A,{href:l?f:o,...c,...h}):(0,u.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?(0,ee.G)(n,t.pathname):t.pathname.startsWith(p)},...c,...h})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const a=(0,u.jsx)(ne,{className:(0,o.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:a}):a}function oe(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ne,{className:(0,o.A)("menu__link",t),...r})})}function ae(e){let{mobile:t=!1,position:n,...r}=e;const o=t?oe:re;return(0,u.jsx)(o,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(33535),se=n(30214),le=n(40797);const ce="dropdownNavbarItemMobile_S0Fm";function ue(e,t){return e.some((e=>function(e,t){return!!(0,se.ys)(e.to,t)||!!(0,ee.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:a,onClick:i,...s}=e;const l=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),(0,u.jsxs)("div",{ref:l,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(ne,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:s.to?void 0:"#",className:(0,o.A)("navbar__link",a),...s,onClick:s.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:s.children??s.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Be,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function pe(e){let{items:t,className:n,position:a,onClick:i,...l}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,le.A)(),{pathname:t}=(0,s.zy)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:p,toggleCollapsed:f,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[c,d,m]),(0,u.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":p}),children:[(0,u.jsx)(ne,{role:"button",className:(0,o.A)(ce,"menu__link menu__link--sublist menu__link--sublist-caret",n),...l,onClick:e=>{e.preventDefault(),f()},children:l.children??l.label}),(0,u.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:p,children:t.map(((e,t)=>(0,r.createElement)(Be,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function fe(e){let{mobile:t=!1,...n}=e;const r=t?pe:de;return(0,u.jsx)(r,{...n})}var me=n(67976);function he(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const ge="iconLanguage_nlXk";var ye=n(40961),be=n(55600),ve=n(27143),we=n(53592),Se=n(58455),xe=n(89396),ke=n(23716);function je(){return[`language:${(0,le.A)().i18n.currentLocale}`,function(){const e=(0,ke.v)();return[xe.C,...e]}().map((e=>`docusaurus_tag:${e}`))]}const _e={button:{buttonText:(0,l.translate)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,l.translate)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,l.translate)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,l.translate)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,l.translate)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,l.translate)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,l.translate)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,l.translate)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,l.translate)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,l.translate)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,l.translate)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,l.translate)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,l.translate)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,l.translate)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,l.translate)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,l.translate)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,l.translate)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,l.translate)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,l.translate)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,l.translate)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,l.translate)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,l.translate)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,l.translate)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};let Ee=null;function Oe(){return Ee?Promise.resolve():Promise.all([n.e(8158).then(n.bind(n,48158)),Promise.all([n.e(1869),n.e(8913)]).then(n.bind(n,58913)),Promise.all([n.e(1869),n.e(1809)]).then(n.bind(n,1809))]).then((e=>{let[{DocSearchModal:t}]=e;Ee=t}))}function Pe(e){let{hit:t,children:n}=e;return(0,u.jsx)(Z.A,{to:t.url,children:n})}function Ce(e){let{state:t,onClose:n}=e;const r=(0,we.w)();return(0,u.jsx)(Z.A,{to:r(t.query),onClick:n,children:(0,u.jsx)(l.default,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits},children:"See all {count} results"})})}function Ae(e){let{externalUrlRegex:t,...n}=e;const o=function(e){let{externalUrlRegex:t}=e;const n=(0,s.W6)(),[o]=(0,r.useState)((()=>({navigate(e){(0,ee.G)(t,e.itemUrl)?window.location.href=e.itemUrl:n.push(e.itemUrl)}})));return o}({externalUrlRegex:t}),a=function(e){let{contextualSearch:t,...n}=e;const r=je(),o=n.searchParameters?.facetFilters??[],a=t?function(e,t){const n=e=>"string"==typeof e?[e]:e;return[...n(e),...n(t)]}(r,o):o;return{...n.searchParameters,facetFilters:a}}({...n}),i=function(e){const t=(0,Se.C)(),[n]=(0,r.useState)((()=>n=>e.transformItems?e.transformItems(n):n.map((e=>({...e,url:t(e.url)})))));return n}(n),l=function(){const{siteMetadata:{docusaurusVersion:e}}=(0,le.A)();return(0,r.useCallback)((t=>(t.addAlgoliaAgent("docusaurus",e),t)),[e])}(),c=(0,r.useRef)(null),d=(0,r.useRef)(null),[p,f]=(0,r.useState)(!1),[m,h]=(0,r.useState)(void 0),g=(0,r.useCallback)((()=>{if(!c.current){const e=document.createElement("div");c.current=e,document.body.insertBefore(e,document.body.firstChild)}}),[]),y=(0,r.useCallback)((()=>{g(),Oe().then((()=>f(!0)))}),[g]),b=(0,r.useCallback)((()=>{f(!1),d.current?.focus(),h(void 0)}),[]),v=(0,r.useCallback)((e=>{"f"===e.key&&(e.metaKey||e.ctrlKey)||(e.preventDefault(),h(e.key),y())}),[y]),w=function(e){let{closeModal:t}=e;return(0,r.useMemo)((()=>e=>{let{state:n}=e;return(0,u.jsx)(Ce,{state:n,onClose:t})}),[t])}({closeModal:b});return(0,be.E8)({isOpen:p,onOpen:y,onClose:b,onInput:v,searchButtonRef:d}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ve.A,{children:(0,u.jsx)("link",{rel:"preconnect",href:`https://${n.appId}-dsn.algolia.net`,crossOrigin:"anonymous"})}),(0,u.jsx)(be.Bc,{onTouchStart:Oe,onFocus:Oe,onMouseOver:Oe,onClick:y,ref:d,translations:n.translations?.button??_e.button}),p&&Ee&&c.current&&(0,ye.createPortal)((0,u.jsx)(Ee,{onClose:b,initialScrollY:window.scrollY,initialQuery:m,navigator:o,transformItems:i,hitComponent:Pe,transformSearchClient:l,...n.searchPagePath&&{resultsFooterComponent:w},placeholder:_e.placeholder,...n,translations:n.translations?.modal??_e.modal,searchParameters:a}),c.current)]})}function Te(){const{siteConfig:e}=(0,le.A)();return(0,u.jsx)(Ae,{...e.themeConfig.algolia})}const Ie={navbarSearchContainer:"navbarSearchContainer_Bca1"};function Ne(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,o.A)(n,Ie.navbarSearchContainer),children:t})}var Le=n(56942),Re=n(93751);var De=n(96351);function Me(e,t){return t.alternateDocVersions[e.name]??function(e){return e.docs.find((t=>t.id===e.mainDocId))}(e)}const Fe={default:ae,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:o="",...a}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,le.A)(),p=(0,me.o)(),{search:f,hash:m}=(0,s.zy)(),h=[...n,...c.map((e=>{const n=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${m}${o}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],g=t?(0,l.translate)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,u.jsx)(fe,{...a,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(he,{className:ge}),g]}),items:h})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(Ne,{className:n,children:(0,u.jsx)(Te,{})})},dropdown:fe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:a=!1}=e;const i=a?"li":"div";return(0,u.jsx)(i,{className:(0,o.A)({navbar__item:!r&&!a,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,Le.zK)(r),i=(0,Re.QB)(t,r),s=a?.path===i?.path;return null===i||i.unlisted&&!s?null:(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>s||!!a?.sidebar&&a.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,Le.zK)(r),i=(0,Re.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>a?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...o}=e;const a=(0,Re.Vd)(r)[0],i=t??a.label,s=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(a).path;return(0,u.jsx)(ae,{...o,label:i,to:s})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:o,dropdownItemsAfter:a,...i}=e;const{search:c,hash:d}=(0,s.zy)(),p=(0,Le.zK)(n),f=(0,Le.jh)(n),{savePreferredVersionName:m}=(0,De.g1)(n),h=[...o,...f.map((function(e){const t=Me(e,p);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===p.activeVersion,onClick:()=>m(e.name)}})),...a],g=(0,Re.Vd)(n)[0],y=t&&h.length>1?(0,l.translate)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,b=t&&h.length>1?void 0:Me(g,p).path;return h.length<=1?(0,u.jsx)(ae,{...i,mobile:t,label:y,to:b,isActive:r?()=>!1:void 0}):(0,u.jsx)(fe,{...i,mobile:t,label:y,to:b,items:h,isActive:r?()=>!1:void 0})}};function Be(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=Fe[r];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(o,{...n})}function ze(){const e=(0,C.M)(),t=(0,w.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Be,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Ue(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(l.default,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function $e(){const e=0===(0,w.p)().navbar.items.length,t=D();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(Ue,{onClick:()=>t.hide()}),t.content]})}function qe(){const e=(0,C.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(M,{header:(0,u.jsx)(Y,{}),primaryMenu:(0,u.jsx)(ze,{}),secondaryMenu:(0,u.jsx)($e,{})}):null}const He={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Ve(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,o.A)("navbar-sidebar__backdrop",e.className)})}function We(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:a}}=(0,w.p)(),i=(0,C.M)(),{navbarRef:s,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,A.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i<a.current)return void n(!0);if(o.current)return void(o.current=!1);const s=r?.scrollY,l=document.documentElement.scrollHeight-a.current,c=window.innerHeight;s&&i>=s?n(!1):i+c<l&&n(!0)})),(0,c.$)((t=>{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:s,"aria-label":(0,l.translate)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.A)("navbar","navbar--fixed-top",n&&[He.navbarHideable,!d&&He.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(Ve,{onClick:i.toggle}),(0,u.jsx)(qe,{})]})}var Ke=n(30099);const Ge={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function Qe(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(l.default,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function Ye(e){let{error:t}=e;const n=(0,Ke.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{className:Ge.errorBoundaryError,children:n})}class Ze extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const Je="right";function Xe(e){let{width:t=30,height:n=30,className:r,...o}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...o,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function et(){const{toggle:e,shown:t}=(0,C.M)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,l.translate)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(Xe,{})})}const tt={colorModeToggle:"colorModeToggle_DEke"};function nt(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(Ze,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(Be,{...e})},t)))})}function rt(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function ot(){const e=(0,C.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??Je)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return(0,u.jsx)(rt,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(et,{}),(0,u.jsx)(G,{}),(0,u.jsx)(nt,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(nt,{items:r}),(0,u.jsx)(W,{className:tt.colorModeToggle}),!o&&(0,u.jsx)(Ne,{children:(0,u.jsx)(Te,{})})]})})}function at(){return(0,u.jsx)(We,{children:(0,u.jsx)(ot,{})})}function it(e){let{item:t}=e;const{to:n,href:r,label:a,prependBaseUrlToHref:i,className:s,...l}=t,c=(0,J.Ay)(n),d=(0,J.Ay)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(Z.A,{className:(0,o.A)("footer__link-item",s),...r?{href:i?d:r}:{to:c},...l,children:[a,r&&!(0,X.A)(r)&&(0,u.jsx)(te.A,{})]})}function st(e){let{item:t}=e;return t.html?(0,u.jsx)("li",{className:(0,o.A)("footer__item",t.className),dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(it,{item:t})},t.href??t.to)}function lt(e){let{column:t}=e;return(0,u.jsxs)("div",{className:(0,o.A)("col footer__col",t.className),children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,u.jsx)(st,{item:e},t)))})]})}function ct(e){let{columns:t}=e;return(0,u.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,u.jsx)(lt,{column:e},t)))})}function ut(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function dt(e){let{item:t}=e;return t.html?(0,u.jsx)("span",{className:(0,o.A)("footer__link-item",t.className),dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(it,{item:t})}function pt(e){let{links:t}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(dt,{item:e}),t.length!==n+1&&(0,u.jsx)(ut,{})]},n)))})})}function ft(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(ct,{columns:t}):(0,u.jsx)(pt,{links:t})}var mt=n(39324);const ht="footerLogoLink_BH7S";function gt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,J.hH)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,u.jsx)(mt.A,{className:(0,o.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function yt(e){let{logo:t}=e;return t.href?(0,u.jsx)(Z.A,{href:t.href,className:ht,target:t.target,children:(0,u.jsx)(gt,{logo:t})}):(0,u.jsx)(gt,{logo:t})}function bt(e){let{copyright:t}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function vt(e){let{style:t,links:n,logo:r,copyright:a}=e;return(0,u.jsx)("footer",{className:(0,o.A)("footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||a)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function wt(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:o}=e;return(0,u.jsx)(vt,{style:o,links:n&&n.length>0&&(0,u.jsx)(ft,{links:n}),logo:r&&(0,u.jsx)(yt,{logo:r}),copyright:t&&(0,u.jsx)(bt,{copyright:t})})}const St=r.memo(wt),xt=(0,T.fM)([F.a,S.o,A.Tv,De.VQ,i.Jx,function(e){let{children:t}=e;return(0,u.jsx)(I.y_,{children:(0,u.jsx)(C.e,{children:(0,u.jsx)(L,{children:t})})})}]);function kt(e){let{children:t}=e;return(0,u.jsx)(xt,{children:t})}var jt=n(9303);function _t(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(jt.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(l.default,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(Qe,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(Ye,{error:t})})]})})})}const Et={mainWrapper:"mainWrapper_z2l0"};function Ot(e){const{children:t,noFooter:n,wrapperClassName:r,title:s,description:l}=e;return(0,y.J)(),(0,u.jsxs)(kt,{children:[(0,u.jsx)(i.be,{title:s,description:l}),(0,u.jsx)(v,{}),(0,u.jsx)(P,{}),(0,u.jsx)(at,{}),(0,u.jsx)("div",{id:d,className:(0,o.A)(g.G.wrapper.main,Et.mainWrapper,r),children:(0,u.jsx)(a.default,{fallback:e=>(0,u.jsx)(_t,{...e}),children:t})}),!n&&(0,u.jsx)(St,{})]})}},12862:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(63696);var r=n(56289),o=n(29030),a=n(40797),i=n(53115),s=n(39324),l=n(62540);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.Ay)(t.src),dark:(0,o.Ay)(t.srcDark||t.src)},i=(0,l.jsx)(s.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,l.jsx)("div",{className:r,children:i}):i}function u(e){const{siteConfig:{title:t}}=(0,a.A)(),{navbar:{title:n,logo:s}}=(0,i.p)(),{imageClassName:u,titleClassName:d,...p}=e,f=(0,o.Ay)(s?.href||"/"),m=n?"":t,h=s?.alt??m;return(0,l.jsxs)(r.A,{to:f,...p,...s?.target&&{target:s.target},children:[s&&(0,l.jsx)(c,{logo:s,alt:h,imageClassName:u}),null!=n&&(0,l.jsx)("b",{className:d,children:n})]})}},37220:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(63696);var r=n(27143),o=n(62540);function a(e){let{locale:t,version:n,tag:a}=e;const i=t;return(0,o.jsxs)(r.A,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),i&&(0,o.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},39324:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(63696),o=n(34164),a=n(9136),i=n(8532);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var l=n(62540);function c(e){let{className:t,children:n}=e;const c=(0,a.A)(),{colorMode:u}=(0,i.G)();return(0,l.jsx)(l.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const a=n({theme:e,className:(0,o.A)(t,s.themedComponent,s[`themedComponent--${e}`])});return(0,l.jsx)(r.Fragment,{children:a},e)}))})}function u(e){const{sources:t,className:n,alt:r,...o}=e;return(0,l.jsx)(c,{className:n,children:e=>{let{theme:n,className:a}=e;return(0,l.jsx)("img",{src:t[n],alt:r,className:a,...o})}})}},33535:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(63696),o=n(9136),a=n(50372),i=n(84924),s=n(62540);const l="ease-in-out";function c(e){let{initialState:t}=e;const[n,o]=(0,r.useState)(t??!1),a=(0,r.useCallback)((()=>{o((e=>!e))}),[]);return{collapsed:n,setCollapsed:o,toggleCollapsed:a}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){let{collapsibleRef:t,collapsed:n,animation:o}=e;const a=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=o?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${o?.easing??l}`,height:`${t}px`}}function s(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return p(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,o])}function m(e){let{collapsed:t,isBrowser:n}=e;if(!n)return t?u:d}function h(e){let{as:t="div",collapsed:n,children:a,animation:i,onCollapseTransitionEnd:l,className:c,disableSSRStyle:u}=e;const d=(0,o.A)(),h=(0,r.useRef)(null);return f({collapsibleRef:h,collapsed:n,animation:i}),(0,s.jsx)(t,{ref:h,style:u?void 0:m({collapsed:n,isBrowser:d}),onTransitionEnd:e=>{"height"===e.propertyName&&(p(h.current,n),l?.(n))},className:c,children:a})}function g(e){let{collapsed:t,...n}=e;const[o,i]=(0,r.useState)(!t),[l,c]=(0,r.useState)(t);return(0,a.A)((()=>{t||i(!0)}),[t]),(0,a.A)((()=>{o&&c(t)}),[o,t]),o?(0,s.jsx)(h,{...n,collapsed:l}):null}function y(e){let{lazy:t,...n}=e;const r=t?g:h;return(0,s.jsx)(r,{...n})}},23380:(e,t,n)=>{"use strict";n.d(t,{M:()=>h,o:()=>m});var r=n(63696),o=n(9136),a=n(78749),i=n(26849),s=n(53115),l=n(62540);const c=(0,a.Wf)("docusaurus.announcement.dismiss"),u=(0,a.Wf)("docusaurus.announcement.id"),d=()=>"true"===c.get(),p=e=>c.set(String(e)),f=r.createContext(null);function m(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.p)(),t=(0,o.A)(),[n,a]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{a(d())}),[]);const i=(0,r.useCallback)((()=>{p(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&p(!1),!r&&d()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,l.jsx)(f.Provider,{value:n,children:t})}function h(){const e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},8532:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>g});var r=n(63696),o=n(61934),a=n(26849),i=n(78749),s=n(53115),l=n(62540);const c=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),p={light:"light",dark:"dark"},f=e=>e===p.dark?p.dark:p.light,m=e=>o.A.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),h=e=>{d.set(f(e))};function g(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.p)(),[o,a]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:o=!0}=r;t?(a(t),o&&h(t)):(a(n?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:i,get isDarkTheme(){return o===p.dark},setLightTheme(){i(p.light)},setDarkTheme(){i(p.dark)}})),[o,i])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(c);if(null==e)throw new a.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},5528:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(63696),o=n(63065),a=n(86682),i=n(30604),s=n(53115),l=n(26849),c=n(62540);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,o.YL)(),{items:t}=(0,s.p)().navbar;return 0===t.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,[l,c]=(0,r.useState)(!1);(0,i.$Z)((()=>{if(l)return c(!1),!1}));const u=(0,r.useCallback)((()=>{c((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&c(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:l})),[e,n,u,l])}function p(e){let{children:t}=e;const n=d();return(0,c.jsx)(u.Provider,{value:n,children:t})}function f(){const e=r.useContext(u);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},63065:(e,t,n)=>{"use strict";n.d(t,{GX:()=>c,YL:()=>l,y_:()=>s});var r=n(63696),o=n(26849),a=n(62540);const i=r.createContext(null);function s(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(!e)throw new o.dV("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const a=(0,r.useContext)(i);if(!a)throw new o.dV("NavbarSecondaryMenuContentProvider");const[,s]=a,l=(0,o.Be)(n);return(0,r.useEffect)((()=>{s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},67788:(e,t,n)=>{"use strict";n.d(t,{w:()=>o,J:()=>a});var r=n(63696);const o="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},53592:(e,t,n)=>{"use strict";n.d(t,{b:()=>s,w:()=>l});var r=n(63696),o=n(40797),a=n(30604);const i="q";function s(){return(0,a.l)(i)}function l(){const{siteConfig:{baseUrl:e,themeConfig:t}}=(0,o.A)(),{algolia:{searchPagePath:n}}=t;return(0,r.useCallback)((t=>`${e}${n}?${i}=${encodeURIComponent(t)}`),[e,n])}},86682:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(63696),o=n(61934);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,s]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){s(function(e){if(!o.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a.desktop:a.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},204:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},84924:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},66540:(e,t,n)=>{"use strict";n.d(t,{s:()=>o});var r=n(40797);function o(e){const{siteConfig:t}=(0,r.A)(),{title:n,titleDelimiter:o}=t;return e?.trim().length?`${e.trim()} ${o} ${n}`:n}},30604:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>l,l:()=>c});var r=n(63696),o=n(56347),a=n(26849);function i(e){!function(e){const t=(0,o.W6)(),n=(0,a._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function s(e){const t=(0,o.W6)();return(0,r.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}function l(e){return s((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}function c(e){const t=l(e)??"",n=function(e){const t=(0,o.W6)();return(0,r.useCallback)(((n,r)=>{const o=new URLSearchParams(t.location.search);n?o.set(e,n):o.delete(e),(r?.push?t.push:t.replace)({search:o.toString()})}),[e,t])}(e);return[t,n]}},11861:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function o(e){return Array.from(new Set(e))}n.d(t,{XI:()=>r,sb:()=>o})},59144:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>d,Jx:()=>m});var r=n(63696),o=n(34164),a=n(27143),i=n(75313);function s(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(29030),c=n(66540),u=n(62540);function d(e){let{title:t,description:n,keywords:r,image:o,children:i}=e;const s=(0,c.s)(t),{withBaseUrl:d}=(0,l.hH)(),p=o?d(o,{absolute:!0}):void 0;return(0,u.jsxs)(a.A,{children:[t&&(0,u.jsx)("title",{children:s}),t&&(0,u.jsx)("meta",{property:"og:title",content:s}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,u.jsx)("meta",{property:"og:image",content:p}),p&&(0,u.jsx)("meta",{name:"twitter:image",content:p}),i]})}const p=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(p),s=(0,o.A)(i,t);return(0,u.jsxs)(p.Provider,{value:s,children:[(0,u.jsx)(a.A,{children:(0,u.jsx)("html",{className:s})}),n]})}function m(e){let{children:t}=e;const n=s(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const a=`plugin-id-${n.plugin.id}`;return(0,u.jsx)(f,{className:(0,o.A)(r,a),children:t})}},26849:(e,t,n)=>{"use strict";n.d(t,{Be:()=>c,ZC:()=>s,_q:()=>i,dV:()=>l,fM:()=>u});var r=n(63696),o=n(50372),a=n(62540);function i(e){const t=(0,r.useRef)(e);return(0,o.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function s(e){const t=(0,r.useRef)();return(0,o.A)((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?<name>\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,a.jsx)(a.Fragment,{children:e.reduceRight(((e,t)=>(0,a.jsx)(t,{children:e})),n)})}}},26767:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{G:()=>r})},30214:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>s,ys:()=>i});var r=n(63696),o=n(48912),a=n(40797);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function s(){const{baseUrl:e}=(0,a.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function o(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(o).flatMap((e=>e.routes??[])))}(n)}({routes:o.A,baseUrl:e})),[e])}},65627:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,a_:()=>m,gk:()=>h});var r=n(63696),o=n(61934),a=n(9136),i=n(50372),s=n(26849),l=n(62540);const c=r.createContext(void 0);function u(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function d(){const e=(0,r.useContext)(c);if(null==e)throw new s.dV("ScrollControllerProvider");return e}const p=()=>o.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function f(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=d(),o=(0,r.useRef)(p()),a=(0,s._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=p();a(e,o.current),o.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function m(){const e=d(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),o=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,i.A)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:o}}function h(){const e=(0,r.useRef)(null),t=(0,a.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(n&&o>e||!n&&o<e)&&(t=requestAnimationFrame(r),window.scrollTo(0,Math.floor(.85*(o-e))+e))}(),()=>t&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},89396:(e,t,n)=>{"use strict";n.d(t,{C:()=>r});const r="default"},78749:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>u,Dv:()=>d});var r=n(63696);const o=JSON.parse('{"N":"localStorage","M":""}'),a=o.N;function i(e){let{key:t,oldValue:n,newValue:r,storage:o}=e;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}function s(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}let l=!1;const c={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){const n=`${e}${o.M}`;if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(n);const r=s(t?.persistence);return null===r?c:{get:()=>{try{return r.getItem(n)}catch(e){return console.error(`Docusaurus storage error, can't get key=${n}`,e),null}},set:e=>{try{const t=r.getItem(n);r.setItem(n,e),i({key:n,oldValue:t,newValue:e,storage:r})}catch(t){console.error(`Docusaurus storage error, can't set ${n}=${e}`,t)}},del:()=>{try{const e=r.getItem(n);r.removeItem(n),i({key:n,oldValue:e,newValue:null,storage:r})}catch(e){console.error(`Docusaurus storage error, can't delete key=${n}`,e)}},listen:e=>{try{const t=t=>{t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}catch(t){return console.error(`Docusaurus storage error, can't listen for changes of key=${n}`,t),()=>{}}}}}function d(e,t){const n=(0,r.useRef)((()=>null===e?c:u(e,t))).current(),o=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,r.useSyncExternalStore)(o,(()=>n.get()),(()=>null)),n]}},67976:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(40797),o=n(56347),a=n(30099);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:s}}=(0,r.A)(),{pathname:l}=(0,o.zy)(),c=(0,a.Ks)(l,{trailingSlash:n,baseUrl:e}),u=s===i?e:e.replace(`/${s}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${u}`:`${u}${e}/`}(n)}${d}`}}}},77685:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(63696),o=n(56347),a=n(26849);function i(e){const t=(0,o.zy)(),n=(0,a.ZC)(t),i=(0,a._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},53115:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(40797);function o(){return(0,r.A)().siteConfig.themeConfig}},11835:(e,t,n)=>{"use strict";n.d(t,{c:()=>o});var r=n(40797);function o(){const{siteConfig:{themeConfig:e}}=(0,r.A)();return e}},58455:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(63696),o=n(26767),a=n(29030),i=n(11835);function s(){const{withBaseUrl:e}=(0,a.hH)(),{algolia:{externalUrlRegex:t,replaceSearchResultPathname:n}}=(0,i.c)();return(0,r.useCallback)((r=>{const a=new URL(r);if((0,o.G)(t,a.href))return r;const i=`${a.pathname+a.hash}`;return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(i,n))}),[e,t,n])}},92562:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=o,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),s="/"===i||i===r?i:(l=i,c=n,c?o(l):a(l));var l,c;return e.replace(i,s)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=a;const r=n(27149);function o(e){return e.endsWith("/")?e:`${e}/`}function a(e){return(0,r.removeSuffix)(e,"/")}},52528:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t,...e(t.cause)];return[t]}},30099:(e,t,n)=>{"use strict";t.rA=t.Ks=void 0;const r=n(31635);var o=n(92562);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(o).default}});var a=n(27149);var i=n(52528);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},27149:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:`${t}${e}`},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:`${e}${t}`},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},5080:()=>{!function(e){function t(e){const t=e.map((e=>{return`${t=e,t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`;var t})).join("|");return new RegExp(`\\b(?:${t})\\b`)}e.languages["json-schema"]=e.languages.extend("json5",{keyword:[{pattern:t(["if","then","else"]),alias:["control-flow","schema-conditionally"]},{pattern:t(["allOf","anyOf","oneOf","not"]),alias:"schema-composition"},{pattern:t(["$ref","$defs","$anchor","$defs","$dynamicRef","$dynamicAnchor","$recursiveAnchor","$recursiveRef"]),alias:"refs"},{pattern:t(["dependencies","dependentSchemas","dependentRequired","dependentSchemas"]),alias:"schema-conditionally"},{pattern:t(["additionalItems","contains","items","minItems","maxItems","minContains","maxContains","prefixItems","unevaluatedItems","uniqueItems"]),alias:"array"},{pattern:t(["title","description","default","examples","deprecated","readOnly","writeOnly","$comment"]),alias:"annotations"},{pattern:t(["enum"]),alias:"enum"},{pattern:t(["const"]),alias:"const"},{pattern:t(["contentEncoding","contentMediaType","contentSchema","format","minLength","maxLength","pattern"]),alias:"string"},{pattern:t(["multipleOf","minimum","exclusiveMinimum","maximum","exclusiveMaximum"]),alias:"number"},{pattern:t(["additionalProperties","patternProperties","properties","propertyNames","required","minProperties","maxProperties","unevaluatedProperties"]),alias:"object"}]})}(Prism)},31513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>w,TM:()=>E,yJ:()=>f,sC:()=>P,AO:()=>p});var r=n(58168);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}const i=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],i=t&&t.split("/")||[],s=e&&o(e),l=t&&o(t),c=s||l;if(e&&o(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var u=i[i.length-1];n="."===u||".."===u||""===u}else n=!1;for(var d=0,p=i.length;p>=0;p--){var f=i[p];"."===f?a(i,p):".."===f?(a(i,p),d++):d&&(a(i,p),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(11561);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var h=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(e,t){t(window.confirm(e))}var y="popstate",b="hashchange";function v(){try{return window.history.state||{}}catch(e){return{}}}function w(e){void 0===e&&(e={}),h||(0,s.A)(!1);var t,n=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,c=i.forceRefresh,w=void 0!==c&&c,S=i.getUserConfirmation,x=void 0===S?g:S,k=i.keyLength,j=void 0===k?6:k,_=e.basename?d(l(e.basename)):"";function E(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname+o.search+o.hash;return _&&(a=u(a,_)),f(a,r,n)}function O(){return Math.random().toString(36).substr(2,j)}var P=m();function C(e){(0,r.A)(U,e),U.length=n.length,P.notifyListeners(U.location,U.action)}function A(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||N(E(e.state))}function T(){N(E(v()))}var I=!1;function N(e){if(I)I=!1,C();else{P.confirmTransitionTo(e,"POP",x,(function(t){t?C({action:"POP",location:e}):function(e){var t=U.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(I=!0,M(o))}(e)}))}}var L=E(v()),R=[L.key];function D(e){return _+p(e)}function M(e){n.go(e)}var F=0;function B(e){1===(F+=e)&&1===e?(window.addEventListener(y,A),a&&window.addEventListener(b,T)):0===F&&(window.removeEventListener(y,A),a&&window.removeEventListener(b,T))}var z=!1;var U={length:n.length,action:"POP",location:L,createHref:D,push:function(e,t){var r="PUSH",a=f(e,t,O(),U.location);P.confirmTransitionTo(a,r,x,(function(e){if(e){var t=D(a),i=a.key,s=a.state;if(o)if(n.pushState({key:i,state:s},null,t),w)window.location.href=t;else{var l=R.indexOf(U.location.key),c=R.slice(0,l+1);c.push(a.key),R=c,C({action:r,location:a})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",a=f(e,t,O(),U.location);P.confirmTransitionTo(a,r,x,(function(e){if(e){var t=D(a),i=a.key,s=a.state;if(o)if(n.replaceState({key:i,state:s},null,t),w)window.location.replace(t);else{var l=R.indexOf(U.location.key);-1!==l&&(R[l]=a.key),C({action:r,location:a})}else window.location.replace(t)}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=P.setPrompt(e);return z||(B(1),z=!0),function(){return z&&(z=!1,B(-1)),t()}},listen:function(e){var t=P.appendListener(e);return B(1),function(){B(-1),t()}}};return U}var S="hashchange",x={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+c(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:c,decodePath:l},slash:{encodePath:l,decodePath:l}};function k(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function j(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function _(e){window.location.replace(k(window.location.href)+"#"+e)}function E(e){void 0===e&&(e={}),h||(0,s.A)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),o=n.getUserConfirmation,a=void 0===o?g:o,i=n.hashType,c=void 0===i?"slash":i,y=e.basename?d(l(e.basename)):"",b=x[c],v=b.encodePath,w=b.decodePath;function E(){var e=w(j());return y&&(e=u(e,y)),f(e)}var O=m();function P(e){(0,r.A)(z,e),z.length=t.length,O.notifyListeners(z.location,z.action)}var C=!1,A=null;function T(){var e,t,n=j(),r=v(n);if(n!==r)_(r);else{var o=E(),i=z.location;if(!C&&(t=o,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(A===p(o))return;A=null,function(e){if(C)C=!1,P();else{var t="POP";O.confirmTransitionTo(e,t,a,(function(n){n?P({action:t,location:e}):function(e){var t=z.location,n=R.lastIndexOf(p(t));-1===n&&(n=0);var r=R.lastIndexOf(p(e));-1===r&&(r=0);var o=n-r;o&&(C=!0,D(o))}(e)}))}}(o)}}var I=j(),N=v(I);I!==N&&_(N);var L=E(),R=[p(L)];function D(e){t.go(e)}var M=0;function F(e){1===(M+=e)&&1===e?window.addEventListener(S,T):0===M&&window.removeEventListener(S,T)}var B=!1;var z={length:t.length,action:"POP",location:L,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=k(window.location.href)),n+"#"+v(y+p(e))},push:function(e,t){var n="PUSH",r=f(e,void 0,void 0,z.location);O.confirmTransitionTo(r,n,a,(function(e){if(e){var t=p(r),o=v(y+t);if(j()!==o){A=t,function(e){window.location.hash=e}(o);var a=R.lastIndexOf(p(z.location)),i=R.slice(0,a+1);i.push(t),R=i,P({action:n,location:r})}else P()}}))},replace:function(e,t){var n="REPLACE",r=f(e,void 0,void 0,z.location);O.confirmTransitionTo(r,n,a,(function(e){if(e){var t=p(r),o=v(y+t);j()!==o&&(A=t,_(o));var a=R.indexOf(p(z.location));-1!==a&&(R[a]=t),P({action:n,location:r})}}))},go:D,goBack:function(){D(-1)},goForward:function(){D(1)},block:function(e){void 0===e&&(e=!1);var t=O.setPrompt(e);return B||(F(1),B=!0),function(){return B&&(B=!1,F(-1)),t()}},listen:function(e){var t=O.appendListener(e);return F(1),function(){F(-1),t()}}};return z}function O(e,t,n){return Math.min(Math.max(e,t),n)}function P(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,a=void 0===o?["/"]:o,i=t.initialIndex,s=void 0===i?0:i,l=t.keyLength,c=void 0===l?6:l,u=m();function d(e){(0,r.A)(w,e),w.length=w.entries.length,u.notifyListeners(w.location,w.action)}function h(){return Math.random().toString(36).substr(2,c)}var g=O(s,0,a.length-1),y=a.map((function(e){return f(e,void 0,"string"==typeof e?h():e.key||h())})),b=p;function v(e){var t=O(w.index+e,0,w.entries.length-1),r=w.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?d({action:"POP",location:r,index:t}):d()}))}var w={length:y.length,action:"POP",location:y[g],index:g,entries:y,createHref:b,push:function(e,t){var r="PUSH",o=f(e,t,h(),w.location);u.confirmTransitionTo(o,r,n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=f(e,t,h(),w.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return w}},4146:(e,t,n)=>{"use strict";var r=n(44363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=f(n);o&&o!==m&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),h=l(n),g=0;g<i.length;++g){var y=i[g];if(!(a[y]||r&&r[y]||h&&h[y]||s&&s[y])){var b=p(n,y);try{c(t,y,b)}catch(v){}}}}return t}},20311:e=>{"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},64634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},67378:(e,t,n)=>{"use strict";n.r(t)},82094:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function o(e,t,n){return e<t?t:e>n?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){l(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),s=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},35302:(e,t,n)=>{var r=n(64634);e.exports=m,e.exports.parse=a,e.exports.compile=function(e,t){return l(a(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,s=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],p=n[1],f=n.index;if(l+=e.slice(s,f),s=f+d.length,p)l+=p[1];else{var m=e[s],h=n[2],g=n[3],y=n[4],b=n[5],v=n[6],w=n[7];l&&(r.push(l),l="");var S=null!=h&&null!=m&&m!==h,x="+"===v||"*"===v,k="?"===v||"*"===v,j=h||c,_=y||b,E=h||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||a++,prefix:h||"",delimiter:j,optional:k,repeat:x,partial:S,asterisk:!!w,pattern:_?u(_):w?".*":i(j,E)})}}return s<e.length&&(l+=e.substr(s)),l&&r.push(l),r}function i(e,t){return!t||t.indexOf(e)>-1?"[^"+c(e)+"]+?":c(t)+"|(?:(?!"+c(t)+")[^"+c(e)+"])+?"}function s(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",p(t)));return function(t,o){for(var a="",i=t||{},l=(o||{}).pretty?s:encodeURIComponent,c=0;c<e.length;c++){var u=e[c];if("string"!=typeof u){var d,p=i[u.name];if(null==p){if(u.optional){u.partial&&(a+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<p.length;f++){if(d=l(p[f]),!n[c].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");a+=(0===f?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):l(p),!n[c].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');a+=u.prefix+d}}else a+=u}return a}}function c(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function u(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function d(e,t){return e.keys=t,e}function p(e){return e&&e.sensitive?"":"i"}function f(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,a=!1!==n.end,i="",s=0;s<e.length;s++){var l=e[s];if("string"==typeof l)i+=c(l);else{var u=c(l.prefix),f="(?:"+l.pattern+")";t.push(l),l.repeat&&(f+="(?:"+u+f+")*"),i+=f=l.optional?l.partial?u+"("+f+")?":"(?:"+u+"("+f+"))?":u+"("+f+")"}}var m=c(n.delimiter||"/"),h=i.slice(-m.length)===m;return o||(i=(h?i.slice(0,-m.length):i)+"(?:"+m+"(?=$))?"),i+=a?"$":o&&h?"":"(?="+m+"|$)",d(new RegExp("^"+i,p(n)),t)}function m(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return d(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(m(e[o],t,n).source);return d(new RegExp("(?:"+r.join("|")+")",p(n)),t)}(e,t,n):function(e,t,n){return f(a(e,n),t,n)}(e,t,n)}},72514:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},10267:()=>{!function(e){var t=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;e.languages.json5=e.languages.extend("json",{property:[{pattern:RegExp(t.source+"(?=\\s*:)"),greedy:!0},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,alias:"unquoted"}],string:{pattern:t,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/})}(Prism)},19700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,s=i.length;-1!==n.code.indexOf(o=t(r,s));)++s;return i[s]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(s){for(var l=0;l<s.length&&!(o>=a.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++o;var h=p.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=p.substring(m+f.length),b=[];h&&b.push.apply(b,i([h])),b.push(g),y&&b.push.apply(b,i([y])),"string"==typeof c?s.splice.apply(s,[l,1].concat(b)):c.content=b}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(Prism)},89863:(e,t,n)=>{var r={"./prism-json":72514,"./prism-json5":10267};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=89863},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},22551:(e,t,n)=>{"use strict";var r=n(63696),o=n(69982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)i.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},m={};function h(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new h(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new h(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new h(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new h(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new h(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new h(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new h(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new h(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new h(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function v(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(m,e)||!d.call(f,e)&&(p.test(e)?m[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);g[t]=new h(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);g[t]=new h(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);g[t]=new h(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=Symbol.for("react.element"),x=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),O=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),I=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var D,M=Object.assign;function F(e){if(void 0===D)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var B=!1;function z(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var o=c.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(1!==i||1!==s)do{if(i--,0>--s||o[i]!==a[s]){var l="\n"+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function U(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=z(e.type,!1);case 11:return e=z(e.type.render,!1);case 1:return e=z(e.type,!0);default:return""}}function $(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case k:return"Fragment";case x:return"Portal";case _:return"Profiler";case j:return"StrictMode";case C:return"Suspense";case A:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:$(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return $(e(t))}catch(n){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $(t);case 8:return t===j?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return M({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Z(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function J(e,t){Z(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return M({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ae(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function he(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=he(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(fe).forEach((function(e){me.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ye=M({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function Se(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,ke=null,je=null;function _e(e){if(e=wo(e)){if("function"!=typeof xe)throw Error(a(280));var t=e.stateNode;t&&(t=xo(t),xe(e.stateNode,e.type,t))}}function Ee(e){ke?je?je.push(e):je=[e]:ke=e}function Oe(){if(ke){var e=ke,t=je;if(je=ke=null,_e(e),t)for(e=0;e<t.length;e++)_e(t[e])}}function Pe(e,t){return e(t)}function Ce(){}var Ae=!1;function Te(e,t,n){if(Ae)return e(t,n);Ae=!0;try{return Pe(e,t,n)}finally{Ae=!1,(null!==ke||null!==je)&&(Ce(),Oe())}}function Ie(e,t){var n=e.stateNode;if(null===n)return null;var r=xo(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Ne=!1;if(u)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Ne=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(ue){Ne=!1}function Re(e,t,n,r,o,a,i,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var De=!1,Me=null,Fe=!1,Be=null,ze={onError:function(e){De=!0,Me=e}};function Ue(e,t,n,r,o,a,i,s,l){De=!1,Me=null,Re.apply(ze,arguments)}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if($e(e)!==e)throw Error(a(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return He(o),e;if(i===r)return He(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var Ke=o.unstable_scheduleCallback,Ge=o.unstable_cancelCallback,Qe=o.unstable_shouldYield,Ye=o.unstable_requestPaint,Ze=o.unstable_now,Je=o.unstable_getCurrentPriorityLevel,Xe=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,at=null;var it=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~o;0!==s?r=dt(s):0!==(a&=i)&&(r=dt(a))}else 0!==(i=n&~o)?r=dt(i):0!==a&&(r=dt(a));if(0===r)return 0;if(0!==t&&t!==r&&!(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-it(t)),r|=e[n],t&=~o;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ht(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var vt=0;function wt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var St,xt,kt,jt,_t,Et=!1,Ot=[],Pt=null,Ct=null,At=null,Tt=new Map,It=new Map,Nt=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Rt(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":Ct=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":Tt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":It.delete(t.pointerId)}}function Dt(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=wo(t))&&xt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Mt(e){var t=vo(e.target);if(null!==t){var n=$e(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=qe(n)))return e.blockedOn=t,void _t(e.priority,(function(){kt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wo(n))&&xt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Bt(e,t,n){Ft(e)&&n.delete(t)}function zt(){Et=!1,null!==Pt&&Ft(Pt)&&(Pt=null),null!==Ct&&Ft(Ct)&&(Ct=null),null!==At&&Ft(At)&&(At=null),Tt.forEach(Bt),It.forEach(Bt)}function Ut(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,zt)))}function $t(e){function t(t){return Ut(t,e)}if(0<Ot.length){Ut(Ot[0],e);for(var n=1;n<Ot.length;n++){var r=Ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Pt&&Ut(Pt,e),null!==Ct&&Ut(Ct,e),null!==At&&Ut(At,e),Tt.forEach(t),It.forEach(t),n=0;n<Nt.length;n++)(r=Nt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&null===(n=Nt[0]).blockedOn;)Mt(n),null===n.blockedOn&&Nt.shift()}var qt=w.ReactCurrentBatchConfig,Ht=!0;function Vt(e,t,n,r){var o=vt,a=qt.transition;qt.transition=null;try{vt=1,Kt(e,t,n,r)}finally{vt=o,qt.transition=a}}function Wt(e,t,n,r){var o=vt,a=qt.transition;qt.transition=null;try{vt=4,Kt(e,t,n,r)}finally{vt=o,qt.transition=a}}function Kt(e,t,n,r){if(Ht){var o=Qt(e,t,n,r);if(null===o)Hr(e,t,r,Gt,n),Rt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Pt=Dt(Pt,e,t,n,r,o),!0;case"dragenter":return Ct=Dt(Ct,e,t,n,r,o),!0;case"mouseover":return At=Dt(At,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Tt.set(a,Dt(Tt.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,It.set(a,Dt(It.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Rt(e,r),4&t&&-1<Lt.indexOf(e)){for(;null!==o;){var a=wo(o);if(null!==a&&St(a),null===(a=Qt(e,t,n,r))&&Hr(e,t,r,Gt,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Gt=null;function Qt(e,t,n,r){if(Gt=null,null!==(e=vo(e=Se(r))))if(null===(t=$e(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=qe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Xe:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Zt=null,Jt=null,Xt=null;function en(){if(Xt)return Xt;var e,t,n=Jt,r=n.length,o="value"in Zt?Zt.value:Zt.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return Xt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=M({},cn,{view:0,detail:0}),pn=on(dn),fn=M({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),mn=on(fn),hn=on(M({},fn,{dataTransfer:0})),gn=on(M({},dn,{relatedTarget:0})),yn=on(M({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=M({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vn=on(bn),wn=on(M({},cn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kn[e])&&!!t[e]}function _n(){return jn}var En=M({},dn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),On=on(En),Pn=on(M({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=on(M({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),An=on(M({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Tn=M({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),In=on(Tn),Nn=[9,13,27,32],Ln=u&&"CompositionEvent"in window,Rn=null;u&&"documentMode"in document&&(Rn=document.documentMode);var Dn=u&&"TextEvent"in window&&!Rn,Mn=u&&(!Ln||Rn&&8<Rn&&11>=Rn),Fn=String.fromCharCode(32),Bn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var $n=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Vn(e,t,n,r){Ee(r),0<(t=Wr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Kn=null;function Gn(e){Fr(e,0)}function Qn(e){if(K(So(e)))return e}function Yn(e,t){if("change"===e)return t}var Zn=!1;if(u){var Jn;if(u){var Xn="oninput"in document;if(!Xn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Xn="function"==typeof er.oninput}Jn=Xn}else Jn=!1;Zn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),Kn=Wn=null)}function nr(e){if("value"===e.propertyName&&Qn(Kn)){var t=[];Vn(t,Kn,e,Se(e)),Te(Gn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Kn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Kn)}function ar(e,t){if("click"===e)return Qn(t)}function ir(e,t){if("input"===e||"change"===e)return Qn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!sr(e[o],t[o]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=ur(n,a);var i=ur(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,yr=null,br=null,vr=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==gr||gr!==G(r)||("selectionStart"in(r=gr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&lr(br,r)||(br=r,0<(r=Wr(yr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function Sr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:Sr("Animation","AnimationEnd"),animationiteration:Sr("Animation","AnimationIteration"),animationstart:Sr("Animation","AnimationStart"),transitionend:Sr("Transition","TransitionEnd")},kr={},jr={};function _r(e){if(kr[e])return kr[e];if(!xr[e])return e;var t,n=xr[e];for(t in n)if(n.hasOwnProperty(t)&&t in jr)return kr[e]=n[t];return e}u&&(jr=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Er=_r("animationend"),Or=_r("animationiteration"),Pr=_r("animationstart"),Cr=_r("transitionend"),Ar=new Map,Tr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ir(e,t){Ar.set(e,t),l(t,[e])}for(var Nr=0;Nr<Tr.length;Nr++){var Lr=Tr[Nr];Ir(Lr.toLowerCase(),"on"+(Lr[0].toUpperCase()+Lr.slice(1)))}Ir(Er,"onAnimationEnd"),Ir(Or,"onAnimationIteration"),Ir(Pr,"onAnimationStart"),Ir("dblclick","onDoubleClick"),Ir("focusin","onFocus"),Ir("focusout","onBlur"),Ir(Cr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rr));function Mr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,l,c){if(Ue.apply(this,arguments),De){if(!De)throw Error(a(198));var u=Me;De=!1,Me=null,Fe||(Fe=!0,Be=u)}}(r,t,void 0,e),e.currentTarget=null}function Fr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;Mr(o,s,c),a=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,c=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;Mr(o,s,c),a=l}}}if(Fe)throw e=Be,Fe=!1,Be=null,e}function Br(e,t){var n=t[go];void 0===n&&(n=t[go]=new Set);var r=e+"__bubble";n.has(r)||(qr(t,e,2,!1),n.add(r))}function zr(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var Ur="_reactListening"+Math.random().toString(36).slice(2);function $r(e){if(!e[Ur]){e[Ur]=!0,i.forEach((function(t){"selectionchange"!==t&&(Dr.has(t)||zr(t,!1,e),zr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ur]||(t[Ur]=!0,zr("selectionchange",!1,t))}}function qr(e,t,n,r){switch(Yt(t)){case 1:var o=Vt;break;case 4:o=Wt;break;default:o=Kt}n=o.bind(null,t,n,e),o=void 0,!Ne||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,o){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;i=i.return}for(;null!==s;){if(null===(i=vo(s)))return;if(5===(l=i.tag)||6===l){r=a=i;continue e}s=s.parentNode}}r=r.return}Te((function(){var r=a,o=Se(n),i=[];e:{var s=Ar.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=On;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=hn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Cn;break;case Er:case Or:case Pr:l=yn;break;case Cr:l=An;break;case"scroll":l=pn;break;case"wheel":l=In;break;case"copy":case"cut":case"paste":l=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Pn}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==s?s+"Capture":null:s;u=[];for(var f,m=r;null!==m;){var h=(f=m).stateNode;if(5===f.tag&&null!==h&&(f=h,null!==p&&(null!=(h=Ie(m,p))&&u.push(Vr(m,h,f)))),d)break;m=m.return}0<u.length&&(s=new l(s,c,null,n,o),i.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(c=n.relatedTarget||n.fromElement)||!vo(c)&&!c[ho])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?vo(c):null)&&(c!==(d=$e(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=mn,h="onMouseLeave",p="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(u=Pn,h="onPointerLeave",p="onPointerEnter",m="pointer"),d=null==l?s:So(l),f=null==c?s:So(c),(s=new u(h,m+"leave",l,n,o)).target=d,s.relatedTarget=f,h=null,vo(o)===r&&((u=new u(p,m+"enter",c,n,o)).target=f,u.relatedTarget=d,h=u),d=h,l&&c)e:{for(p=c,m=0,f=u=l;f;f=Kr(f))m++;for(f=0,h=p;h;h=Kr(h))f++;for(;0<m-f;)u=Kr(u),m--;for(;0<f-m;)p=Kr(p),f--;for(;m--;){if(u===p||null!==p&&u===p.alternate)break e;u=Kr(u),p=Kr(p)}u=null}else u=null;null!==l&&Gr(i,s,l,u,!1),null!==c&&null!==d&&Gr(i,d,c,u,!0)}if("select"===(l=(s=r?So(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Yn;else if(Hn(s))if(Zn)g=ir;else{g=or;var y=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ar);switch(g&&(g=g(e,r))?Vn(i,g,n,o):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ee(s,"number",s.value)),y=r?So(r):window,e){case"focusin":(Hn(y)||"true"===y.contentEditable)&&(gr=y,yr=r,br=null);break;case"focusout":br=yr=gr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,wr(i,n,o);break;case"selectionchange":if(hr)break;case"keydown":case"keyup":wr(i,n,o)}var b;if(Ln)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else $n?zn(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Mn&&"ko"!==n.locale&&($n||"onCompositionStart"!==v?"onCompositionEnd"===v&&$n&&(b=en()):(Jt="value"in(Zt=o)?Zt.value:Zt.textContent,$n=!0)),0<(y=Wr(r,v)).length&&(v=new wn(v,e,null,n,o),i.push({event:v,listeners:y}),b?v.data=b:null!==(b=Un(n))&&(v.data=b))),(b=Dn?function(e,t){switch(e){case"compositionend":return Un(t);case"keypress":return 32!==t.which?null:(Bn=!0,Fn);case"textInput":return(e=t.data)===Fn&&Bn?null:e;default:return null}}(e,n):function(e,t){if($n)return"compositionend"===e||!Ln&&zn(e,t)?(e=en(),Xt=Jt=Zt=null,$n=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Wr(r,"onBeforeInput")).length&&(o=new wn("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=b))}Fr(i,t)}))}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Ie(e,n))&&r.unshift(Vr(e,a,o)),null!=(a=Ie(e,t))&&r.push(Vr(e,a,o))),e=e.return}return r}function Kr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gr(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=Ie(n,a))&&i.unshift(Vr(n,l,s)):o||null!=(l=Ie(n,a))&&i.push(Vr(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var Qr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Zr(e){return("string"==typeof e?e:""+e).replace(Qr,"\n").replace(Yr,"")}function Jr(e,t,n){if(t=Zr(t),Zr(e)!==t&&n)throw Error(a(425))}function Xr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"==typeof setTimeout?setTimeout:void 0,oo="function"==typeof clearTimeout?clearTimeout:void 0,ao="function"==typeof Promise?Promise:void 0,io="function"==typeof queueMicrotask?queueMicrotask:void 0!==ao?function(e){return ao.resolve(null).then(e).catch(so)}:ro;function so(e){setTimeout((function(){throw e}))}function lo(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void $t(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);$t(t)}function co(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var po=Math.random().toString(36).slice(2),fo="__reactFiber$"+po,mo="__reactProps$"+po,ho="__reactContainer$"+po,go="__reactEvents$"+po,yo="__reactListeners$"+po,bo="__reactHandles$"+po;function vo(e){var t=e[fo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ho]||n[fo]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[fo])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function wo(e){return!(e=e[fo]||e[ho])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function So(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function xo(e){return e[mo]||null}var ko=[],jo=-1;function _o(e){return{current:e}}function Eo(e){0>jo||(e.current=ko[jo],ko[jo]=null,jo--)}function Oo(e,t){jo++,ko[jo]=e.current,e.current=t}var Po={},Co=_o(Po),Ao=_o(!1),To=Po;function Io(e,t){var n=e.type.contextTypes;if(!n)return Po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function No(e){return null!=(e=e.childContextTypes)}function Lo(){Eo(Ao),Eo(Co)}function Ro(e,t,n){if(Co.current!==Po)throw Error(a(168));Oo(Co,t),Oo(Ao,n)}function Do(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,q(e)||"Unknown",o));return M({},n,r)}function Mo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Po,To=Co.current,Oo(Co,e),Oo(Ao,Ao.current),!0}function Fo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Do(e,t,To),r.__reactInternalMemoizedMergedChildContext=e,Eo(Ao),Eo(Co),Oo(Co,e)):Eo(Ao),Oo(Ao,n)}var Bo=null,zo=!1,Uo=!1;function $o(e){null===Bo?Bo=[e]:Bo.push(e)}function qo(){if(!Uo&&null!==Bo){Uo=!0;var e=0,t=vt;try{var n=Bo;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bo=null,zo=!1}catch(o){throw null!==Bo&&(Bo=Bo.slice(e+1)),Ke(Xe,qo),o}finally{vt=t,Uo=!1}}return null}var Ho=[],Vo=0,Wo=null,Ko=0,Go=[],Qo=0,Yo=null,Zo=1,Jo="";function Xo(e,t){Ho[Vo++]=Ko,Ho[Vo++]=Wo,Wo=e,Ko=t}function ea(e,t,n){Go[Qo++]=Zo,Go[Qo++]=Jo,Go[Qo++]=Yo,Yo=e;var r=Zo;e=Jo;var o=32-it(r)-1;r&=~(1<<o),n+=1;var a=32-it(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Zo=1<<32-it(t)+o|n<<o|r,Jo=a+e}else Zo=1<<a|n<<o|r,Jo=e}function ta(e){null!==e.return&&(Xo(e,1),ea(e,1,0))}function na(e){for(;e===Wo;)Wo=Ho[--Vo],Ho[Vo]=null,Ko=Ho[--Vo],Ho[Vo]=null;for(;e===Yo;)Yo=Go[--Qo],Go[Qo]=null,Jo=Go[--Qo],Go[Qo]=null,Zo=Go[--Qo],Go[Qo]=null}var ra=null,oa=null,aa=!1,ia=null;function sa(e,t){var n=Tc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function la(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ra=e,oa=co(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ra=e,oa=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yo?{id:Zo,overflow:Jo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ra=e,oa=null,!0);default:return!1}}function ca(e){return!(!(1&e.mode)||128&e.flags)}function ua(e){if(aa){var t=oa;if(t){var n=t;if(!la(e,t)){if(ca(e))throw Error(a(418));t=co(n.nextSibling);var r=ra;t&&la(e,t)?sa(r,n):(e.flags=-4097&e.flags|2,aa=!1,ra=e)}}else{if(ca(e))throw Error(a(418));e.flags=-4097&e.flags|2,aa=!1,ra=e}}}function da(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ra=e}function pa(e){if(e!==ra)return!1;if(!aa)return da(e),aa=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oa)){if(ca(e))throw fa(),Error(a(418));for(;t;)sa(e,t),t=co(t.nextSibling)}if(da(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oa=co(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oa=null}}else oa=ra?co(e.stateNode.nextSibling):null;return!0}function fa(){for(var e=oa;e;)e=co(e.nextSibling)}function ma(){oa=ra=null,aa=!1}function ha(e){null===ia?ia=[e]:ia.push(e)}var ga=w.ReactCurrentBatchConfig;function ya(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ba(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function va(e){return(0,e._init)(e._payload)}function wa(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Nc(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Mc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===k?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===I&&va(a)===t.type)?((r=o(t,n.props)).ref=ya(e,t,n),r.return=e,r):((r=Lc(n.type,n.key,n.props,null,e.mode,r)).ref=ya(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Rc(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Mc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case S:return(n=Lc(t.type,t.key,t.props,null,e.mode,n)).ref=ya(e,null,t),n.return=e,n;case x:return(t=Fc(t,e.mode,n)).return=e,t;case I:return p(e,(0,t._init)(t._payload),n)}if(te(t)||R(t))return(t=Rc(t,e.mode,n,null)).return=e,t;ba(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case S:return n.key===o?c(e,t,n,r):null;case x:return n.key===o?u(e,t,n,r):null;case I:return f(e,t,(o=n._init)(n._payload),r)}if(te(n)||R(n))return null!==o?null:d(e,t,n,r,null);ba(e,n)}return null}function m(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case x:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case I:return m(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||R(r))return d(t,e=e.get(n)||null,r,o,null);ba(t,r)}return null}function h(o,a,s,l){for(var c=null,u=null,d=a,h=a=0,g=null;null!==d&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var y=f(o,d,s[h],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(o,d),a=i(y,a,h),null===u?c=y:u.sibling=y,u=y,d=g}if(h===s.length)return n(o,d),aa&&Xo(o,h),c;if(null===d){for(;h<s.length;h++)null!==(d=p(o,s[h],l))&&(a=i(d,a,h),null===u?c=d:u.sibling=d,u=d);return aa&&Xo(o,h),c}for(d=r(o,d);h<s.length;h++)null!==(g=m(d,o,h,s[h],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?h:g.key),a=i(g,a,h),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(o,e)})),aa&&Xo(o,h),c}function g(o,s,l,c){var u=R(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,h=s,g=s=0,y=null,b=l.next();null!==h&&!b.done;g++,b=l.next()){h.index>g?(y=h,h=null):y=h.sibling;var v=f(o,h,b.value,c);if(null===v){null===h&&(h=y);break}e&&h&&null===v.alternate&&t(o,h),s=i(v,s,g),null===d?u=v:d.sibling=v,d=v,h=y}if(b.done)return n(o,h),aa&&Xo(o,g),u;if(null===h){for(;!b.done;g++,b=l.next())null!==(b=p(o,b.value,c))&&(s=i(b,s,g),null===d?u=b:d.sibling=b,d=b);return aa&&Xo(o,g),u}for(h=r(o,h);!b.done;g++,b=l.next())null!==(b=m(h,o,g,b.value,c))&&(e&&null!==b.alternate&&h.delete(null===b.key?g:b.key),s=i(b,s,g),null===d?u=b:d.sibling=b,d=b);return e&&h.forEach((function(e){return t(o,e)})),aa&&Xo(o,g),u}return function e(r,a,i,l){if("object"==typeof i&&null!==i&&i.type===k&&null===i.key&&(i=i.props.children),"object"==typeof i&&null!==i){switch(i.$$typeof){case S:e:{for(var c=i.key,u=a;null!==u;){if(u.key===c){if((c=i.type)===k){if(7===u.tag){n(r,u.sibling),(a=o(u,i.props.children)).return=r,r=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===I&&va(c)===u.type){n(r,u.sibling),(a=o(u,i.props)).ref=ya(r,u,i),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}i.type===k?((a=Rc(i.props.children,r.mode,l,i.key)).return=r,r=a):((l=Lc(i.type,i.key,i.props,null,r.mode,l)).ref=ya(r,a,i),l.return=r,r=l)}return s(r);case x:e:{for(u=i.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===i.containerInfo&&a.stateNode.implementation===i.implementation){n(r,a.sibling),(a=o(a,i.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Fc(i,r.mode,l)).return=r,r=a}return s(r);case I:return e(r,a,(u=i._init)(i._payload),l)}if(te(i))return h(r,a,i,l);if(R(i))return g(r,a,i,l);ba(r,i)}return"string"==typeof i&&""!==i||"number"==typeof i?(i=""+i,null!==a&&6===a.tag?(n(r,a.sibling),(a=o(a,i)).return=r,r=a):(n(r,a),(a=Mc(i,r.mode,l)).return=r,r=a),s(r)):n(r,a)}}var Sa=wa(!0),xa=wa(!1),ka=_o(null),ja=null,_a=null,Ea=null;function Oa(){Ea=_a=ja=null}function Pa(e){var t=ka.current;Eo(ka),e._currentValue=t}function Ca(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Aa(e,t){ja=e,Ea=_a=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(vs=!0),e.firstContext=null)}function Ta(e){var t=e._currentValue;if(Ea!==e)if(e={context:e,memoizedValue:t,next:null},null===_a){if(null===ja)throw Error(a(308));_a=e,ja.dependencies={lanes:0,firstContext:e}}else _a=_a.next=e;return t}var Ia=null;function Na(e){null===Ia?Ia=[e]:Ia.push(e)}function La(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Na(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ra(e,r)}function Ra(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Da=!1;function Ma(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ba(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Pl){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ra(e,n)}return null===(o=r.interleaved)?(t.next=t,Na(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ra(e,n)}function Ua(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function $a(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function qa(e,t,n,r){var o=e.updateQueue;Da=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===i?a=c:i.next=c,i=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==i&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==a){var d=o.baseState;for(i=0,u=c=l=null,s=a;;){var p=s.lane,f=s.eventTime;if((r&p)===p){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,h=s;switch(p=t,f=n,h.tag){case 1:if("function"==typeof(m=h.payload)){d=m.call(f,d,p);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(p="function"==typeof(m=h.payload)?m.call(f,d,p):m))break e;d=M({},d,p);break e;case 2:Da=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=o.effects)?o.effects=[s]:p.push(s))}else f={eventTime:f,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,i|=p;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(p=s).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);Dl|=i,e.lanes=i,e.memoizedState=d}}function Ha(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(a(191,o));o.call(r)}}}var Va={},Wa=_o(Va),Ka=_o(Va),Ga=_o(Va);function Qa(e){if(e===Va)throw Error(a(174));return e}function Ya(e,t){switch(Oo(Ga,t),Oo(Ka,e),Oo(Wa,Va),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Eo(Wa),Oo(Wa,t)}function Za(){Eo(Wa),Eo(Ka),Eo(Ga)}function Ja(e){Qa(Ga.current);var t=Qa(Wa.current),n=le(t,e.type);t!==n&&(Oo(Ka,e),Oo(Wa,n))}function Xa(e){Ka.current===e&&(Eo(Wa),Eo(Ka))}var ei=_o(0);function ti(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ni=[];function ri(){for(var e=0;e<ni.length;e++)ni[e]._workInProgressVersionPrimary=null;ni.length=0}var oi=w.ReactCurrentDispatcher,ai=w.ReactCurrentBatchConfig,ii=0,si=null,li=null,ci=null,ui=!1,di=!1,pi=0,fi=0;function mi(){throw Error(a(321))}function hi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function gi(e,t,n,r,o,i){if(ii=i,si=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oi.current=null===e||null===e.memoizedState?Xi:es,e=n(r,o),di){i=0;do{if(di=!1,pi=0,25<=i)throw Error(a(301));i+=1,ci=li=null,t.updateQueue=null,oi.current=ts,e=n(r,o)}while(di)}if(oi.current=Ji,t=null!==li&&null!==li.next,ii=0,ci=li=si=null,ui=!1,t)throw Error(a(300));return e}function yi(){var e=0!==pi;return pi=0,e}function bi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ci?si.memoizedState=ci=e:ci=ci.next=e,ci}function vi(){if(null===li){var e=si.alternate;e=null!==e?e.memoizedState:null}else e=li.next;var t=null===ci?si.memoizedState:ci.next;if(null!==t)ci=t,li=e;else{if(null===e)throw Error(a(310));e={memoizedState:(li=e).memoizedState,baseState:li.baseState,baseQueue:li.baseQueue,queue:li.queue,next:null},null===ci?si.memoizedState=ci=e:ci=ci.next=e}return ci}function wi(e,t){return"function"==typeof t?t(e):t}function Si(e){var t=vi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=li,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var l=s=null,c=null,u=i;do{var d=u.lane;if((ii&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var p={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=p,s=r):c=c.next=p,si.lanes|=d,Dl|=d}u=u.next}while(null!==u&&u!==i);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(vs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,si.lanes|=i,Dl|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function xi(e){var t=vi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);sr(i,t.memoizedState)||(vs=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ki(){}function ji(e,t){var n=si,r=vi(),o=t(),i=!sr(r.memoizedState,o);if(i&&(r.memoizedState=o,vs=!0),r=r.queue,Di(Oi.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==ci&&1&ci.memoizedState.tag){if(n.flags|=2048,Ti(9,Ei.bind(null,n,r,o,t),void 0,null),null===Cl)throw Error(a(349));30&ii||_i(n,t,o)}return o}function _i(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=si.updateQueue)?(t={lastEffect:null,stores:null},si.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ei(e,t,n,r){t.value=n,t.getSnapshot=r,Pi(t)&&Ci(e)}function Oi(e,t,n){return n((function(){Pi(t)&&Ci(e)}))}function Pi(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Ci(e){var t=Ra(e,1);null!==t&&nc(t,e,1,-1)}function Ai(e){var t=bi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:e},t.queue=e,e=e.dispatch=Gi.bind(null,si,e),[t.memoizedState,e]}function Ti(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=si.updateQueue)?(t={lastEffect:null,stores:null},si.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ii(){return vi().memoizedState}function Ni(e,t,n,r){var o=bi();si.flags|=e,o.memoizedState=Ti(1|t,n,void 0,void 0===r?null:r)}function Li(e,t,n,r){var o=vi();r=void 0===r?null:r;var a=void 0;if(null!==li){var i=li.memoizedState;if(a=i.destroy,null!==r&&hi(r,i.deps))return void(o.memoizedState=Ti(t,n,a,r))}si.flags|=e,o.memoizedState=Ti(1|t,n,a,r)}function Ri(e,t){return Ni(8390656,8,e,t)}function Di(e,t){return Li(2048,8,e,t)}function Mi(e,t){return Li(4,2,e,t)}function Fi(e,t){return Li(4,4,e,t)}function Bi(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function zi(e,t,n){return n=null!=n?n.concat([e]):null,Li(4,4,Bi.bind(null,t,e),n)}function Ui(){}function $i(e,t){var n=vi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&hi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qi(e,t){var n=vi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&hi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Hi(e,t,n){return 21&ii?(sr(n,t)||(n=ht(),si.lanes|=n,Dl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,vs=!0),e.memoizedState=n)}function Vi(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=ai.transition;ai.transition={};try{e(!1),t()}finally{vt=n,ai.transition=r}}function Wi(){return vi().memoizedState}function Ki(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qi(e))Yi(t,n);else if(null!==(n=La(e,t,n,r))){nc(n,e,r,ec()),Zi(n,t,r)}}function Gi(e,t,n){var r=tc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qi(e))Yi(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,sr(s,i)){var l=t.interleaved;return null===l?(o.next=o,Na(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=La(e,t,o,r))&&(nc(n,e,r,o=ec()),Zi(n,t,r))}}function Qi(e){var t=e.alternate;return e===si||null!==t&&t===si}function Yi(e,t){di=ui=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zi(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Ji={readContext:Ta,useCallback:mi,useContext:mi,useEffect:mi,useImperativeHandle:mi,useInsertionEffect:mi,useLayoutEffect:mi,useMemo:mi,useReducer:mi,useRef:mi,useState:mi,useDebugValue:mi,useDeferredValue:mi,useTransition:mi,useMutableSource:mi,useSyncExternalStore:mi,useId:mi,unstable_isNewReconciler:!1},Xi={readContext:Ta,useCallback:function(e,t){return bi().memoizedState=[e,void 0===t?null:t],e},useContext:Ta,useEffect:Ri,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ni(4194308,4,Bi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ni(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ni(4,2,e,t)},useMemo:function(e,t){var n=bi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ki.bind(null,si,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},bi().memoizedState=e},useState:Ai,useDebugValue:Ui,useDeferredValue:function(e){return bi().memoizedState=e},useTransition:function(){var e=Ai(!1),t=e[0];return e=Vi.bind(null,e[1]),bi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=si,o=bi();if(aa){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Cl)throw Error(a(349));30&ii||_i(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ri(Oi.bind(null,r,i,e),[e]),r.flags|=2048,Ti(9,Ei.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=bi(),t=Cl.identifierPrefix;if(aa){var n=Jo;t=":"+t+"R"+(n=(Zo&~(1<<32-it(Zo)-1)).toString(32)+n),0<(n=pi++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fi++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Ta,useCallback:$i,useContext:Ta,useEffect:Di,useImperativeHandle:zi,useInsertionEffect:Mi,useLayoutEffect:Fi,useMemo:qi,useReducer:Si,useRef:Ii,useState:function(){return Si(wi)},useDebugValue:Ui,useDeferredValue:function(e){return Hi(vi(),li.memoizedState,e)},useTransition:function(){return[Si(wi)[0],vi().memoizedState]},useMutableSource:ki,useSyncExternalStore:ji,useId:Wi,unstable_isNewReconciler:!1},ts={readContext:Ta,useCallback:$i,useContext:Ta,useEffect:Di,useImperativeHandle:zi,useInsertionEffect:Mi,useLayoutEffect:Fi,useMemo:qi,useReducer:xi,useRef:Ii,useState:function(){return xi(wi)},useDebugValue:Ui,useDeferredValue:function(e){var t=vi();return null===li?t.memoizedState=e:Hi(t,li.memoizedState,e)},useTransition:function(){return[xi(wi)[0],vi().memoizedState]},useMutableSource:ki,useSyncExternalStore:ji,useId:Wi,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=M({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:M({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var os={isMounted:function(e){return!!(e=e._reactInternals)&&$e(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),o=tc(e),a=Ba(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=za(e,a,o))&&(nc(t,e,o,r),Ua(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),o=tc(e),a=Ba(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=za(e,a,o))&&(nc(t,e,o,r),Ua(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),o=Ba(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=za(e,o,r))&&(nc(t,e,r,n),Ua(t,e,r))}};function as(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(o,a))}function is(e,t,n){var r=!1,o=Po,a=t.contextType;return"object"==typeof a&&null!==a?a=Ta(a):(o=No(t)?To:Co.current,a=(r=null!=(r=t.contextTypes))?Io(e,o):Po),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=os,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&os.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ma(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=Ta(a):(a=No(t)?To:Co.current,o.context=Io(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(rs(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&os.enqueueReplaceState(o,o.state,null),qa(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=U(r),r=r.return}while(r);var o=n}catch(a){o="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:o,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ps="function"==typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=Ba(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),ds(0,t)},n}function ms(e,t,n){(n=Ba(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ds(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===Wl?Wl=new Set([this]):Wl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function hs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ps;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=_c.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ba(-1,1)).tag=2,za(n,t,1))),n.lanes|=1),e)}var bs=w.ReactCurrentOwner,vs=!1;function ws(e,t,n,r){t.child=null===e?xa(t,null,n,r):Sa(t,e.child,n,r)}function Ss(e,t,n,r,o){n=n.render;var a=t.ref;return Aa(t,o),r=gi(e,t,n,r,a,o),n=yi(),null===e||vs?(aa&&n&&ta(t),t.flags|=1,ws(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Hs(e,t,o))}function xs(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Ic(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Lc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ks(e,t,a,r,o))}if(a=e.child,!(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(i,r)&&e.ref===t.ref)return Hs(e,t,o)}return t.flags|=1,(e=Nc(a,r)).ref=t.ref,e.return=t,t.child=e}function ks(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref){if(vs=!1,t.pendingProps=r=a,!(e.lanes&o))return t.lanes=e.lanes,Hs(e,t,o);131072&e.flags&&(vs=!0)}}return Es(e,t,n,r,o)}function js(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oo(Nl,Il),Il|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Oo(Nl,Il),Il|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oo(Nl,Il),Il|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Oo(Nl,Il),Il|=r;return ws(e,t,o,n),t.child}function _s(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Es(e,t,n,r,o){var a=No(n)?To:Co.current;return a=Io(t,a),Aa(t,o),n=gi(e,t,n,r,a,o),r=yi(),null===e||vs?(aa&&r&&ta(t),t.flags|=1,ws(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Hs(e,t,o))}function Os(e,t,n,r,o){if(No(n)){var a=!0;Mo(t)}else a=!1;if(Aa(t,o),null===t.stateNode)qs(e,t),is(t,n,r),ls(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ta(c):c=Io(t,c=No(n)?To:Co.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,i,r,c),Da=!1;var p=t.memoizedState;i.state=p,qa(t,r,i,o),l=t.memoizedState,s!==r||p!==l||Ao.current||Da?("function"==typeof u&&(rs(t,n,u,r),l=t.memoizedState),(s=Da||as(t,n,s,r,p,l,c))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Fa(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),i.props=c,d=t.pendingProps,p=i.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ta(l):l=Io(t,l=No(n)?To:Co.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||p!==l)&&ss(t,i,r,l),Da=!1,p=t.memoizedState,i.state=p,qa(t,r,i,o);var m=t.memoizedState;s!==d||p!==m||Ao.current||Da?("function"==typeof f&&(rs(t,n,f,r),m=t.memoizedState),(c=Da||as(t,n,c,r,p,m,l)||!1)?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,m,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,m,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=l,r=c):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ps(e,t,n,r,a,o)}function Ps(e,t,n,r,o,a){_s(e,t);var i=!!(128&t.flags);if(!r&&!i)return o&&Fo(t,n,!1),Hs(e,t,a);r=t.stateNode,bs.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=Sa(t,e.child,null,a),t.child=Sa(t,null,s,a)):ws(e,t,s,a),t.memoizedState=r.state,o&&Fo(t,n,!0),t.child}function Cs(e){var t=e.stateNode;t.pendingContext?Ro(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ro(0,t.context,!1),Ya(e,t.containerInfo)}function As(e,t,n,r,o){return ma(),ha(o),t.flags|=256,ws(e,t,n,r),t.child}var Ts,Is,Ns,Ls,Rs={dehydrated:null,treeContext:null,retryLane:0};function Ds(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ms(e,t,n){var r,o=t.pendingProps,i=ei.current,s=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&i)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Oo(ei,1&i),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},1&o||null===s?s=Dc(l,o,0,null):(s.childLanes=0,s.pendingProps=l),e=Rc(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ds(n),t.memoizedState=Rs,e):Fs(t,l));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,s){if(n)return 256&t.flags?(t.flags&=-257,Bs(e,t,s,r=us(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Dc({mode:"visible",children:r.children},o,0,null),(i=Rc(i,o,s,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,1&t.mode&&Sa(t,e.child,null,s),t.child.memoizedState=Ds(s),t.memoizedState=Rs,i);if(!(1&t.mode))return Bs(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,Bs(e,t,s,r=us(i=Error(a(419)),r,void 0))}if(l=!!(s&e.childLanes),vs||l){if(null!==(r=Cl)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=o&(r.suspendedLanes|s)?0:o)&&o!==i.retryLane&&(i.retryLane=o,Ra(e,o),nc(r,e,o,-1))}return hc(),Bs(e,t,s,r=us(Error(a(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Oc.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,oa=co(o.nextSibling),ra=t,aa=!0,ia=null,null!==e&&(Go[Qo++]=Zo,Go[Qo++]=Jo,Go[Qo++]=Yo,Zo=e.id,Jo=e.overflow,Yo=t),t=Fs(t,r.children),t.flags|=4096,t)}(e,t,l,o,r,i,n);if(s){s=o.fallback,l=t.mode,r=(i=e.child).sibling;var c={mode:"hidden",children:o.children};return 1&l||t.child===i?(o=Nc(i,c)).subtreeFlags=14680064&i.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null),null!==r?s=Nc(r,s):(s=Rc(s,l,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Ds(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Rs,o}return e=(s=e.child).sibling,o=Nc(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Fs(e,t){return(t=Dc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bs(e,t,n,r){return null!==r&&ha(r),Sa(t,e.child,null,n),(e=Fs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function zs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ca(e.return,t,n)}function Us(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function $s(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(ws(e,t,r.children,n),2&(r=ei.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&zs(e,n,t);else if(19===e.tag)zs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oo(ei,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ti(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Us(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ti(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Us(t,!0,n,null,a);break;case"together":Us(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function qs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Dl|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Nc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Nc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Vs(e,t){if(!aa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ws(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ks(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ws(t),null;case 1:case 17:return No(t.type)&&Lo(),Ws(t),null;case 3:return r=t.stateNode,Za(),Eo(Ao),Eo(Co),ri(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(pa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ia&&(ic(ia),ia=null))),Is(e,t),Ws(t),null;case 5:Xa(t);var o=Qa(Ga.current);if(n=t.type,null!==e&&null!=t.stateNode)Ns(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Ws(t),null}if(e=Qa(Wa.current),pa(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[fo]=t,r[mo]=i,e=!!(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(o=0;o<Rr.length;o++)Br(Rr[o],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":Y(r,i),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Br("invalid",r);break;case"textarea":oe(r,i),Br("invalid",r)}for(var l in be(n,i),o=null,i)if(i.hasOwnProperty(l)){var c=i[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==i.suppressHydrationWarning&&Jr(r.textContent,c,e),o=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==i.suppressHydrationWarning&&Jr(r.textContent,c,e),o=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Br("scroll",r)}switch(n){case"input":W(r),X(r,i,!0);break;case"textarea":W(r),ie(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=Xr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[fo]=t,e[mo]=r,Ts(e,t,!1,!1),t.stateNode=e;e:{switch(l=ve(n,r),n){case"dialog":Br("cancel",e),Br("close",e),o=r;break;case"iframe":case"object":case"embed":Br("load",e),o=r;break;case"video":case"audio":for(o=0;o<Rr.length;o++)Br(Rr[o],e);o=r;break;case"source":Br("error",e),o=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),o=r;break;case"details":Br("toggle",e),o=r;break;case"input":Y(e,r),o=Q(e,r),Br("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=M({},r,{value:void 0}),Br("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Br("invalid",e)}for(i in be(n,o),c=o)if(c.hasOwnProperty(i)){var u=c[i];"style"===i?ge(e,u):"dangerouslySetInnerHTML"===i?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===i?"string"==typeof u?("textarea"!==n||""!==u)&&pe(e,u):"number"==typeof u&&pe(e,""+u):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(s.hasOwnProperty(i)?null!=u&&"onScroll"===i&&Br("scroll",e):null!=u&&v(e,i,u,l))}switch(n){case"input":W(e),X(e,r,!1);break;case"textarea":W(e),ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?ne(e,!!r.multiple,i,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Xr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ws(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=Qa(Ga.current),Qa(Wa.current),pa(t)){if(r=t.stateNode,n=t.memoizedProps,r[fo]=t,(i=r.nodeValue!==n)&&null!==(e=ra))switch(e.tag){case 3:Jr(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,!!(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[fo]=t,t.stateNode=r}return Ws(t),null;case 13:if(Eo(ei),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(aa&&null!==oa&&1&t.mode&&!(128&t.flags))fa(),ma(),t.flags|=98560,i=!1;else if(i=pa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));i[fo]=t}else ma(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ws(t),i=!1}else null!==ia&&(ic(ia),ia=null),i=!0;if(!i)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ei.current?0===Ll&&(Ll=3):hc())),null!==t.updateQueue&&(t.flags|=4),Ws(t),null);case 4:return Za(),Is(e,t),null===e&&$r(t.stateNode.containerInfo),Ws(t),null;case 10:return Pa(t.type._context),Ws(t),null;case 19:if(Eo(ei),null===(i=t.memoizedState))return Ws(t),null;if(r=!!(128&t.flags),null===(l=i.rendering))if(r)Vs(i,!1);else{if(0!==Ll||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ti(e))){for(t.flags|=128,Vs(i,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(l=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oo(ei,1&ei.current|2),t.child}e=e.sibling}null!==i.tail&&Ze()>$l&&(t.flags|=128,r=!0,Vs(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ti(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Vs(i,!0),null===i.tail&&"hidden"===i.tailMode&&!l.alternate&&!aa)return Ws(t),null}else 2*Ze()-i.renderingStartTime>$l&&1073741824!==n&&(t.flags|=128,r=!0,Vs(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=i.last)?n.sibling=l:t.child=l,i.last=l)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ze(),t.sibling=null,n=ei.current,Oo(ei,r?1&n|2:1&n),t):(Ws(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Il)&&(Ws(t),6&t.subtreeFlags&&(t.flags|=8192)):Ws(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Gs(e,t){switch(na(t),t.tag){case 1:return No(t.type)&&Lo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Za(),Eo(Ao),Eo(Co),ri(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Xa(t),null;case 13:if(Eo(ei),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));ma()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Eo(ei),null;case 4:return Za(),null;case 10:return Pa(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ts=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Is=function(){},Ns=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Qa(Wa.current);var a,i=null;switch(n){case"input":o=Q(e,o),r=Q(e,r),i=[];break;case"select":o=M({},o,{value:void 0}),r=M({},r,{value:void 0}),i=[];break;case"textarea":o=re(e,o),r=re(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Xr)}for(u in be(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var l=o[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(i||(i=[]),i.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(i=i||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(i=i||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Br("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Qs=!1,Ys=!1,Zs="function"==typeof WeakSet?WeakSet:Set,Js=null;function Xs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){jc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){jc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&el(t,n,a)}o=o.next}while(o!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ol(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fo],delete t[mo],delete t[go],delete t[yo],delete t[bo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function il(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||il(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Xr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function pl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(ot,n)}catch(s){}switch(n.tag){case 5:Ys||Xs(n,t);case 6:var r=ul,o=dl;ul=null,pl(e,t,n),dl=o,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?lo(e.parentNode,n):1===e.nodeType&&lo(e,n),$t(e)):lo(ul,n.stateNode));break;case 4:r=ul,o=dl,ul=n.stateNode.containerInfo,dl=!0,pl(e,t,n),ul=r,dl=o;break;case 0:case 11:case 14:case 15:if(!Ys&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(2&a||4&a)&&el(n,t,i),o=o.next}while(o!==r)}pl(e,t,n);break;case 1:if(!Ys&&(Xs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){jc(n,t,s)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,pl(e,t,n),Ys=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Zs),t.forEach((function(t){var r=Pc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function hl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(a(160));fl(i,s,o),ul=null,dl=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(u){jc(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hl(t,e),yl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(g){jc(e,e.return,g)}try{nl(5,e,e.return)}catch(g){jc(e,e.return,g)}}break;case 1:hl(t,e),yl(e),512&r&&null!==n&&Xs(n,n.return);break;case 5:if(hl(t,e),yl(e),512&r&&null!==n&&Xs(n,n.return),32&e.flags){var o=e.stateNode;try{pe(o,"")}catch(g){jc(e,e.return,g)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,s=null!==n?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===i.type&&null!=i.name&&Z(o,i),ve(l,s);var u=ve(l,i);for(s=0;s<c.length;s+=2){var d=c[s],p=c[s+1];"style"===d?ge(o,p):"dangerouslySetInnerHTML"===d?de(o,p):"children"===d?pe(o,p):v(o,d,p,u)}switch(l){case"input":J(o,i);break;case"textarea":ae(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var m=i.value;null!=m?ne(o,!!i.multiple,m,!1):f!==!!i.multiple&&(null!=i.defaultValue?ne(o,!!i.multiple,i.defaultValue,!0):ne(o,!!i.multiple,i.multiple?[]:"",!1))}o[mo]=i}catch(g){jc(e,e.return,g)}}break;case 6:if(hl(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(a(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){jc(e,e.return,g)}}break;case 3:if(hl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{$t(t.containerInfo)}catch(g){jc(e,e.return,g)}break;case 4:default:hl(t,e),yl(e);break;case 13:hl(t,e),yl(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Ul=Ze())),4&r&&ml(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ys=(u=Ys)||d,hl(t,e),Ys=u):hl(t,e),yl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Js=e,d=e.child;null!==d;){for(p=Js=d;null!==Js;){switch(m=(f=Js).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:Xs(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(g){jc(r,n,g)}}break;case 5:Xs(f,f.return);break;case 22:if(null!==f.memoizedState){Sl(p);continue}}null!==m?(m.return=f,Js=m):Sl(p)}d=d.sibling}e:for(d=null,p=e;;){if(5===p.tag){if(null===d){d=p;try{o=p.stateNode,u?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(l=p.stateNode,s=null!=(c=p.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=he("display",s))}catch(g){jc(e,e.return,g)}}}else if(6===p.tag){if(null===d)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(g){jc(e,e.return,g)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===e)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;null===p.sibling;){if(null===p.return||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:hl(t,e),yl(e),4&r&&ml(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(il(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(pe(o,""),r.flags&=-33),cl(e,sl(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;ll(e,sl(e),i);break;default:throw Error(a(161))}}catch(s){jc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bl(e,t,n){Js=e,vl(e,t,n)}function vl(e,t,n){for(var r=!!(1&e.mode);null!==Js;){var o=Js,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Qs;if(!i){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Ys;s=Qs;var c=Ys;if(Qs=i,(Ys=l)&&!c)for(Js=o;null!==Js;)l=(i=Js).child,22===i.tag&&null!==i.memoizedState?xl(o):null!==l?(l.return=i,Js=l):xl(o);for(;null!==a;)Js=a,vl(a,t,n),a=a.sibling;Js=o,Qs=s,Ys=c}wl(e)}else 8772&o.subtreeFlags&&null!==a?(a.return=o,Js=a):wl(e)}}function wl(e){for(;null!==Js;){var t=Js;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ys||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ys)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Ha(t,i,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ha(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var p=d.dehydrated;null!==p&&$t(p)}}}break;default:throw Error(a(163))}Ys||512&t.flags&&ol(t)}catch(f){jc(t,t.return,f)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function Sl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function xl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){jc(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){jc(t,o,l)}}var a=t.return;try{ol(t)}catch(l){jc(t,a,l)}break;case 5:var i=t.return;try{ol(t)}catch(l){jc(t,i,l)}}}catch(l){jc(t,t.return,l)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var kl,jl=Math.ceil,_l=w.ReactCurrentDispatcher,El=w.ReactCurrentOwner,Ol=w.ReactCurrentBatchConfig,Pl=0,Cl=null,Al=null,Tl=0,Il=0,Nl=_o(0),Ll=0,Rl=null,Dl=0,Ml=0,Fl=0,Bl=null,zl=null,Ul=0,$l=1/0,ql=null,Hl=!1,Vl=null,Wl=null,Kl=!1,Gl=null,Ql=0,Yl=0,Zl=null,Jl=-1,Xl=0;function ec(){return 6&Pl?Ze():-1!==Jl?Jl:Jl=Ze()}function tc(e){return 1&e.mode?2&Pl&&0!==Tl?Tl&-Tl:null!==ga.transition?(0===Xl&&(Xl=ht()),Xl):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function nc(e,t,n,r){if(50<Yl)throw Yl=0,Zl=null,Error(a(185));yt(e,n,r),2&Pl&&e===Cl||(e===Cl&&(!(2&Pl)&&(Ml|=n),4===Ll&&sc(e,Tl)),rc(e,r),1===n&&0===Pl&&!(1&t.mode)&&($l=Ze()+500,zo&&qo()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-it(a),s=1<<i,l=o[i];-1===l?s&n&&!(s&r)||(o[i]=ft(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=pt(e,e===Cl?Tl:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){zo=!0,$o(e)}(lc.bind(null,e)):$o(lc.bind(null,e)),io((function(){!(6&Pl)&&qo()})),n=null;else{switch(wt(r)){case 1:n=Xe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Cc(n,oc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function oc(e,t){if(Jl=-1,Xl=0,6&Pl)throw Error(a(327));var n=e.callbackNode;if(xc()&&e.callbackNode!==n)return null;var r=pt(e,e===Cl?Tl:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=gc(e,r);else{t=r;var o=Pl;Pl|=2;var i=mc();for(Cl===e&&Tl===t||(ql=null,$l=Ze()+500,pc(e,t));;)try{bc();break}catch(l){fc(e,l)}Oa(),_l.current=i,Pl=o,null!==Al?t=0:(Cl=null,Tl=0,t=Ll)}if(0!==t){if(2===t&&(0!==(o=mt(e))&&(r=o,t=ac(e,o))),1===t)throw n=Rl,pc(e,0),sc(e,r),rc(e,Ze()),n;if(6===t)sc(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!sr(a(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=gc(e,r),2===t&&(i=mt(e),0!==i&&(r=i,t=ac(e,i))),1!==t)))throw n=Rl,pc(e,0),sc(e,r),rc(e,Ze()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:Sc(e,zl,ql);break;case 3:if(sc(e,r),(130023424&r)===r&&10<(t=Ul+500-Ze())){if(0!==pt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(Sc.bind(null,e,zl,ql),t);break}Sc(e,zl,ql);break;case 4:if(sc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-it(r);i=1<<s,(s=t[s])>o&&(o=s),r&=~i}if(r=o,10<(r=(120>(r=Ze()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jl(r/1960))-r)){e.timeoutHandle=ro(Sc.bind(null,e,zl,ql),r);break}Sc(e,zl,ql);break;default:throw Error(a(329))}}}return rc(e,Ze()),e.callbackNode===n?oc.bind(null,e):null}function ac(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(pc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=zl,zl=n,null!==t&&ic(t)),e}function ic(e){null===zl?zl=e:zl.push.apply(zl,e)}function sc(e,t){for(t&=~Fl,t&=~Ml,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(6&Pl)throw Error(a(327));xc();var t=pt(e,0);if(!(1&t))return rc(e,Ze()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=mt(e);0!==r&&(t=r,n=ac(e,r))}if(1===n)throw n=Rl,pc(e,0),sc(e,t),rc(e,Ze()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Sc(e,zl,ql),rc(e,Ze()),null}function cc(e,t){var n=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=n)&&($l=Ze()+500,zo&&qo())}}function uc(e){null!==Gl&&0===Gl.tag&&!(6&Pl)&&xc();var t=Pl;Pl|=1;var n=Ol.transition,r=vt;try{if(Ol.transition=null,vt=1,e)return e()}finally{vt=r,Ol.transition=n,!(6&(Pl=t))&&qo()}}function dc(){Il=Nl.current,Eo(Nl)}function pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Al)for(n=Al.return;null!==n;){var r=n;switch(na(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Lo();break;case 3:Za(),Eo(Ao),Eo(Co),ri();break;case 5:Xa(r);break;case 4:Za();break;case 13:case 19:Eo(ei);break;case 10:Pa(r.type._context);break;case 22:case 23:dc()}n=n.return}if(Cl=e,Al=e=Nc(e.current,null),Tl=Il=t,Ll=0,Rl=null,Fl=Ml=Dl=0,zl=Bl=null,null!==Ia){for(t=0;t<Ia.length;t++)if(null!==(r=(n=Ia[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Ia=null}return e}function fc(e,t){for(;;){var n=Al;try{if(Oa(),oi.current=Ji,ui){for(var r=si.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ui=!1}if(ii=0,ci=li=si=null,di=!1,pi=0,El.current=null,null===n||null===n.return){Ll=1,Rl=t,Al=null;break}e:{var i=e,s=n.return,l=n,c=t;if(t=Tl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,p=d.tag;if(!(1&d.mode||0!==p&&11!==p&&15!==p)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=gs(s);if(null!==m){m.flags&=-257,ys(m,s,l,0,t),1&m.mode&&hs(i,u,t),c=u;var h=(t=m).updateQueue;if(null===h){var g=new Set;g.add(c),t.updateQueue=g}else h.add(c);break e}if(!(1&t)){hs(i,u,t),hc();break e}c=Error(a(426))}else if(aa&&1&l.mode){var y=gs(s);if(null!==y){!(65536&y.flags)&&(y.flags|=256),ys(y,s,l,0,t),ha(cs(c,l));break e}}i=c=cs(c,l),4!==Ll&&(Ll=2),null===Bl?Bl=[i]:Bl.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,$a(i,fs(0,c,t));break e;case 1:l=c;var b=i.type,v=i.stateNode;if(!(128&i.flags||"function"!=typeof b.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==Wl&&Wl.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t,$a(i,ms(i,l,t));break e}}i=i.return}while(null!==i)}wc(n)}catch(w){t=w,Al===n&&null!==n&&(Al=n=n.return);continue}break}}function mc(){var e=_l.current;return _l.current=Ji,null===e?Ji:e}function hc(){0!==Ll&&3!==Ll&&2!==Ll||(Ll=4),null===Cl||!(268435455&Dl)&&!(268435455&Ml)||sc(Cl,Tl)}function gc(e,t){var n=Pl;Pl|=2;var r=mc();for(Cl===e&&Tl===t||(ql=null,pc(e,t));;)try{yc();break}catch(o){fc(e,o)}if(Oa(),Pl=n,_l.current=r,null!==Al)throw Error(a(261));return Cl=null,Tl=0,Ll}function yc(){for(;null!==Al;)vc(Al)}function bc(){for(;null!==Al&&!Qe();)vc(Al)}function vc(e){var t=kl(e.alternate,e,Il);e.memoizedProps=e.pendingProps,null===t?wc(e):Al=t,El.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Gs(n,t)))return n.flags&=32767,void(Al=n);if(null===e)return Ll=6,void(Al=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ks(n,t,Il)))return void(Al=n);if(null!==(t=t.sibling))return void(Al=t);Al=t=e}while(null!==t);0===Ll&&(Ll=5)}function Sc(e,t,n){var r=vt,o=Ol.transition;try{Ol.transition=null,vt=1,function(e,t,n,r){do{xc()}while(null!==Gl);if(6&Pl)throw Error(a(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-it(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,i),e===Cl&&(Al=Cl=null,Tl=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Kl||(Kl=!0,Cc(tt,(function(){return xc(),null}))),i=!!(15990&n.flags),!!(15990&n.subtreeFlags)||i){i=Ol.transition,Ol.transition=null;var s=vt;vt=1;var l=Pl;Pl|=4,El.current=null,function(e,t){if(eo=Ht,fr(e=pr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(S){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,p=e,f=null;t:for(;;){for(var m;p!==n||0!==o&&3!==p.nodeType||(l=s+o),p!==i||0!==r&&3!==p.nodeType||(c=s+r),3===p.nodeType&&(s+=p.nodeValue.length),null!==(m=p.firstChild);)f=p,p=m;for(;;){if(p===e)break t;if(f===n&&++u===o&&(l=s),f===i&&++d===r&&(c=s),null!==(m=p.nextSibling))break;f=(p=f).parentNode}p=m}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Ht=!1,Js=t;null!==Js;)if(e=(t=Js).child,1028&t.subtreeFlags&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var g=h.memoizedProps,y=h.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(a(163))}}catch(S){jc(t,t.return,S)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}h=tl,tl=!1}(e,n),gl(n,e),mr(to),Ht=!!eo,to=eo=null,e.current=n,bl(n,e,o),Ye(),Pl=l,vt=s,Ol.transition=i}else e.current=n;if(Kl&&(Kl=!1,Gl=e,Ql=o),i=e.pendingLanes,0===i&&(Wl=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(ot,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),rc(e,Ze()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Hl)throw Hl=!1,e=Vl,Vl=null,e;!!(1&Ql)&&0!==e.tag&&xc(),i=e.pendingLanes,1&i?e===Zl?Yl++:(Yl=0,Zl=e):Yl=0,qo()}(e,t,n,r)}finally{Ol.transition=o,vt=r}return null}function xc(){if(null!==Gl){var e=wt(Ql),t=Ol.transition,n=vt;try{if(Ol.transition=null,vt=16>e?16:e,null===Gl)var r=!1;else{if(e=Gl,Gl=null,Ql=0,6&Pl)throw Error(a(331));var o=Pl;for(Pl|=4,Js=e.current;null!==Js;){var i=Js,s=i.child;if(16&Js.flags){var l=i.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Js=u;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:nl(8,d,i)}var p=d.child;if(null!==p)p.return=d,Js=p;else for(;null!==Js;){var f=(d=Js).sibling,m=d.return;if(al(d),d===u){Js=null;break}if(null!==f){f.return=m,Js=f;break}Js=m}}}var h=i.alternate;if(null!==h){var g=h.child;if(null!==g){h.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Js=i}}if(2064&i.subtreeFlags&&null!==s)s.return=i,Js=s;else e:for(;null!==Js;){if(2048&(i=Js).flags)switch(i.tag){case 0:case 11:case 15:nl(9,i,i.return)}var b=i.sibling;if(null!==b){b.return=i.return,Js=b;break e}Js=i.return}}var v=e.current;for(Js=v;null!==Js;){var w=(s=Js).child;if(2064&s.subtreeFlags&&null!==w)w.return=s,Js=w;else e:for(s=v;null!==Js;){if(2048&(l=Js).flags)try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(x){jc(l,l.return,x)}if(l===s){Js=null;break e}var S=l.sibling;if(null!==S){S.return=l.return,Js=S;break e}Js=l.return}}if(Pl=o,qo(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(ot,e)}catch(x){}r=!0}return r}finally{vt=n,Ol.transition=t}}return!1}function kc(e,t,n){e=za(e,t=fs(0,t=cs(n,t),1),1),t=ec(),null!==e&&(yt(e,1,t),rc(e,t))}function jc(e,t,n){if(3===e.tag)kc(e,e,n);else for(;null!==t;){if(3===t.tag){kc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Wl||!Wl.has(r))){t=za(t,e=ms(t,e=cs(n,e),1),1),e=ec(),null!==t&&(yt(t,1,e),rc(t,e));break}}t=t.return}}function _c(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Cl===e&&(Tl&n)===n&&(4===Ll||3===Ll&&(130023424&Tl)===Tl&&500>Ze()-Ul?pc(e,0):Fl|=n),rc(e,t)}function Ec(e,t){0===t&&(1&e.mode?(t=ut,!(130023424&(ut<<=1))&&(ut=4194304)):t=1);var n=ec();null!==(e=Ra(e,t))&&(yt(e,t,n),rc(e,n))}function Oc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ec(e,n)}function Pc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Ec(e,n)}function Cc(e,t){return Ke(e,t)}function Ac(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tc(e,t,n,r){return new Ac(e,t,n,r)}function Ic(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Nc(e,t){var n=e.alternate;return null===n?((n=Tc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Lc(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)Ic(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case k:return Rc(n.children,o,i,t);case j:s=8,o|=8;break;case _:return(e=Tc(12,n,t,2|o)).elementType=_,e.lanes=i,e;case C:return(e=Tc(13,n,t,o)).elementType=C,e.lanes=i,e;case A:return(e=Tc(19,n,t,o)).elementType=A,e.lanes=i,e;case N:return Dc(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:s=10;break e;case O:s=9;break e;case P:s=11;break e;case T:s=14;break e;case I:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Tc(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Rc(e,t,n,r){return(e=Tc(7,e,r,t)).lanes=n,e}function Dc(e,t,n,r){return(e=Tc(22,e,r,t)).elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function Mc(e,t,n){return(e=Tc(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Tc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function zc(e,t,n,r,o,a,i,s,l){return e=new Bc(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Tc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ma(a),e}function Uc(e){if(!e)return Po;e:{if($e(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(No(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(No(n))return Do(e,n,t)}return t}function $c(e,t,n,r,o,a,i,s,l){return(e=zc(n,r,!0,e,0,a,0,s,l)).context=Uc(null),n=e.current,(a=Ba(r=ec(),o=tc(n))).callback=null!=t?t:null,za(n,a,o),e.current.lanes=o,yt(e,o,r),rc(e,r),e}function qc(e,t,n,r){var o=t.current,a=ec(),i=tc(o);return n=Uc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ba(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=za(o,t,i))&&(nc(e,o,i,a),Ua(e,o,i)),i}function Hc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Wc(e,t){Vc(e,t),(e=e.alternate)&&Vc(e,t)}kl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ao.current)vs=!0;else{if(!(e.lanes&n||128&t.flags))return vs=!1,function(e,t,n){switch(t.tag){case 3:Cs(t),ma();break;case 5:Ja(t);break;case 1:No(t.type)&&Mo(t);break;case 4:Ya(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Oo(ka,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Oo(ei,1&ei.current),t.flags|=128,null):n&t.child.childLanes?Ms(e,t,n):(Oo(ei,1&ei.current),null!==(e=Hs(e,t,n))?e.sibling:null);Oo(ei,1&ei.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return $s(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Oo(ei,ei.current),r)break;return null;case 22:case 23:return t.lanes=0,js(e,t,n)}return Hs(e,t,n)}(e,t,n);vs=!!(131072&e.flags)}else vs=!1,aa&&1048576&t.flags&&ea(t,Ko,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qs(e,t),e=t.pendingProps;var o=Io(t,Co.current);Aa(t,n),o=gi(null,t,r,e,o,n);var i=yi();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,No(r)?(i=!0,Mo(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ma(t),o.updater=os,t.stateNode=o,o._reactInternals=t,ls(t,r,e,n),t=Ps(null,t,r,!0,i,n)):(t.tag=0,aa&&i&&ta(t),ws(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qs(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Ic(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===T)return 14}return 2}(r),e=ns(r,e),o){case 0:t=Es(null,t,r,e,n);break e;case 1:t=Os(null,t,r,e,n);break e;case 11:t=Ss(null,t,r,e,n);break e;case 14:t=xs(null,t,r,ns(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Es(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 1:return r=t.type,o=t.pendingProps,Os(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 3:e:{if(Cs(t),null===e)throw Error(a(387));r=t.pendingProps,o=(i=t.memoizedState).element,Fa(e,t),qa(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=As(e,t,r,n,o=cs(Error(a(423)),t));break e}if(r!==o){t=As(e,t,r,n,o=cs(Error(a(424)),t));break e}for(oa=co(t.stateNode.containerInfo.firstChild),ra=t,aa=!0,ia=null,n=xa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ma(),r===o){t=Hs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return Ja(t),null===e&&ua(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,no(r,o)?s=null:null!==i&&no(r,i)&&(t.flags|=32),_s(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&ua(t),null;case 13:return Ms(e,t,n);case 4:return Ya(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Sa(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ss(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Oo(ka,r._currentValue),r._currentValue=s,null!==i)if(sr(i.value,s)){if(i.children===o.children&&!Ao.current){t=Hs(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var l=i.dependencies;if(null!==l){s=i.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===i.tag){(c=Ba(-1,n&-n)).tag=2;var u=i.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,null!==(c=i.alternate)&&(c.lanes|=n),Ca(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===i.tag)s=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(s=i.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Ca(s,n,t),s=i.sibling}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===t){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}ws(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Aa(t,n),r=r(o=Ta(o)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return o=ns(r=t.type,t.pendingProps),xs(e,t,r,o=ns(r.type,o),n);case 15:return ks(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ns(r,o),qs(e,t),t.tag=1,No(r)?(e=!0,Mo(t)):e=!1,Aa(t,n),is(t,r,o),ls(t,r,o,n),Ps(null,t,r,!0,e,n);case 19:return $s(e,t,n);case 22:return js(e,t,n)}throw Error(a(156,t.tag))};var Kc="function"==typeof reportError?reportError:function(e){console.error(e)};function Gc(e){this._internalRoot=e}function Qc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jc(){}function Xc(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var s=o;o=function(){var e=Hc(i);s.call(e)}}qc(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=Hc(i);a.call(e)}}var i=$c(t,r,e,0,null,!1,0,"",Jc);return e._reactRootContainer=i,e[ho]=i.current,$r(8===e.nodeType?e.parentNode:e),uc(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=Hc(l);s.call(e)}}var l=zc(e,0,!1,null,0,!1,0,"",Jc);return e._reactRootContainer=l,e[ho]=l.current,$r(8===e.nodeType?e.parentNode:e),uc((function(){qc(t,l,n,r)})),l}(n,t,e,o,r);return Hc(i)}Qc.prototype.render=Gc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));qc(e,t,null,null)},Qc.prototype.unmount=Gc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc((function(){qc(null,e,null,null)})),t[ho]=null}},Qc.prototype.unstable_scheduleHydration=function(e){if(e){var t=jt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&0!==t&&t<Nt[n].priority;n++);Nt.splice(n,0,e),0===n&&Mt(e)}},St=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(bt(t,1|n),rc(t,Ze()),!(6&Pl)&&($l=Ze()+500,qo()))}break;case 13:uc((function(){var t=Ra(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),Wc(e,1)}},xt=function(e){if(13===e.tag){var t=Ra(e,134217728);if(null!==t)nc(t,e,134217728,ec());Wc(e,134217728)}},kt=function(e){if(13===e.tag){var t=tc(e),n=Ra(e,t);if(null!==n)nc(n,e,t,ec());Wc(e,t)}},jt=function(){return vt},_t=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}},xe=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=xo(r);if(!o)throw Error(a(90));K(r),J(r,o)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Pe=cc,Ce=uc;var eu={usingClientEntryPoint:!1,Events:[wo,So,xo,Ee,Oe,cc]},tu={findFiberByHostInstance:vo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{ot=ru.inject(nu),at=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Yc(e))throw Error(a(299));var n=!1,r="",o=Kc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=zc(e,1,!1,null,0,n,0,r,o),e[ho]=t.current,$r(8===e.nodeType?e.parentNode:e),new Gc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!Zc(t))throw Error(a(200));return Xc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yc(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",s=Kc;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=$c(t,null,e,1,null!=n?n:null,o,0,i,s),e[ho]=t.current,$r(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Qc(t)},t.render=function(e,t,n){if(!Zc(t))throw Error(a(200));return Xc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Zc(e))throw Error(a(40));return!!e._reactRootContainer&&(uc((function(){Xc(null,null,e,!1,(function(){e._reactRootContainer=null,e[ho]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return Xc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},5338:(e,t,n)=>{"use strict";var r=n(40961);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},40961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(22551)},30115:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var s,l,c,u;if(Array.isArray(e)){if((s=e.length)!=i.length)return!1;for(l=s;0!=l--;)if(!a(e[l],i[l]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!i.has(l.value[0]))return!1;for(u=e.entries();!(l=u.next()).done;)if(!a(l.value[1],i.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!i.has(l.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((s=e.length)!=i.length)return!1;for(l=s;0!=l--;)if(e[l]!==i[l])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof i.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof i.toString)return e.toString()===i.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(i,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!a(e[c[l]],i[c[l]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return a(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},80545:(e,t,n)=>{"use strict";n.d(t,{mg:()=>X,vd:()=>V});var r=n(63696),o=n(5556),a=n.n(o),i=n(30115),s=n.n(i),l=n(20311),c=n.n(l),u=n(2833),d=n.n(u);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function f(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(o[n]=e[n]);return o}var g={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},y={rel:["amphtml","canonical","alternate"]},b={type:["application/ld+json"]},v={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(g).map((function(e){return g[e]})),S={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(S).reduce((function(e,t){return e[S[t]]=t,e}),{}),k=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},j=function(e){var t=k(e,g.TITLE),n=k(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(function(){return t}));var r=k(e,"defaultTitle");return t||r||void 0},_=function(e){return k(e,"onChangeClientState")||function(){}},E=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return p({},e,t)}),{})},O=function(e,t){return t.filter((function(e){return void 0!==e[g.BASE]})).map((function(e){return e[g.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),o=0;o<r.length;o+=1){var a=r[o].toLowerCase();if(-1!==e.indexOf(a)&&n[a])return t.concat(n)}return t}),[])},P=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var o={};n.filter((function(e){for(var n,a=Object.keys(e),i=0;i<a.length;i+=1){var s=a[i],l=s.toLowerCase();-1===t.indexOf(l)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===l&&"stylesheet"===e[l].toLowerCase()||(n=l),-1===t.indexOf(s)||"innerHTML"!==s&&"cssText"!==s&&"itemprop"!==s||(n=s)}if(!n||!e[n])return!1;var c=e[n].toLowerCase();return r[n]||(r[n]={}),o[n]||(o[n]={}),!r[n][c]&&(o[n][c]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var a=Object.keys(o),i=0;i<a.length;i+=1){var s=a[i],l=p({},r[s],o[s]);r[s]=l}return e}),[]).reverse()},C=function(e,t){if(Array.isArray(e)&&e.length)for(var n=0;n<e.length;n+=1)if(e[n][t])return!0;return!1},A=function(e){return Array.isArray(e)?e.join(""):e},T=function(e,t){return Array.isArray(e)?e.reduce((function(e,n){return function(e,t){for(var n=Object.keys(e),r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1}(n,t)?e.priority.push(n):e.default.push(n),e}),{priority:[],default:[]}):{default:e}},I=function(e,t){var n;return p({},e,((n={})[t]=void 0,n))},N=[g.NOSCRIPT,g.SCRIPT,g.STYLE],L=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},R=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},D=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce((function(t,n){return t[S[n]||n]=e[n],t}),t)},M=function(e,t){return t.map((function(t,n){var o,a=((o={key:n})["data-rh"]=!0,o);return Object.keys(t).forEach((function(e){var n=S[e]||e;"innerHTML"===n||"cssText"===n?a.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:a[n]=t[e]})),r.createElement(e,a)}))},F=function(e,t,n){switch(e){case g.TITLE:return{toComponent:function(){return n=t.titleAttributes,(o={key:e=t.title})["data-rh"]=!0,a=D(n,o),[r.createElement(g.TITLE,a,e)];var e,n,o,a},toString:function(){return function(e,t,n,r){var o=R(n),a=A(t);return o?"<"+e+' data-rh="true" '+o+">"+L(a,r)+"</"+e+">":"<"+e+' data-rh="true">'+L(a,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return D(t)},toString:function(){return R(t)}};default:return{toComponent:function(){return M(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var o=Object.keys(r).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,t){var o=void 0===r[t]?t:t+'="'+L(r[t],n)+'"';return e?e+" "+o:o}),""),a=r.innerHTML||r.cssText||"",i=-1===N.indexOf(e);return t+"<"+e+' data-rh="true" '+o+(i?"/>":">"+a+"</"+e+">")}),"")}(e,t,n)}}}},B=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,a=e.noscriptTags,i=e.styleTags,s=e.title,l=void 0===s?"":s,c=e.titleAttributes,u=e.linkTags,d=e.metaTags,p=e.scriptTags,f={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,o=T(e.metaTags,v),a=T(t,y),i=T(n,b);return{priorityMethods:{toComponent:function(){return[].concat(M(g.META,o.priority),M(g.LINK,a.priority),M(g.SCRIPT,i.priority))},toString:function(){return F(g.META,o.priority,r)+" "+F(g.LINK,a.priority,r)+" "+F(g.SCRIPT,i.priority,r)}},metaTags:o.default,linkTags:a.default,scriptTags:i.default}}(e);f=m.priorityMethods,u=m.linkTags,d=m.metaTags,p=m.scriptTags}return{priority:f,base:F(g.BASE,t,r),bodyAttributes:F("bodyAttributes",n,r),htmlAttributes:F("htmlAttributes",o,r),link:F(g.LINK,u,r),meta:F(g.META,d,r),noscript:F(g.NOSCRIPT,a,r),script:F(g.SCRIPT,p,r),style:F(g.STYLE,i,r),title:F(g.TITLE,{title:l,titleAttributes:c},r)}},z=[],U=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?z:n.instances},add:function(e){(n.canUseDOM?z:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?z:n.instances).indexOf(e);(n.canUseDOM?z:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=B({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},$=r.createContext({}),q=a().shape({setHelmet:a().func,helmetInstances:a().shape({get:a().func,add:a().func,remove:a().func})}),H="undefined"!=typeof document,V=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new U(r.props.context,t.canUseDOM),r}return f(t,e),t.prototype.render=function(){return r.createElement($.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);V.canUseDOM=H,V.propTypes={context:a().shape({helmet:a().shape()}),children:a().node.isRequired},V.defaultProps={context:{}},V.displayName="HelmetProvider";var W=function(e,t){var n,r=document.head||document.querySelector(g.HEAD),o=r.querySelectorAll(e+"[data-rh]"),a=[].slice.call(o),i=[];return t&&t.length&&t.forEach((function(t){var r=document.createElement(e);for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&("innerHTML"===o?r.innerHTML=t.innerHTML:"cssText"===o?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(o,void 0===t[o]?"":t[o]));r.setAttribute("data-rh","true"),a.some((function(e,t){return n=t,r.isEqualNode(e)}))?a.splice(n,1):i.push(r)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return r.appendChild(e)})),{oldTags:a,newTags:i}},K=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),o=r?r.split(","):[],a=[].concat(o),i=Object.keys(t),s=0;s<i.length;s+=1){var l=i[s],c=t[l]||"";n.getAttribute(l)!==c&&n.setAttribute(l,c),-1===o.indexOf(l)&&o.push(l);var u=a.indexOf(l);-1!==u&&a.splice(u,1)}for(var d=a.length-1;d>=0;d-=1)n.removeAttribute(a[d]);o.length===a.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},G=function(e,t){var n=e.baseTag,r=e.htmlAttributes,o=e.linkTags,a=e.metaTags,i=e.noscriptTags,s=e.onChangeClientState,l=e.scriptTags,c=e.styleTags,u=e.title,d=e.titleAttributes;K(g.BODY,e.bodyAttributes),K(g.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=A(e)),K(g.TITLE,t)}(u,d);var p={baseTag:W(g.BASE,n),linkTags:W(g.LINK,o),metaTags:W(g.META,a),noscriptTags:W(g.NOSCRIPT,i),scriptTags:W(g.SCRIPT,l),styleTags:W(g.STYLE,c)},f={},m={};Object.keys(p).forEach((function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(f[e]=n),r.length&&(m[e]=p[e].oldTags)})),t&&t(),s(e,f,m)},Q=null,Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).rendered=!1,t}f(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!d()(e,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var e,t,n=this.props.context,r=n.setHelmet,o=null,a=(e=n.helmetInstances.get().map((function(e){var t=p({},e.props);return delete t.context,t})),{baseTag:O(["href"],e),bodyAttributes:E("bodyAttributes",e),defer:k(e,"defer"),encode:k(e,"encodeSpecialCharacters"),htmlAttributes:E("htmlAttributes",e),linkTags:P(g.LINK,["rel","href"],e),metaTags:P(g.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:P(g.NOSCRIPT,["innerHTML"],e),onChangeClientState:_(e),scriptTags:P(g.SCRIPT,["src","innerHTML"],e),styleTags:P(g.STYLE,["cssText"],e),title:j(e),titleAttributes:E("titleAttributes",e),prioritizeSeoTags:C(e,"prioritizeSeoTags")});V.canUseDOM?(t=a,Q&&cancelAnimationFrame(Q),t.defer?Q=requestAnimationFrame((function(){G(t,(function(){Q=null}))})):(G(t),Q=null)):B&&(o=B(a)),r(o)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(r.Component);Y.propTypes={context:q.isRequired},Y.displayName="HelmetDispatcher";var Z=["children"],J=["children"],X=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!s()(I(this.props,"helmetData"),I(e,"helmetData"))},n.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case g.SCRIPT:case g.NOSCRIPT:return{innerHTML:t};case g.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return p({},r,((t={})[n.type]=[].concat(r[n.type]||[],[p({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,o=e.newProps,a=e.newChildProps,i=e.nestedChildren;switch(r.type){case g.TITLE:return p({},o,((t={})[r.type]=i,t.titleAttributes=p({},a),t));case g.BODY:return p({},o,{bodyAttributes:p({},a)});case g.HTML:return p({},o,{htmlAttributes:p({},a)});default:return p({},o,((n={})[r.type]=p({},a),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=p({},t);return Object.keys(e).forEach((function(t){var r;n=p({},n,((r={})[t]=e[t],r))})),n},n.warnOnInvalidChildren=function(e,t){return c()(w.some((function(t){return e.type===t})),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),c()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,o={};return r.Children.forEach(e,(function(e){if(e&&e.props){var r=e.props,a=r.children,i=h(r,Z),s=Object.keys(i).reduce((function(e,t){return e[x[t]||t]=i[t],e}),{}),l=e.type;switch("symbol"==typeof l?l=l.toString():n.warnOnInvalidChildren(e,a),l){case g.FRAGMENT:t=n.mapChildrenToProps(a,t);break;case g.LINK:case g.META:case g.NOSCRIPT:case g.SCRIPT:case g.STYLE:o=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:o,newChildProps:s,nestedChildren:a});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:a})}}})),this.mapArrayTypeChildrenToProps(o,t)},n.render=function(){var e=this.props,t=e.children,n=h(e,J),o=p({},n),a=n.helmetData;return t&&(o=this.mapChildrenToProps(t,o)),!a||a instanceof U||(a=new U(a.context,a.instances)),a?r.createElement(Y,p({},o,{context:a.value,helmetData:void 0})):r.createElement($.Consumer,null,(function(e){return r.createElement(Y,p({},o,{context:e}))}))},t}(r.Component);X.propTypes={base:a().object,bodyAttributes:a().object,children:a().oneOfType([a().arrayOf(a().node),a().node]),defaultTitle:a().string,defer:a().bool,encodeSpecialCharacters:a().bool,htmlAttributes:a().object,link:a().arrayOf(a().object),meta:a().arrayOf(a().object),noscript:a().arrayOf(a().object),onChangeClientState:a().func,script:a().arrayOf(a().object),style:a().arrayOf(a().object),title:a().string,titleAttributes:a().object,titleTemplate:a().string,prioritizeSeoTags:a().bool,helmetData:a().object},X.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},X.displayName="Helmet"},22799:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case h:case l:return e;default:return t}}case o:return t}}}function x(e){return S(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=h,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||S(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return S(e)===c},t.isContextProvider=function(e){return S(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return S(e)===p},t.isFragment=function(e){return S(e)===a},t.isLazy=function(e){return S(e)===g},t.isMemo=function(e){return S(e)===h},t.isPortal=function(e){return S(e)===o},t.isProfiler=function(e){return S(e)===s},t.isStrictMode=function(e){return S(e)===i},t.isSuspense=function(e){return S(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===i||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},t.typeOf=S},44363:(e,t,n)=>{"use strict";e.exports=n(22799)},53259:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}var s=n(63696),l=[],c=[];var u=s.createContext(null);function d(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function p(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var o=d(e[r]);o.loading?t.loading=!0:(t.loaded[r]=o.loaded,t.error=o.error),n.push(o.promise),o.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function f(e,t){return s.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function m(e,t){var d,p;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var m=i({loader:null,loading:null,delay:200,timeout:null,render:f,webpack:null,modules:null},t),h=null;function g(){return h||(h=e(m.loader)),h.promise}return l.push(g),"function"==typeof m.webpack&&c.push((function(){if((0,m.webpack)().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return g()})),p=d=function(t){function n(n){var r;return a(o(o(r=t.call(this,n)||this)),"retry",(function(){r.setState({error:null,loading:!0,timedOut:!1}),h=e(m.loader),r._loadModule()})),g(),r.state={error:h.error,pastDelay:!1,timedOut:!1,loading:h.loading,loaded:h.loaded},r}r(n,t),n.preload=function(){return g()};var i=n.prototype;return i.UNSAFE_componentWillMount=function(){this._loadModule()},i.componentDidMount=function(){this._mounted=!0},i._loadModule=function(){var e=this;if(this.context&&Array.isArray(m.modules)&&m.modules.forEach((function(t){e.context.report(t)})),h.loading){var t=function(t){e._mounted&&e.setState(t)};"number"==typeof m.delay&&(0===m.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){t({pastDelay:!0})}),m.delay)),"number"==typeof m.timeout&&(this._timeout=setTimeout((function(){t({timedOut:!0})}),m.timeout));var n=function(){t({error:h.error,loaded:h.loaded,loading:h.loading}),e._clearTimeouts()};h.promise.then((function(){return n(),null})).catch((function(e){return n(),null}))}},i.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},i._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},i.render=function(){return this.state.loading||this.state.error?s.createElement(m.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?m.render(this.state.loaded,this.props):null},n}(s.Component),a(d,"contextType",u),p}function h(e){return m(d,e)}h.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(p,e)};var g=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return s.createElement(u.Provider,{value:{report:this.props.report}},s.Children.only(this.props.children))},t}(s.Component);function y(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return y(e)}))}h.Capture=g,h.preloadAll=function(){return new Promise((function(e,t){y(l).then(e,t)}))},h.preloadReady=function(){return new Promise((function(e,t){y(c).then(e,e)}))},e.exports=h},22831:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,v:()=>s});var r=n(56347),o=n(58168),a=n(63696);function i(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var o=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return o&&(n.push({route:e,match:o}),e.routes&&i(e.routes,t,n)),o})),n}function s(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?a.createElement(r.dO,n,e.map((function(e,n){return a.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,o.A)({},n,{},t,{route:e})):a.createElement(e.component,(0,o.A)({},n,t,{route:e}))}})}))):null}},54625:(e,t,n)=>{"use strict";n.d(t,{I9:()=>d,Kd:()=>u,N_:()=>y,k2:()=>w});var r=n(56347),o=n(42892),a=n(63696),i=n(31513),s=n(58168),l=n(98587),c=n(11561),u=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.zR)(t.props),t}return(0,o.A)(t,e),t.prototype.render=function(){return a.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(a.Component);var d=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.TM)(t.props),t}return(0,o.A)(t,e),t.prototype.render=function(){return a.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(a.Component);var p=function(e,t){return"function"==typeof e?e(t):e},f=function(e,t){return"string"==typeof e?(0,i.yJ)(e,null,null,t):e},m=function(e){return e},h=a.forwardRef;void 0===h&&(h=m);var g=h((function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=(0,l.A)(e,["innerRef","navigate","onClick"]),c=i.target,u=(0,s.A)({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||c&&"_self"!==c||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=m!==h&&t||n,a.createElement("a",u)}));var y=h((function(e,t){var n=e.component,o=void 0===n?g:n,u=e.replace,d=e.to,y=e.innerRef,b=(0,l.A)(e,["component","replace","to","innerRef"]);return a.createElement(r.XZ.Consumer,null,(function(e){e||(0,c.A)(!1);var n=e.history,r=f(p(d,e.location),e.location),l=r?n.createHref(r):"",g=(0,s.A)({},b,{href:l,navigate:function(){var t=p(d,e.location),r=(0,i.AO)(e.location)===(0,i.AO)(f(t));(u||r?n.replace:n.push)(t)}});return m!==h?g.ref=t||y:g.innerRef=y,a.createElement(o,g)}))})),b=function(e){return e},v=a.forwardRef;void 0===v&&(v=b);var w=v((function(e,t){var n=e["aria-current"],o=void 0===n?"page":n,i=e.activeClassName,u=void 0===i?"active":i,d=e.activeStyle,m=e.className,h=e.exact,g=e.isActive,w=e.location,S=e.sensitive,x=e.strict,k=e.style,j=e.to,_=e.innerRef,E=(0,l.A)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.createElement(r.XZ.Consumer,null,(function(e){e||(0,c.A)(!1);var n=w||e.location,i=f(p(j,n),n),l=i.pathname,O=l&&l.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),P=O?(0,r.B6)(n.pathname,{path:O,exact:h,sensitive:S,strict:x}):null,C=!!(g?g(P,n):P),A="function"==typeof m?m(C):m,T="function"==typeof k?k(C):k;C&&(A=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(A,u),T=(0,s.A)({},T,d));var I=(0,s.A)({"aria-current":C&&o||null,className:A,style:T,to:i},E);return b!==v?I.ref=t||_:I.innerRef=_,a.createElement(y,I)}))}))},56347:(e,t,n)=>{"use strict";n.d(t,{B6:()=>k,Ix:()=>v,W6:()=>I,XZ:()=>b,dO:()=>A,qh:()=>j,zy:()=>N});var r=n(42892),o=n(63696),a=n(5556),i=n.n(a),s=n(31513),l=n(11561),c=n(58168),u=n(35302),d=n.n(u),p=(n(44363),n(98587)),f=(n(4146),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var h=o.createContext||function(e,t){var n,a,s="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",l=function(e){function n(){for(var t,n,r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(t=e.call.apply(e,[this].concat(a))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter((function(t){return t!==e}))},get:function(){return n},set:function(e,t){n=e,r.forEach((function(e){return e(n,t)}))}}),t}(0,r.A)(n,e);var o=n.prototype;return o.getChildContext=function(){var e;return(e={})[s]=this.emitter,e},o.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((a=r)===(i=o)?0!==a||1/a==1/i:a!=a&&i!=i)?n=0:(n="function"==typeof t?t(r,o):f,0!==(n|=0)&&this.emitter.set(e.value,n))}var a,i},o.render=function(){return this.props.children},n}(o.Component);l.childContextTypes=((n={})[s]=i().object.isRequired,n);var c=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(0|e.observedBits)&n&&e.setState({value:e.getValue()})},e}(0,r.A)(n,t);var o=n.prototype;return o.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?f:t},o.componentDidMount=function(){this.context[s]&&this.context[s].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?f:e},o.componentWillUnmount=function(){this.context[s]&&this.context[s].off(this.onUpdate)},o.getValue=function(){return this.context[s]?this.context[s].get():e},o.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(o.Component);return c.contextTypes=((a={})[s]=i().object,a),{Provider:l,Consumer:c}},g=function(e){var t=h();return t.displayName=e,t},y=g("Router-History"),b=g("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}(0,r.A)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return o.createElement(b.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.createElement(y.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.Component);o.Component;o.Component;var w={},S=1e4,x=0;function k(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,a=void 0!==o&&o,i=n.strict,s=void 0!==i&&i,l=n.sensitive,c=void 0!==l&&l;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=w[n]||(w[n]={});if(r[e])return r[e];var o=[],a={regexp:d()(e,o,t),keys:o};return x<S&&(r[e]=a,x++),a}(n,{end:a,strict:s,sensitive:c}),o=r.regexp,i=r.keys,l=o.exec(e);if(!l)return null;var u=l[0],p=l.slice(1),f=e===u;return a&&!f?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:f,params:i.reduce((function(e,t,n){return e[t.name]=p[n],e}),{})}}),null)}var j=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return o.createElement(b.Consumer,null,(function(t){t||(0,l.A)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?k(n.pathname,e.props):t.match,a=(0,c.A)({},t,{location:n,match:r}),i=e.props,s=i.children,u=i.component,d=i.render;return Array.isArray(s)&&function(e){return 0===o.Children.count(e)}(s)&&(s=null),o.createElement(b.Provider,{value:a},a.match?s?"function"==typeof s?s(a):s:u?o.createElement(u,a):d?d(a):null:"function"==typeof s?s(a):null)}))},t}(o.Component);function _(e){return"/"===e.charAt(0)?e:"/"+e}function E(e,t){if(!e)return t;var n=_(e);return 0!==t.pathname.indexOf(n)?t:(0,c.A)({},t,{pathname:t.pathname.substr(n.length)})}function O(e){return"string"==typeof e?e:(0,s.AO)(e)}function P(e){return function(){(0,l.A)(!1)}}function C(){}o.Component;var A=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return o.createElement(b.Consumer,null,(function(t){t||(0,l.A)(!1);var n,r,a=e.props.location||t.location;return o.Children.forEach(e.props.children,(function(e){if(null==r&&o.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?k(a.pathname,(0,c.A)({},e.props,{path:i})):t.match}})),r?o.cloneElement(n,{location:a,computedMatch:r}):null}))},t}(o.Component);var T=o.useContext;function I(){return T(y)}function N(){return T(b).location}},7463:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>a(l,n))c<o&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,p=null,f=3,m=!1,h=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function S(e){if(g=!1,w(e),!h)if(null!==r(c))h=!0,N(x);else{var t=r(u);null!==t&&L(S,t.startTime-e)}}function x(e,n){h=!1,g&&(g=!1,b(E),E=-1),m=!0;var a=f;try{for(w(n),p=r(c);null!==p&&(!(p.expirationTime>n)||e&&!C());){var i=p.callback;if("function"==typeof i){p.callback=null,f=p.priorityLevel;var s=i(p.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?p.callback=s:p===r(c)&&o(c),w(n)}else o(c);p=r(c)}if(null!==p)var l=!0;else{var d=r(u);null!==d&&L(S,d.startTime-n),l=!1}return l}finally{p=null,f=a,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,j=!1,_=null,E=-1,O=5,P=-1;function C(){return!(t.unstable_now()-P<O)}function A(){if(null!==_){var e=t.unstable_now();P=e;var n=!0;try{n=_(!0,e)}finally{n?k():(j=!1,_=null)}}else j=!1}if("function"==typeof v)k=function(){v(A)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,I=T.port2;T.port1.onmessage=A,k=function(){I.postMessage(null)}}else k=function(){y(A,0)};function N(e){_=e,j||(j=!0,k())}function L(e,n){E=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){h||m||(h=!0,N(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,o,a){var i=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?i+a:i:a=i,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>i?(e.sortIndex=a,n(u,e),null===r(c)&&e===r(u)&&(g?(b(E),E=-1):g=!0,L(S,a-i))):(e.sortIndex=s,n(c,e),h||m||(h=!0,N(x))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},69982:(e,t,n)=>{"use strict";e.exports=n(7463)},2833:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}},4784:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={title:"Docusaurus JSON Schema Plugin",tagline:"JSON Schema plugin viewer / editor in Docusaurus",url:"https://jy95.github.io",baseUrl:"/docusaurus-json-schema-plugin/",onBrokenLinks:"throw",onBrokenMarkdownLinks:"warn",favicon:"img/favicon.ico",trailingSlash:!1,organizationName:"jy95",projectName:"docusaurus-json-schema-plugin",themeConfig:{algolia:{appId:"IQ028YCDJT",apiKey:"8bd1d98fae984449f5cc44eed58ddb2d",indexName:"jy95io",contextualSearch:!0,searchParameters:{},searchPagePath:"search"},navbar:{title:"JSON Schema viewer / editor",logo:{alt:"My Site Logo",src:"img/project_icon.svg"},items:[{to:"docs/demo/",activeBasePath:"docs",label:"Demos",position:"left"},{to:"playground",label:"Playground",position:"left"},{label:"Github",position:"right",to:"https://github.com/jy95/docusaurus-json-schema-plugin"}],hideOnScroll:!1},footer:{style:"dark",links:[],copyright:"Copyright \xa9 2025. Built with Docusaurus."},prism:{additionalLanguages:["json","json5"],theme:{plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},blog:{sidebar:{groupByYear:!0}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},presets:[["@docusaurus/preset-classic",{docs:{remarkPlugins:[[null,{sync:!0}]],sidebarPath:"/home/runner/work/docusaurus-json-schema-plugin/docusaurus-json-schema-plugin/testsite/sidebars.js",editUrl:"https://github.com/jy95/docusaurus-json-schema-plugin/tree/main/testsite/"},blog:!1,theme:{customCss:"/home/runner/work/docusaurus-json-schema-plugin/docusaurus-json-schema-plugin/testsite/src/css/custom.css"}}]],themes:[["docusaurus-json-schema-plugin",{}]],plugins:[null],baseUrlIssueBanner:!0,i18n:{defaultLocale:"en",path:"i18n",locales:["en"],localeConfigs:{}},future:{experimental_faster:{swcJsLoader:!1,swcJsMinimizer:!1,swcHtmlMinimizer:!1,lightningCssMinimizer:!1,mdxCrossCompilerCache:!1,rspackBundler:!1},experimental_storage:{type:"localStorage",namespace:!1},experimental_router:"browser"},onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},scripts:[],headTags:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1,markdown:{format:"mdx",mermaid:!1,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0},anchors:{maintainCase:!1}}}},58168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},42892:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>o})},98587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},34164:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}n.d(t,{A:()=>o});const o=function(){for(var e,t,n=0,o="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}},71765:(e,t,n)=>{"use strict";n.d(t,{My:()=>S,f4:()=>Y});var r,o,a=n(63696),i=n(34164),s=Object.create,l=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,m=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,y=(e,t,n)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b=(e,t)=>{for(var n in t||(t={}))h.call(t,n)&&y(e,n,t[n]);if(f)for(var n of f(t))g.call(t,n)&&y(e,n,t[n]);return e},v=(e,t)=>c(e,d(t)),w=(e,t)=>{var n={};for(var r in e)h.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&f)for(var r of f(e))t.indexOf(r)<0&&g.call(e,r)&&(n[r]=e[r]);return n},S=((e,t,n)=>(n=null!=e?s(m(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of p(t))h.call(e,o)||o===n||l(e,o,{get:()=>t[o],enumerable:!(r=u(t,o))||r.enumerable});return e})(!t&&e&&e.__esModule?n:l(n,"default",{value:e,enumerable:!0}),e)))((r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var o,a;switch(n=n||{},r.util.type(t)){case"Object":if(a=r.util.objId(t),n[a])return n[a];for(var i in o={},n[a]=o,t)t.hasOwnProperty(i)&&(o[i]=e(t[i],n));return o;case"Array":return a=r.util.objId(t),n[a]?n[a]:(o=[],n[a]=o,t.forEach((function(t,r){o[r]=e(t,n)})),o);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var o in t)n[o]=t[o];return n},insertBefore:function(e,t,n,o){var a=(o=o||r.languages)[e],i={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=a[s])}var c=o[e];return o[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,o,a){a=a||{};var i=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],o||s);var l=t[s],c=r.util.type(l);"Object"!==c||a[i(l)]?"Array"!==c||a[i(l)]||(a[i(l)]=!0,e(l,n,s,a)):(a[i(l)]=!0,e(l,n,null,a))}}},plugins:{},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",a),!a.grammar)throw new Error('The language "'+a.language+'" has no grammar.');return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run("after-tokenize",a),o.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new s;return l(o,o.head,e),i(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var o,a=0;o=n[a++];)o(t)}},Token:o};function o(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function i(e,t,n,s,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var m=0;m<f.length;++m){if(d&&d.cause==p+","+m)return;var h=f[m],g=h.inside,y=!!h.lookbehind,b=!!h.greedy,v=h.alias;if(b&&!h.pattern.global){var w=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,w+"g")}for(var S=h.pattern||h,x=s.next,k=u;x!==t.tail&&!(d&&k>=d.reach);k+=x.value.length,x=x.next){var j=x.value;if(t.length>e.length)return;if(!(j instanceof o)){var _,E=1;if(b){if(!(_=a(S,k,e,y))||_.index>=e.length)break;var O=_.index,P=_.index+_[0].length,C=k;for(C+=x.value.length;O>=C;)C+=(x=x.next).value.length;if(k=C-=x.value.length,x.value instanceof o)continue;for(var A=x;A!==t.tail&&(C<P||"string"==typeof A.value);A=A.next)E++,C+=A.value.length;E--,j=e.slice(k,C),_.index-=k}else if(!(_=a(S,0,j,y)))continue;O=_.index;var T=_[0],I=j.slice(0,O),N=j.slice(O+T.length),L=k+j.length;d&&L>d.reach&&(d.reach=L);var R=x.prev;if(I&&(R=l(t,R,I),k+=I.length),c(t,R,E),x=l(t,R,new o(p,g?r.tokenize(T,g):T,v,T)),N&&l(t,x,N),E>1){var D={cause:p+","+m,reach:L};i(e,t,n,x.prev,k,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}return o.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var o="";return t.forEach((function(t){o+=e(t,n)})),o}var a={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),r.hooks.run("wrap",a);var s="";for(var l in a.attributes)s+=" "+l+'="'+(a.attributes[l]||"").replace(/"/g,""")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+s+">"+a.content+"</"+a.tag+">"},r}();t.exports=n,n.default=n}},function(){return o||(0,r[p(r)[0]])((o={exports:{}}).exports,o),o.exports})());S.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},S.languages.markup.tag.inside["attr-value"].inside.entity=S.languages.markup.entity,S.languages.markup.doctype.inside["internal-subset"].inside=S.languages.markup,S.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(S.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:S.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:S.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},S.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(S.languages.markup.tag,"addAttribute",{value:function(e,t){S.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:S.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),S.languages.html=S.languages.markup,S.languages.mathml=S.languages.markup,S.languages.svg=S.languages.markup,S.languages.xml=S.languages.extend("markup",{}),S.languages.ssml=S.languages.xml,S.languages.atom=S.languages.xml,S.languages.rss=S.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",o=(r=RegExp(r+"-"+r),{pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"});e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(S),S.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},S.languages.javascript=S.languages.extend("clike",{"class-name":[S.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),S.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,S.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:S.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:S.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:S.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:S.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:S.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),S.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:S.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),S.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),S.languages.markup&&(S.languages.markup.tag.addInlined("script","javascript"),S.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),S.languages.js=S.languages.javascript,S.languages.actionscript=S.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),S.languages.actionscript["class-name"].alias="function",delete S.languages.actionscript.parameter,delete S.languages.actionscript["literal-property"],S.languages.markup&&S.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:S.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(S),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},o="doc-comment";if(a=e.languages[t]){var a,i=a[o];if((i=i||(a=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[o])instanceof RegExp&&(i=a[o]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s<l;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),r(i[s]);else r(i)}}))}}),t.addSupport(["java","javascript","php"],t)}(S),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;(t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup))&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(S),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(S),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(S),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o,a=t[n];"code"!==a.type?e(a.content):(o=a.content[1],a=a.content[3],o&&a&&"code-language"===o.type&&"code-block"===a.type&&"string"==typeof o.content&&(o=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),o="language-"+(o=(/[a-z][\w-]*/i.exec(o)||[""])[0].toLowerCase()),a.alias?"string"==typeof a.alias?a.alias=[a.alias,o]:a.alias.push(o):a.alias=[o]))}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var a=t.classes[r];if(a=/language-(.+)/.exec(a)){n=a[1];break}}var c,u=e.languages[n];u?t.content=e.highlight(t.content.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e})),u,n):n&&"none"!==n&&e.plugins.autoloader&&(c="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})))}})),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(S),S.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:S.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},S.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var o=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var a=p(/^\($/,/^\)$/);if(-1===a)continue;for(;n<a;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),o.push(i.content))}n=a+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),0<o.length)){var s=p(/^\{$/,/^\}$/);if(-1!==s)for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&0<=o.indexOf(c.content)&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function p(e,r){for(var o=1,a=n;a<t.length;a++){var i=t[a],s=i.content;if("punctuation"===i.type&&"string"==typeof s)if(e.test(s))o++;else if(r.test(s)&&0==--o)return a}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),S.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function l(t,n,i){var l=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),c=0,u={},d=(l=s(l.map((function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=c++,n="___"+i.toUpperCase()+"_"+r+"___")););return u[n]=e,n})).join(""),n,i),Object.keys(u));return c=0,function t(n){for(var a=0;a<n.length;a++){if(c>=d.length)return;var i,l,p,f,m,h,g,y=n[a];"string"==typeof y||"string"==typeof y.content?(i=d[c],-1!==(g=(h="string"==typeof y?y:y.content).indexOf(i))&&(++c,l=h.substring(0,g),m=u[i],p=void 0,(f={})["interpolation-punctuation"]=o,3===(f=e.tokenize(m,f)).length&&((p=[1,1]).push.apply(p,s(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,m),f=h.substring(g+i.length),m=[],l&&m.push(l),m.push(p),f&&(t(h=[f]),m.push.apply(m,h)),"string"==typeof y?(n.splice.apply(n,[a,1].concat(m)),a+=m.length-1):y.content=m)):(g=y.content,Array.isArray(g)?t(g):t([g]))}}(l),new e.Token(i,l,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(u).join(""):u(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in c&&function t(n){for(var r=0,o=n.length;r<o;r++){var a,i,s,c=n[r];"string"!=typeof c&&(a=c.content,Array.isArray(a)?"template-string"===c.type?(c=a[1],3===a.length&&"string"!=typeof c&&"embedded-code"===c.type&&(i=u(c),c=c.alias,c=Array.isArray(c)?c[0]:c,s=e.languages[c])&&(a[1]=l(i,s,c))):t(a):"string"!=typeof a&&t([a]))}}(t.tokens)}))}(S),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(S),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(S),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(S),S.languages.n4js=S.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),S.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),S.languages.n4jsd=S.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var o=n[r],a=e.languages.javascript[o];o=(a="RegExp"===e.util.type(a)?e.languages.javascript[o]={pattern:a}:a).inside||{};(a.inside=o)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(S),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return o})),RegExp(e,t)}function i(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],a=!1;"string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===s(o.content[0].content[1])&&n.pop():"/>"!==o.content[o.content.length-1].content&&n.push({tagName:s(o.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&0<n.length&&0===n[n.length-1].openedBraces&&(a=s(o),r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(a+=s(t[r+1]),t.splice(r+1,1)),0<r&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(a=s(t[r-1])+a,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",a,null,a)),o.content&&"string"!=typeof o.content&&i(o.content)}}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)}))}(S),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(S),S.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},S.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=S.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(S),S.languages.c=S.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),S.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),S.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},S.languages.c.string],char:S.languages.c.char,comment:S.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:S.languages.c}}}}),S.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete S.languages.c.boolean,S.languages.objectivec=S.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete S.languages.objectivec["class-name"],S.languages.objc=S.languages.objectivec,S.languages.reason=S.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),S.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete S.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(S),S.languages.go=S.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),S.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete S.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(S),S.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},S.languages.python["string-interpolation"].inside.interpolation.inside.rest=S.languages.python,S.languages.py=S.languages.python,S.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},S.languages.webmanifest=S.languages.json;((e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0})})({},{dracula:()=>x,duotoneDark:()=>k,duotoneLight:()=>j,github:()=>_,gruvboxMaterialDark:()=>$,gruvboxMaterialLight:()=>q,jettwaveDark:()=>F,jettwaveLight:()=>B,nightOwl:()=>E,nightOwlLight:()=>O,oceanicNext:()=>A,okaidia:()=>T,oneDark:()=>z,oneLight:()=>U,palenight:()=>I,shadesOfPurple:()=>N,synthwave84:()=>L,ultramin:()=>R,vsDark:()=>D,vsLight:()=>M});var x={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},k={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},j={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},_={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},E={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},O={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},P="#c5a5c5",C="#8dc891",A={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:P}},{types:["attr-value"],style:{color:C}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:C}},{types:["punctuation"],style:{color:C}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:P}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},T={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},I={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},N={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},L={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},R={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},D={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},M={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},F={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},B={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},z={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},U={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},$={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},q={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},H=/\r\n|\r|\n/,V=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},W=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},K=e=>{const t=[[]],n=[e],r=[0],o=[e.length];let a=0,i=0,s=[];const l=[s];for(;i>-1;){for(;(a=r[i]++)<o[i];){let e,c=t[i];const u=n[i][a];if("string"==typeof u?(c=i>0?c:["plain"],e=u):(c=W(c,u.type),u.alias&&(c=W(c,u.alias)),e=u.content),"string"!=typeof e){i++,t.push(c),n.push(e),r.push(0),o.push(e.length);continue}const d=e.split(H),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)V(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),o.pop()}return V(s),l},G=(e,t)=>{const{plain:n}=e,r=e.styles.reduce(((e,n)=>{const{languages:r,style:o}=n;return r&&!r.includes(t)||n.types.forEach((t=>{const n=b(b({},e[t]),o);e[t]=n})),e}),{});return r.root=n,r.plain=v(b({},n),{backgroundColor:void 0}),r},Q=({children:e,language:t,code:n,theme:r,prism:o})=>{const s=t.toLowerCase(),l=G(r,s),c=(e=>(0,a.useCallback)((t=>{var n=t,{className:r,style:o,line:a}=n,s=w(n,["className","style","line"]);const l=v(b({},s),{className:(0,i.A)("token-line",r)});return"object"==typeof e&&"plain"in e&&(l.style=e.plain),"object"==typeof o&&(l.style=b(b({},l.style||{}),o)),l}),[e]))(l),u=(e=>{const t=(0,a.useCallback)((({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map((t=>e[t])))}),[e]);return(0,a.useCallback)((e=>{var n=e,{token:r,className:o,style:a}=n,s=w(n,["token","className","style"]);const l=v(b({},s),{className:(0,i.A)("token",...r.types,o),children:r.content,style:t(r)});return null!=a&&(l.style=b(b({},l.style||{}),a)),l}),[t])})(l),d=(({prism:e,code:t,grammar:n,language:r})=>(0,a.useMemo)((()=>{if(null==n)return K([t]);const o={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",o),K(o.tokens)}),[t,n,r,e]))({prism:o,language:s,code:n,grammar:o.languages[s]});return e({tokens:d,className:`prism-code language-${s}`,style:null!=l?l.root:{},getLineProps:c,getTokenProps:u})},Y=e=>(0,a.createElement)(Q,v(b({},e),{prism:e.prism||S,theme:e.theme||D,code:e.code,language:e.language}))},11561:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=!0,o="Invariant failed";function a(e,t){if(!e){if(r)throw new Error(o);var n="function"==typeof t?t():t,a=n?"".concat(o,": ").concat(n):o;throw new Error(a)}}},31635:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>R,__assign:()=>a,__asyncDelegator:()=>_,__asyncGenerator:()=>j,__asyncValues:()=>E,__await:()=>k,__awaiter:()=>m,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>L,__classPrivateFieldSet:()=>N,__createBinding:()=>g,__decorate:()=>s,__disposeResources:()=>M,__esDecorate:()=>c,__exportStar:()=>y,__extends:()=>o,__generator:()=>h,__importDefault:()=>T,__importStar:()=>A,__makeTemplateObject:()=>O,__metadata:()=>f,__param:()=>l,__propKey:()=>d,__read:()=>v,__rest:()=>i,__rewriteRelativeImportExtension:()=>F,__runInitializers:()=>u,__setFunctionName:()=>p,__spread:()=>w,__spreadArray:()=>x,__spreadArrays:()=>S,__values:()=>b,default:()=>B});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),p=!1,f=n.length-1;f>=0;f--){var m={};for(var h in r)m[h]="access"===h?{}:r[h];for(var h in r.access)m.access[h]=r.access[h];m.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var g=(0,n[f])("accessor"===l?{get:d.get,set:d.set}:d[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=i(g.get))&&(d.get=s),(s=i(g.set))&&(d.set=s),(s=i(g.init))&&o.unshift(s)}else(s=i(g))&&("field"===l?o.unshift(s):d[c]=s)}u&&Object.defineProperty(u,r.name,d),p=!0}function u(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{l(r.next(e))}catch(t){a(t)}}function s(e){try{l(r.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))}function h(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(l){s=[6,l],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function y(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function S(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}function x(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function k(e){return this instanceof k?(this.v=e,this):new k(e)}function j(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),r[Symbol.asyncIterator]=function(){return this},r;function i(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof k?Promise.resolve(n.value.v).then(l,c):u(a[0][2],n)}catch(r){u(a[0][3],r)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:k(e[r](t)),done:!1}:o?o(t):t}:o}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},C=function(e){return C=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},C(e)};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=C(e),r=0;r<n.length;r++)"default"!==n[r]&&g(t,e,n[r]);return P(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function I(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function N(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function L(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function R(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var D="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function M(e){function t(t){e.error=e.hasError?new D(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(o,(function(e){return t(e),o()}))}else r|=1}catch(i){t(i)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function F(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,r,o,a){return n?t?".jsx":".js":!r||o&&a?r+o+"."+a.toLowerCase()+"js":e})):e}const B={__extends:o,__assign:a,__rest:i,__decorate:s,__param:l,__esDecorate:c,__runInitializers:u,__propKey:d,__setFunctionName:p,__metadata:f,__awaiter:m,__generator:h,__createBinding:g,__exportStar:y,__values:b,__read:v,__spread:w,__spreadArrays:S,__spreadArray:x,__await:k,__asyncGenerator:j,__asyncDelegator:_,__asyncValues:E,__makeTemplateObject:O,__importStar:A,__importDefault:T,__classPrivateFieldGet:I,__classPrivateFieldSet:N,__classPrivateFieldIn:L,__addDisposableResource:R,__disposeResources:M,__rewriteRelativeImportExtension:F}},22654:e=>{"use strict";e.exports={}},84054:e=>{"use strict";e.exports=JSON.parse('{"/docusaurus-json-schema-plugin/boxFileSchema-f25":{"__comp":"84361440","__context":{"plugin":"a7456010"},"config":"5e9f5e1a"},"/docusaurus-json-schema-plugin/playground-353":{"__comp":"0ce74438","__context":{"plugin":"a7456010"},"config":"5e9f5e1a"},"/docusaurus-json-schema-plugin/search-36e":{"__comp":"1a4e3797","__context":{"plugin":"c141421f"}},"/docusaurus-json-schema-plugin/docs-37f":{"__comp":"5e95c892","__context":{"plugin":"aba21aa0"}},"/docusaurus-json-schema-plugin/docs-246":{"__comp":"a7bd4aaa","__props":"af4dc41c"},"/docusaurus-json-schema-plugin/docs-575":{"__comp":"a94703ab"},"/docusaurus-json-schema-plugin/docs/api-53e":{"__comp":"14eb3368","__props":"808311b0"},"/docusaurus-json-schema-plugin/docs/api/config-58a":{"__comp":"17896441","content":"c3bb5603"},"/docusaurus-json-schema-plugin/docs/api/JSONSchemaEditor-15f":{"__comp":"17896441","content":"d4ff3b58"},"/docusaurus-json-schema-plugin/docs/api/JSONSchemaViewer-48b":{"__comp":"17896441","content":"3af02d98"},"/docusaurus-json-schema-plugin/docs/api/MonacoEditor-0c8":{"__comp":"17896441","content":"08dc474f"},"/docusaurus-json-schema-plugin/docs/category/-array-fe0":{"__comp":"14eb3368","__props":"2bd2a82e"},"/docusaurus-json-schema-plugin/docs/category/\ufe0f-customizations-56f":{"__comp":"14eb3368","__props":"2e4a130b"},"/docusaurus-json-schema-plugin/docs/category/-generic-keywords-a5c":{"__comp":"14eb3368","__props":"03eeee36"},"/docusaurus-json-schema-plugin/docs/category/-numeric-2d1":{"__comp":"14eb3368","__props":"ffca4553"},"/docusaurus-json-schema-plugin/docs/category/-object-b53":{"__comp":"14eb3368","__props":"c09ae39f"},"/docusaurus-json-schema-plugin/docs/category/-references-f27":{"__comp":"14eb3368","__props":"0087a340"},"/docusaurus-json-schema-plugin/docs/category/-schema-composition-b88":{"__comp":"14eb3368","__props":"ee47f93d"},"/docusaurus-json-schema-plugin/docs/category/-schema-conditionally-1bf":{"__comp":"14eb3368","__props":"16bf5a7a"},"/docusaurus-json-schema-plugin/docs/category/-string-56a":{"__comp":"14eb3368","__props":"03b83387"},"/docusaurus-json-schema-plugin/docs/category/-type-bde":{"__comp":"14eb3368","__props":"7f4b4e53"},"/docusaurus-json-schema-plugin/docs/contributing-68d":{"__comp":"17896441","content":"72a427b3"},"/docusaurus-json-schema-plugin/docs/demo-576":{"__comp":"14eb3368","__props":"a9c29fe5"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems1-874":{"__comp":"17896441","content":"f45d2610"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/additionalItems2-e9f":{"__comp":"17896441","content":"09dbd73b"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/contains-ec1":{"__comp":"17896441","content":"e6818ad2"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/items-f60":{"__comp":"17896441","content":"ca1962f0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/length-211":{"__comp":"17896441","content":"a9655ce0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/minContainsAndMaxContains-0af":{"__comp":"17896441","content":"f595544d"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/simple-19f":{"__comp":"17896441","content":"ca1c8d76"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/tuples-408":{"__comp":"17896441","content":"9028850b"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems1-eb8":{"__comp":"17896441","content":"0d2bf170"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/unevaluatedItems2-a1c":{"__comp":"17896441","content":"f37a108b"},"/docusaurus-json-schema-plugin/docs/demo-viewer/array/uniqueItems-2ce":{"__comp":"17896441","content":"9a29e754"},"/docusaurus-json-schema-plugin/docs/demo-viewer/boolean-21d":{"__comp":"17896441","content":"720066b1"},"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/description-c98":{"__comp":"17896441","content":"6713985a"},"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/unsolved_refs-129":{"__comp":"17896441","content":"756e0924"},"/docusaurus-json-schema-plugin/docs/demo-viewer/custom/values-070":{"__comp":"17896441","content":"bb96c887"},"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/annotations-fc3":{"__comp":"17896441","content":"b34a7af0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/const-c56":{"__comp":"17896441","content":"c7088344"},"/docusaurus-json-schema-plugin/docs/demo-viewer/generic_keywords/enum-1e6":{"__comp":"17896441","content":"3d59b95f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/null-79e":{"__comp":"17896441","content":"2cc05f38"},"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/integer-4bc":{"__comp":"17896441","content":"8e80fdd7"},"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/multipleOf-54e":{"__comp":"17896441","content":"39bae550"},"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/number-34d":{"__comp":"17896441","content":"8f9be69b"},"/docusaurus-json-schema-plugin/docs/demo-viewer/numeric/ranges-b09":{"__comp":"17896441","content":"9a079c62"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties-e5f":{"__comp":"17896441","content":"a78d2520"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalProperties2-f08":{"__comp":"17896441","content":"d672ff73"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/additionalPropertiesWithPatternProperties-66d":{"__comp":"17896441","content":"dc7a627d"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/patternProperties-071":{"__comp":"17896441","content":"25efcfba"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/properties-2a2":{"__comp":"17896441","content":"207c73ba"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/propertyNames-abf":{"__comp":"17896441","content":"f149d4e3"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/required-06e":{"__comp":"17896441","content":"6c29c54d"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/simpleObject-6bb":{"__comp":"17896441","content":"4f68d1a6"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/size-8b4":{"__comp":"17896441","content":"dba41c5f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties1-f04":{"__comp":"17896441","content":"ef99d285"},"/docusaurus-json-schema-plugin/docs/demo-viewer/object/unevaluatedProperties2-08e":{"__comp":"17896441","content":"188a43e1"},"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/localFile-1f6":{"__comp":"17896441","content":"0446378f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/ref-5ab":{"__comp":"17896441","content":"93cebb7f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/refs/remoteFile-ae8":{"__comp":"17896441","content":"890ab00c"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/allOf-269":{"__comp":"17896441","content":"73e48de0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/anyOf-4bd":{"__comp":"17896441","content":"4de116f4"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/not-1c7":{"__comp":"17896441","content":"1e804d56"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_composition/oneOf-82b":{"__comp":"17896441","content":"cd537aaf"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired-540":{"__comp":"17896441","content":"8f884ddd"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas-03c":{"__comp":"17896441","content":"f7f7156a"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired-104":{"__comp":"17896441","content":"247662c2"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional-557":{"__comp":"17896441","content":"0d743cca"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/dependentSchemas-c6f":{"__comp":"17896441","content":"458927b5"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else-9c3":{"__comp":"17896441","content":"0ff7d3d9"},"/docusaurus-json-schema-plugin/docs/demo-viewer/schema_conditionally/if-then-else_multiple-fb2":{"__comp":"17896441","content":"6f77199a"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncoding-e86":{"__comp":"17896441","content":"2b403dce"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentEncodingWithContentMediaType-e83":{"__comp":"17896441","content":"9dfa20e1"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentMediaType-3a3":{"__comp":"17896441","content":"5f0f252d"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/contentSchema-7b3":{"__comp":"17896441","content":"bf17fbd2"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/format-4a7":{"__comp":"17896441","content":"a998845c"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/length-1c6":{"__comp":"17896441","content":"5bc82b60"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/pattern-dc1":{"__comp":"17896441","content":"cbc552c0"},"/docusaurus-json-schema-plugin/docs/demo-viewer/string/simple-53f":{"__comp":"17896441","content":"e5bfc516"},"/docusaurus-json-schema-plugin/docs/demo-viewer/type/multipleType-cfb":{"__comp":"17896441","content":"f746fa1f"},"/docusaurus-json-schema-plugin/docs/demo-viewer/type/singleType-65b":{"__comp":"17896441","content":"c37467e1"},"/docusaurus-json-schema-plugin/docs/demo/viewer-a86":{"__comp":"14eb3368","__props":"22aea3f5"},"/docusaurus-json-schema-plugin/docs/faq-11d":{"__comp":"17896441","content":"ea313555"},"/docusaurus-json-schema-plugin/docs/next-steps-aac":{"__comp":"17896441","content":"ec99730f"},"/docusaurus-json-schema-plugin/docs/quick-start-0de":{"__comp":"17896441","content":"c179f821"},"/docusaurus-json-schema-plugin/-17b":{"__comp":"c4f5d8e4","__context":{"plugin":"a7456010"},"config":"5e9f5e1a"}}')}},e=>{e.O(0,[1869],(()=>{return t=41823,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/assets/js/main.0dbb5983.js.LICENSE.txt b/assets/js/main.c589e2f0.js.LICENSE.txt similarity index 100% rename from assets/js/main.0dbb5983.js.LICENSE.txt rename to assets/js/main.c589e2f0.js.LICENSE.txt diff --git a/assets/js/runtime~main.1e307338.js b/assets/js/runtime~main.1e307338.js deleted file mode 100644 index 29881b6e..00000000 --- a/assets/js/runtime~main.1e307338.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,a,f,c,d,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(f.exports,f,f.exports,r),f.loaded=!0,f.exports}r.m=b,r.amdO={},e=[],r.O=(a,f,c,d)=>{if(!f){var b=1/0;for(i=0;i<e.length;i++){f=e[i][0],c=e[i][1],d=e[i][2];for(var t=!0,o=0;o<f.length;o++)(!1&d||b>=d)&&Object.keys(r.O).every((e=>r.O[e](f[o])))?f.splice(o--,1):(t=!1,d<b&&(b=d));if(t){e.splice(i--,1);var n=c();void 0!==n&&(a=n)}}return a}d=d||0;for(var i=e.length;i>0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[f,c,d]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var d=Object.create(null);r.r(d);var b={};a=a||[null,f({}),f([]),f(f)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(d,b),d},r.d=(e,a)=>{for(var f in a)r.o(a,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,f)=>(r.f[f](e,a),a)),[])),r.u=e=>"assets/js/"+({19:"84361440",36:"d672ff73",81:"08dc474f",151:"03eeee36",180:"0087a340",415:"8e80fdd7",417:"39bae550",947:"af4dc41c",957:"c141421f",983:"4f68d1a6",1011:"ea313555",1060:"09dbd73b",1110:"c179f821",1116:"e5bfc516",1235:"a7456010",1283:"ef99d285",1309:"9028850b",1487:"2cc05f38",1552:"3af02d98",1698:"207c73ba",2076:"common",2138:"1a4e3797",2209:"ec99730f",2539:"dba41c5f",2610:"ffca4553",2634:"c4f5d8e4",2701:"5f0f252d",2726:"4de116f4",2778:"f746fa1f",2837:"a9655ce0",2869:"f45d2610",3120:"808311b0",3177:"0d2bf170",3263:"cd537aaf",3365:"0ce74438",3459:"03b83387",3516:"16bf5a7a",3693:"9a29e754",3829:"dc7a627d",3869:"f149d4e3",4032:"ee47f93d",4198:"22aea3f5",4362:"3d59b95f",4648:"e6818ad2",4893:"73e48de0",4923:"ca1962f0",5150:"a78d2520",5184:"bb96c887",5232:"188a43e1",5271:"d4ff3b58",5533:"b34a7af0",5643:"72a427b3",5650:"2b403dce",5687:"720066b1",5742:"aba21aa0",5771:"9dfa20e1",5821:"247662c2",5887:"c3bb5603",6358:"c7088344",6444:"1e804d56",6969:"14eb3368",6997:"f595544d",7031:"6713985a",7098:"a7bd4aaa",7279:"c37467e1",7368:"ca1c8d76",7808:"8f9be69b",7846:"a998845c",7889:"0446378f",7949:"bf17fbd2",8109:"a9c29fe5",8117:"2bd2a82e",8131:"7f4b4e53",8142:"9a079c62",8263:"f37a108b",8272:"cbc552c0",8288:"93cebb7f",8401:"17896441",8853:"c09ae39f",8947:"2e4a130b",8962:"0ff7d3d9",9048:"a94703ab",9233:"8f884ddd",9352:"0d743cca",9517:"6f77199a",9558:"890ab00c",9617:"25efcfba",9647:"5e95c892",9681:"6c29c54d",9823:"756e0924",9842:"f7f7156a",9873:"5bc82b60",9905:"458927b5"}[e]||e)+"."+{19:"0ca7c38e",36:"7937f7cf",81:"0b6c3eba",151:"c031b8c6",180:"341bc655",277:"6c914fd1",415:"f8f9e441",416:"f27fdde8",417:"0f30ee7c",513:"14a7f581",561:"48569f7e",635:"be581cc4",947:"f3a59d15",957:"bbb6b94e",983:"24839fe2",1011:"2e1048f5",1060:"26436e53",1110:"7a79e1d7",1116:"1ca9ee44",1201:"9c888d9e",1235:"9cd0937f",1250:"db6b6d0f",1283:"ac430606",1309:"b07f37ed",1487:"793ba1f7",1530:"dbd1973d",1552:"d0960fe4",1616:"66ef6670",1698:"1232ea9a",2022:"e33c8b98",2076:"51e9c859",2138:"e8ad5f3a",2186:"f7116936",2209:"620ad730",2237:"6142219e",2304:"3a94fa08",2334:"4408a1c3",2441:"7d1e5dad",2498:"cbe99f99",2499:"23beb064",2532:"c0a38e84",2539:"b1669135",2570:"4c4f9b00",2610:"e635c0c5",2634:"8ba158b4",2701:"c19cf2c0",2726:"fb1d2370",2778:"5d408522",2783:"86bfd54d",2837:"c1051c25",2869:"1469b955",2881:"310bae8e",2910:"e02eeede",3120:"78762568",3177:"de023bbf",3263:"f60955ae",3289:"8f417791",3365:"351fc17d",3459:"9f6a5374",3516:"80dc1ccd",3536:"32196ff4",3563:"f09e1734",3601:"06e593e5",3693:"a83532dc",3829:"c3bc40f4",3839:"2c17c23c",3869:"3d6d7306",3974:"441d0db9",4032:"e63bf468",4082:"a7b862a8",4130:"32ac5f3d",4198:"c2825784",4275:"06c25105",4360:"fcc54484",4362:"ae3a21ad",4369:"534e75ce",4416:"b58309ad",4437:"43cf64f7",4534:"dac79096",4629:"fc8e590a",4648:"d2eaf1f7",4651:"ce916b22",4655:"860ee7ad",4820:"cabe8ab2",4893:"e200c308",4923:"1276d244",5040:"8ed51a9f",5113:"426fe6e9",5150:"27e4d878",5184:"b3bd3d50",5188:"e1ca82fc",5232:"fa5cdf81",5271:"4cef20b0",5274:"2f36e9f9",5465:"2e1fa3d8",5533:"7f862df7",5607:"dd10fd09",5643:"9ee7abaa",5648:"6db048cf",5650:"274a4759",5687:"f47372ce",5741:"f83c249f",5742:"31596dad",5771:"995fc52b",5821:"a7210a5e",5887:"3b0a84de",5951:"78a9ded2",6358:"939fde1f",6368:"bec8d70e",6444:"7fa771bc",6474:"1bf126c2",6546:"203e4d6e",6864:"faea4235",6949:"268f5d16",6969:"4f964236",6997:"2c56ad71",7031:"aaf3c6c8",7082:"22a17154",7095:"f1565304",7098:"c2280aea",7240:"7e16dc7b",7279:"9fbf24db",7368:"cb228c00",7434:"040e144f",7555:"17fcf600",7662:"2ea70956",7669:"1f899902",7808:"d2dd102b",7846:"4a60ce85",7889:"a64ee537",7949:"8da83418",8109:"279dbada",8117:"ad8da8f5",8131:"b5d39312",8142:"3d1859d5",8158:"13bc5547",8180:"868799d8",8187:"329d123d",8210:"78422a1a",8263:"1afad96f",8272:"12b16dc1",8288:"c04117be",8369:"3655c2eb",8401:"70db0a30",8853:"113e08d8",8913:"9f11344a",8947:"9b958a77",8962:"6dc8a7dc",9048:"2841e30a",9086:"7a58fc08",9175:"04d44c3b",9229:"074e6483",9233:"80374dab",9352:"dd7dd8be",9517:"2708583b",9534:"2efa41ac",9558:"f1127092",9567:"3253db89",9569:"07a8bfec",9617:"ec812cad",9621:"dbf83c74",9647:"3b3b4361",9681:"98275556",9823:"b92c5f06",9842:"50ca90cb",9873:"072ca02f",9905:"07d39c0c",9933:"4be159d2"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},d="testsite:",r.l=(e,a,f,b)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var u=n[i];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==d+f){t=u;break}}t||(o=!0,(t=document.createElement("script")).charset="utf-8",t.timeout=120,r.nc&&t.setAttribute("nonce",r.nc),t.setAttribute("data-webpack",d+f),t.src=e),c[e]=[a];var l=(a,f)=>{t.onerror=t.onload=null,clearTimeout(s);var d=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/docusaurus-json-schema-plugin/",r.gca=function(e){return e={17896441:"8401",84361440:"19",d672ff73:"36","08dc474f":"81","03eeee36":"151","0087a340":"180","8e80fdd7":"415","39bae550":"417",af4dc41c:"947",c141421f:"957","4f68d1a6":"983",ea313555:"1011","09dbd73b":"1060",c179f821:"1110",e5bfc516:"1116",a7456010:"1235",ef99d285:"1283","9028850b":"1309","2cc05f38":"1487","3af02d98":"1552","207c73ba":"1698",common:"2076","1a4e3797":"2138",ec99730f:"2209",dba41c5f:"2539",ffca4553:"2610",c4f5d8e4:"2634","5f0f252d":"2701","4de116f4":"2726",f746fa1f:"2778",a9655ce0:"2837",f45d2610:"2869","808311b0":"3120","0d2bf170":"3177",cd537aaf:"3263","0ce74438":"3365","03b83387":"3459","16bf5a7a":"3516","9a29e754":"3693",dc7a627d:"3829",f149d4e3:"3869",ee47f93d:"4032","22aea3f5":"4198","3d59b95f":"4362",e6818ad2:"4648","73e48de0":"4893",ca1962f0:"4923",a78d2520:"5150",bb96c887:"5184","188a43e1":"5232",d4ff3b58:"5271",b34a7af0:"5533","72a427b3":"5643","2b403dce":"5650","720066b1":"5687",aba21aa0:"5742","9dfa20e1":"5771","247662c2":"5821",c3bb5603:"5887",c7088344:"6358","1e804d56":"6444","14eb3368":"6969",f595544d:"6997","6713985a":"7031",a7bd4aaa:"7098",c37467e1:"7279",ca1c8d76:"7368","8f9be69b":"7808",a998845c:"7846","0446378f":"7889",bf17fbd2:"7949",a9c29fe5:"8109","2bd2a82e":"8117","7f4b4e53":"8131","9a079c62":"8142",f37a108b:"8263",cbc552c0:"8272","93cebb7f":"8288",c09ae39f:"8853","2e4a130b":"8947","0ff7d3d9":"8962",a94703ab:"9048","8f884ddd":"9233","0d743cca":"9352","6f77199a":"9517","890ab00c":"9558","25efcfba":"9617","5e95c892":"9647","6c29c54d":"9681","756e0924":"9823",f7f7156a:"9842","5bc82b60":"9873","458927b5":"9905"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,f)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((f,d)=>c=e[a]=[f,d]));f.push(c[2]=d);var b=r.p+r.u(a),t=new Error;r.l(b,(f=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var d=f&&("load"===f.type?"missing":f.type),b=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+b+")",t.name="ChunkLoadError",t.type=d,t.request=b,c[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,f)=>{var c,d,b=f[0],t=f[1],o=f[2],n=0;if(b.some((a=>0!==e[a]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(a&&a(f);n<b.length;n++)d=b[n],r.o(e,d)&&e[d]&&e[d][0](),e[d]=0;return r.O(i)},f=self.webpackChunktestsite=self.webpackChunktestsite||[];f.forEach(a.bind(null,0)),f.push=a.bind(null,f.push.bind(f))})()})(); \ No newline at end of file diff --git a/assets/js/runtime~main.457dcca2.js b/assets/js/runtime~main.457dcca2.js new file mode 100644 index 00000000..357f6e19 --- /dev/null +++ b/assets/js/runtime~main.457dcca2.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,a,f,c,d,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(f.exports,f,f.exports,r),f.loaded=!0,f.exports}r.m=b,r.amdO={},e=[],r.O=(a,f,c,d)=>{if(!f){var b=1/0;for(i=0;i<e.length;i++){f=e[i][0],c=e[i][1],d=e[i][2];for(var t=!0,o=0;o<f.length;o++)(!1&d||b>=d)&&Object.keys(r.O).every((e=>r.O[e](f[o])))?f.splice(o--,1):(t=!1,d<b&&(b=d));if(t){e.splice(i--,1);var n=c();void 0!==n&&(a=n)}}return a}d=d||0;for(var i=e.length;i>0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[f,c,d]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var d=Object.create(null);r.r(d);var b={};a=a||[null,f({}),f([]),f(f)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(d,b),d},r.d=(e,a)=>{for(var f in a)r.o(a,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,f)=>(r.f[f](e,a),a)),[])),r.u=e=>"assets/js/"+({19:"84361440",36:"d672ff73",81:"08dc474f",151:"03eeee36",180:"0087a340",415:"8e80fdd7",417:"39bae550",947:"af4dc41c",957:"c141421f",983:"4f68d1a6",1011:"ea313555",1060:"09dbd73b",1110:"c179f821",1116:"e5bfc516",1235:"a7456010",1283:"ef99d285",1309:"9028850b",1487:"2cc05f38",1552:"3af02d98",1698:"207c73ba",2076:"common",2138:"1a4e3797",2209:"ec99730f",2539:"dba41c5f",2610:"ffca4553",2634:"c4f5d8e4",2701:"5f0f252d",2726:"4de116f4",2778:"f746fa1f",2837:"a9655ce0",2869:"f45d2610",3120:"808311b0",3177:"0d2bf170",3263:"cd537aaf",3365:"0ce74438",3459:"03b83387",3516:"16bf5a7a",3693:"9a29e754",3829:"dc7a627d",3869:"f149d4e3",4032:"ee47f93d",4198:"22aea3f5",4362:"3d59b95f",4648:"e6818ad2",4893:"73e48de0",4923:"ca1962f0",5150:"a78d2520",5184:"bb96c887",5232:"188a43e1",5271:"d4ff3b58",5533:"b34a7af0",5643:"72a427b3",5650:"2b403dce",5687:"720066b1",5742:"aba21aa0",5771:"9dfa20e1",5821:"247662c2",5887:"c3bb5603",6358:"c7088344",6444:"1e804d56",6969:"14eb3368",6997:"f595544d",7031:"6713985a",7098:"a7bd4aaa",7279:"c37467e1",7368:"ca1c8d76",7808:"8f9be69b",7846:"a998845c",7889:"0446378f",7949:"bf17fbd2",8109:"a9c29fe5",8117:"2bd2a82e",8131:"7f4b4e53",8142:"9a079c62",8263:"f37a108b",8272:"cbc552c0",8288:"93cebb7f",8401:"17896441",8853:"c09ae39f",8947:"2e4a130b",8962:"0ff7d3d9",9048:"a94703ab",9233:"8f884ddd",9352:"0d743cca",9517:"6f77199a",9558:"890ab00c",9617:"25efcfba",9647:"5e95c892",9681:"6c29c54d",9823:"756e0924",9842:"f7f7156a",9873:"5bc82b60",9905:"458927b5"}[e]||e)+"."+{19:"af0e0eb2",36:"071a2f87",81:"ae792b63",151:"c031b8c6",180:"341bc655",277:"6c914fd1",415:"b7eab5d2",417:"ca69824c",513:"14a7f581",561:"48569f7e",947:"f3a59d15",957:"bbb6b94e",983:"fb7540a3",1011:"f7c4dfe8",1060:"dbce5616",1110:"ae12719a",1116:"8e52b552",1201:"9c888d9e",1235:"9cd0937f",1250:"db6b6d0f",1283:"bfb1f2e9",1309:"3a6c8c6c",1487:"10c18d9a",1530:"dbd1973d",1552:"fa88bcf6",1616:"66ef6670",1698:"c67b8a95",1809:"372b7f7b",2076:"128e1352",2138:"7604b0c0",2155:"a89f639b",2186:"f7116936",2209:"6a42a16d",2304:"3a94fa08",2334:"4408a1c3",2441:"7d1e5dad",2498:"cbe99f99",2499:"23beb064",2532:"c0a38e84",2539:"3559606f",2570:"4c4f9b00",2610:"e635c0c5",2634:"0cd8d07c",2701:"ed3f2cf3",2726:"af200318",2778:"6da04c81",2783:"86bfd54d",2837:"c7064e79",2869:"abd9037f",2881:"310bae8e",2910:"e02eeede",2953:"b027838e",3042:"6015bfb1",3120:"78762568",3177:"ba8f6a64",3263:"07ce0099",3289:"8f417791",3365:"5c1e34e0",3459:"9f6a5374",3516:"80dc1ccd",3536:"32196ff4",3563:"f09e1734",3596:"47b4fe9a",3601:"06e593e5",3693:"e6470b7f",3829:"20001b91",3839:"2c17c23c",3869:"88f0afee",3974:"441d0db9",4032:"e63bf468",4082:"a7b862a8",4130:"32ac5f3d",4198:"c2825784",4275:"06c25105",4360:"fcc54484",4362:"f88338ea",4369:"534e75ce",4416:"b58309ad",4437:"43cf64f7",4534:"dac79096",4629:"fc8e590a",4648:"ace066b0",4651:"ce916b22",4655:"860ee7ad",4820:"cabe8ab2",4893:"8335d3dc",4923:"3f6e151e",5040:"8ed51a9f",5113:"426fe6e9",5150:"a7de0c0a",5184:"373aa900",5188:"e1ca82fc",5232:"7e973f9f",5271:"13a1f635",5465:"2e1fa3d8",5533:"aababcaf",5607:"dd10fd09",5643:"491e9c53",5648:"6db048cf",5650:"0af21df7",5687:"4d798ac7",5711:"fe71f8f3",5741:"f83c249f",5742:"31596dad",5771:"15a760d4",5821:"6912d122",5887:"c1e207ca",5951:"78a9ded2",6005:"9a1a210c",6358:"abdb46c4",6368:"bec8d70e",6444:"76056651",6474:"1bf126c2",6546:"203e4d6e",6864:"faea4235",6969:"aef7709c",6997:"7084a062",7031:"f57985da",7095:"f1565304",7098:"c379f6a0",7126:"93b83561",7240:"7e16dc7b",7279:"5a06d16f",7368:"8190ae83",7434:"040e144f",7555:"17fcf600",7662:"2ea70956",7669:"1f899902",7808:"8774b9cb",7846:"405e7606",7889:"ef015516",7949:"79b6a006",8109:"279dbada",8117:"ad8da8f5",8131:"b5d39312",8142:"16365c2e",8158:"13bc5547",8180:"868799d8",8210:"78422a1a",8263:"c7a2d85a",8272:"bcbe40c2",8288:"5f889604",8369:"3655c2eb",8401:"7fdc214a",8853:"113e08d8",8913:"9f11344a",8947:"9b958a77",8962:"8865e8c5",9048:"ece806c0",9086:"7a58fc08",9175:"04d44c3b",9233:"4bd8bfb9",9295:"254bd121",9352:"65ae7d51",9517:"5870fc34",9534:"2efa41ac",9558:"06a8344d",9567:"3253db89",9569:"07a8bfec",9617:"3e10cb0c",9621:"dbf83c74",9647:"15b1e4e3",9681:"3614b129",9823:"3c6dfb08",9842:"46e85af6",9873:"9b5992e1",9905:"f29e42f3",9933:"4be159d2"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},d="testsite:",r.l=(e,a,f,b)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var u=n[i];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==d+f){t=u;break}}t||(o=!0,(t=document.createElement("script")).charset="utf-8",t.timeout=120,r.nc&&t.setAttribute("nonce",r.nc),t.setAttribute("data-webpack",d+f),t.src=e),c[e]=[a];var l=(a,f)=>{t.onerror=t.onload=null,clearTimeout(s);var d=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/docusaurus-json-schema-plugin/",r.gca=function(e){return e={17896441:"8401",84361440:"19",d672ff73:"36","08dc474f":"81","03eeee36":"151","0087a340":"180","8e80fdd7":"415","39bae550":"417",af4dc41c:"947",c141421f:"957","4f68d1a6":"983",ea313555:"1011","09dbd73b":"1060",c179f821:"1110",e5bfc516:"1116",a7456010:"1235",ef99d285:"1283","9028850b":"1309","2cc05f38":"1487","3af02d98":"1552","207c73ba":"1698",common:"2076","1a4e3797":"2138",ec99730f:"2209",dba41c5f:"2539",ffca4553:"2610",c4f5d8e4:"2634","5f0f252d":"2701","4de116f4":"2726",f746fa1f:"2778",a9655ce0:"2837",f45d2610:"2869","808311b0":"3120","0d2bf170":"3177",cd537aaf:"3263","0ce74438":"3365","03b83387":"3459","16bf5a7a":"3516","9a29e754":"3693",dc7a627d:"3829",f149d4e3:"3869",ee47f93d:"4032","22aea3f5":"4198","3d59b95f":"4362",e6818ad2:"4648","73e48de0":"4893",ca1962f0:"4923",a78d2520:"5150",bb96c887:"5184","188a43e1":"5232",d4ff3b58:"5271",b34a7af0:"5533","72a427b3":"5643","2b403dce":"5650","720066b1":"5687",aba21aa0:"5742","9dfa20e1":"5771","247662c2":"5821",c3bb5603:"5887",c7088344:"6358","1e804d56":"6444","14eb3368":"6969",f595544d:"6997","6713985a":"7031",a7bd4aaa:"7098",c37467e1:"7279",ca1c8d76:"7368","8f9be69b":"7808",a998845c:"7846","0446378f":"7889",bf17fbd2:"7949",a9c29fe5:"8109","2bd2a82e":"8117","7f4b4e53":"8131","9a079c62":"8142",f37a108b:"8263",cbc552c0:"8272","93cebb7f":"8288",c09ae39f:"8853","2e4a130b":"8947","0ff7d3d9":"8962",a94703ab:"9048","8f884ddd":"9233","0d743cca":"9352","6f77199a":"9517","890ab00c":"9558","25efcfba":"9617","5e95c892":"9647","6c29c54d":"9681","756e0924":"9823",f7f7156a:"9842","5bc82b60":"9873","458927b5":"9905"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,f)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((f,d)=>c=e[a]=[f,d]));f.push(c[2]=d);var b=r.p+r.u(a),t=new Error;r.l(b,(f=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var d=f&&("load"===f.type?"missing":f.type),b=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+b+")",t.name="ChunkLoadError",t.type=d,t.request=b,c[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,f)=>{var c,d,b=f[0],t=f[1],o=f[2],n=0;if(b.some((a=>0!==e[a]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(a&&a(f);n<b.length;n++)d=b[n],r.o(e,d)&&e[d]&&e[d][0](),e[d]=0;return r.O(i)},f=self.webpackChunktestsite=self.webpackChunktestsite||[];f.forEach(a.bind(null,0)),f.push=a.bind(null,f.push.bind(f))})()})(); \ No newline at end of file diff --git a/boxFileSchema.html b/boxFileSchema.html index d20bd262..84924126 100644 --- a/boxFileSchema.html +++ b/boxFileSchema.html @@ -2,10 +2,10 @@ <html lang="en" dir="ltr" class="plugin-pages plugin-id-default" data-has-hydrated="false"> <head> <meta charset="UTF-8"> -<meta name="generator" content="Docusaurus v3.6.3"> +<meta name="generator" content="Docusaurus v3.7.0"> <title data-rh="true">Box File JSON Schema | Docusaurus JSON Schema Plugin - - + +
    Loading...
    diff --git a/docs/api.html b/docs/api.html index 02ac91a3..2e7eb009 100644 --- a/docs/api.html +++ b/docs/api.html @@ -2,10 +2,10 @@ - + 📖 API Reference | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/api/JSONSchemaEditor.html b/docs/api/JSONSchemaEditor.html index 61cfea46..4e1a6f8f 100644 --- a/docs/api/JSONSchemaEditor.html +++ b/docs/api/JSONSchemaEditor.html @@ -2,10 +2,10 @@ - + ✏️ @theme/JSONSchemaEditor | Docusaurus JSON Schema Plugin - - + +

    ✏️ @theme/JSONSchemaEditor

    Configuration

    diff --git a/docs/api/JSONSchemaViewer.html b/docs/api/JSONSchemaViewer.html index 2fced37f..2c2a23a1 100644 --- a/docs/api/JSONSchemaViewer.html +++ b/docs/api/JSONSchemaViewer.html @@ -2,10 +2,10 @@ - + 🔎 @theme/JSONSchemaViewer | Docusaurus JSON Schema Plugin - - + +

    🔎 @theme/JSONSchemaViewer

    Configuration

    diff --git a/docs/api/MonacoEditor.html b/docs/api/MonacoEditor.html index b974b0f5..0243b1fe 100644 --- a/docs/api/MonacoEditor.html +++ b/docs/api/MonacoEditor.html @@ -2,10 +2,10 @@ - + 🔧 @theme/MonacoEditor | Docusaurus JSON Schema Plugin - - + +

    🔧 @theme/MonacoEditor

    Configuration

    diff --git a/docs/api/config.html b/docs/api/config.html index 27234ce6..f0b28412 100644 --- a/docs/api/config.html +++ b/docs/api/config.html @@ -2,10 +2,10 @@ - + ⚙️ Theme Configuration | Docusaurus JSON Schema Plugin - - + +

    ⚙️ Theme Configuration

    Configuration

    diff --git a/docs/category/-array.html b/docs/category/-array.html index 0faefaa1..afde6010 100644 --- a/docs/category/-array.html +++ b/docs/category/-array.html @@ -2,10 +2,10 @@ - + 📚 Array showcases | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/category/-generic-keywords.html b/docs/category/-generic-keywords.html index e4ceb783..cd075641 100644 --- a/docs/category/-generic-keywords.html +++ b/docs/category/-generic-keywords.html @@ -2,10 +2,10 @@ - + 🧬 Generic keywords showcases | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/category/-numeric.html b/docs/category/-numeric.html index 811b70a3..9e8b0f9b 100644 --- a/docs/category/-numeric.html +++ b/docs/category/-numeric.html @@ -2,10 +2,10 @@ - + 🔢 Numeric showcases | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/category/-object.html b/docs/category/-object.html index 7eb60c3e..9ded8863 100644 --- a/docs/category/-object.html +++ b/docs/category/-object.html @@ -2,10 +2,10 @@ - + 📦 Object showcases | Docusaurus JSON Schema Plugin - - + +
    diff --git a/docs/category/-references.html b/docs/category/-references.html index 646b10ce..aa7609ad 100644 --- a/docs/category/-references.html +++ b/docs/category/-references.html @@ -2,10 +2,10 @@ - + 📎 References showcases | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/category/-schema-composition.html b/docs/category/-schema-composition.html index 8354e847..33b78dd1 100644 --- a/docs/category/-schema-composition.html +++ b/docs/category/-schema-composition.html @@ -2,10 +2,10 @@ - + 🧱 Schema composition showcases | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/category/-schema-conditionally.html b/docs/category/-schema-conditionally.html index 23e76ad5..c0834ce8 100644 --- a/docs/category/-schema-conditionally.html +++ b/docs/category/-schema-conditionally.html @@ -2,10 +2,10 @@ - + 🚦 Schema conditionally showcases | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/category/-string.html b/docs/category/-string.html index e7eed1d8..e5917a89 100644 --- a/docs/category/-string.html +++ b/docs/category/-string.html @@ -2,10 +2,10 @@ - + 🧵 String showcases | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/category/-type.html b/docs/category/-type.html index 947d64ea..591f24b6 100644 --- a/docs/category/-type.html +++ b/docs/category/-type.html @@ -2,10 +2,10 @@ - + 🎭 Type showcases | Docusaurus JSON Schema Plugin - - + + diff --git "a/docs/category/\357\270\217-customizations.html" "b/docs/category/\357\270\217-customizations.html" index f06e1c71..a4a94cd2 100644 --- "a/docs/category/\357\270\217-customizations.html" +++ "b/docs/category/\357\270\217-customizations.html" @@ -2,10 +2,10 @@ - + 🛠️ Customizations showcases | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/contributing.html b/docs/contributing.html index 2555a6ba..59e14c51 100644 --- a/docs/contributing.html +++ b/docs/contributing.html @@ -2,10 +2,10 @@ - + 🧩 Contributing | Docusaurus JSON Schema Plugin - - + +

    🧩 Contributing

    Since project is completly open source, any kind of contribution is welcome and highly appreciated.

    diff --git a/docs/demo-viewer/array/additionalItems1.html b/docs/demo-viewer/array/additionalItems1.html index 32958c28..aa21e00a 100644 --- a/docs/demo-viewer/array/additionalItems1.html +++ b/docs/demo-viewer/array/additionalItems1.html @@ -2,10 +2,10 @@ - + ❌ AdditionalItems (1) | Docusaurus JSON Schema Plugin - - + +

    AdditionalItems (1)

    diff --git a/docs/demo-viewer/array/additionalItems2.html b/docs/demo-viewer/array/additionalItems2.html index 0f917d90..30b82021 100644 --- a/docs/demo-viewer/array/additionalItems2.html +++ b/docs/demo-viewer/array/additionalItems2.html @@ -2,10 +2,10 @@ - + ➕ AdditionalItems (2) | Docusaurus JSON Schema Plugin - - + +

    AdditionalItems (2)

    diff --git a/docs/demo-viewer/array/contains.html b/docs/demo-viewer/array/contains.html index efaad13c..7d790dc0 100644 --- a/docs/demo-viewer/array/contains.html +++ b/docs/demo-viewer/array/contains.html @@ -2,10 +2,10 @@ - + 🍱 Contains | Docusaurus JSON Schema Plugin - - + +

    Contains

    diff --git a/docs/demo-viewer/array/items.html b/docs/demo-viewer/array/items.html index cabe9358..25583609 100644 --- a/docs/demo-viewer/array/items.html +++ b/docs/demo-viewer/array/items.html @@ -2,10 +2,10 @@ - + 🛍️ Items | Docusaurus JSON Schema Plugin - - + +

    Items

    diff --git a/docs/demo-viewer/array/length.html b/docs/demo-viewer/array/length.html index 5adecc2d..5f4e336e 100644 --- a/docs/demo-viewer/array/length.html +++ b/docs/demo-viewer/array/length.html @@ -2,10 +2,10 @@ - + 📐 Length | Docusaurus JSON Schema Plugin - - + +

    Length

    diff --git a/docs/demo-viewer/array/minContainsAndMaxContains.html b/docs/demo-viewer/array/minContainsAndMaxContains.html index f70f794a..00d84a91 100644 --- a/docs/demo-viewer/array/minContainsAndMaxContains.html +++ b/docs/demo-viewer/array/minContainsAndMaxContains.html @@ -2,10 +2,10 @@ - + 📊 minContains & maxContains | Docusaurus JSON Schema Plugin - - + +

    minContains & maxContains

    diff --git a/docs/demo-viewer/array/simple.html b/docs/demo-viewer/array/simple.html index ff15c738..9af5c11c 100644 --- a/docs/demo-viewer/array/simple.html +++ b/docs/demo-viewer/array/simple.html @@ -2,10 +2,10 @@ - + 🟦 Simple | Docusaurus JSON Schema Plugin - - + +

    Simple

    diff --git a/docs/demo-viewer/array/tuples.html b/docs/demo-viewer/array/tuples.html index acdb940c..d48349e8 100644 --- a/docs/demo-viewer/array/tuples.html +++ b/docs/demo-viewer/array/tuples.html @@ -2,10 +2,10 @@ - + 📋 Tuples | Docusaurus JSON Schema Plugin - - + +

    Tuples

    diff --git a/docs/demo-viewer/array/unevaluatedItems1.html b/docs/demo-viewer/array/unevaluatedItems1.html index 612ef59c..37b80f72 100644 --- a/docs/demo-viewer/array/unevaluatedItems1.html +++ b/docs/demo-viewer/array/unevaluatedItems1.html @@ -2,10 +2,10 @@ - + 🤔 UnevaluatedItems (1) | Docusaurus JSON Schema Plugin - - + +

    UnevaluatedItems (1)

    diff --git a/docs/demo-viewer/array/unevaluatedItems2.html b/docs/demo-viewer/array/unevaluatedItems2.html index cfbb4f3e..d37fa904 100644 --- a/docs/demo-viewer/array/unevaluatedItems2.html +++ b/docs/demo-viewer/array/unevaluatedItems2.html @@ -2,10 +2,10 @@ - + 📋 UnevaluatedItems (2) | Docusaurus JSON Schema Plugin - - + +

    UnevaluatedItems (2)

    diff --git a/docs/demo-viewer/array/uniqueItems.html b/docs/demo-viewer/array/uniqueItems.html index 7f0e5080..06d4acf8 100644 --- a/docs/demo-viewer/array/uniqueItems.html +++ b/docs/demo-viewer/array/uniqueItems.html @@ -2,10 +2,10 @@ - + 🦄 Unique items | Docusaurus JSON Schema Plugin - - + +

    Unique items

    diff --git a/docs/demo-viewer/boolean.html b/docs/demo-viewer/boolean.html index 12d09691..df480422 100644 --- a/docs/demo-viewer/boolean.html +++ b/docs/demo-viewer/boolean.html @@ -2,10 +2,10 @@ - + ✅ Boolean | Docusaurus JSON Schema Plugin - - + +

    Boolean

    diff --git a/docs/demo-viewer/custom/description.html b/docs/demo-viewer/custom/description.html index 0c8a319b..ab8b9b97 100644 --- a/docs/demo-viewer/custom/description.html +++ b/docs/demo-viewer/custom/description.html @@ -2,10 +2,10 @@ - + 📋 Custom description Component | Docusaurus JSON Schema Plugin - - + +

    Custom description Component

    diff --git a/docs/demo-viewer/custom/unsolved_refs.html b/docs/demo-viewer/custom/unsolved_refs.html index c96e230c..5dadbb34 100644 --- a/docs/demo-viewer/custom/unsolved_refs.html +++ b/docs/demo-viewer/custom/unsolved_refs.html @@ -2,10 +2,10 @@ - + ⚠️ Custom Unresolved Refs Component | Docusaurus JSON Schema Plugin - - + +

    Custom Unresolved Refs Component

    diff --git a/docs/demo-viewer/custom/values.html b/docs/demo-viewer/custom/values.html index 2ccb8960..38ba4b3a 100644 --- a/docs/demo-viewer/custom/values.html +++ b/docs/demo-viewer/custom/values.html @@ -2,10 +2,10 @@ - + 🎨 Custom value Component | Docusaurus JSON Schema Plugin - - + +

    Custom value component

    diff --git a/docs/demo-viewer/generic_keywords/annotations.html b/docs/demo-viewer/generic_keywords/annotations.html index b3f715c3..40be879c 100644 --- a/docs/demo-viewer/generic_keywords/annotations.html +++ b/docs/demo-viewer/generic_keywords/annotations.html @@ -2,10 +2,10 @@ - + 📌 Annotations | Docusaurus JSON Schema Plugin - - + +

    Annotations

    diff --git a/docs/demo-viewer/generic_keywords/const.html b/docs/demo-viewer/generic_keywords/const.html index c4dd2ff6..2ae06bee 100644 --- a/docs/demo-viewer/generic_keywords/const.html +++ b/docs/demo-viewer/generic_keywords/const.html @@ -2,10 +2,10 @@ - + 🧊 Const | Docusaurus JSON Schema Plugin - - + +

    Const

    diff --git a/docs/demo-viewer/generic_keywords/enum.html b/docs/demo-viewer/generic_keywords/enum.html index c3fc0500..08559e8c 100644 --- a/docs/demo-viewer/generic_keywords/enum.html +++ b/docs/demo-viewer/generic_keywords/enum.html @@ -2,10 +2,10 @@ - + 🔒 Enum | Docusaurus JSON Schema Plugin - - + +

    Enum

    diff --git a/docs/demo-viewer/null.html b/docs/demo-viewer/null.html index d0cd675d..7288033b 100644 --- a/docs/demo-viewer/null.html +++ b/docs/demo-viewer/null.html @@ -2,10 +2,10 @@ - + 🕳️ Null | Docusaurus JSON Schema Plugin - - + +

    Null

    diff --git a/docs/demo-viewer/numeric/integer.html b/docs/demo-viewer/numeric/integer.html index 2ecd98c7..4a81f317 100644 --- a/docs/demo-viewer/numeric/integer.html +++ b/docs/demo-viewer/numeric/integer.html @@ -2,10 +2,10 @@ - + 1️⃣ Integer | Docusaurus JSON Schema Plugin - - + +

    Integer

    diff --git a/docs/demo-viewer/numeric/multipleOf.html b/docs/demo-viewer/numeric/multipleOf.html index 456db784..4d8ac51c 100644 --- a/docs/demo-viewer/numeric/multipleOf.html +++ b/docs/demo-viewer/numeric/multipleOf.html @@ -2,10 +2,10 @@ - + ✖️ Multiple Of | Docusaurus JSON Schema Plugin - - + +

    Multiple Of

    diff --git a/docs/demo-viewer/numeric/number.html b/docs/demo-viewer/numeric/number.html index a4f7d9a3..36312552 100644 --- a/docs/demo-viewer/numeric/number.html +++ b/docs/demo-viewer/numeric/number.html @@ -2,10 +2,10 @@ - + 🔢 Number | Docusaurus JSON Schema Plugin - - + +

    Number

    diff --git a/docs/demo-viewer/numeric/ranges.html b/docs/demo-viewer/numeric/ranges.html index dfe50e6e..c4b55fe6 100644 --- a/docs/demo-viewer/numeric/ranges.html +++ b/docs/demo-viewer/numeric/ranges.html @@ -2,10 +2,10 @@ - + 🌡️ Ranges | Docusaurus JSON Schema Plugin - - + +

    Ranges

    diff --git a/docs/demo-viewer/object/additionalProperties.html b/docs/demo-viewer/object/additionalProperties.html index 47ac7cdb..d48216ca 100644 --- a/docs/demo-viewer/object/additionalProperties.html +++ b/docs/demo-viewer/object/additionalProperties.html @@ -2,10 +2,10 @@ - + 🗝️ AdditionalProperties (1) | Docusaurus JSON Schema Plugin - - + +

    AdditionalProperties (1)

    diff --git a/docs/demo-viewer/object/additionalProperties2.html b/docs/demo-viewer/object/additionalProperties2.html index 23aa5c64..e0eaad72 100644 --- a/docs/demo-viewer/object/additionalProperties2.html +++ b/docs/demo-viewer/object/additionalProperties2.html @@ -2,10 +2,10 @@ - + 🛠️ AdditionalProperties (2) | Docusaurus JSON Schema Plugin - - + +

    AdditionalProperties (2)

    diff --git a/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.html b/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.html index f1d2006f..ff3d70b6 100644 --- a/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.html +++ b/docs/demo-viewer/object/additionalPropertiesWithPatternProperties.html @@ -2,10 +2,10 @@ - + 🌈 AdditionalProperties with patternProperties | Docusaurus JSON Schema Plugin - - + +

    AdditionalProperties with patternProperties

    diff --git a/docs/demo-viewer/object/patternProperties.html b/docs/demo-viewer/object/patternProperties.html index 5563606e..19d4e9f9 100644 --- a/docs/demo-viewer/object/patternProperties.html +++ b/docs/demo-viewer/object/patternProperties.html @@ -2,10 +2,10 @@ - + 🎨 PatternProperties | Docusaurus JSON Schema Plugin - - + +

    PatternProperties

    diff --git a/docs/demo-viewer/object/properties.html b/docs/demo-viewer/object/properties.html index ff45112a..0e341af6 100644 --- a/docs/demo-viewer/object/properties.html +++ b/docs/demo-viewer/object/properties.html @@ -2,10 +2,10 @@ - + 📝 Properties | Docusaurus JSON Schema Plugin - - + +

    Properties

    diff --git a/docs/demo-viewer/object/propertyNames.html b/docs/demo-viewer/object/propertyNames.html index 0c100ecf..433d4ad5 100644 --- a/docs/demo-viewer/object/propertyNames.html +++ b/docs/demo-viewer/object/propertyNames.html @@ -2,10 +2,10 @@ - + 🏷️ PropertyNames | Docusaurus JSON Schema Plugin - - + +

    PropertyNames

    diff --git a/docs/demo-viewer/object/required.html b/docs/demo-viewer/object/required.html index 621b8393..b6d87d38 100644 --- a/docs/demo-viewer/object/required.html +++ b/docs/demo-viewer/object/required.html @@ -2,10 +2,10 @@ - + 🔴 Required | Docusaurus JSON Schema Plugin - - + +

    Required

    diff --git a/docs/demo-viewer/object/simpleObject.html b/docs/demo-viewer/object/simpleObject.html index 472b3017..c40dc511 100644 --- a/docs/demo-viewer/object/simpleObject.html +++ b/docs/demo-viewer/object/simpleObject.html @@ -2,10 +2,10 @@ - + 🟦 Simple | Docusaurus JSON Schema Plugin - - + +

    Simple

    diff --git a/docs/demo-viewer/object/size.html b/docs/demo-viewer/object/size.html index fb42313a..5338f2d0 100644 --- a/docs/demo-viewer/object/size.html +++ b/docs/demo-viewer/object/size.html @@ -2,10 +2,10 @@ - + 📏 Size | Docusaurus JSON Schema Plugin - - + +

    Size

    diff --git a/docs/demo-viewer/object/unevaluatedProperties1.html b/docs/demo-viewer/object/unevaluatedProperties1.html index 574ae9a2..166f25c1 100644 --- a/docs/demo-viewer/object/unevaluatedProperties1.html +++ b/docs/demo-viewer/object/unevaluatedProperties1.html @@ -2,10 +2,10 @@ - + 🧐 UnevaluatedProperties (1) | Docusaurus JSON Schema Plugin - - + +

    UnevaluatedProperties (1)

    diff --git a/docs/demo-viewer/object/unevaluatedProperties2.html b/docs/demo-viewer/object/unevaluatedProperties2.html index f3bbdeea..d48de150 100644 --- a/docs/demo-viewer/object/unevaluatedProperties2.html +++ b/docs/demo-viewer/object/unevaluatedProperties2.html @@ -2,10 +2,10 @@ - + 🕵️‍♀️ UnevaluatedProperties (2) | Docusaurus JSON Schema Plugin - - + +

    UnevaluatedProperties (2)

    diff --git a/docs/demo-viewer/refs/localFile.html b/docs/demo-viewer/refs/localFile.html index bf0e58e8..81216209 100644 --- a/docs/demo-viewer/refs/localFile.html +++ b/docs/demo-viewer/refs/localFile.html @@ -2,10 +2,10 @@ - + 📁$ref (as local file) | Docusaurus JSON Schema Plugin - - + +

    $ref (as local file)

    diff --git a/docs/demo-viewer/refs/ref.html b/docs/demo-viewer/refs/ref.html index 79bf530f..70149f1d 100644 --- a/docs/demo-viewer/refs/ref.html +++ b/docs/demo-viewer/refs/ref.html @@ -2,10 +2,10 @@ - + 💡 $ref (inline) | Docusaurus JSON Schema Plugin - - + +

    $ref

    diff --git a/docs/demo-viewer/refs/remoteFile.html b/docs/demo-viewer/refs/remoteFile.html index a726d177..cdd049a2 100644 --- a/docs/demo-viewer/refs/remoteFile.html +++ b/docs/demo-viewer/refs/remoteFile.html @@ -2,10 +2,10 @@ - + 🌐 $ref (as remote file) | Docusaurus JSON Schema Plugin - - + +

    $ref (as local file)

    diff --git a/docs/demo-viewer/schema_composition/allOf.html b/docs/demo-viewer/schema_composition/allOf.html index e4bbfd39..92555140 100644 --- a/docs/demo-viewer/schema_composition/allOf.html +++ b/docs/demo-viewer/schema_composition/allOf.html @@ -2,10 +2,10 @@ - + 🤝 allOf | Docusaurus JSON Schema Plugin - - + +

    allOf

    diff --git a/docs/demo-viewer/schema_composition/anyOf.html b/docs/demo-viewer/schema_composition/anyOf.html index c03f295a..75246f87 100644 --- a/docs/demo-viewer/schema_composition/anyOf.html +++ b/docs/demo-viewer/schema_composition/anyOf.html @@ -2,10 +2,10 @@ - + 🌐 anyOf | Docusaurus JSON Schema Plugin - - + +

    anyOf

    diff --git a/docs/demo-viewer/schema_composition/not.html b/docs/demo-viewer/schema_composition/not.html index 2e15b6fd..d9301d9b 100644 --- a/docs/demo-viewer/schema_composition/not.html +++ b/docs/demo-viewer/schema_composition/not.html @@ -2,10 +2,10 @@ - + 🚫 not | Docusaurus JSON Schema Plugin - - + +

    not

    diff --git a/docs/demo-viewer/schema_composition/oneOf.html b/docs/demo-viewer/schema_composition/oneOf.html index 91b503dc..8c273ce2 100644 --- a/docs/demo-viewer/schema_composition/oneOf.html +++ b/docs/demo-viewer/schema_composition/oneOf.html @@ -2,10 +2,10 @@ - + 🎯 oneOf | Docusaurus JSON Schema Plugin - - + +

    oneOf

    diff --git a/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.html b/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.html index 995dbd2d..9edf340c 100644 --- a/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.html +++ b/docs/demo-viewer/schema_conditionally/dependencies_dependentRequired.html @@ -2,10 +2,10 @@ - + 🤞 dependencies (dependentRequired) | Docusaurus JSON Schema Plugin - - + +

    dependencies (dependentRequired)

    diff --git a/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.html b/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.html index bbe12f74..72d3c9bc 100644 --- a/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.html +++ b/docs/demo-viewer/schema_conditionally/dependencies_dependentSchemas.html @@ -2,10 +2,10 @@ - + 🌳 dependencies (dependentSchemas) | Docusaurus JSON Schema Plugin - - + +

    dependencies (dependentSchemas)

    diff --git a/docs/demo-viewer/schema_conditionally/dependentRequired.html b/docs/demo-viewer/schema_conditionally/dependentRequired.html index 3ecfc891..8fcbd34c 100644 --- a/docs/demo-viewer/schema_conditionally/dependentRequired.html +++ b/docs/demo-viewer/schema_conditionally/dependentRequired.html @@ -2,10 +2,10 @@ - + 🔑 dependentRequired | Docusaurus JSON Schema Plugin - - + +

    dependentRequired

    diff --git a/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.html b/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.html index 4add3bdf..9165775d 100644 --- a/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.html +++ b/docs/demo-viewer/schema_conditionally/dependentRequired_bidirectional.html @@ -2,10 +2,10 @@ - + 🔁 dependentRequired (bidirectional) | Docusaurus JSON Schema Plugin - - + +

    dependentRequired (bidirectional)

    diff --git a/docs/demo-viewer/schema_conditionally/dependentSchemas.html b/docs/demo-viewer/schema_conditionally/dependentSchemas.html index 852624c3..a6b6515d 100644 --- a/docs/demo-viewer/schema_conditionally/dependentSchemas.html +++ b/docs/demo-viewer/schema_conditionally/dependentSchemas.html @@ -2,10 +2,10 @@ - + 🏗️ dependentSchemas | Docusaurus JSON Schema Plugin - - + +

    dependentSchemas

    diff --git a/docs/demo-viewer/schema_conditionally/if-then-else.html b/docs/demo-viewer/schema_conditionally/if-then-else.html index d970e5bc..18930fbe 100644 --- a/docs/demo-viewer/schema_conditionally/if-then-else.html +++ b/docs/demo-viewer/schema_conditionally/if-then-else.html @@ -2,10 +2,10 @@ - + 🎬 If-Then-Else | Docusaurus JSON Schema Plugin - - + +

    If-Then-Else

    diff --git a/docs/demo-viewer/schema_conditionally/if-then-else_multiple.html b/docs/demo-viewer/schema_conditionally/if-then-else_multiple.html index 8a313e3c..7b967819 100644 --- a/docs/demo-viewer/schema_conditionally/if-then-else_multiple.html +++ b/docs/demo-viewer/schema_conditionally/if-then-else_multiple.html @@ -2,10 +2,10 @@ - + 🔀 If-Then-Else (multiple) | Docusaurus JSON Schema Plugin - - + +

    If-Then-Else (multiple)

    diff --git a/docs/demo-viewer/string/contentEncoding.html b/docs/demo-viewer/string/contentEncoding.html index 07140ffd..14ce7ba1 100644 --- a/docs/demo-viewer/string/contentEncoding.html +++ b/docs/demo-viewer/string/contentEncoding.html @@ -2,10 +2,10 @@ - + 📜 ContentEncoding | Docusaurus JSON Schema Plugin - - + +

    ContentEncoding

    diff --git a/docs/demo-viewer/string/contentEncodingWithContentMediaType.html b/docs/demo-viewer/string/contentEncodingWithContentMediaType.html index e513a2c2..b3a24fdd 100644 --- a/docs/demo-viewer/string/contentEncodingWithContentMediaType.html +++ b/docs/demo-viewer/string/contentEncodingWithContentMediaType.html @@ -2,10 +2,10 @@ - + 📄 ContentEncoding & ContentMediaType | Docusaurus JSON Schema Plugin - - + +

    ContentEncoding & ContentMediaType

    diff --git a/docs/demo-viewer/string/contentMediaType.html b/docs/demo-viewer/string/contentMediaType.html index bf2668a5..c7bf731b 100644 --- a/docs/demo-viewer/string/contentMediaType.html +++ b/docs/demo-viewer/string/contentMediaType.html @@ -2,10 +2,10 @@ - + 🔖 ContentMediaType | Docusaurus JSON Schema Plugin - - + +

    ContentMediaType

    diff --git a/docs/demo-viewer/string/contentSchema.html b/docs/demo-viewer/string/contentSchema.html index f8b528fb..9761825b 100644 --- a/docs/demo-viewer/string/contentSchema.html +++ b/docs/demo-viewer/string/contentSchema.html @@ -2,10 +2,10 @@ - + 📑 ContentSchema | Docusaurus JSON Schema Plugin - - + +

    ContentSchema

    diff --git a/docs/demo-viewer/string/format.html b/docs/demo-viewer/string/format.html index a33533dd..cb570506 100644 --- a/docs/demo-viewer/string/format.html +++ b/docs/demo-viewer/string/format.html @@ -2,10 +2,10 @@ - + 📅 Format | Docusaurus JSON Schema Plugin - - + +

    Format

    diff --git a/docs/demo-viewer/string/length.html b/docs/demo-viewer/string/length.html index 7746051b..2fed9608 100644 --- a/docs/demo-viewer/string/length.html +++ b/docs/demo-viewer/string/length.html @@ -2,10 +2,10 @@ - + 📏 Length | Docusaurus JSON Schema Plugin - - + +

    Length

    diff --git a/docs/demo-viewer/string/pattern.html b/docs/demo-viewer/string/pattern.html index 84daa48c..3e61195b 100644 --- a/docs/demo-viewer/string/pattern.html +++ b/docs/demo-viewer/string/pattern.html @@ -2,10 +2,10 @@ - + 🔮 Pattern | Docusaurus JSON Schema Plugin - - + +

    Pattern

    diff --git a/docs/demo-viewer/string/simple.html b/docs/demo-viewer/string/simple.html index 48c7eacb..fc241488 100644 --- a/docs/demo-viewer/string/simple.html +++ b/docs/demo-viewer/string/simple.html @@ -2,10 +2,10 @@ - + 🟦 Basic | Docusaurus JSON Schema Plugin - - + +

    Basic

    diff --git a/docs/demo-viewer/type/multipleType.html b/docs/demo-viewer/type/multipleType.html index 87a6ade7..7f5ea03a 100644 --- a/docs/demo-viewer/type/multipleType.html +++ b/docs/demo-viewer/type/multipleType.html @@ -2,10 +2,10 @@ - + 🐾 Multiple types | Docusaurus JSON Schema Plugin - - + +

    Multiple types

    diff --git a/docs/demo-viewer/type/singleType.html b/docs/demo-viewer/type/singleType.html index 5e7c7a35..6546d1f9 100644 --- a/docs/demo-viewer/type/singleType.html +++ b/docs/demo-viewer/type/singleType.html @@ -2,10 +2,10 @@ - + 🌟 Single type | Docusaurus JSON Schema Plugin - - + +

    Single type

    diff --git a/docs/demo.html b/docs/demo.html index a725d31a..989589ef 100644 --- a/docs/demo.html +++ b/docs/demo.html @@ -2,10 +2,10 @@ - + 💡 Showcases of the theme plugin | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/demo/viewer.html b/docs/demo/viewer.html index 8ce57c0b..b0344be0 100644 --- a/docs/demo/viewer.html +++ b/docs/demo/viewer.html @@ -2,10 +2,10 @@ - + 🔎 JSON Schema Viewer showcases | Docusaurus JSON Schema Plugin - - + + diff --git a/docs/faq.html b/docs/faq.html index da68c111..ae2ed88b 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -2,10 +2,10 @@ - + ❓ FAQ | Docusaurus JSON Schema Plugin - - + +

    ❓ FAQ

    diff --git a/docs/next-steps.html b/docs/next-steps.html index fb28c790..1d5d4a90 100644 --- a/docs/next-steps.html +++ b/docs/next-steps.html @@ -2,10 +2,10 @@ - + 🚧 Roadmap | Docusaurus JSON Schema Plugin - - + +

    🚧 Roadmap

    Unsupported JSON Schema features in JSONSchemaViewer

    diff --git a/docs/quick-start.html b/docs/quick-start.html index 4c2997ad..36d76a1a 100644 --- a/docs/quick-start.html +++ b/docs/quick-start.html @@ -2,10 +2,10 @@ - + ⚡ Quick Start | Docusaurus JSON Schema Plugin - - + +

    ⚡ Quick Start

    diff --git a/index.html b/index.html index adec7cbd..bf67fe71 100644 --- a/index.html +++ b/index.html @@ -2,10 +2,10 @@ - + Hello from Docusaurus JSON Schema Plugin | Docusaurus JSON Schema Plugin - - + +

    Docusaurus JSON Schema Plugin

    JSON Schema plugin viewer / editor in Docusaurus

    JSON Schema Viewer / Editor

    JSON Schema Viewer / Editor

    Explore your JSON Schema directly from your Docusaurus website.

    Configurable

    Configurable

    Internationalization, Theme-able (as follow Infima styling framework that powers the Docusaurus UI), ...

    Open source

    Open source

    Want to improve this plugin ? We welcome your contributions !

    diff --git a/playground.html b/playground.html index 050915a3..b512f226 100644 --- a/playground.html +++ b/playground.html @@ -2,10 +2,10 @@ - + Playground | Docusaurus JSON Schema Plugin - - + +
    Loading...
    diff --git a/search.html b/search.html index 19b2e4ea..f9b50a40 100644 --- a/search.html +++ b/search.html @@ -2,12 +2,12 @@ - + Search the documentation | Docusaurus JSON Schema Plugin - - + + -

    Search the documentation

    +

    Search the documentation

    \ No newline at end of file